mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-24 04:01:46 +00:00
Precompute and inline constant globals
This is necessary so that other constant globals referencing constant globals can be precomputed as well (NON_STANDALONE_FLOW in binaryen)
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
(module
|
||||
(type $iii (func (param i32 i32) (result i32)))
|
||||
(type $v (func))
|
||||
(global $export/a i32 (i32.const 1))
|
||||
(global $export/b i32 (i32.const 2))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\08")
|
||||
(export "memory" (memory $0))
|
||||
@ -23,12 +21,12 @@
|
||||
(drop
|
||||
(i32.add
|
||||
(call $export/add
|
||||
(get_global $export/a)
|
||||
(get_global $export/b)
|
||||
(i32.const 1)
|
||||
(i32.const 2)
|
||||
)
|
||||
(call $export/sub
|
||||
(get_global $export/b)
|
||||
(get_global $export/a)
|
||||
(i32.const 2)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
Reference in New Issue
Block a user