202 lines
4.1 KiB
Plaintext
Raw Normal View History

2017-12-02 20:58:39 +01:00
(module
(type $ii (func (param i32) (result i32)))
2017-12-16 17:54:53 +01:00
(global $HEAP_BASE i32 (i32.const 4))
2017-12-02 20:58:39 +01:00
(memory $0 1)
2017-12-02 23:33:01 +01:00
(export "doSwitch" (func $switch/doSwitch))
(export "doSwitchDefaultFirst" (func $switch/doSwitchDefaultFirst))
(export "doSwitchDefaultOmitted" (func $switch/doSwitchDefaultOmitted))
2017-12-02 20:58:39 +01:00
(export "memory" (memory $0))
(func $switch/doSwitch (; 0 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
2017-12-08 16:11:58 +01:00
(block $break|0
(block $case4|0
(block $case3|0
(block $case2|0
(block $case1|0
(block $case0|0
2017-12-02 20:58:39 +01:00
(set_local $1
(get_local $0)
)
2017-12-08 16:11:58 +01:00
(br_if $case0|0
2017-12-02 20:58:39 +01:00
(i32.eq
(get_local $1)
(i32.const 1)
)
)
2017-12-08 16:11:58 +01:00
(br_if $case1|0
2017-12-02 20:58:39 +01:00
(i32.eq
(get_local $1)
(i32.const 0)
)
)
2017-12-08 16:11:58 +01:00
(br_if $case3|0
2017-12-02 20:58:39 +01:00
(i32.eq
(get_local $1)
(i32.const 2)
)
)
2017-12-08 16:11:58 +01:00
(br_if $case4|0
2017-12-02 20:58:39 +01:00
(i32.eq
(get_local $1)
(i32.const 3)
)
)
2017-12-08 16:11:58 +01:00
(br $case2|0)
2017-12-02 20:58:39 +01:00
)
(return
(i32.const 1)
)
)
)
(return
(i32.const 0)
)
)
)
(return
(i32.const 23)
)
)
)
(func $switch/doSwitchDefaultFirst (; 1 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
2017-12-08 16:11:58 +01:00
(block $break|0
(block $case3|0
(block $case2|0
(block $case1|0
(block $case0|0
2017-12-02 20:58:39 +01:00
(set_local $1
(get_local $0)
)
2017-12-08 16:11:58 +01:00
(br_if $case1|0
2017-12-02 20:58:39 +01:00
(i32.eq
(get_local $1)
(i32.const 1)
)
)
2017-12-08 16:11:58 +01:00
(br_if $case2|0
2017-12-02 20:58:39 +01:00
(i32.eq
(get_local $1)
(i32.const 2)
)
)
2017-12-08 16:11:58 +01:00
(br_if $case3|0
2017-12-02 20:58:39 +01:00
(i32.eq
(get_local $1)
(i32.const 3)
)
)
2017-12-08 16:11:58 +01:00
(br $case0|0)
2017-12-02 20:58:39 +01:00
)
(return
(i32.const 0)
)
)
(return
(i32.const 1)
)
)
)
(return
(i32.const 23)
)
)
)
(func $switch/doSwitchDefaultOmitted (; 2 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
2017-12-08 16:11:58 +01:00
(block $break|0
(block $case2|0
(block $case1|0
(block $case0|0
2017-12-02 20:58:39 +01:00
(set_local $1
(get_local $0)
)
2017-12-08 16:11:58 +01:00
(br_if $case0|0
2017-12-02 20:58:39 +01:00
(i32.eq
(get_local $1)
(i32.const 1)
)
)
2017-12-08 16:11:58 +01:00
(br_if $case1|0
2017-12-02 20:58:39 +01:00
(i32.eq
(get_local $1)
(i32.const 2)
)
)
2017-12-08 16:11:58 +01:00
(br_if $case2|0
2017-12-02 20:58:39 +01:00
(i32.eq
(get_local $1)
(i32.const 3)
)
)
2017-12-08 16:11:58 +01:00
(br $break|0)
2017-12-02 20:58:39 +01:00
)
(return
(i32.const 1)
)
)
)
(return
(i32.const 23)
)
)
(return
(i32.const 0)
)
)
)
(;
[program.elements]
GLOBAL: NaN
GLOBAL: Infinity
FUNCTION_PROTOTYPE: isNaN
FUNCTION_PROTOTYPE: isFinite
FUNCTION_PROTOTYPE: clz
FUNCTION_PROTOTYPE: ctz
FUNCTION_PROTOTYPE: popcnt
FUNCTION_PROTOTYPE: rotl
FUNCTION_PROTOTYPE: rotr
FUNCTION_PROTOTYPE: abs
FUNCTION_PROTOTYPE: max
FUNCTION_PROTOTYPE: min
FUNCTION_PROTOTYPE: ceil
FUNCTION_PROTOTYPE: floor
FUNCTION_PROTOTYPE: copysign
FUNCTION_PROTOTYPE: nearest
FUNCTION_PROTOTYPE: reinterpret
FUNCTION_PROTOTYPE: sqrt
FUNCTION_PROTOTYPE: trunc
FUNCTION_PROTOTYPE: load
FUNCTION_PROTOTYPE: store
FUNCTION_PROTOTYPE: sizeof
FUNCTION_PROTOTYPE: select
FUNCTION_PROTOTYPE: unreachable
FUNCTION_PROTOTYPE: current_memory
FUNCTION_PROTOTYPE: grow_memory
FUNCTION_PROTOTYPE: parseInt
FUNCTION_PROTOTYPE: parseFloat
FUNCTION_PROTOTYPE: changetype
FUNCTION_PROTOTYPE: assert
FUNCTION_PROTOTYPE: i8
FUNCTION_PROTOTYPE: i16
FUNCTION_PROTOTYPE: i32
FUNCTION_PROTOTYPE: i64
FUNCTION_PROTOTYPE: u8
FUNCTION_PROTOTYPE: u16
FUNCTION_PROTOTYPE: u32
FUNCTION_PROTOTYPE: u64
FUNCTION_PROTOTYPE: bool
FUNCTION_PROTOTYPE: f32
FUNCTION_PROTOTYPE: f64
FUNCTION_PROTOTYPE: isize
FUNCTION_PROTOTYPE: usize
GLOBAL: HEAP_BASE
FUNCTION_PROTOTYPE: switch/doSwitch
FUNCTION_PROTOTYPE: switch/doSwitchDefaultFirst
FUNCTION_PROTOTYPE: switch/doSwitchDefaultOmitted
2017-12-02 20:58:39 +01:00
[program.exports]
FUNCTION_PROTOTYPE: switch/doSwitch
FUNCTION_PROTOTYPE: switch/doSwitchDefaultFirst
FUNCTION_PROTOTYPE: switch/doSwitchDefaultOmitted
2017-12-02 20:58:39 +01:00
;)