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

@ -73,7 +73,6 @@
(global $std/math/OVERFLOW i32 (i32.const 16))
(global $~lib/math/NativeMath.E f64 (f64.const 2.718281828459045))
(global $~lib/math/NativeMathf.E f32 (f32.const 2.7182817459106445))
(global $Infinity f64 (f64.const inf))
(global $~lib/math/NativeMath.LN2 f64 (f64.const 0.6931471805599453))
(global $~lib/math/NativeMath.LN10 f64 (f64.const 2.302585092994046))
(global $~lib/math/NativeMath.LOG2E f64 (f64.const 1.4426950408889634))
@ -86,18 +85,17 @@
(global $~lib/math/NativeMathf.PI f32 (f32.const 3.1415927410125732))
(global $~lib/math/NativeMathf.SQRT1_2 f32 (f32.const 0.7071067690849304))
(global $~lib/math/NativeMathf.SQRT2 f32 (f32.const 1.4142135381698608))
(global $NaN f64 (f64.const nan:0x8000000000000))
(global $~lib/builtins/f64.MIN_VALUE f64 (f64.const 5e-324))
(global $~lib/math/random_seeded (mut i32) (i32.const 0))
(global $~lib/math/random_state0_64 (mut i64) (i64.const 0))
(global $~lib/math/random_state1_64 (mut i64) (i64.const 0))
(global $~lib/math/random_state0_32 (mut i32) (i32.const 0))
(global $~lib/math/random_state1_32 (mut i32) (i32.const 0))
(global $ASC_SHRINK_LEVEL i32 (i32.const 0))
(global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0))
(global $~lib/builtins/f64.MAX_VALUE f64 (f64.const 1797693134862315708145274e284))
(global $~lib/builtins/f32.MAX_VALUE f32 (f32.const 3402823466385288598117041e14))
(global $~lib/builtins/f32.MIN_VALUE f32 (f32.const 1.401298464324817e-45))
(global $HEAP_BASE i32 (i32.const 68))
(global $~lib/memory/HEAP_BASE i32 (i32.const 68))
(export "memory" (memory $0))
(export "table" (table $0))
(start $start)
@ -9774,7 +9772,7 @@
if
i32.const 0
i32.const 40
i32.const 972
i32.const 968
i32.const 4
call $~lib/env/abort
unreachable
@ -9806,7 +9804,7 @@
if
i32.const 0
i32.const 40
i32.const 981
i32.const 977
i32.const 24
call $~lib/env/abort
unreachable
@ -9863,7 +9861,7 @@
if
i32.const 0
i32.const 40
i32.const 2051
i32.const 2044
i32.const 24
call $~lib/env/abort
unreachable
@ -11581,7 +11579,7 @@
local.get $3
end
)
(func $start (; 157 ;) (type $_)
(func $start:std/math (; 157 ;) (type $_)
(local $0 i32)
(local $1 f64)
(local $2 i32)
@ -42988,6 +42986,9 @@
unreachable
end
)
(func $null (; 158 ;) (type $_)
(func $start (; 158 ;) (type $_)
call $start:std/math
)
(func $null (; 159 ;) (type $_)
)
)