aboutsummaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2019-05-29main: version 0.6.0v0.6.0Ayke van Laethem
2019-05-28llvm cpu featuresj7b
2019-05-28Trivial typo fixJustin Clift
2019-05-27ci: install Go 1.12.5 on macOSAyke van Laethem
This should fix compatibility with the Go 1.12 stdlib: https://github.com/tinygo-org/tinygo/issues/368
2019-05-27machine/samd21: use HasBits() method to simplify bit comparisonsRon Evans
Signed-off-by: Ron Evans <[email protected]>
2019-05-27machine/stm32: use HasBits() method to simplify bit comparisonsRon Evans
Signed-off-by: Ron Evans <[email protected]>
2019-05-27machine/avr: use HasBits() method to simplify bit comparisonsRon Evans
Signed-off-by: Ron Evans <[email protected]>
2019-05-27tools: generate volatile HasBits() method in device wrappers to simplify bit ↵Ron Evans
comparison code Signed-off-by: Ron Evans <[email protected]>
2019-05-27ci: use go modules instead of depAyke van Laethem
This also updates the LLVM build to include this commit: https://github.com/llvm-mirror/llvm/commit/d519e424c503d2d2a723284664a509a6cd5401a8
2019-05-27wasm: add support for js.FuncOfAyke van Laethem
2019-05-27compiler,runtime: make panic functions camelCaseAyke van Laethem
Rename panic functions to be runtime.nilPanic, runtime.lookupPanic, and runtime.slicePanic.
2019-05-27docs: update list of supported MCU boardsRon Evans
Signed-off-by: Ron Evans <[email protected]>
2019-05-27syscall: implement Exit call on unixAyke van Laethem
2019-05-26machine: refactor pins to be of Pin typeAyke van Laethem
2019-05-25wasm: fix Makefile to avoid debuginfoAyke van Laethem
2019-05-25wasm: fix wasm-ld hangAyke van Laethem
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
2019-05-24main: add the absolute path to clang-8 on macOSAyke van Laethem
This avoids the need to correctly set $PATH if LLVM 8 has been installed using Homebrew.
2019-05-24tools/gen-device: complete refactor to new generator based on volatile packageRon Evans
Signed-off-by: Ron Evans <[email protected]>
2019-05-24machine/nrf: refactor to use volatile package/APIRon Evans
Signed-off-by: Ron Evans <[email protected]>
2019-05-24machine/stm32f103xx: fix i2c 2 byte readk-brk
2019-05-24compiler,runtime: fix multiple definitions of a single functionAyke van Laethem
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.
2019-05-24main: add build tags for the Go stdlib versionAyke van Laethem
2019-05-24interp: support some more expressions in const icmpAyke van Laethem
2019-05-24ci: make sure that all examples are included in the smoketestsAyke van Laethem
2019-05-24ci: move tests from CircleCI config to MakefileAyke van Laethem
This makes it easier to run smoke tests locally.
2019-05-23machine/atsamd21: fix analog pin modeAyke van Laethem
2019-05-21interp: work around limitation of constfolding in IR builderAyke van Laethem
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
2019-05-21interp: make errors during branches more reliableAyke van Laethem
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.
2019-05-21machine/stm32: refactor to use new volatile package for all register accessRon Evans
Signed-off-by: Ron Evans <[email protected]>
2019-05-20all: add go.mod and go.sum files for vgo supportAyke van Laethem
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.
2019-05-20arm: print an error when a HardFault occursAyke van Laethem
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.
2019-05-20compiler: create temporary allocas with appropriate lifetimesAyke van Laethem
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.
2019-05-19machine/sam: Refactor all machine/runtime code to use new volatile package/APIRon Evans
Signed-off-by: Ron Evans <[email protected]>
2019-05-19machine/feather-m0: correct board build tag and add placeholders for I2S ↵Ron Evans
interface Signed-off-by: Ron Evans <[email protected]>
2019-05-19Add Feather M0 Board (#356)Anthony Elder
* Add Feather M0 Board
2019-05-18interp: improve scan for loadsAyke van Laethem
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.
2019-05-18compiler: avoid some obviously false nil checksAyke van Laethem
Pointers to globals are never nil.
2019-05-17cgo: print better error messages for unknown typesAyke van Laethem
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).
2019-05-17cgo: add support for enum typesAyke van Laethem
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.
2019-05-15docker: do not remove make from tinygo-dev docker image, to make it easier ↵Ron Evans
to run drivers CI build, which uses the tinygo-dev image Signed-off-by: Ron Evans <[email protected]>
2019-05-14docs: update README with new boards Adafruit Trinket M0, and STM32F407 DiscoveryRon Evans
Signed-off-by: Ron Evans <[email protected]>
2019-05-14[Board] Adafruit Trinket (#333)Martin Treml
* Add support for Adafruit Trinket-M0 board
2019-05-14avr: use register wrappers that use runtime/volatile.*Uint8 callsAyke van Laethem
This avoids the //go:volatile pragma on types in Go source code, at least for AVR targets.
2019-05-14compiler: add //go:inline pragmaAyke van Laethem
2019-05-14compiler: implement volatile operations as compiler builtinsAyke van Laethem
The long term goal is to remove the //go:volatile hack.
2019-05-14compiler: insert nil checks when storing to a pointerAyke van Laethem
This does increase code size, but it is necessary to avoid undefined behavior.
2019-05-14compiler: add debug info for function argumentsAyke van Laethem
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.
2019-05-14compiler: implement comparing channel valuesAyke van Laethem
2019-05-14compiler: simplify some interface codeAyke van Laethem
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.
2019-05-14runtime: implement growing hashmapsAyke van Laethem
Add support for growing hashmaps beyond their initial size.