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

14 коммитов

Автор SHA1 Сообщение Дата
Ayke van Laethem
1f2af7d848
compiler: do not remove dead globals
These were not removed when they contain data, and will be removed by
LLVM anyway.
2018-09-17 15:15:03 +02:00
Ayke van Laethem
2a20c0c7f0
all: rewrite sleep function
time.Sleep now compiles on all systems, so lets use that.
Additionally, do a few improvements in time unit handling for the
scheduler. This should lead to somewhat longer sleep durations without
wrapping (on some platforms).

Some examples got smaller, some got bigger. In particular, code using
the scheduler got bigger and the blinky1 example got smaller (especially
on Arduino: 380 -> 314 bytes).
2018-09-15 01:58:54 +02:00
Ayke van Laethem
43b8c24226
compiler: implement interface assertions
This is a lot harder than 'regular' type assertions as the actual
methods need to be checked.
2018-09-06 20:18:18 +02:00
Ayke van Laethem
c100e4d67f
compiler: fix nil constant interface
A nil interface has no dynamic type (or: nil dynamic type). Don't try to
use the static type as the dynamic type, because these are different.
2018-09-03 01:01:24 +02:00
Ayke van Laethem
58c87329d4
Implement closures and bound methods 2018-09-02 03:39:37 +02:00
Ayke van Laethem
a1359d7f64
passes: small code cleanup 2018-08-30 22:54:44 +02:00
Ayke van Laethem
cfd20c7a12
Add a number for the "error" type by default 2018-08-30 05:40:11 +02:00
Ayke van Laethem
6e0c60a7a1
Some extra header docs 2018-08-30 02:36:13 +02:00
Ayke van Laethem
309de00fd6
Simplify function names by removing $async suffix 2018-08-26 21:45:28 +02:00
Ayke van Laethem
9f2bcfe5e3
Implement global interface variable constant 2018-08-25 02:58:00 +02:00
Ayke van Laethem
df4ee6e733
passes: Fix bug in SimpleDCE
Main was included twice, leading to problems with coroutines.
2018-08-20 20:08:11 +02:00
Ayke van Laethem
7460e10894
Add dead code elimination (DCE) pass
This should make it much easier (in the future) to use the standard
library when unused functions contain unimplemented features. But more
importantly, it makes later passes better and makes compiling faster by
not having to scan dead code.
2018-08-19 20:47:58 +02:00
Ayke van Laethem
bce33bbf41
Rename {Function,Global}.Name -> LinkName 2018-08-19 20:42:24 +02:00
Ayke van Laethem
e18fd6da16
Rename analysis.go -> passes.go 2018-08-19 17:07:48 +02:00
Переименован с analysis.go (Смотреть далее)