Avoid trampolines where optional arguments are constant literals, see #102; Fix temporary local flags not being cleared; Fix inlined temporary locals not being free'd; Fix inlined flows not breaking after returns; Allow changetype of u32s, i.e. function pointers

This commit is contained in:
dcodeIO
2018-05-11 16:31:56 +02:00
parent ef9b43740d
commit e415377cda
35 changed files with 3424 additions and 4059 deletions

View File

@ -48,9 +48,6 @@
(func $start (; 5 ;) (type $v)
(local $0 i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(drop
(call $abi/internal)
)
@ -87,16 +84,16 @@
)
)
(block
(set_local $1
(set_local $0
(i32.const 256)
)
(if
(get_global $abi/condition)
(set_local $1
(set_local $0
(i32.div_s
(i32.shr_s
(i32.shl
(get_local $1)
(get_local $0)
(i32.const 24)
)
(i32.const 24)
@ -104,11 +101,11 @@
(i32.const 2)
)
)
(set_local $1
(set_local $0
(i32.div_s
(i32.shr_s
(i32.shl
(get_local $1)
(get_local $0)
(i32.const 24)
)
(i32.const 24)
@ -122,7 +119,7 @@
(i32.eqz
(i32.shr_s
(i32.shl
(get_local $1)
(get_local $0)
(i32.const 24)
)
(i32.const 24)
@ -141,16 +138,16 @@
)
)
(block
(set_local $2
(set_local $0
(i32.const 256)
)
(if
(get_global $abi/condition)
(set_local $2
(set_local $0
(i32.shr_s
(i32.shr_s
(i32.shl
(get_local $2)
(get_local $0)
(i32.const 24)
)
(i32.const 24)
@ -158,9 +155,9 @@
(i32.const 24)
)
)
(set_local $2
(set_local $0
(i32.and
(get_local $2)
(get_local $0)
(i32.const 127)
)
)
@ -168,7 +165,7 @@
(if
(i32.eqz
(i32.eqz
(get_local $2)
(get_local $0)
)
)
(block
@ -210,7 +207,7 @@
)
)
(block
(set_local $3
(set_local $0
(i32.ctz
(i32.const 2)
)
@ -218,7 +215,7 @@
(if
(i32.eqz
(i32.and
(get_local $3)
(get_local $0)
(i32.const 1)
)
)
@ -232,7 +229,7 @@
(unreachable)
)
)
(set_local $3
(set_local $0
(i32.clz
(i32.const 1)
)
@ -240,7 +237,7 @@
(if
(i32.eqz
(i32.and
(get_local $3)
(get_local $0)
(i32.const 1)
)
)
@ -254,14 +251,14 @@
(unreachable)
)
)
(set_local $4
(set_local $1
(i32.ctz
(i32.const 2)
)
)
(if
(i32.eqz
(get_local $4)
(get_local $1)
)
(block
(call $abort
@ -273,14 +270,14 @@
(unreachable)
)
)
(set_local $4
(set_local $1
(i32.clz
(i32.const 1)
)
)
(if
(i32.eqz
(get_local $4)
(get_local $1)
)
(block
(call $abort

File diff suppressed because it is too large Load Diff

View File

@ -35,21 +35,6 @@
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(local $9 i32)
(local $10 i32)
(local $11 i32)
(local $12 i32)
(local $13 i32)
(local $14 i32)
(local $15 i32)
(local $16 i32)
(local $17 i32)
(local $18 i32)
(local $19 i32)
(local $20 i32)
(local $21 i32)
(local $22 i32)
(block
(set_local $0
(f32.const -1)
@ -102,12 +87,12 @@
(i32.eqz
(i32.eq
(block $inlining/func_ii|inlined.1 (result i32)
(set_local $3
(set_local $2
(i32.const 41)
)
(if
(i32.eq
(get_local $3)
(get_local $2)
(i32.const 42)
)
(br $inlining/func_ii|inlined.1
@ -117,7 +102,7 @@
(br $inlining/func_ii|inlined.1
(if (result i32)
(i32.lt_s
(get_local $3)
(get_local $2)
(i32.const 42)
)
(i32.const 2)
@ -142,12 +127,12 @@
(i32.eqz
(i32.eq
(block $inlining/func_ii|inlined.2 (result i32)
(set_local $4
(set_local $2
(i32.const 43)
)
(if
(i32.eq
(get_local $4)
(get_local $2)
(i32.const 42)
)
(br $inlining/func_ii|inlined.2
@ -157,7 +142,7 @@
(br $inlining/func_ii|inlined.2
(if (result i32)
(i32.lt_s
(get_local $4)
(get_local $2)
(i32.const 42)
)
(i32.const 2)
@ -182,11 +167,11 @@
(i32.eqz
(i32.eq
(block $inlining/func_ii_opt|inlined.0 (result i32)
(set_local $5
(set_local $2
(i32.const 0)
)
(br $inlining/func_ii_opt|inlined.0
(get_local $5)
(get_local $2)
)
)
(i32.const 0)
@ -206,11 +191,11 @@
(i32.eqz
(i32.eq
(block $inlining/func_ii_opt|inlined.1 (result i32)
(set_local $6
(set_local $2
(i32.const 1)
)
(br $inlining/func_ii_opt|inlined.1
(get_local $6)
(get_local $2)
)
)
(i32.const 1)
@ -230,29 +215,28 @@
(i32.eqz
(i32.eq
(block $inlining/func_ii_loc|inlined.0 (result i32)
(set_local $7
(set_local $2
(i32.const 2)
)
(set_local $8
(get_local $7)
(set_local $3
(get_local $2)
)
(nop)
(block
(set_local $10
(get_local $8)
(set_local $5
(get_local $3)
)
(set_local $11
(get_local $10)
(set_local $6
(get_local $5)
)
(set_local $9
(set_local $4
(i32.add
(get_local $11)
(get_local $6)
(i32.const 1)
)
)
)
(br $inlining/func_ii_loc|inlined.0
(get_local $9)
(get_local $4)
)
)
(i32.const 3)
@ -272,29 +256,28 @@
(i32.eqz
(i32.eq
(block $inlining/func_ii_loc|inlined.1 (result i32)
(set_local $12
(set_local $4
(i32.const 3)
)
(set_local $13
(get_local $12)
(set_local $3
(get_local $4)
)
(nop)
(block
(set_local $15
(get_local $13)
(set_local $6
(get_local $3)
)
(set_local $16
(get_local $15)
(set_local $5
(get_local $6)
)
(set_local $14
(set_local $2
(i32.add
(get_local $16)
(get_local $5)
(i32.const 1)
)
)
)
(br $inlining/func_ii_loc|inlined.1
(get_local $14)
(get_local $2)
)
)
(i32.const 4)
@ -311,7 +294,7 @@
)
)
(block $inlining/func_iv|inlined.0
(set_local $17
(set_local $2
(i32.const 0)
)
)
@ -348,16 +331,16 @@
(i32.eqz
(i32.eq
(block $inlining/Foo.method_static|inlined.0 (result i32)
(set_local $18
(set_local $2
(i32.const 42)
)
(set_local $19
(set_local $3
(i32.const 2)
)
(br $inlining/Foo.method_static|inlined.0
(i32.add
(get_local $18)
(get_local $19)
(get_local $2)
(get_local $3)
)
)
)
@ -374,21 +357,21 @@
(unreachable)
)
)
(set_local $20
(set_local $7
(i32.const 123)
)
(if
(i32.eqz
(i32.eq
(block $inlining/Foo#method_this|inlined.0 (result i32)
(set_local $21
(set_local $3
(i32.const 43)
)
(set_local $22
(set_local $2
(i32.const 3)
)
(br $inlining/Foo#method_this|inlined.0
(get_local $20)
(get_local $7)
)
)
(i32.const 123)

View File

@ -370,13 +370,13 @@
(if
(f64.le
(f64.add
(tee_local $8
(tee_local $7
(f64.mul
(get_local $4)
(get_local $4)
)
)
(tee_local $7
(tee_local $8
(f64.mul
(get_local $5)
(get_local $5)
@ -401,8 +401,8 @@
(set_local $4
(f64.add
(f64.sub
(get_local $8)
(get_local $7)
(get_local $8)
)
(get_local $10)
)
@ -424,7 +424,7 @@
)
)
)
(set_local $8
(set_local $7
(f64.min
(f64.const 8)
(f64.convert_u/i32
@ -438,10 +438,10 @@
(f64.convert_u/i32
(get_local $6)
)
(get_local $8)
(get_local $7)
)
(block
(set_local $7
(set_local $8
(f64.add
(f64.sub
(f64.mul
@ -469,7 +469,7 @@
)
)
(set_local $4
(get_local $7)
(get_local $8)
)
(set_local $6
(i32.add

View File

@ -347,10 +347,7 @@
(local $14 i32)
(local $15 f64)
(local $16 f64)
(local $17 f64)
(local $18 f64)
(local $19 f64)
(local $20 i32)
(local $17 i32)
(set_local $4
(f64.div
(f64.convert_u/i32
@ -497,7 +494,7 @@
)
)
(block $break|2
(set_local $16
(set_local $15
(f64.min
(f64.const 8)
(f64.convert_u/i32
@ -511,11 +508,11 @@
(f64.convert_u/i32
(get_local $14)
)
(get_local $16)
(get_local $15)
)
(block
(block
(set_local $17
(set_local $16
(f64.add
(f64.sub
(f64.mul
@ -543,7 +540,7 @@
)
)
(set_local $10
(get_local $17)
(get_local $16)
)
)
(set_local $14
@ -557,12 +554,12 @@
)
)
)
(set_local $19
(set_local $15
(f64.div
(call $~lib/math/NativeMath.log
(call $~lib/math/NativeMath.log
(block $~lib/math/NativeMath.sqrt|inlined.0 (result f64)
(set_local $18
(set_local $15
(f64.add
(f64.mul
(get_local $10)
@ -576,7 +573,7 @@
)
(br $~lib/math/NativeMath.sqrt|inlined.0
(f64.sqrt
(get_local $18)
(get_local $15)
)
)
)
@ -585,10 +582,10 @@
(f64.const 0.6931471805599453)
)
)
(set_local $20
(set_local $17
(if (result i32)
(call $isFinite<f64>
(get_local $19)
(get_local $15)
)
(i32.trunc_u/f64
(f64.mul
@ -607,7 +604,7 @@
(i32.const 1)
)
)
(get_local $19)
(get_local $15)
)
(f64.convert_u/i32
(get_local $3)
@ -635,7 +632,7 @@
)
(i32.const 1)
)
(get_local $20)
(get_local $17)
)
)
(set_local $8

View File

@ -8,6 +8,7 @@
(start $start)
(func $start (; 1 ;) (type $v)
(local $0 i32)
(local $1 i32)
(if
(i32.ne
(tee_local $0
@ -48,15 +49,18 @@
(unreachable)
)
)
(set_local $0
(i32.add
(tee_local $1
(get_local $0)
)
(i32.const 1)
)
)
(if
(i32.ne
(i32.and
(tee_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(get_local $0)
(i32.const 255)
)
(i32.const 128)
@ -71,15 +75,18 @@
(unreachable)
)
)
(set_local $0
(i32.sub
(tee_local $1
(get_local $0)
)
(i32.const 1)
)
)
(if
(i32.ne
(i32.and
(tee_local $0
(i32.sub
(get_local $0)
(i32.const 1)
)
)
(get_local $0)
(i32.const 255)
)
(i32.const 127)
@ -247,15 +254,18 @@
(unreachable)
)
)
(set_local $0
(i32.add
(tee_local $1
(get_local $0)
)
(i32.const 1)
)
)
(if
(i32.ne
(i32.and
(tee_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(get_local $0)
(i32.const 65535)
)
(i32.const 32768)
@ -270,15 +280,18 @@
(unreachable)
)
)
(set_local $0
(i32.sub
(tee_local $1
(get_local $0)
)
(i32.const 1)
)
)
(if
(i32.ne
(i32.and
(tee_local $0
(i32.sub
(get_local $0)
(i32.const 1)
)
)
(get_local $0)
(i32.const 65535)
)
(i32.const 32767)
@ -446,15 +459,18 @@
(unreachable)
)
)
(set_local $0
(i32.sub
(tee_local $1
(get_local $0)
)
(i32.const 1)
)
)
(if
(i32.ne
(i32.and
(tee_local $0
(i32.sub
(get_local $0)
(i32.const 1)
)
)
(get_local $0)
(i32.const 255)
)
(i32.const 255)
@ -469,14 +485,17 @@
(unreachable)
)
)
(set_local $0
(i32.add
(tee_local $1
(get_local $0)
)
(i32.const 1)
)
)
(if
(i32.and
(tee_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(get_local $0)
(i32.const 255)
)
(block
@ -636,15 +655,18 @@
(unreachable)
)
)
(set_local $0
(i32.sub
(tee_local $1
(get_local $0)
)
(i32.const 1)
)
)
(if
(i32.ne
(i32.and
(tee_local $0
(i32.sub
(get_local $0)
(i32.const 1)
)
)
(get_local $0)
(i32.const 65535)
)
(i32.const 65535)
@ -659,14 +681,17 @@
(unreachable)
)
)
(set_local $0
(i32.add
(tee_local $1
(get_local $0)
)
(i32.const 1)
)
)
(if
(i32.and
(tee_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(get_local $0)
(i32.const 65535)
)
(block

View File

@ -11,12 +11,6 @@
(local $0 i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(block
(set_local $0
(i32.const 127)
@ -301,12 +295,12 @@
)
)
(block
(set_local $2
(set_local $1
(i32.const 32767)
)
(set_local $2
(set_local $1
(i32.add
(get_local $2)
(get_local $1)
(i32.const 1)
)
)
@ -315,7 +309,7 @@
(i32.eq
(i32.shr_s
(i32.shl
(get_local $2)
(get_local $1)
(i32.const 16)
)
(i32.const 16)
@ -333,9 +327,9 @@
(unreachable)
)
)
(set_local $2
(set_local $1
(i32.sub
(get_local $2)
(get_local $1)
(i32.const 1)
)
)
@ -344,7 +338,7 @@
(i32.eq
(i32.shr_s
(i32.shl
(get_local $2)
(get_local $1)
(i32.const 16)
)
(i32.const 16)
@ -362,18 +356,18 @@
(unreachable)
)
)
(set_local $3
(set_local $0
(block (result i32)
(set_local $4
(get_local $2)
)
(set_local $2
(get_local $1)
)
(set_local $1
(i32.add
(get_local $4)
(get_local $2)
(i32.const 1)
)
)
(get_local $4)
(get_local $2)
)
)
(if
@ -381,7 +375,7 @@
(i32.eq
(i32.shr_s
(i32.shl
(get_local $2)
(get_local $1)
(i32.const 16)
)
(i32.const 16)
@ -399,18 +393,18 @@
(unreachable)
)
)
(set_local $3
(set_local $0
(block (result i32)
(set_local $4
(get_local $2)
)
(set_local $2
(get_local $1)
)
(set_local $1
(i32.sub
(get_local $4)
(get_local $2)
(i32.const 1)
)
)
(get_local $4)
(get_local $2)
)
)
(if
@ -418,7 +412,7 @@
(i32.eq
(i32.shr_s
(i32.shl
(get_local $2)
(get_local $1)
(i32.const 16)
)
(i32.const 16)
@ -436,9 +430,9 @@
(unreachable)
)
)
(set_local $2
(set_local $1
(i32.add
(get_local $2)
(get_local $1)
(i32.const 1)
)
)
@ -447,7 +441,7 @@
(i32.eq
(i32.shr_s
(i32.shl
(get_local $2)
(get_local $1)
(i32.const 16)
)
(i32.const 16)
@ -465,9 +459,9 @@
(unreachable)
)
)
(set_local $2
(set_local $1
(i32.sub
(get_local $2)
(get_local $1)
(i32.const 1)
)
)
@ -476,7 +470,7 @@
(i32.eq
(i32.shr_s
(i32.shl
(get_local $2)
(get_local $1)
(i32.const 16)
)
(i32.const 16)
@ -494,10 +488,10 @@
(unreachable)
)
)
(set_local $3
(tee_local $2
(set_local $0
(tee_local $1
(i32.add
(get_local $2)
(get_local $1)
(i32.const 1)
)
)
@ -507,7 +501,7 @@
(i32.eq
(i32.shr_s
(i32.shl
(get_local $2)
(get_local $1)
(i32.const 16)
)
(i32.const 16)
@ -525,10 +519,10 @@
(unreachable)
)
)
(set_local $3
(tee_local $2
(set_local $0
(tee_local $1
(i32.sub
(get_local $2)
(get_local $1)
(i32.const 1)
)
)
@ -538,7 +532,7 @@
(i32.eq
(i32.shr_s
(i32.shl
(get_local $2)
(get_local $1)
(i32.const 16)
)
(i32.const 16)
@ -562,7 +556,7 @@
(i32.shr_s
(i32.shl
(i32.add
(get_local $2)
(get_local $1)
(i32.const 1)
)
(i32.const 16)
@ -584,12 +578,12 @@
)
)
(block
(set_local $4
(set_local $0
(i32.const 0)
)
(set_local $4
(set_local $0
(i32.sub
(get_local $4)
(get_local $0)
(i32.const 1)
)
)
@ -597,7 +591,7 @@
(i32.eqz
(i32.eq
(i32.and
(get_local $4)
(get_local $0)
(i32.const 255)
)
(i32.const 255)
@ -613,9 +607,9 @@
(unreachable)
)
)
(set_local $4
(set_local $0
(i32.add
(get_local $4)
(get_local $0)
(i32.const 1)
)
)
@ -623,7 +617,7 @@
(i32.eqz
(i32.eq
(i32.and
(get_local $4)
(get_local $0)
(i32.const 255)
)
(i32.const 0)
@ -639,25 +633,25 @@
(unreachable)
)
)
(set_local $5
(set_local $1
(block (result i32)
(set_local $6
(get_local $4)
(set_local $2
(get_local $0)
)
(set_local $4
(set_local $0
(i32.sub
(get_local $6)
(get_local $2)
(i32.const 1)
)
)
(get_local $6)
(get_local $2)
)
)
(if
(i32.eqz
(i32.eq
(i32.and
(get_local $4)
(get_local $0)
(i32.const 255)
)
(i32.const 255)
@ -673,25 +667,25 @@
(unreachable)
)
)
(set_local $5
(set_local $1
(block (result i32)
(set_local $6
(get_local $4)
(set_local $2
(get_local $0)
)
(set_local $4
(set_local $0
(i32.add
(get_local $6)
(get_local $2)
(i32.const 1)
)
)
(get_local $6)
(get_local $2)
)
)
(if
(i32.eqz
(i32.eq
(i32.and
(get_local $4)
(get_local $0)
(i32.const 255)
)
(i32.const 0)
@ -707,9 +701,9 @@
(unreachable)
)
)
(set_local $4
(set_local $0
(i32.sub
(get_local $4)
(get_local $0)
(i32.const 1)
)
)
@ -717,7 +711,7 @@
(i32.eqz
(i32.eq
(i32.and
(get_local $4)
(get_local $0)
(i32.const 255)
)
(i32.const 255)
@ -733,9 +727,9 @@
(unreachable)
)
)
(set_local $4
(set_local $0
(i32.add
(get_local $4)
(get_local $0)
(i32.const 1)
)
)
@ -743,7 +737,7 @@
(i32.eqz
(i32.eq
(i32.and
(get_local $4)
(get_local $0)
(i32.const 255)
)
(i32.const 0)
@ -759,10 +753,10 @@
(unreachable)
)
)
(set_local $5
(tee_local $4
(set_local $1
(tee_local $0
(i32.sub
(get_local $4)
(get_local $0)
(i32.const 1)
)
)
@ -771,7 +765,7 @@
(i32.eqz
(i32.eq
(i32.and
(get_local $4)
(get_local $0)
(i32.const 255)
)
(i32.const 255)
@ -787,10 +781,10 @@
(unreachable)
)
)
(set_local $5
(tee_local $4
(set_local $1
(tee_local $0
(i32.add
(get_local $4)
(get_local $0)
(i32.const 1)
)
)
@ -799,7 +793,7 @@
(i32.eqz
(i32.eq
(i32.and
(get_local $4)
(get_local $0)
(i32.const 255)
)
(i32.const 0)
@ -820,7 +814,7 @@
(i32.eq
(i32.and
(i32.sub
(get_local $4)
(get_local $0)
(i32.const 1)
)
(i32.const 255)
@ -840,12 +834,12 @@
)
)
(block
(set_local $6
(set_local $1
(i32.const 0)
)
(set_local $6
(set_local $1
(i32.sub
(get_local $6)
(get_local $1)
(i32.const 1)
)
)
@ -853,7 +847,7 @@
(i32.eqz
(i32.eq
(i32.and
(get_local $6)
(get_local $1)
(i32.const 65535)
)
(i32.const 65535)
@ -869,9 +863,9 @@
(unreachable)
)
)
(set_local $6
(set_local $1
(i32.add
(get_local $6)
(get_local $1)
(i32.const 1)
)
)
@ -879,7 +873,7 @@
(i32.eqz
(i32.eq
(i32.and
(get_local $6)
(get_local $1)
(i32.const 65535)
)
(i32.const 0)
@ -895,25 +889,25 @@
(unreachable)
)
)
(set_local $7
(set_local $0
(block (result i32)
(set_local $8
(get_local $6)
(set_local $2
(get_local $1)
)
(set_local $6
(set_local $1
(i32.sub
(get_local $8)
(get_local $2)
(i32.const 1)
)
)
(get_local $8)
(get_local $2)
)
)
(if
(i32.eqz
(i32.eq
(i32.and
(get_local $6)
(get_local $1)
(i32.const 65535)
)
(i32.const 65535)
@ -929,25 +923,25 @@
(unreachable)
)
)
(set_local $7
(set_local $0
(block (result i32)
(set_local $8
(get_local $6)
(set_local $2
(get_local $1)
)
(set_local $6
(set_local $1
(i32.add
(get_local $8)
(get_local $2)
(i32.const 1)
)
)
(get_local $8)
(get_local $2)
)
)
(if
(i32.eqz
(i32.eq
(i32.and
(get_local $6)
(get_local $1)
(i32.const 65535)
)
(i32.const 0)
@ -963,9 +957,9 @@
(unreachable)
)
)
(set_local $6
(set_local $1
(i32.sub
(get_local $6)
(get_local $1)
(i32.const 1)
)
)
@ -973,7 +967,7 @@
(i32.eqz
(i32.eq
(i32.and
(get_local $6)
(get_local $1)
(i32.const 65535)
)
(i32.const 65535)
@ -989,9 +983,9 @@
(unreachable)
)
)
(set_local $6
(set_local $1
(i32.add
(get_local $6)
(get_local $1)
(i32.const 1)
)
)
@ -999,7 +993,7 @@
(i32.eqz
(i32.eq
(i32.and
(get_local $6)
(get_local $1)
(i32.const 65535)
)
(i32.const 0)
@ -1015,10 +1009,10 @@
(unreachable)
)
)
(set_local $7
(tee_local $6
(set_local $0
(tee_local $1
(i32.sub
(get_local $6)
(get_local $1)
(i32.const 1)
)
)
@ -1027,7 +1021,7 @@
(i32.eqz
(i32.eq
(i32.and
(get_local $6)
(get_local $1)
(i32.const 65535)
)
(i32.const 65535)
@ -1043,10 +1037,10 @@
(unreachable)
)
)
(set_local $7
(tee_local $6
(set_local $0
(tee_local $1
(i32.add
(get_local $6)
(get_local $1)
(i32.const 1)
)
)
@ -1055,7 +1049,7 @@
(i32.eqz
(i32.eq
(i32.and
(get_local $6)
(get_local $1)
(i32.const 65535)
)
(i32.const 0)
@ -1076,7 +1070,7 @@
(i32.eq
(i32.and
(i32.sub
(get_local $6)
(get_local $1)
(i32.const 1)
)
(i32.const 65535)

View File

@ -10,11 +10,10 @@
(start $start)
(func $scoped/fn (; 0 ;) (type $iv) (param $0 i32)
(local $1 i32)
(local $2 i32)
(set_local $1
(i32.const 0)
)
(set_local $2
(set_local $1
(get_local $0)
)
)

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,6 @@
(type $iiii (func (param i32 i32 i32) (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32)))
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
(global $~argc (mut i32) (i32.const 0))
(memory $0 1)
(data (i32.const 8) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s")
(data (i32.const 40) "\04\00\00\00n\00u\00l\00l")
@ -208,34 +207,8 @@
)
)
)
(func $~lib/string/String#startsWith|trampoline (; 6 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(block $1of1
(block $0of1
(block $oob
(br_table $0of1 $1of1 $oob
(i32.sub
(get_global $~argc)
(i32.const 1)
)
)
)
(unreachable)
)
(set_local $2
(i32.const 0)
)
)
(func $std/array-access/stringArrayMethodCall (; 6 ;) (type $ii) (param $0 i32) (result i32)
(call $~lib/string/String#startsWith
(get_local $0)
(get_local $1)
(get_local $2)
)
)
(func $std/array-access/stringArrayMethodCall (; 7 ;) (type $ii) (param $0 i32) (result i32)
(set_global $~argc
(i32.const 1)
)
(call $~lib/string/String#startsWith|trampoline
(call $~lib/array/Array<Array<i32>>#__get
(get_local $0)
(i32.const 0)
@ -244,7 +217,7 @@
(i32.const 0)
)
)
(func $std/array-access/stringArrayArrayPropertyAccess (; 8 ;) (type $ii) (param $0 i32) (result i32)
(func $std/array-access/stringArrayArrayPropertyAccess (; 7 ;) (type $ii) (param $0 i32) (result i32)
(i32.load
(call $~lib/array/Array<Array<i32>>#__get
(call $~lib/array/Array<Array<i32>>#__get
@ -255,11 +228,8 @@
)
)
)
(func $std/array-access/stringArrayArrayMethodCall (; 9 ;) (type $ii) (param $0 i32) (result i32)
(set_global $~argc
(i32.const 1)
)
(call $~lib/string/String#startsWith|trampoline
(func $std/array-access/stringArrayArrayMethodCall (; 8 ;) (type $ii) (param $0 i32) (result i32)
(call $~lib/string/String#startsWith
(call $~lib/array/Array<Array<i32>>#__get
(call $~lib/array/Array<Array<i32>>#__get
(get_local $0)

View File

@ -9,7 +9,6 @@
(global $~lib/internal/allocator/AL_MASK i32 (i32.const 7))
(global $~lib/internal/arraybuffer/HEADER_SIZE i32 (i32.const 8))
(global $~lib/internal/string/HEADER_SIZE i32 (i32.const 4))
(global $~argc (mut i32) (i32.const 0))
(global $HEAP_BASE i32 (i32.const 52))
(memory $0 1)
(data (i32.const 4) "\00\00\00\00")
@ -321,47 +320,19 @@
)
)
)
(func $~lib/string/String#startsWith|trampoline (; 8 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(block $1of1
(block $0of1
(block $oob
(br_table $0of1 $1of1 $oob
(i32.sub
(get_global $~argc)
(i32.const 1)
)
)
(func $std/array-access/stringArrayMethodCall (; 8 ;) (type $ii) (param $0 i32) (result i32)
(return
(call $~lib/string/String#startsWith
(call $~lib/array/Array<String>#__get
(get_local $0)
(i32.const 0)
)
(unreachable)
)
(set_local $2
(i32.const 4)
(i32.const 0)
)
)
(call $~lib/string/String#startsWith
(get_local $0)
(get_local $1)
(get_local $2)
)
)
(func $std/array-access/stringArrayMethodCall (; 9 ;) (type $ii) (param $0 i32) (result i32)
(return
(block (result i32)
(set_global $~argc
(i32.const 1)
)
(call $~lib/string/String#startsWith|trampoline
(call $~lib/array/Array<String>#__get
(get_local $0)
(i32.const 0)
)
(i32.const 4)
(i32.const 0)
)
)
)
)
(func $~lib/array/Array<Array<String>>#__get (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/array/Array<Array<String>>#__get (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(set_local $2
(i32.load
@ -396,7 +367,7 @@
)
)
)
(func $std/array-access/stringArrayArrayPropertyAccess (; 11 ;) (type $ii) (param $0 i32) (result i32)
(func $std/array-access/stringArrayArrayPropertyAccess (; 10 ;) (type $ii) (param $0 i32) (result i32)
(return
(i32.load
(call $~lib/array/Array<String>#__get
@ -409,23 +380,18 @@
)
)
)
(func $std/array-access/stringArrayArrayMethodCall (; 12 ;) (type $ii) (param $0 i32) (result i32)
(func $std/array-access/stringArrayArrayMethodCall (; 11 ;) (type $ii) (param $0 i32) (result i32)
(return
(block (result i32)
(set_global $~argc
(call $~lib/string/String#startsWith
(call $~lib/array/Array<String>#__get
(call $~lib/array/Array<Array<String>>#__get
(get_local $0)
(i32.const 0)
)
(i32.const 1)
)
(call $~lib/string/String#startsWith|trampoline
(call $~lib/array/Array<String>#__get
(call $~lib/array/Array<Array<String>>#__get
(get_local $0)
(i32.const 0)
)
(i32.const 1)
)
(i32.const 4)
(i32.const 0)
)
(i32.const 4)
(i32.const 0)
)
)
)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,7 @@
(module
(type $ii (func (param i32) (result i32)))
(type $iv (func (param i32)))
(type $fi (func (param f32) (result i32)))
(type $Fi (func (param f64) (result i32)))
(type $Ii (func (param i64) (result i32)))
(type $v (func))
(import "env" "logi" (func $std/hash/logi (param i32)))
(memory $0 1)
@ -11,55 +10,7 @@
(data (i32.const 24) "\03\00\00\00a\00b\00c")
(export "memory" (memory $0))
(start $start)
(func $~lib/internal/hash/hash<usize> (; 1 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(i32.mul
(i32.xor
(i32.mul
(i32.xor
(i32.mul
(i32.xor
(i32.mul
(i32.xor
(i32.and
(tee_local $1
(get_local $0)
)
(i32.const 255)
)
(i32.const -2128831035)
)
(i32.const 16777619)
)
(i32.and
(i32.shr_u
(get_local $1)
(i32.const 8)
)
(i32.const 255)
)
)
(i32.const 16777619)
)
(i32.and
(i32.shr_u
(get_local $1)
(i32.const 16)
)
(i32.const 255)
)
)
(i32.const 16777619)
)
(i32.shr_u
(get_local $1)
(i32.const 24)
)
)
(i32.const 16777619)
)
)
(func $~lib/internal/hash/hash<String> (; 2 ;) (type $ii) (param $0 i32) (result i32)
(func $~lib/internal/hash/hashStr (; 1 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@ -107,8 +58,7 @@
)
(get_local $2)
)
(func $~lib/internal/hash/hash<f32> (; 3 ;) (type $fi) (param $0 f32) (result i32)
(local $1 i32)
(func $~lib/internal/hash/hash32 (; 2 ;) (type $ii) (param $0 i32) (result i32)
(i32.mul
(i32.xor
(i32.mul
@ -118,11 +68,7 @@
(i32.mul
(i32.xor
(i32.and
(tee_local $1
(i32.reinterpret/f32
(get_local $0)
)
)
(get_local $0)
(i32.const 255)
)
(i32.const -2128831035)
@ -131,7 +77,7 @@
)
(i32.and
(i32.shr_u
(get_local $1)
(get_local $0)
(i32.const 8)
)
(i32.const 255)
@ -141,7 +87,7 @@
)
(i32.and
(i32.shr_u
(get_local $1)
(get_local $0)
(i32.const 16)
)
(i32.const 255)
@ -150,16 +96,15 @@
(i32.const 16777619)
)
(i32.shr_u
(get_local $1)
(get_local $0)
(i32.const 24)
)
)
(i32.const 16777619)
)
)
(func $~lib/internal/hash/hash<f64> (; 4 ;) (type $Fi) (param $0 f64) (result i32)
(func $~lib/internal/hash/hash64 (; 3 ;) (type $Ii) (param $0 i64) (result i32)
(local $1 i32)
(local $2 i64)
(i32.mul
(i32.xor
(i32.mul
@ -179,11 +124,7 @@
(i32.and
(tee_local $1
(i32.wrap/i64
(tee_local $2
(i64.reinterpret/f64
(get_local $0)
)
)
(get_local $0)
)
)
(i32.const 255)
@ -223,7 +164,7 @@
(tee_local $1
(i32.wrap/i64
(i64.shr_u
(get_local $2)
(get_local $0)
(i64.const 32)
)
)
@ -261,90 +202,90 @@
(i32.const 16777619)
)
)
(func $start (; 5 ;) (type $v)
(func $start (; 4 ;) (type $v)
(call $std/hash/logi
(call $~lib/internal/hash/hash<usize>
(call $~lib/internal/hash/hashStr
(i32.const 0)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<String>
(call $~lib/internal/hash/hashStr
(i32.const 4)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<String>
(call $~lib/internal/hash/hashStr
(i32.const 8)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<String>
(call $~lib/internal/hash/hashStr
(i32.const 16)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<String>
(call $~lib/internal/hash/hashStr
(i32.const 24)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f32>
(f32.const 0)
(call $~lib/internal/hash/hash32
(i32.const 0)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f32>
(f32.const 1)
(call $~lib/internal/hash/hash32
(i32.const 1065353216)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f32>
(f32.const 1.100000023841858)
(call $~lib/internal/hash/hash32
(i32.const 1066192077)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f32>
(f32.const 0)
(call $~lib/internal/hash/hash32
(i32.const 0)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f32>
(f32.const inf)
(call $~lib/internal/hash/hash32
(i32.const 2139095040)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f32>
(f32.const nan:0x400000)
(call $~lib/internal/hash/hash32
(i32.const 2143289344)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f64>
(f64.const 0)
(call $~lib/internal/hash/hash64
(i64.const 0)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f64>
(f64.const 1)
(call $~lib/internal/hash/hash64
(i64.const 4607182418800017408)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f64>
(f64.const 1.1)
(call $~lib/internal/hash/hash64
(i64.const 4607632778762754458)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f64>
(f64.const 0)
(call $~lib/internal/hash/hash64
(i64.const 0)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f64>
(f64.const inf)
(call $~lib/internal/hash/hash64
(i64.const 9218868437227405312)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f64>
(f64.const nan:0x8000000000000)
(call $~lib/internal/hash/hash64
(i64.const 9221120237041090560)
)
)
)

View File

@ -2,22 +2,22 @@ import { hash } from "internal/hash";
declare function logi(i: i32): void;
logi(hash(null));
logi(hash(""));
logi(hash("a"));
logi(hash("ab"));
logi(hash("abc"));
logi(hash<string>(null));
logi(hash<string>(""));
logi(hash<string>("a"));
logi(hash<string>("ab"));
logi(hash<string>("abc"));
logi(hash(<f32>0.0));
logi(hash(<f32>1.0));
logi(hash(<f32>1.1));
logi(hash(<f32>-0));
logi(hash(<f32>Infinity));
logi(hash(<f32>NaN));
logi(hash<f32>(0.0));
logi(hash<f32>(1.0));
logi(hash<f32>(1.1));
logi(hash<f32>(-0));
logi(hash<f32>(Infinity));
logi(hash<f32>(NaN));
logi(hash(<f64>0.0));
logi(hash(<f64>1.0));
logi(hash(<f64>1.1));
logi(hash(<f64>-0));
logi(hash(<f64>Infinity));
logi(hash(<f64>NaN));
logi(hash<f64>(0.0));
logi(hash<f64>(1.0));
logi(hash<f64>(1.1));
logi(hash<f64>(-0));
logi(hash<f64>(Infinity));
logi(hash<f64>(NaN));

View File

@ -1,8 +1,7 @@
(module
(type $ii (func (param i32) (result i32)))
(type $iv (func (param i32)))
(type $fi (func (param f32) (result i32)))
(type $Fi (func (param f64) (result i32)))
(type $Ii (func (param i64) (result i32)))
(type $v (func))
(import "env" "logi" (func $std/hash/logi (param i32)))
(global $~lib/internal/allocator/AL_BITS i32 (i32.const 3))
@ -24,76 +23,7 @@
(data (i32.const 24) "\03\00\00\00a\00b\00c\00")
(export "memory" (memory $0))
(start $start)
(func $~lib/internal/hash/hash<usize> (; 1 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(set_local $1
(i32.const -2128831035)
)
(block
(set_local $2
(get_local $0)
)
(set_local $1
(i32.mul
(i32.xor
(get_local $1)
(i32.and
(get_local $2)
(i32.const 255)
)
)
(i32.const 16777619)
)
)
(set_local $1
(i32.mul
(i32.xor
(get_local $1)
(i32.and
(i32.shr_u
(get_local $2)
(i32.const 8)
)
(i32.const 255)
)
)
(i32.const 16777619)
)
)
(set_local $1
(i32.mul
(i32.xor
(get_local $1)
(i32.and
(i32.shr_u
(get_local $2)
(i32.const 16)
)
(i32.const 255)
)
)
(i32.const 16777619)
)
)
(set_local $1
(i32.mul
(i32.xor
(get_local $1)
(i32.shr_u
(get_local $2)
(i32.const 24)
)
)
(i32.const 16777619)
)
)
)
(return
(get_local $1)
)
)
(func $~lib/internal/hash/hash<String> (; 2 ;) (type $ii) (param $0 i32) (result i32)
(func $~lib/internal/hash/hashStr (; 1 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@ -150,301 +80,431 @@
(get_local $1)
)
)
(func $~lib/internal/hash/hash<f32> (; 3 ;) (type $fi) (param $0 f32) (result i32)
(func $~lib/internal/hash/hash32 (; 2 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(set_local $1
(i32.const -2128831035)
)
(set_local $1
(i32.mul
(i32.xor
(get_local $1)
(i32.and
(get_local $0)
(i32.const 255)
)
)
(i32.const 16777619)
)
)
(set_local $1
(i32.mul
(i32.xor
(get_local $1)
(i32.and
(i32.shr_u
(get_local $0)
(i32.const 8)
)
(i32.const 255)
)
)
(i32.const 16777619)
)
)
(set_local $1
(i32.mul
(i32.xor
(get_local $1)
(i32.and
(i32.shr_u
(get_local $0)
(i32.const 16)
)
(i32.const 255)
)
)
(i32.const 16777619)
)
)
(set_local $1
(i32.mul
(i32.xor
(get_local $1)
(i32.shr_u
(get_local $0)
(i32.const 24)
)
)
(i32.const 16777619)
)
)
(return
(get_local $1)
)
)
(func $~lib/internal/hash/hash64 (; 3 ;) (type $Ii) (param $0 i64) (result i32)
(local $1 i32)
(local $2 i32)
(set_local $1
(i32.const -2128831035)
)
(block
(set_local $2
(i32.reinterpret/f32
(get_local $0)
)
)
(set_local $1
(i32.mul
(i32.xor
(get_local $1)
(i32.and
(get_local $2)
(i32.const 255)
)
)
(i32.const 16777619)
)
)
(set_local $1
(i32.mul
(i32.xor
(get_local $1)
(i32.and
(i32.shr_u
(get_local $2)
(i32.const 8)
)
(i32.const 255)
)
)
(i32.const 16777619)
)
)
(set_local $1
(i32.mul
(i32.xor
(get_local $1)
(i32.and
(i32.shr_u
(get_local $2)
(i32.const 16)
)
(i32.const 255)
)
)
(i32.const 16777619)
)
)
(set_local $1
(i32.mul
(i32.xor
(get_local $1)
(i32.shr_u
(get_local $2)
(i32.const 24)
)
)
(i32.const 16777619)
)
)
)
(return
(get_local $1)
)
)
(func $~lib/internal/hash/hash<f64> (; 4 ;) (type $Fi) (param $0 f64) (result i32)
(local $1 i32)
(local $2 i64)
(local $3 i32)
(local $4 i32)
(set_local $1
(i32.wrap/i64
(get_local $0)
)
)
(set_local $2
(i32.wrap/i64
(i64.shr_u
(get_local $0)
(i64.const 32)
)
)
)
(set_local $3
(i32.const -2128831035)
)
(block
(set_local $2
(i64.reinterpret/f64
(get_local $0)
(set_local $3
(i32.mul
(i32.xor
(get_local $3)
(i32.and
(get_local $1)
(i32.const 255)
)
)
(i32.const 16777619)
)
(set_local $3
(i32.wrap/i64
(get_local $2)
)
(set_local $3
(i32.mul
(i32.xor
(get_local $3)
(i32.and
(i32.shr_u
(get_local $1)
(i32.const 8)
)
(i32.const 255)
)
)
(i32.const 16777619)
)
(set_local $4
(i32.wrap/i64
(i64.shr_u
)
(set_local $3
(i32.mul
(i32.xor
(get_local $3)
(i32.and
(i32.shr_u
(get_local $1)
(i32.const 16)
)
(i32.const 255)
)
)
(i32.const 16777619)
)
)
(set_local $3
(i32.mul
(i32.xor
(get_local $3)
(i32.shr_u
(get_local $1)
(i32.const 24)
)
)
(i32.const 16777619)
)
)
(set_local $3
(i32.mul
(i32.xor
(get_local $3)
(i32.and
(get_local $2)
(i64.const 32)
(i32.const 255)
)
)
(i32.const 16777619)
)
(set_local $1
(i32.mul
(i32.xor
(get_local $1)
(i32.and
(get_local $3)
(i32.const 255)
)
)
(i32.const 16777619)
)
)
(set_local $1
(i32.mul
(i32.xor
(get_local $1)
(i32.and
(i32.shr_u
(get_local $3)
(i32.const 8)
)
(i32.const 255)
)
)
(i32.const 16777619)
)
)
(set_local $1
(i32.mul
(i32.xor
(get_local $1)
(i32.and
(i32.shr_u
(get_local $3)
(i32.const 16)
)
(i32.const 255)
)
)
(i32.const 16777619)
)
)
(set_local $1
(i32.mul
(i32.xor
(get_local $1)
)
(set_local $3
(i32.mul
(i32.xor
(get_local $3)
(i32.and
(i32.shr_u
(get_local $3)
(i32.const 24)
(get_local $2)
(i32.const 8)
)
(i32.const 255)
)
(i32.const 16777619)
)
(i32.const 16777619)
)
(set_local $1
(i32.mul
(i32.xor
(get_local $1)
(i32.and
(get_local $4)
(i32.const 255)
)
)
(i32.const 16777619)
)
)
(set_local $1
(i32.mul
(i32.xor
(get_local $1)
(i32.and
(i32.shr_u
(get_local $4)
(i32.const 8)
)
(i32.const 255)
)
)
(i32.const 16777619)
)
)
(set_local $1
(i32.mul
(i32.xor
(get_local $1)
(i32.and
(i32.shr_u
(get_local $4)
(i32.const 16)
)
(i32.const 255)
)
)
(i32.const 16777619)
)
)
(set_local $1
(i32.mul
(i32.xor
(get_local $1)
)
(set_local $3
(i32.mul
(i32.xor
(get_local $3)
(i32.and
(i32.shr_u
(get_local $4)
(i32.const 24)
(get_local $2)
(i32.const 16)
)
(i32.const 255)
)
(i32.const 16777619)
)
(i32.const 16777619)
)
)
(set_local $3
(i32.mul
(i32.xor
(get_local $3)
(i32.shr_u
(get_local $2)
(i32.const 24)
)
)
(i32.const 16777619)
)
)
(return
(get_local $1)
(get_local $3)
)
)
(func $start (; 5 ;) (type $v)
(func $start (; 4 ;) (type $v)
(local $0 i32)
(local $1 f32)
(local $2 f64)
(call $std/hash/logi
(call $~lib/internal/hash/hash<usize>
(i32.const 0)
(block $~lib/internal/hash/hash<String>|inlined.0 (result i32)
(set_local $0
(i32.const 0)
)
(br $~lib/internal/hash/hash<String>|inlined.0
(call $~lib/internal/hash/hashStr
(get_local $0)
)
)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<String>
(i32.const 4)
(block $~lib/internal/hash/hash<String>|inlined.1 (result i32)
(set_local $0
(i32.const 4)
)
(br $~lib/internal/hash/hash<String>|inlined.1
(call $~lib/internal/hash/hashStr
(get_local $0)
)
)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<String>
(i32.const 8)
(block $~lib/internal/hash/hash<String>|inlined.2 (result i32)
(set_local $0
(i32.const 8)
)
(br $~lib/internal/hash/hash<String>|inlined.2
(call $~lib/internal/hash/hashStr
(get_local $0)
)
)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<String>
(i32.const 16)
(block $~lib/internal/hash/hash<String>|inlined.3 (result i32)
(set_local $0
(i32.const 16)
)
(br $~lib/internal/hash/hash<String>|inlined.3
(call $~lib/internal/hash/hashStr
(get_local $0)
)
)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<String>
(i32.const 24)
(block $~lib/internal/hash/hash<String>|inlined.4 (result i32)
(set_local $0
(i32.const 24)
)
(br $~lib/internal/hash/hash<String>|inlined.4
(call $~lib/internal/hash/hashStr
(get_local $0)
)
)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f32>
(f32.const 0)
(block $~lib/internal/hash/hash<f32>|inlined.0 (result i32)
(set_local $1
(f32.const 0)
)
(br $~lib/internal/hash/hash<f32>|inlined.0
(call $~lib/internal/hash/hash32
(i32.reinterpret/f32
(get_local $1)
)
)
)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f32>
(f32.const 1)
(block $~lib/internal/hash/hash<f32>|inlined.1 (result i32)
(set_local $1
(f32.const 1)
)
(br $~lib/internal/hash/hash<f32>|inlined.1
(call $~lib/internal/hash/hash32
(i32.reinterpret/f32
(get_local $1)
)
)
)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f32>
(f32.const 1.100000023841858)
(block $~lib/internal/hash/hash<f32>|inlined.2 (result i32)
(set_local $1
(f32.const 1.100000023841858)
)
(br $~lib/internal/hash/hash<f32>|inlined.2
(call $~lib/internal/hash/hash32
(i32.reinterpret/f32
(get_local $1)
)
)
)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f32>
(f32.const 0)
(block $~lib/internal/hash/hash<f32>|inlined.3 (result i32)
(set_local $1
(f32.const 0)
)
(br $~lib/internal/hash/hash<f32>|inlined.3
(call $~lib/internal/hash/hash32
(i32.reinterpret/f32
(get_local $1)
)
)
)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f32>
(f32.const inf)
(block $~lib/internal/hash/hash<f32>|inlined.4 (result i32)
(set_local $1
(f32.const inf)
)
(br $~lib/internal/hash/hash<f32>|inlined.4
(call $~lib/internal/hash/hash32
(i32.reinterpret/f32
(get_local $1)
)
)
)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f32>
(f32.const nan:0x400000)
(block $~lib/internal/hash/hash<f32>|inlined.5 (result i32)
(set_local $1
(f32.const nan:0x400000)
)
(br $~lib/internal/hash/hash<f32>|inlined.5
(call $~lib/internal/hash/hash32
(i32.reinterpret/f32
(get_local $1)
)
)
)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f64>
(f64.const 0)
(block $~lib/internal/hash/hash<f64>|inlined.0 (result i32)
(set_local $2
(f64.const 0)
)
(br $~lib/internal/hash/hash<f64>|inlined.0
(call $~lib/internal/hash/hash64
(i64.reinterpret/f64
(get_local $2)
)
)
)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f64>
(f64.const 1)
(block $~lib/internal/hash/hash<f64>|inlined.1 (result i32)
(set_local $2
(f64.const 1)
)
(br $~lib/internal/hash/hash<f64>|inlined.1
(call $~lib/internal/hash/hash64
(i64.reinterpret/f64
(get_local $2)
)
)
)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f64>
(f64.const 1.1)
(block $~lib/internal/hash/hash<f64>|inlined.2 (result i32)
(set_local $2
(f64.const 1.1)
)
(br $~lib/internal/hash/hash<f64>|inlined.2
(call $~lib/internal/hash/hash64
(i64.reinterpret/f64
(get_local $2)
)
)
)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f64>
(f64.const 0)
(block $~lib/internal/hash/hash<f64>|inlined.3 (result i32)
(set_local $2
(f64.const 0)
)
(br $~lib/internal/hash/hash<f64>|inlined.3
(call $~lib/internal/hash/hash64
(i64.reinterpret/f64
(get_local $2)
)
)
)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f64>
(f64.const inf)
(block $~lib/internal/hash/hash<f64>|inlined.4 (result i32)
(set_local $2
(f64.const inf)
)
(br $~lib/internal/hash/hash<f64>|inlined.4
(call $~lib/internal/hash/hash64
(i64.reinterpret/f64
(get_local $2)
)
)
)
)
)
(call $std/hash/logi
(call $~lib/internal/hash/hash<f64>
(f64.const nan:0x8000000000000)
(block $~lib/internal/hash/hash<f64>|inlined.5 (result i32)
(set_local $2
(f64.const nan:0x8000000000000)
)
(br $~lib/internal/hash/hash<f64>|inlined.5
(call $~lib/internal/hash/hash64
(i64.reinterpret/f64
(get_local $2)
)
)
)
)
)
)

File diff suppressed because it is too large Load Diff

View File

@ -44295,14 +44295,14 @@
(call $~lib/math/JSMath.random)
)
)
(set_local $1
(set_local $0
(i32.const 0)
)
(loop $continue|1
(if
(f64.lt
(f64.convert_s/i32
(get_local $1)
(get_local $0)
)
(f64.const 1e6)
)
@ -44310,7 +44310,7 @@
(if
(i32.eqz
(if (result i32)
(tee_local $0
(tee_local $1
(f32.ge
(tee_local $3
(call $~lib/math/NativeMathf.random)
@ -44322,7 +44322,7 @@
(get_local $3)
(f32.const 1)
)
(get_local $0)
(get_local $1)
)
)
(block
@ -44335,9 +44335,9 @@
(unreachable)
)
)
(set_local $1
(set_local $0
(i32.add
(get_local $1)
(get_local $0)
(i32.const 1)
)
)

File diff suppressed because it is too large Load Diff

View File

@ -2767,7 +2767,7 @@
(if
(i32.eqz
(if (result i32)
(tee_local $0
(tee_local $1
(i32.eq
(i32.load
(get_global $std/operator-overloading/ais)
@ -2781,7 +2781,7 @@
)
(i32.const 5)
)
(get_local $0)
(get_local $1)
)
)
(block
@ -2813,22 +2813,22 @@
(i32.const 0)
(i32.add
(i32.load
(tee_local $0
(tee_local $1
(get_global $std/operator-overloading/aii1)
)
)
(i32.load
(tee_local $1
(tee_local $0
(get_global $std/operator-overloading/aii2)
)
)
)
(i32.add
(i32.load offset=4
(get_local $0)
(get_local $1)
)
(i32.load offset=4
(get_local $1)
(get_local $0)
)
)
)

File diff suppressed because it is too large Load Diff

View File

@ -238,30 +238,7 @@
)
)
)
(func $~lib/string/String#startsWith|trampoline (; 4 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(block $1of1
(block $0of1
(block $oob
(br_table $0of1 $1of1 $oob
(i32.sub
(get_global $~argc)
(i32.const 1)
)
)
)
(unreachable)
)
(set_local $2
(i32.const 0)
)
)
(call $~lib/string/String#startsWith
(get_local $0)
(get_local $1)
(get_local $2)
)
)
(func $~lib/string/String#endsWith (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(func $~lib/string/String#endsWith (; 4 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(if
(i32.eqz
@ -346,7 +323,7 @@
)
)
)
(func $~lib/string/String#endsWith|trampoline (; 6 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(func $~lib/string/String#endsWith|trampoline (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(block $1of1
(block $0of1
(block $oob
@ -369,7 +346,7 @@
(get_local $2)
)
)
(func $~lib/string/String#indexOf (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(func $~lib/string/String#indexOf (; 6 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
@ -474,7 +451,7 @@
)
(i32.const -1)
)
(func $~lib/string/String#includes (; 8 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(func $~lib/string/String#includes (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(i32.ne
(call $~lib/string/String#indexOf
(get_local $0)
@ -484,56 +461,10 @@
(i32.const -1)
)
)
(func $~lib/string/String#includes|trampoline (; 9 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(block $1of1
(block $0of1
(block $oob
(br_table $0of1 $1of1 $oob
(i32.sub
(get_global $~argc)
(i32.const 1)
)
)
)
(unreachable)
)
(set_local $2
(i32.const 0)
)
)
(call $~lib/string/String#includes
(get_local $0)
(get_local $1)
(get_local $2)
)
)
(func $~lib/string/String#indexOf|trampoline (; 10 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(block $1of1
(block $0of1
(block $oob
(br_table $0of1 $1of1 $oob
(i32.sub
(get_global $~argc)
(i32.const 1)
)
)
)
(unreachable)
)
(set_local $2
(i32.const 0)
)
)
(call $~lib/string/String#indexOf
(get_local $0)
(get_local $1)
(get_local $2)
)
)
(func $std/string/getString (; 11 ;) (type $i) (result i32)
(func $std/string/getString (; 8 ;) (type $i) (result i32)
(get_global $std/string/str)
)
(func $~lib/internal/string/parse<f64> (; 12 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64)
(func $~lib/internal/string/parse<f64> (; 9 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@ -879,35 +810,13 @@
(get_local $5)
)
)
(func $~lib/string/parseInt (; 13 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64)
(func $~lib/string/parseInt (; 10 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64)
(call $~lib/internal/string/parse<f64>
(get_local $0)
(get_local $1)
)
)
(func $~lib/string/parseInt|trampoline (; 14 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64)
(block $1of1
(block $0of1
(block $oob
(br_table $0of1 $1of1 $oob
(i32.sub
(get_global $~argc)
(i32.const 1)
)
)
)
(unreachable)
)
(set_local $1
(i32.const 0)
)
)
(call $~lib/string/parseInt
(get_local $0)
(get_local $1)
)
)
(func $~lib/string/parseFloat (; 15 ;) (type $iF) (param $0 i32) (result f64)
(func $~lib/string/parseFloat (; 11 ;) (type $iF) (param $0 i32) (result f64)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@ -1157,7 +1066,7 @@
(get_local $4)
)
)
(func $~lib/allocator/arena/allocate_memory (; 16 ;) (type $ii) (param $0 i32) (result i32)
(func $~lib/allocator/arena/allocate_memory (; 12 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@ -1246,7 +1155,7 @@
)
(i32.const 0)
)
(func $~lib/internal/string/allocate (; 17 ;) (type $ii) (param $0 i32) (result i32)
(func $~lib/internal/string/allocate (; 13 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(if
(i32.eqz
@ -1290,7 +1199,7 @@
)
(get_local $1)
)
(func $~lib/memory/copy_memory (; 18 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(func $~lib/memory/copy_memory (; 14 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32)
(local $4 i32)
(loop $continue|0
@ -2866,7 +2775,7 @@
)
)
)
(func $~lib/memory/move_memory (; 19 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(func $~lib/memory/move_memory (; 15 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32)
(if
(i32.eq
@ -3153,7 +3062,7 @@
)
)
)
(func $~lib/string/String#concat (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/string/String#concat (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@ -3240,7 +3149,7 @@
)
(get_local $2)
)
(func $~lib/string/String.__concat (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/string/String.__concat (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(if
(i32.eqz
(get_local $0)
@ -3254,7 +3163,7 @@
(get_local $1)
)
)
(func $~lib/string/String.__eq (; 22 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/string/String.__eq (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(if
(i32.eq
@ -3313,7 +3222,7 @@
)
)
)
(func $~lib/string/String.__ne (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/string/String.__ne (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(i32.eqz
(call $~lib/string/String.__eq
(get_local $0)
@ -3321,7 +3230,7 @@
)
)
)
(func $~lib/string/String.__gt (; 24 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/string/String.__gt (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(if
@ -3399,7 +3308,7 @@
(i32.const 0)
)
)
(func $~lib/string/String.__gte (; 25 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/string/String.__gte (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(if
@ -3479,7 +3388,7 @@
(i32.const 0)
)
)
(func $~lib/string/String.__lt (; 26 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/string/String.__lt (; 22 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(if
@ -3557,7 +3466,7 @@
(i32.const 0)
)
)
(func $~lib/string/String.__lte (; 27 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/string/String.__lte (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(if
@ -3637,7 +3546,7 @@
(i32.const 0)
)
)
(func $~lib/string/String#repeat (; 28 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/string/String#repeat (; 24 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@ -3767,26 +3676,7 @@
)
(get_local $4)
)
(func $~lib/string/String#repeat|trampoline (; 29 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(block $1of1
(block $0of1
(block $oob
(br_table $0of1 $1of1 $oob
(get_global $~argc)
)
)
(unreachable)
)
(set_local $1
(i32.const 0)
)
)
(call $~lib/string/String#repeat
(get_local $0)
(get_local $1)
)
)
(func $start (; 30 ;) (type $v)
(func $start (; 25 ;) (type $v)
(set_global $~lib/allocator/arena/startOffset
(i32.and
(i32.add
@ -3850,16 +3740,11 @@
)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 1)
)
(i32.eqz
(call $~lib/string/String#startsWith|trampoline
(get_global $std/string/str)
(i32.const 104)
(i32.const 0)
)
(i32.eqz
(call $~lib/string/String#startsWith
(get_global $std/string/str)
(i32.const 104)
(i32.const 0)
)
)
(block
@ -3896,16 +3781,11 @@
)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 1)
)
(i32.eqz
(call $~lib/string/String#includes|trampoline
(get_global $std/string/str)
(i32.const 140)
(i32.const 0)
)
(i32.eqz
(call $~lib/string/String#includes
(get_global $std/string/str)
(i32.const 140)
(i32.const 0)
)
)
(block
@ -3919,18 +3799,13 @@
)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 1)
)
(i32.ne
(call $~lib/string/String#indexOf|trampoline
(get_global $std/string/str)
(i32.const 152)
(i32.const 0)
)
(i32.const 2)
(i32.ne
(call $~lib/string/String#indexOf
(get_global $std/string/str)
(i32.const 152)
(i32.const 0)
)
(i32.const 2)
)
(block
(call $abort
@ -3943,18 +3818,13 @@
)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 1)
)
(i32.ne
(call $~lib/string/String#indexOf|trampoline
(get_global $std/string/str)
(i32.const 160)
(i32.const 0)
)
(i32.const -1)
(i32.ne
(call $~lib/string/String#indexOf
(get_global $std/string/str)
(i32.const 160)
(i32.const 0)
)
(i32.const -1)
)
(block
(call $abort
@ -3967,17 +3837,12 @@
)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 1)
)
(f64.ne
(call $~lib/string/parseInt|trampoline
(i32.const 168)
(i32.const 0)
)
(f64.const 0)
(f64.ne
(call $~lib/string/parseInt
(i32.const 168)
(i32.const 0)
)
(f64.const 0)
)
(block
(call $abort
@ -3990,17 +3855,12 @@
)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 1)
)
(f64.ne
(call $~lib/string/parseInt|trampoline
(i32.const 176)
(i32.const 0)
)
(f64.const 1)
(f64.ne
(call $~lib/string/parseInt
(i32.const 176)
(i32.const 0)
)
(f64.const 1)
)
(block
(call $abort
@ -4013,17 +3873,12 @@
)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 1)
)
(f64.ne
(call $~lib/string/parseInt|trampoline
(i32.const 184)
(i32.const 0)
)
(f64.const 5)
(f64.ne
(call $~lib/string/parseInt
(i32.const 184)
(i32.const 0)
)
(f64.const 5)
)
(block
(call $abort
@ -4036,17 +3891,12 @@
)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 1)
)
(f64.ne
(call $~lib/string/parseInt|trampoline
(i32.const 200)
(i32.const 0)
)
(f64.const 455)
(f64.ne
(call $~lib/string/parseInt
(i32.const 200)
(i32.const 0)
)
(f64.const 455)
)
(block
(call $abort
@ -4059,17 +3909,12 @@
)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 1)
)
(f64.ne
(call $~lib/string/parseInt|trampoline
(i32.const 216)
(i32.const 0)
)
(f64.const 3855)
(f64.ne
(call $~lib/string/parseInt
(i32.const 216)
(i32.const 0)
)
(f64.const 3855)
)
(block
(call $abort
@ -4082,17 +3927,12 @@
)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 1)
)
(f64.ne
(call $~lib/string/parseInt|trampoline
(i32.const 232)
(i32.const 0)
)
(f64.const 3855)
(f64.ne
(call $~lib/string/parseInt
(i32.const 232)
(i32.const 0)
)
(f64.const 3855)
)
(block
(call $abort
@ -4105,17 +3945,12 @@
)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 1)
)
(f64.ne
(call $~lib/string/parseInt|trampoline
(i32.const 248)
(i32.const 0)
)
(f64.const 11)
(f64.ne
(call $~lib/string/parseInt
(i32.const 248)
(i32.const 0)
)
(f64.const 11)
)
(block
(call $abort
@ -4128,17 +3963,12 @@
)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 1)
)
(f64.ne
(call $~lib/string/parseInt|trampoline
(i32.const 260)
(i32.const 0)
)
(f64.const 1)
(f64.ne
(call $~lib/string/parseInt
(i32.const 260)
(i32.const 0)
)
(f64.const 1)
)
(block
(call $abort
@ -4624,14 +4454,9 @@
(if
(i32.eqz
(call $~lib/string/String.__eq
(block (result i32)
(set_global $~argc
(i32.const 0)
)
(call $~lib/string/String#repeat|trampoline
(i32.const 316)
(i32.const 0)
)
(call $~lib/string/String#repeat
(i32.const 316)
(i32.const 0)
)
(i32.const 332)
)

View File

@ -18,8 +18,8 @@
(global $std/string/str (mut i32) (i32.const 4))
(global $std/string/nullStr (mut i32) (i32.const 0))
(global $~lib/internal/string/HEADER_SIZE i32 (i32.const 4))
(global $~argc (mut i32) (i32.const 0))
(global $~lib/internal/string/MAX_LENGTH i32 (i32.const 536870910))
(global $~argc (mut i32) (i32.const 0))
(global $NaN f64 (f64.const nan:0x8000000000000))
(global $~lib/internal/string/CharCode.PLUS i32 (i32.const 43))
(global $~lib/internal/string/CharCode.MINUS i32 (i32.const 45))
@ -302,30 +302,7 @@
)
)
)
(func $~lib/string/String#startsWith|trampoline (; 4 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(block $1of1
(block $0of1
(block $oob
(br_table $0of1 $1of1 $oob
(i32.sub
(get_global $~argc)
(i32.const 1)
)
)
)
(unreachable)
)
(set_local $2
(i32.const 0)
)
)
(call $~lib/string/String#startsWith
(get_local $0)
(get_local $1)
(get_local $2)
)
)
(func $~lib/string/String#endsWith (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(func $~lib/string/String#endsWith (; 4 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
@ -429,7 +406,7 @@
)
)
)
(func $~lib/string/String#endsWith|trampoline (; 6 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(func $~lib/string/String#endsWith|trampoline (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(block $1of1
(block $0of1
(block $oob
@ -452,7 +429,7 @@
(get_local $2)
)
)
(func $~lib/string/String#indexOf (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(func $~lib/string/String#indexOf (; 6 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
@ -579,7 +556,7 @@
(i32.const -1)
)
)
(func $~lib/string/String#includes (; 8 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(func $~lib/string/String#includes (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(return
(i32.ne
(call $~lib/string/String#indexOf
@ -591,58 +568,12 @@
)
)
)
(func $~lib/string/String#includes|trampoline (; 9 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(block $1of1
(block $0of1
(block $oob
(br_table $0of1 $1of1 $oob
(i32.sub
(get_global $~argc)
(i32.const 1)
)
)
)
(unreachable)
)
(set_local $2
(i32.const 0)
)
)
(call $~lib/string/String#includes
(get_local $0)
(get_local $1)
(get_local $2)
)
)
(func $~lib/string/String#indexOf|trampoline (; 10 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(block $1of1
(block $0of1
(block $oob
(br_table $0of1 $1of1 $oob
(i32.sub
(get_global $~argc)
(i32.const 1)
)
)
)
(unreachable)
)
(set_local $2
(i32.const 0)
)
)
(call $~lib/string/String#indexOf
(get_local $0)
(get_local $1)
(get_local $2)
)
)
(func $std/string/getString (; 11 ;) (type $i) (result i32)
(func $std/string/getString (; 8 ;) (type $i) (result i32)
(return
(get_global $std/string/str)
)
)
(func $~lib/internal/string/parse<f64> (; 12 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64)
(func $~lib/internal/string/parse<f64> (; 9 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@ -1034,7 +965,7 @@
)
)
)
(func $~lib/string/parseInt (; 13 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64)
(func $~lib/string/parseInt (; 10 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64)
(return
(call $~lib/internal/string/parse<f64>
(get_local $0)
@ -1042,29 +973,7 @@
)
)
)
(func $~lib/string/parseInt|trampoline (; 14 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64)
(block $1of1
(block $0of1
(block $oob
(br_table $0of1 $1of1 $oob
(i32.sub
(get_global $~argc)
(i32.const 1)
)
)
)
(unreachable)
)
(set_local $1
(i32.const 0)
)
)
(call $~lib/string/parseInt
(get_local $0)
(get_local $1)
)
)
(func $~lib/string/parseFloat (; 15 ;) (type $iF) (param $0 i32) (result f64)
(func $~lib/string/parseFloat (; 11 ;) (type $iF) (param $0 i32) (result f64)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@ -1343,7 +1252,7 @@
)
)
)
(func $~lib/allocator/arena/allocate_memory (; 16 ;) (type $ii) (param $0 i32) (result i32)
(func $~lib/allocator/arena/allocate_memory (; 12 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@ -1453,7 +1362,7 @@
(i32.const 0)
)
)
(func $~lib/internal/string/allocate (; 17 ;) (type $ii) (param $0 i32) (result i32)
(func $~lib/internal/string/allocate (; 13 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(if
@ -1501,7 +1410,7 @@
(get_local $2)
)
)
(func $~lib/memory/copy_memory (; 18 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(func $~lib/memory/copy_memory (; 14 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
@ -3303,7 +3212,7 @@
)
)
)
(func $~lib/memory/move_memory (; 19 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(func $~lib/memory/move_memory (; 15 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32)
(if
(i32.eq
@ -3621,7 +3530,7 @@
)
)
)
(func $~lib/string/String#concat (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/string/String#concat (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@ -3720,7 +3629,7 @@
(get_local $5)
)
)
(func $~lib/string/String.__concat (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/string/String.__concat (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(if
(i32.eqz
(get_local $0)
@ -3736,7 +3645,7 @@
)
)
)
(func $~lib/string/String.__eq (; 22 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/string/String.__eq (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(if
@ -3801,7 +3710,7 @@
)
)
)
(func $~lib/string/String.__ne (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/string/String.__ne (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return
(i32.eqz
(call $~lib/string/String.__eq
@ -3811,7 +3720,7 @@
)
)
)
(func $~lib/string/String.__gt (; 24 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/string/String.__gt (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@ -3904,7 +3813,7 @@
)
)
)
(func $~lib/string/String.__gte (; 25 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/string/String.__gte (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@ -3999,7 +3908,7 @@
)
)
)
(func $~lib/string/String.__lt (; 26 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/string/String.__lt (; 22 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@ -4092,7 +4001,7 @@
)
)
)
(func $~lib/string/String.__lte (; 27 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/string/String.__lte (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@ -4187,7 +4096,7 @@
)
)
)
(func $~lib/string/String#repeat (; 28 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/string/String#repeat (; 24 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
@ -4333,26 +4242,7 @@
(get_local $4)
)
)
(func $~lib/string/String#repeat|trampoline (; 29 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(block $1of1
(block $0of1
(block $oob
(br_table $0of1 $1of1 $oob
(get_global $~argc)
)
)
(unreachable)
)
(set_local $1
(i32.const 0)
)
)
(call $~lib/string/String#repeat
(get_local $0)
(get_local $1)
)
)
(func $start (; 30 ;) (type $v)
(func $start (; 25 ;) (type $v)
(set_global $~lib/allocator/arena/startOffset
(i32.and
(i32.add
@ -4426,15 +4316,10 @@
)
(if
(i32.eqz
(block (result i32)
(set_global $~argc
(i32.const 1)
)
(call $~lib/string/String#startsWith|trampoline
(get_global $std/string/str)
(i32.const 104)
(i32.const 0)
)
(call $~lib/string/String#startsWith
(get_global $std/string/str)
(i32.const 104)
(i32.const 0)
)
)
(block
@ -4472,15 +4357,10 @@
)
(if
(i32.eqz
(block (result i32)
(set_global $~argc
(i32.const 1)
)
(call $~lib/string/String#includes|trampoline
(get_global $std/string/str)
(i32.const 140)
(i32.const 0)
)
(call $~lib/string/String#includes
(get_global $std/string/str)
(i32.const 140)
(i32.const 0)
)
)
(block
@ -4496,15 +4376,10 @@
(if
(i32.eqz
(i32.eq
(block (result i32)
(set_global $~argc
(i32.const 1)
)
(call $~lib/string/String#indexOf|trampoline
(get_global $std/string/str)
(i32.const 152)
(i32.const 0)
)
(call $~lib/string/String#indexOf
(get_global $std/string/str)
(i32.const 152)
(i32.const 0)
)
(i32.const 2)
)
@ -4522,15 +4397,10 @@
(if
(i32.eqz
(i32.eq
(block (result i32)
(set_global $~argc
(i32.const 1)
)
(call $~lib/string/String#indexOf|trampoline
(get_global $std/string/str)
(i32.const 160)
(i32.const 0)
)
(call $~lib/string/String#indexOf
(get_global $std/string/str)
(i32.const 160)
(i32.const 0)
)
(i32.const -1)
)
@ -4548,14 +4418,9 @@
(if
(i32.eqz
(f64.eq
(block (result f64)
(set_global $~argc
(i32.const 1)
)
(call $~lib/string/parseInt|trampoline
(i32.const 168)
(i32.const 0)
)
(call $~lib/string/parseInt
(i32.const 168)
(i32.const 0)
)
(f64.const 0)
)
@ -4573,14 +4438,9 @@
(if
(i32.eqz
(f64.eq
(block (result f64)
(set_global $~argc
(i32.const 1)
)
(call $~lib/string/parseInt|trampoline
(i32.const 176)
(i32.const 0)
)
(call $~lib/string/parseInt
(i32.const 176)
(i32.const 0)
)
(f64.const 1)
)
@ -4598,14 +4458,9 @@
(if
(i32.eqz
(f64.eq
(block (result f64)
(set_global $~argc
(i32.const 1)
)
(call $~lib/string/parseInt|trampoline
(i32.const 184)
(i32.const 0)
)
(call $~lib/string/parseInt
(i32.const 184)
(i32.const 0)
)
(f64.const 5)
)
@ -4623,14 +4478,9 @@
(if
(i32.eqz
(f64.eq
(block (result f64)
(set_global $~argc
(i32.const 1)
)
(call $~lib/string/parseInt|trampoline
(i32.const 200)
(i32.const 0)
)
(call $~lib/string/parseInt
(i32.const 200)
(i32.const 0)
)
(f64.const 455)
)
@ -4648,14 +4498,9 @@
(if
(i32.eqz
(f64.eq
(block (result f64)
(set_global $~argc
(i32.const 1)
)
(call $~lib/string/parseInt|trampoline
(i32.const 216)
(i32.const 0)
)
(call $~lib/string/parseInt
(i32.const 216)
(i32.const 0)
)
(f64.const 3855)
)
@ -4673,14 +4518,9 @@
(if
(i32.eqz
(f64.eq
(block (result f64)
(set_global $~argc
(i32.const 1)
)
(call $~lib/string/parseInt|trampoline
(i32.const 232)
(i32.const 0)
)
(call $~lib/string/parseInt
(i32.const 232)
(i32.const 0)
)
(f64.const 3855)
)
@ -4698,14 +4538,9 @@
(if
(i32.eqz
(f64.eq
(block (result f64)
(set_global $~argc
(i32.const 1)
)
(call $~lib/string/parseInt|trampoline
(i32.const 248)
(i32.const 0)
)
(call $~lib/string/parseInt
(i32.const 248)
(i32.const 0)
)
(f64.const 11)
)
@ -4723,14 +4558,9 @@
(if
(i32.eqz
(f64.eq
(block (result f64)
(set_global $~argc
(i32.const 1)
)
(call $~lib/string/parseInt|trampoline
(i32.const 260)
(i32.const 0)
)
(call $~lib/string/parseInt
(i32.const 260)
(i32.const 0)
)
(f64.const 1)
)
@ -5259,14 +5089,9 @@
(if
(i32.eqz
(call $~lib/string/String.__eq
(block (result i32)
(set_global $~argc
(i32.const 0)
)
(call $~lib/string/String#repeat|trampoline
(i32.const 316)
(i32.const 0)
)
(call $~lib/string/String#repeat
(i32.const 316)
(i32.const 0)
)
(i32.const 332)
)