Commit Graph

12 Commits

Author SHA1 Message Date
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