Commit Graph

8 Commits

Author SHA1 Message Date
Ayke van Laethem 309de00fd6 Simplify function names by removing $async suffix 2018-08-26 21:45:28 +02:00
Ayke van Laethem c25b448758 Rewrite init() interpretation to a real interpreter
Instead of mostly heuristics, actually execute the init() instruction in
an interpreter to calculate initializers for globals. This is far more
flexible and extensible, and gives the option of extending the
interpreter to other code and make it a partial evaluator.
2018-08-25 02:07:01 +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 3146cc86d4 Move Compiler.program to Program.program 2018-08-19 20:41:05 +02:00
Ayke van Laethem ad9a62f260 Make sure we handle all package members 2018-08-18 01:13:35 +02:00
Ayke van Laethem a475233f36 Support recursive types 2018-08-18 01:12:52 +02:00
Ayke van Laethem 574c7ec047 Refactor: Use our own types as much as possible from the analysis
Previously, mostly the types from the ssa package were used directly
with the types from analysis.go as an overlay. This commit uses these
types everywhere and renames a few things here and there to make things
clearer.
2018-08-17 23:13:32 +02:00