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

163 коммитов

Автор SHA1 Сообщение Дата
Ayke van Laethem
865520b571
compiler: act as a compiler driver (on unix systems)
As a final step, link the object file with the system compiler/linker.
TODO: cross compiling.
2018-09-12 19:59:13 +02:00
Ayke van Laethem
6ab2b30984
compiler: move output file type selection to main.go 2018-09-12 19:11:50 +02:00
Ayke van Laethem
9bec479041
all: make targets configurable with a JSON file
This is intentionally similar to the target specifications in Rust:
https://doc.rust-lang.org/nightly/nightly-rustc/rustc_target/spec/struct.TargetOptions.html
2018-09-12 18:28:39 +02:00
Ayke van Laethem
20c2552f8a
compiler: add 'run' command for bytecode interpretation 2018-09-12 17:26:56 +02:00
Ayke van Laethem
8362751590
compiler: use runtime.GOOS/GOARCH instead of hardcoding build tags 2018-09-12 17:25:43 +02:00
Ayke van Laethem
e9b0a7d2ae
compiler: improve command line errors 2018-09-12 17:25:14 +02:00
Ayke van Laethem
0779ee6088
compiler: improve command line argument parsing
To get more compatibility with the go command, implement a similar
command line interface (with "tinygo build <package>" etc.).
Other than that, an all-round cleanup of command parsing.
2018-09-12 17:23:36 +02:00
Ayke van Laethem
83ad0b6137
all: move bootstrapping IR to Go runtime
This has the benefit of not requiring a 'runtime' IR file, so that
complete relocatable files can be built without requiring input IR.
This makes the compiler a lot easier to use without the Makefile.

Code size is not affected.
2018-09-04 21:18:26 +02:00
Ayke van Laethem
0746d61639
compiler: move optimizer into the binary 2018-09-04 19:20:49 +02:00
Ayke van Laethem
bf160d096b
Move lenType definition to runtime (partially) 2018-08-29 20:48:56 +02:00
Ayke van Laethem
a30ffa5c1e
Revert "Move coroutine passes from Makefile to compiler itself"
This reverts commit d9ca5f97fb.

There is a problem with coroutines that I haven't solved yet. Reverting
makes it work, for now.

Also, use a better coroutines flag for the LLVM opt tool.
2018-08-20 20:24:54 +02:00
Ayke van Laethem
d9ca5f97fb
Move coroutine passes from Makefile to compiler itself
This is much more convenient.
2018-08-20 04:31:01 +02:00
Ayke van Laethem
4af2bcb6a9
Split up tgo.go 2018-08-18 01:11:25 +02:00