Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
This should fix compatibility with the Go 1.12 stdlib:
https://github.com/tinygo-org/tinygo/issues/368
|
|
Signed-off-by: Ron Evans <[email protected]>
|
|
Signed-off-by: Ron Evans <[email protected]>
|
|
Signed-off-by: Ron Evans <[email protected]>
|
|
comparison code
Signed-off-by: Ron Evans <[email protected]>
|
|
This also updates the LLVM build to include this commit:
https://github.com/llvm-mirror/llvm/commit/d519e424c503d2d2a723284664a509a6cd5401a8
|
|
|
|
Rename panic functions to be runtime.nilPanic, runtime.lookupPanic, and
runtime.slicePanic.
|
|
Signed-off-by: Ron Evans <[email protected]>
|
|
|
|
|
|
|
|
See the following bugs for more information:
https://bugs.llvm.org/show_bug.cgi?id=41508
https://bugs.llvm.org/show_bug.cgi?id=37064
|
|
This avoids the need to correctly set $PATH if LLVM 8 has been installed
using Homebrew.
|
|
Signed-off-by: Ron Evans <[email protected]>
|
|
Signed-off-by: Ron Evans <[email protected]>
|
|
|
|
strings.IndexByte was implemented in the runtime up to Go 1.11. It is
implemented using a direct call to internal/bytealg.IndexByte since Go
1.12.
Make sure we remain compatible with both.
|
|
|
|
|
|
|
|
This makes it easier to run smoke tests locally.
|
|
|
|
The IR builder does not appear to fold comparisons of constant inttoptr
instructions to const null pointer. So do it manually during
interpretatin, as a somewhat ugly hack.
This fixes https://github.com/tinygo-org/tinygo/issues/363
|
|
Previously, there was a suble error in that .IsConstant() is not always
allowed to be called, resulting in a i1 that was not 0 or 1. Fix this by
checking for the constants directly and adding some more diagnostics to
catch more cases.
|
|
Signed-off-by: Ron Evans <[email protected]>
|
|
Add required files for vgo support. The new vgo system defaults to on
since Go 1.13 so we should be prepared for that once the release hits.
It is also useful for testing Go 1.13 before the release.
|
|
This is very useful for debugging. It differentiates between a stack
overflow and other errors (because it's easy to see when a stack
overflow occurs) and prints the old stack pointer and program counter if
available.
|
|
Make sure all allocas are created in the entry block and are given the
right lifetimes. This is good for code quality:
* Moving allocas to the entry block makes sure they are always
allocated statically (avoiding the need for a frame pointer) and do
not grow the stack on each new alloca instruction. This is
especially useful in loops where it could otherwise lead to a stack
overflow even though there is no recursion.
* Adding lifetime markers allows LLVM to reuse stack areas for
different allocas as long as their lifetimes do not overlap.
All in all, this reduces code size in all tested cases for the BBC
micro:bit, and reduces code size for most cases for WebAssembly.
|
|
Signed-off-by: Ron Evans <[email protected]>
|
|
interface
Signed-off-by: Ron Evans <[email protected]>
|
|
* Add Feather M0 Board
|
|
During a scan, consider loads from dirty globals to be dirty and check
whether they have any local side effects.
This fixes a problem with the new volatile operations that are now in
methods on registers instead of being emitted inline as volatile
instructions.
|
|
Pointers to globals are never nil.
|
|
Types used in a program may not be implemented. Print a nice error
message explaining the situation, instead of just prepending C. to the
type spelling (and hoping the user knows what that undefined reference
means).
|
|
Enum types are implemented as named types (with possible accompanying
typedefs as type aliases). The constants inside the enums are treated as
Go constants like in the Go toolchain.
|
|
to run drivers CI build, which uses the tinygo-dev image
Signed-off-by: Ron Evans <[email protected]>
|
|
Signed-off-by: Ron Evans <[email protected]>
|
|
* Add support for Adafruit Trinket-M0 board
|
|
This avoids the //go:volatile pragma on types in Go source code, at
least for AVR targets.
|
|
|
|
The long term goal is to remove the //go:volatile hack.
|
|
This does increase code size, but it is necessary to avoid undefined
behavior.
|
|
This commit adds debug info to function arguments, so that in many cases
you can see them when compiling with less optimizations enabled.
Unfortunately, due to the way Go SSA works, it is hard to preserve them
in many cases.
Local variables are not yet saved.
Also, change the language type to C, to make sure lldb shows function
arguments. The previous language was Modula 3, apparently due to a
off-by-one error somewhere.
|
|
|
|
No error is produced, so no error needs to be returned. It was missed in
https://github.com/tinygo-org/tinygo/pull/294.
Also, it fixes this smelly code:
if err != nil {
return <something>, nil
}
There could never be an error, so the code was already dead.
|
|
Add support for growing hashmaps beyond their initial size.
|