mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-20 10:16:37 +00:00
Extract portable AS to its own definition and polyfill; Try running flatten/ssa before default optimizations, see WebAssembly/binaryen#1331
This commit is contained in:
@ -5,11 +5,15 @@
|
||||
(export "loopDoInDo" (func $do/loopDoInDo))
|
||||
(export "memory" (memory $0))
|
||||
(func $do/loopDo (; 0 ;) (type $iv) (param $0 i32)
|
||||
(local $1 i32)
|
||||
(set_local $1
|
||||
(get_local $0)
|
||||
)
|
||||
(loop $continue|0
|
||||
(br_if $continue|0
|
||||
(tee_local $0
|
||||
(tee_local $1
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
@ -17,8 +21,10 @@
|
||||
)
|
||||
)
|
||||
(func $do/loopDoInDo (; 1 ;) (type $iv) (param $0 i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(loop $continue|0
|
||||
(set_local $0
|
||||
(set_local $1
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(i32.const 1)
|
||||
@ -26,16 +32,20 @@
|
||||
)
|
||||
(loop $continue|1
|
||||
(br_if $continue|1
|
||||
(tee_local $0
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(i32.const 1)
|
||||
(tee_local $2
|
||||
(tee_local $1
|
||||
(tee_local $0
|
||||
(i32.sub
|
||||
(get_local $1)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(br_if $continue|0
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
Reference in New Issue
Block a user