Add trapMode option to asc; Disable flatten/ssa passes for now

This commit is contained in:
dcodeIO
2017-12-09 02:38:17 +01:00
parent 6d8de50565
commit 732068e981
16 changed files with 1339 additions and 1550 deletions

View File

@ -6,36 +6,15 @@
(export "doSwitchDefaultOmitted" (func $switch/doSwitchDefaultOmitted))
(export "memory" (memory $0))
(func $switch/doSwitch (; 0 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(block $case4|0
(block $case2|0
(if
(i32.ne
(tee_local $1
(block $case0|0
(block $tablify|0
(br_table $case2|0 $case0|0 $case4|0 $case4|0 $tablify|0
(get_local $0)
)
(i32.const 1)
)
(block
(br_if $case2|0
(i32.eqz
(get_local $1)
)
)
(br_if $case4|0
(i32.eq
(get_local $1)
(i32.const 2)
)
)
(br_if $case4|0
(i32.eq
(get_local $1)
(i32.const 3)
)
)
(br $case2|0)
)
(br $case2|0)
)
(return
(i32.const 1)
@ -48,31 +27,18 @@
(i32.const 23)
)
(func $switch/doSwitchDefaultFirst (; 1 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(block $case3|0
(if
(i32.ne
(tee_local $1
(get_local $0)
(block $case1|0
(block $tablify|0
(br_table $case1|0 $case3|0 $case3|0 $tablify|0
(i32.sub
(get_local $0)
(i32.const 1)
)
)
(i32.const 1)
)
(block
(br_if $case3|0
(i32.eq
(get_local $1)
(i32.const 2)
)
)
(br_if $case3|0
(i32.eq
(get_local $1)
(i32.const 3)
)
)
(return
(i32.const 0)
)
(return
(i32.const 0)
)
)
(return
@ -82,31 +48,18 @@
(i32.const 23)
)
(func $switch/doSwitchDefaultOmitted (; 2 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(block $break|0
(block $case2|0
(if
(i32.ne
(tee_local $1
(get_local $0)
)
(i32.const 1)
)
(block
(br_if $case2|0
(i32.eq
(get_local $1)
(i32.const 2)
(block $case0|0
(block $tablify|0
(br_table $case0|0 $case2|0 $case2|0 $tablify|0
(i32.sub
(get_local $0)
(i32.const 1)
)
)
(br_if $case2|0
(i32.eq
(get_local $1)
(i32.const 3)
)
)
(br $break|0)
)
(br $break|0)
)
(return
(i32.const 1)