Rework resolver (#489)

* Rework IR and resolver to use nested lookup tables
* Integrate types into IR
* Make components prefer IR, slimmed down AST
* Implement `export *`
* Add `@lazy` annotation and remove `--noTreeShaking`
* Add `@start` annotation and remove magic `main`
* Related refactoring, cleanup and docs
This commit is contained in:
Daniel Wirtz
2019-02-21 00:11:22 +01:00
committed by GitHub
parent e623786b42
commit 0c64f21250
234 changed files with 16949 additions and 37871 deletions

View File

@ -6,7 +6,7 @@
(memory $0 1)
(data (i32.const 8) "\15\00\00\00s\00t\00d\00/\00g\00c\00-\00i\00n\00t\00e\00g\00r\00a\00t\00i\00o\00n\00.\00t\00s")
(table $0 2 funcref)
(elem (i32.const 0) $null $start~anonymous|1)
(elem (i32.const 0) $null $start:std/gc-integration~anonymous|1)
(global $std/gc-integration/B.d (mut i32) (i32.const 16))
(global $std/gc-integration/a_ref (mut i32) (i32.const 24))
(global $std/gc-integration/b_ref (mut i32) (i32.const 32))
@ -14,7 +14,7 @@
(export "memory" (memory $0))
(export "table" (table $0))
(start $start)
(func $start~anonymous|1 (; 1 ;) (type $i_) (param $0 i32)
(func $start:std/gc-integration~anonymous|1 (; 1 ;) (type $i_) (param $0 i32)
global.get $std/gc-integration/i
i32.const 1
i32.add
@ -33,7 +33,7 @@
unreachable
end
)
(func $start (; 2 ;) (type $_)
(func $start:std/gc-integration (; 2 ;) (type $_)
i32.const 8
i32.const 1
call_indirect (type $i_)
@ -58,7 +58,10 @@
unreachable
end
)
(func $null (; 3 ;) (type $_)
(func $start (; 3 ;) (type $_)
call $start:std/gc-integration
)
(func $null (; 4 ;) (type $_)
nop
)
)