Граф коммитов

74 коммитов

Автор SHA1 Сообщение Дата
Elliott Sales de Andrade
5642d72fbe Update to current chromedp. 2021-01-24 23:13:42 +01:00
Ayke van Laethem
a90865506d main: use LLVM 11 by default when linking LLVM dynamically
This doesn't affect the release builds but it is helpful for TinyGo
developers.
2021-01-19 08:55:57 +01:00
Ayke van Laethem
163df7670a main: update go-llvm to fix LLVM build tags for Linux
This should make TinyGo buildable again on Darwin with a Homebrew
installed LLVM.
2020-11-09 18:45:37 +01:00
Ayke van Laethem
2b1d4ce96e main: update go.sum 2020-10-28 08:48:11 +01:00
Ayke van Laethem
b40f250530 main: add initial support for (in-development) LLVM 11
This can be useful to test improvements in LLVM master and to make it
possible to support LLVM 11 for the most part already before the next
release. That also allows catching LLVM bugs early to fix them upstream.

Note that tests do not yet pass for this LLVM version, but the TinyGo
compiler can be built with the binaries from apt.llvm.org (at the time
of making this commit).
2020-10-13 20:23:50 +02:00
Ayke van Laethem
0ecfe9eade ci: fix make wasmtest
This fixes issue https://github.com/tinygo-org/tinygo/issues/1418. In
short, it appears there was a race condition that was only visible on
GOARCH=386 but not on GOARCH=amd64. Updating to a more recent chromedp
version fixes the issue.
2020-10-01 02:07:00 +02:00
Ayke van Laethem
4d1d0c2d3b main: go mod tidy
Clean up the go.mod and go.sum which have gotten a bit messy, and add an
extra line to go.sum that keeps reappearing locally for some reason (so
it seems important).
2020-06-11 08:14:48 +02:00
Ayke van Laethem
3c31a3110f builder: use newer version of gohex
This version adds error handling for the DumpIntelHex method, and thus
fixes a TODO comment.
2020-06-01 19:03:15 +02:00
Brad Peabody
95f509b109
wasm test suite (#1116)
* wasm: add test suite using headlless chrome
2020-05-23 14:12:01 +02:00
Ayke van Laethem
d0b2585e82 main: update go-llvm to fix macOS build problem 2020-05-05 08:11:20 +02:00
Ayke van Laethem
0afd42c439 main: switch to LLVM 10
This commit also adds a bit of version independence, in particular for
external commands. It also adds the LLVM version to the `tinygo version`
command, which might help while debugging.
2020-04-09 20:23:51 +02:00
Ayke van Laethem
7ac531906b main: update go-llvm dependency 2020-03-16 15:30:40 -07:00
Ayke van Laethem
0c73d56861 compiler: add debug info for local variables
Local variables aren't scoped yet and not all are included, but this is
a start. To use it, run `info locals` in GDB.
2020-03-11 14:55:04 -07:00
Elliott Sales de Andrade
d11abb33fe
main: use go mod expected path for go.bug.st/serial 2020-02-11 20:09:22 +01:00
Ayke van Laethem
3e521f710a compiler: add support for debugging globals
This makes most globals visible from GDB, using `info variables`.
2020-01-07 20:20:19 +01:00
Ayke van Laethem
0933577e60 compiler: improve "function redeclared" error
This error can normally only happen with //go:linkname and such, but
it's nice to get an informative error message in that case.
2020-01-04 10:24:14 +01:00
Ayke van Laethem
e74db01f82 interp: improve error reporting
This commit improves error reporting in several ways:

  * Location information is read from the intruction that causes the
    error, as far as that's available.
  * The package that is being interpreted is included in the error
    message. This may be the most useful part of the improvements.
  * The hashmap update intrinsics now doesn't panic, instead it logs a
    clear error (with location information, as in the above two bullet
    points).

This is possible thanks to improvements in LLVM 9. This means that after
this change, TinyGo will depend on LLVM 9.
2019-11-26 07:18:42 +01:00
Ayke van Laethem
10e1420237 cgo: implement #cgo CFLAGS
This implementation is still very limited but provides a base to build
upon. Limitations:

  * CGO_CFLAGS etc is not taken into account.
  * These CFLAGS are not used in C files compiled with the package.
  * Other flags (CPPFLAGS, LDFAGS, ...) are not yet implemented.
2019-11-25 09:32:03 +01:00
Ayke van Laethem
118af9df69 all: switch to LLVM 9 2019-11-16 18:44:27 +01:00
Ron Evans
dff6e6566d go-llvm: update modules to use latest version
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2019-11-04 11:01:11 +01:00
Ayke van Laethem
fa25fa1b0c macos: use llvm@8 instead of just llvm in paths
This should hopefully avoid needing to use `brew switch`.
2019-11-03 21:02:39 +01:00
Ron Evans
02facb8568 flash: add ability to perform 1200baud port reset for MCUs that can detect this in order to go into bootloader mode for flashing without pressing any buttons. Also add support for this to the Arduino Nano33 IoT board target
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2019-10-13 00:43:00 +02:00
Ayke van Laethem
d905476231 all: refactor heap-to-stack transform into the transform package
Also add unit tests.

This is the first of several transformation (optimization/lowering)
passes that I'd like to move to the new transform package. This
separates the compiler from the optimizer.

Also, it finally adds unit tests for the compiler, not just end-to-end
compilation tests. This should improve robustness and should make it
easier to change these transformation passes in the future.
While the heap-to-stack transform is relatively simple, other passes are
much more complex. Adding unit tests not only helps robustness over
time, but also doubles as documentation as to what these transformation
passes do exactly.
2019-09-15 21:26:27 +02:00
Ayke van Laethem
98a3047b58 all: add go.mod and go.sum files for vgo support
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-20 11:40:29 +02:00