2017-12-03 23:04:33 +01:00
|
|
|
(module
|
|
|
|
(type $v (func))
|
|
|
|
(global $builtins/i (mut i32) (i32.const 0))
|
|
|
|
(global $builtins/I (mut i64) (i64.const 0))
|
|
|
|
(global $builtins/f (mut f32) (f32.const 0))
|
|
|
|
(global $builtins/b (mut i32) (i32.const 0))
|
|
|
|
(global $builtins/F (mut f64) (f64.const 0))
|
|
|
|
(global $builtins/s (mut i32) (i32.const 0))
|
2017-12-16 17:54:53 +01:00
|
|
|
(global $HEAP_BASE i32 (i32.const 4))
|
2017-12-03 23:04:33 +01:00
|
|
|
(memory $0 1)
|
|
|
|
(export "memory" (memory $0))
|
|
|
|
(start $start)
|
|
|
|
(func $start (; 0 ;) (type $v)
|
2017-12-05 22:47:20 +01:00
|
|
|
(local $0 i32)
|
|
|
|
(local $1 i32)
|
2017-12-12 09:32:03 +01:00
|
|
|
(local $2 i64)
|
|
|
|
(local $3 i64)
|
|
|
|
(local $4 f32)
|
|
|
|
(local $5 f64)
|
2017-12-03 23:04:33 +01:00
|
|
|
(drop
|
|
|
|
(i32.clz
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.ctz
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.popcnt
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.rotl
|
|
|
|
(i32.const 1)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.rotr
|
|
|
|
(i32.const 1)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(drop
|
|
|
|
(select
|
|
|
|
(i32.sub
|
|
|
|
(i32.const 0)
|
|
|
|
(tee_local $0
|
|
|
|
(i32.sub
|
|
|
|
(i32.const 0)
|
|
|
|
(i32.const 42)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(get_local $0)
|
|
|
|
(i32.lt_s
|
|
|
|
(get_local $0)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(select
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $0
|
2017-12-05 22:47:20 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $1
|
2017-12-05 22:47:20 +01:00
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
(i32.gt_s
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $0)
|
2017-12-05 22:47:20 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(select
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $0
|
2017-12-05 22:47:20 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $1
|
2017-12-05 22:47:20 +01:00
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
(i32.lt_s
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $0)
|
|
|
|
(get_local $1)
|
2017-12-05 22:47:20 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-12-03 23:04:33 +01:00
|
|
|
(set_global $builtins/i
|
|
|
|
(i32.clz
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/i
|
|
|
|
(i32.ctz
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/i
|
|
|
|
(i32.popcnt
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/i
|
|
|
|
(i32.rotl
|
|
|
|
(i32.const 1)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/i
|
|
|
|
(i32.rotr
|
|
|
|
(i32.const 1)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(set_global $builtins/i
|
|
|
|
(select
|
|
|
|
(i32.sub
|
|
|
|
(i32.const 0)
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $0
|
2017-12-05 22:47:20 +01:00
|
|
|
(i32.sub
|
|
|
|
(i32.const 0)
|
|
|
|
(i32.const 42)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $0)
|
2017-12-05 22:47:20 +01:00
|
|
|
(i32.lt_s
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $0)
|
2017-12-05 22:47:20 +01:00
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i32.eq
|
|
|
|
(get_global $builtins/i)
|
|
|
|
(i32.const 42)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(set_global $builtins/i
|
|
|
|
(select
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $0
|
2017-12-05 22:47:20 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $1
|
2017-12-05 22:47:20 +01:00
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
(i32.gt_s
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $0)
|
|
|
|
(get_local $1)
|
2017-12-05 22:47:20 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i32.eq
|
|
|
|
(get_global $builtins/i)
|
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(set_global $builtins/i
|
|
|
|
(select
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $0
|
2017-12-05 22:47:20 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $1
|
2017-12-05 22:47:20 +01:00
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
(i32.lt_s
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $0)
|
|
|
|
(get_local $1)
|
2017-12-05 22:47:20 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i32.eq
|
|
|
|
(get_global $builtins/i)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2017-12-03 23:04:33 +01:00
|
|
|
(drop
|
|
|
|
(i64.clz
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i64.ctz
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i64.popcnt
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i64.rotl
|
|
|
|
(i64.const 1)
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i64.rotr
|
|
|
|
(i64.const 1)
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(drop
|
|
|
|
(select
|
|
|
|
(i64.sub
|
|
|
|
(i64.const 0)
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $2
|
2017-12-05 22:47:20 +01:00
|
|
|
(i64.sub
|
|
|
|
(i64.const 0)
|
|
|
|
(i64.const 42)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $2)
|
2017-12-05 22:47:20 +01:00
|
|
|
(i64.lt_s
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $2)
|
2017-12-05 22:47:20 +01:00
|
|
|
(i64.const 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-12-03 23:04:33 +01:00
|
|
|
(set_global $builtins/I
|
|
|
|
(i64.clz
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/I
|
|
|
|
(i64.ctz
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/I
|
|
|
|
(i64.popcnt
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/I
|
|
|
|
(i64.rotl
|
|
|
|
(i64.const 1)
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/I
|
|
|
|
(i64.rotr
|
|
|
|
(i64.const 1)
|
|
|
|
(i64.const 1)
|
|
|
|
)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(set_global $builtins/I
|
|
|
|
(select
|
|
|
|
(i64.sub
|
|
|
|
(i64.const 0)
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $2
|
2017-12-05 22:47:20 +01:00
|
|
|
(i64.sub
|
|
|
|
(i64.const 0)
|
|
|
|
(i64.const 42)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $2)
|
2017-12-05 22:47:20 +01:00
|
|
|
(i64.lt_s
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $2)
|
2017-12-05 22:47:20 +01:00
|
|
|
(i64.const 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i64.eq
|
|
|
|
(get_global $builtins/I)
|
|
|
|
(i64.const 42)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(set_global $builtins/I
|
|
|
|
(select
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $2
|
2017-12-05 22:47:20 +01:00
|
|
|
(i64.const 1)
|
|
|
|
)
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $3
|
2017-12-05 22:47:20 +01:00
|
|
|
(i64.const 2)
|
|
|
|
)
|
|
|
|
(i64.gt_s
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $2)
|
|
|
|
(get_local $3)
|
2017-12-05 22:47:20 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i64.eq
|
|
|
|
(get_global $builtins/I)
|
|
|
|
(i64.const 2)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(set_global $builtins/I
|
|
|
|
(select
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $2
|
2017-12-05 22:47:20 +01:00
|
|
|
(i64.const 1)
|
|
|
|
)
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $3
|
2017-12-05 22:47:20 +01:00
|
|
|
(i64.const 2)
|
|
|
|
)
|
|
|
|
(i64.lt_s
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $2)
|
|
|
|
(get_local $3)
|
2017-12-05 22:47:20 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i32.eq
|
|
|
|
(get_global $builtins/i)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2017-12-03 23:04:33 +01:00
|
|
|
(drop
|
|
|
|
(f32.const nan:0x400000)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.const inf)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.abs
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.ceil
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.copysign
|
|
|
|
(f32.const 1.25)
|
|
|
|
(f32.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.floor
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.max
|
|
|
|
(f32.const 1.25)
|
|
|
|
(f32.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.min
|
|
|
|
(f32.const 1.25)
|
|
|
|
(f32.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.nearest
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.sqrt
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.trunc
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.ne
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $4
|
2017-12-03 23:04:33 +01:00
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $4)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(select
|
|
|
|
(f32.ne
|
|
|
|
(f32.abs
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $4
|
2017-12-04 14:49:24 +01:00
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
(f32.const inf)
|
|
|
|
)
|
2017-12-04 14:49:24 +01:00
|
|
|
(i32.const 0)
|
|
|
|
(f32.eq
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $4)
|
|
|
|
(get_local $4)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.const nan:0x400000)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.const inf)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.abs
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.ceil
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.copysign
|
|
|
|
(f32.const 1.25)
|
|
|
|
(f32.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.floor
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.max
|
|
|
|
(f32.const 1.25)
|
|
|
|
(f32.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.min
|
|
|
|
(f32.const 1.25)
|
|
|
|
(f32.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.nearest
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.sqrt
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.trunc
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/b
|
|
|
|
(f32.ne
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $4
|
2017-12-03 23:04:33 +01:00
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $4)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/b
|
|
|
|
(select
|
|
|
|
(f32.ne
|
|
|
|
(f32.abs
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $4
|
2017-12-04 14:49:24 +01:00
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
(f32.const inf)
|
|
|
|
)
|
2017-12-04 14:49:24 +01:00
|
|
|
(i32.const 0)
|
|
|
|
(f32.eq
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $4)
|
|
|
|
(get_local $4)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.const nan:0x8000000000000)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.const inf)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.const nan:0x8000000000000)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.const inf)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.abs
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.ceil
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.copysign
|
|
|
|
(f64.const 1.25)
|
|
|
|
(f64.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.floor
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.max
|
|
|
|
(f64.const 1.25)
|
|
|
|
(f64.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.min
|
|
|
|
(f64.const 1.25)
|
|
|
|
(f64.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.nearest
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.sqrt
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.trunc
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.ne
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $5
|
2017-12-03 23:04:33 +01:00
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $5)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(select
|
|
|
|
(f64.ne
|
|
|
|
(f64.abs
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $5
|
2017-12-04 14:49:24 +01:00
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
(f64.const inf)
|
|
|
|
)
|
2017-12-04 14:49:24 +01:00
|
|
|
(i32.const 0)
|
|
|
|
(f64.eq
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $5)
|
|
|
|
(get_local $5)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.const nan:0x8000000000000)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.const inf)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.abs
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.ceil
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.copysign
|
|
|
|
(f64.const 1.25)
|
|
|
|
(f64.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.floor
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.max
|
|
|
|
(f64.const 1.25)
|
|
|
|
(f64.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.min
|
|
|
|
(f64.const 1.25)
|
|
|
|
(f64.const 2.5)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.nearest
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.sqrt
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.trunc
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/b
|
|
|
|
(f64.ne
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $5
|
2017-12-03 23:04:33 +01:00
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $5)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/b
|
|
|
|
(select
|
|
|
|
(f64.ne
|
|
|
|
(f64.abs
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $5
|
2017-12-04 14:49:24 +01:00
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
(f64.const inf)
|
|
|
|
)
|
2017-12-04 14:49:24 +01:00
|
|
|
(i32.const 0)
|
|
|
|
(f64.eq
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $5)
|
|
|
|
(get_local $5)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-12-04 22:47:08 +01:00
|
|
|
(set_global $builtins/i
|
|
|
|
(i32.load
|
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(i32.store
|
|
|
|
(i32.const 8)
|
|
|
|
(get_global $builtins/i)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(i32.store
|
|
|
|
(i32.const 8)
|
|
|
|
(i32.load
|
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
2017-12-04 22:47:08 +01:00
|
|
|
(set_global $builtins/I
|
|
|
|
(i64.load
|
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(i64.store
|
|
|
|
(i32.const 8)
|
|
|
|
(get_global $builtins/I)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(i64.store
|
|
|
|
(i32.const 8)
|
|
|
|
(i64.load
|
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
2017-12-04 22:47:08 +01:00
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.load
|
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(f32.store
|
|
|
|
(i32.const 8)
|
|
|
|
(get_global $builtins/f)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(f32.store
|
|
|
|
(i32.const 8)
|
|
|
|
(f32.load
|
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
2017-12-04 22:47:08 +01:00
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.load
|
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(f64.store
|
|
|
|
(i32.const 8)
|
|
|
|
(get_global $builtins/F)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(f64.store
|
|
|
|
(i32.const 8)
|
|
|
|
(f64.load
|
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
2017-12-04 22:47:08 +01:00
|
|
|
(drop
|
|
|
|
(i32.reinterpret/f32
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f32.reinterpret/i32
|
|
|
|
(i32.const 25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i64.reinterpret/f64
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(f64.reinterpret/i64
|
|
|
|
(i64.const 25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/i
|
|
|
|
(i32.reinterpret/f32
|
|
|
|
(f32.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(f32.reinterpret/i32
|
|
|
|
(i32.const 25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/I
|
|
|
|
(i64.reinterpret/f64
|
|
|
|
(f64.const 1.25)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(f64.reinterpret/i64
|
|
|
|
(i64.const 25)
|
|
|
|
)
|
|
|
|
)
|
2017-12-03 23:04:33 +01:00
|
|
|
(drop
|
|
|
|
(current_memory)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(grow_memory
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/s
|
|
|
|
(current_memory)
|
|
|
|
)
|
|
|
|
(set_global $builtins/s
|
|
|
|
(grow_memory
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2017-12-04 22:47:08 +01:00
|
|
|
(drop
|
|
|
|
(select
|
|
|
|
(i32.const 10)
|
|
|
|
(i32.const 20)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(select
|
|
|
|
(i64.const 100)
|
|
|
|
(i64.const 200)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(select
|
|
|
|
(f32.const 1.25)
|
|
|
|
(f32.const 2.5)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(select
|
|
|
|
(f64.const 12.5)
|
|
|
|
(f64.const 25)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/i
|
|
|
|
(select
|
|
|
|
(i32.const 10)
|
|
|
|
(i32.const 20)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/I
|
|
|
|
(select
|
|
|
|
(i64.const 100)
|
|
|
|
(i64.const 200)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/f
|
|
|
|
(select
|
|
|
|
(f32.const 1.25)
|
|
|
|
(f32.const 2.5)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global $builtins/F
|
|
|
|
(select
|
|
|
|
(f64.const 12.5)
|
|
|
|
(f64.const 25)
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
2017-12-03 23:04:33 +01:00
|
|
|
(if
|
|
|
|
(i32.const 0)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2017-12-04 02:00:48 +01:00
|
|
|
(drop
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 4)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 4)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 4)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 4)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 4)
|
|
|
|
)
|
|
|
|
(drop
|
|
|
|
(i32.const 8)
|
|
|
|
)
|
2017-12-04 14:49:24 +01:00
|
|
|
(if
|
2017-12-05 22:47:20 +01:00
|
|
|
(i32.eqz
|
|
|
|
(f64.ne
|
|
|
|
(f64.const nan:0x8000000000000)
|
|
|
|
(f64.const nan:0x8000000000000)
|
|
|
|
)
|
2017-12-04 14:49:24 +01:00
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(f32.ne
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $4
|
2017-12-04 14:49:24 +01:00
|
|
|
(f32.const nan:0x400000)
|
|
|
|
)
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $4)
|
2017-12-04 14:49:24 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(if
|
2017-12-05 22:47:20 +01:00
|
|
|
(i32.eqz
|
|
|
|
(f64.ne
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $5
|
2017-12-05 22:47:20 +01:00
|
|
|
(f64.const nan:0x8000000000000)
|
2017-12-04 14:49:24 +01:00
|
|
|
)
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $5)
|
2017-12-04 14:49:24 +01:00
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i32.eqz
|
|
|
|
(select
|
|
|
|
(f32.ne
|
|
|
|
(f32.abs
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $4
|
2017-12-05 22:47:20 +01:00
|
|
|
(f32.const nan:0x400000)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(f32.const inf)
|
|
|
|
)
|
|
|
|
(i32.const 0)
|
|
|
|
(f32.eq
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $4)
|
|
|
|
(get_local $4)
|
2017-12-05 22:47:20 +01:00
|
|
|
)
|
|
|
|
)
|
2017-12-04 14:49:24 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(if
|
2017-12-05 22:47:20 +01:00
|
|
|
(i32.eqz
|
|
|
|
(i32.eqz
|
|
|
|
(select
|
|
|
|
(f32.ne
|
|
|
|
(f32.abs
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $4
|
2017-12-05 22:47:20 +01:00
|
|
|
(f32.const inf)
|
|
|
|
)
|
|
|
|
)
|
2017-12-04 14:49:24 +01:00
|
|
|
(f32.const inf)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
(i32.const 0)
|
|
|
|
(f32.eq
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $4)
|
|
|
|
(get_local $4)
|
2017-12-05 22:47:20 +01:00
|
|
|
)
|
2017-12-04 14:49:24 +01:00
|
|
|
)
|
|
|
|
)
|
2017-12-05 22:47:20 +01:00
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i32.eqz
|
|
|
|
(select
|
|
|
|
(f64.ne
|
|
|
|
(f64.abs
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $5
|
2017-12-05 22:47:20 +01:00
|
|
|
(f64.const nan:0x8000000000000)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(f64.const inf)
|
|
|
|
)
|
|
|
|
(i32.const 0)
|
|
|
|
(f64.eq
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $5)
|
|
|
|
(get_local $5)
|
2017-12-05 22:47:20 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(i32.eqz
|
|
|
|
(select
|
|
|
|
(f64.ne
|
|
|
|
(f64.abs
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $5
|
2017-12-05 22:47:20 +01:00
|
|
|
(f64.const inf)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(f64.const inf)
|
|
|
|
)
|
|
|
|
(i32.const 0)
|
|
|
|
(f64.eq
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $5)
|
|
|
|
(get_local $5)
|
2017-12-05 22:47:20 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(select
|
|
|
|
(f32.ne
|
|
|
|
(f32.abs
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $4
|
2017-12-05 22:47:20 +01:00
|
|
|
(f32.const 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(f32.const inf)
|
|
|
|
)
|
|
|
|
(i32.const 0)
|
|
|
|
(f32.eq
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $4)
|
|
|
|
(get_local $4)
|
2017-12-05 22:47:20 +01:00
|
|
|
)
|
2017-12-04 14:49:24 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
|
|
|
(if
|
|
|
|
(i32.eqz
|
|
|
|
(select
|
|
|
|
(f64.ne
|
|
|
|
(f64.abs
|
2017-12-12 09:32:03 +01:00
|
|
|
(tee_local $5
|
2017-12-04 14:49:24 +01:00
|
|
|
(f64.const 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(f64.const inf)
|
|
|
|
)
|
|
|
|
(i32.const 0)
|
|
|
|
(f64.eq
|
2017-12-12 09:32:03 +01:00
|
|
|
(get_local $5)
|
|
|
|
(get_local $5)
|
2017-12-04 14:49:24 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(unreachable)
|
|
|
|
)
|
2017-12-03 23:04:33 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(;
|
|
|
|
[program.elements]
|
2017-12-16 02:27:39 +01:00
|
|
|
NaN
|
|
|
|
Infinity
|
2017-12-15 17:23:04 +01:00
|
|
|
isNaN
|
|
|
|
isFinite
|
2017-12-03 23:04:33 +01:00
|
|
|
clz
|
|
|
|
ctz
|
|
|
|
popcnt
|
|
|
|
rotl
|
|
|
|
rotr
|
|
|
|
abs
|
|
|
|
max
|
|
|
|
min
|
2017-12-15 17:23:04 +01:00
|
|
|
ceil
|
|
|
|
floor
|
|
|
|
copysign
|
2017-12-03 23:04:33 +01:00
|
|
|
nearest
|
2017-12-15 17:23:04 +01:00
|
|
|
reinterpret
|
2017-12-03 23:04:33 +01:00
|
|
|
sqrt
|
|
|
|
trunc
|
2017-12-04 22:47:08 +01:00
|
|
|
load
|
|
|
|
store
|
|
|
|
sizeof
|
2017-12-15 17:23:04 +01:00
|
|
|
select
|
|
|
|
unreachable
|
|
|
|
current_memory
|
|
|
|
grow_memory
|
2017-12-12 01:35:48 +01:00
|
|
|
parseInt
|
|
|
|
parseFloat
|
2017-12-15 17:23:04 +01:00
|
|
|
changetype
|
|
|
|
assert
|
2017-12-15 15:00:19 +01:00
|
|
|
i8
|
|
|
|
i16
|
|
|
|
i32
|
|
|
|
i64
|
|
|
|
u8
|
|
|
|
u16
|
|
|
|
u32
|
|
|
|
u64
|
|
|
|
bool
|
|
|
|
f32
|
|
|
|
f64
|
|
|
|
isize
|
|
|
|
usize
|
2017-12-16 17:54:53 +01:00
|
|
|
HEAP_BASE
|
2017-12-03 23:04:33 +01:00
|
|
|
builtins/b
|
|
|
|
builtins/i
|
|
|
|
builtins/I
|
|
|
|
builtins/f
|
|
|
|
builtins/F
|
|
|
|
builtins/s
|
|
|
|
[program.exports]
|
|
|
|
|
|
|
|
;)
|