Suppress some unnecessary blocks and nops; Fix compilation of always 'break'ing 'do's

This commit is contained in:
dcodeIO
2018-05-06 05:46:35 +02:00
parent 2f8f477ab0
commit 25a1f6230a
45 changed files with 1318 additions and 1642 deletions

View File

@ -60,7 +60,6 @@
)
)
(block
(nop)
(set_local $0
(i32.const 256)
)
@ -88,7 +87,6 @@
)
)
(block
(nop)
(set_local $1
(i32.const 256)
)
@ -143,7 +141,6 @@
)
)
(block
(nop)
(set_local $2
(i32.const 256)
)
@ -213,7 +210,6 @@
)
)
(block
(nop)
(set_local $3
(i32.ctz
(i32.const 2)
@ -258,7 +254,6 @@
(unreachable)
)
)
(nop)
(set_local $4
(i32.ctz
(i32.const 2)

View File

@ -21,7 +21,6 @@
(start $start)
(func $~lib/math/NativeMath.scalbn (; 0 ;) (type $FiF) (param $0 f64) (param $1 i32) (result f64)
(local $2 f64)
(nop)
(set_local $2
(get_local $0)
)
@ -180,7 +179,6 @@
(local $38 f64)
(local $39 f64)
(local $40 i32)
(nop)
(set_local $2
(i64.reinterpret/f64
(get_local $0)
@ -652,8 +650,6 @@
)
)
)
(nop)
(nop)
(if
(i32.gt_s
(get_local $8)
@ -840,7 +836,6 @@
)
)
(block
(nop)
(set_local $27
(i32.const 0)
)
@ -1829,7 +1824,6 @@
)
)
)
(nop)
(if
(i32.eqz
(get_local $4)
@ -2142,7 +2136,6 @@
)
(func $~lib/math/NativeMathf.scalbn (; 4 ;) (type $fif) (param $0 f32) (param $1 i32) (result f32)
(local $2 f32)
(nop)
(set_local $2
(get_local $0)
)
@ -2295,7 +2288,6 @@
(local $34 f32)
(local $35 f32)
(local $36 i32)
(nop)
(set_local $2
(i32.reinterpret/f32
(get_local $0)
@ -2509,7 +2501,6 @@
(get_local $0)
)
)
(nop)
(if
(if (result i32)
(tee_local $6
@ -2633,8 +2624,6 @@
)
)
)
(nop)
(nop)
(if
(i32.gt_s
(get_local $5)
@ -2772,7 +2761,6 @@
)
)
(block
(nop)
(set_local $23
(i32.const 0)
)
@ -3710,7 +3698,6 @@
)
)
)
(nop)
(if
(i32.eqz
(get_local $4)

View File

@ -64,6 +64,7 @@
)
)
(func $builtins/test (; 5 ;) (type $v)
(nop)
)
(func $start (; 6 ;) (type $v)
(local $0 i32)

View File

@ -6,7 +6,6 @@
(export "memory" (memory $0))
(func $class-with-boolean-field/test (; 0 ;) (type $i) (result i32)
(local $0 i32)
(nop)
(i32.store8
(get_local $0)
(i32.const 1)

View File

@ -1,5 +1,6 @@
(module
(type $iiiiv (func (param i32 i32 i32 i32)))
(type $i (func (result i32)))
(type $v (func))
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
(global $comma/a (mut i32) (i32.const 0))

View File

@ -39,5 +39,6 @@
)
)
(func $export/ns.two (; 3 ;) (type $v)
(nop)
)
)

View File

@ -216,30 +216,28 @@
)
(func $exports/Car#constructor (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(block
(i32.store
(tee_local $0
(if (result i32)
(get_local $0)
(get_local $0)
(tee_local $0
(block (result i32)
(set_local $2
(call $~lib/allocator/arena/allocate_memory
(i32.const 4)
)
(i32.store
(tee_local $0
(if (result i32)
(get_local $0)
(get_local $0)
(tee_local $0
(block (result i32)
(set_local $2
(call $~lib/allocator/arena/allocate_memory
(i32.const 4)
)
(i32.store
(get_local $2)
(get_local $1)
)
(get_local $2)
)
(i32.store
(get_local $2)
(get_local $1)
)
(get_local $2)
)
)
)
(get_local $1)
)
(get_local $1)
)
(get_local $0)
)
@ -287,6 +285,7 @@
)
)
(func $exports/Car#openDoors (; 13 ;) (type $iv) (param $0 i32)
(nop)
)
(func $exports/vehicles.Car.getNumTires (; 14 ;) (type $i) (result i32)
(return
@ -295,30 +294,28 @@
)
(func $exports/vehicles.Car#constructor (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(block
(i32.store
(tee_local $0
(if (result i32)
(get_local $0)
(get_local $0)
(tee_local $0
(block (result i32)
(set_local $2
(call $~lib/allocator/arena/allocate_memory
(i32.const 4)
)
(i32.store
(tee_local $0
(if (result i32)
(get_local $0)
(get_local $0)
(tee_local $0
(block (result i32)
(set_local $2
(call $~lib/allocator/arena/allocate_memory
(i32.const 4)
)
(i32.store
(get_local $2)
(get_local $1)
)
(get_local $2)
)
(i32.store
(get_local $2)
(get_local $1)
)
(get_local $2)
)
)
)
(get_local $1)
)
(get_local $1)
)
(get_local $0)
)
@ -366,6 +363,7 @@
)
)
(func $exports/vehicles.Car#openDoors (; 21 ;) (type $iv) (param $0 i32)
(nop)
)
(func $start (; 22 ;) (type $v)
(set_global $~lib/allocator/arena/startOffset

View File

@ -1,6 +1,6 @@
(module
(type $iiiiv (func (param i32 i32 i32 i32)))
(type $i (func (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32)))
(type $v (func))
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
(global $for/i (mut i32) (i32.const 0))
@ -22,9 +22,7 @@
(i32.const 10)
)
(block
(block
(nop)
)
(nop)
(set_global $for/i
(i32.add
(get_global $for/i)
@ -64,9 +62,7 @@
(i32.const 10)
)
(block
(block
(nop)
)
(nop)
(set_local $0
(i32.add
(get_local $0)

View File

@ -28,6 +28,7 @@
)
)
(func $start~someName|2 (; 3 ;) (type $v)
(nop)
)
(func $start~anonymous|3 (; 4 ;) (type $i) (result i32)
(i32.const 1)

View File

@ -19,6 +19,7 @@
(export "memory" (memory $0))
(start $start)
(func $function/v (; 0 ;) (type $v)
(nop)
)
(func $function/i (; 1 ;) (type $i) (result i32)
(return
@ -41,6 +42,7 @@
)
)
(func $function/iv (; 5 ;) (type $iv) (param $0 i32)
(nop)
)
(func $function/ii (; 6 ;) (type $ii) (param $0 i32) (result i32)
(return
@ -63,6 +65,7 @@
)
)
(func $function/iiv (; 10 ;) (type $iiv) (param $0 i32) (param $1 i32)
(nop)
)
(func $function/iii (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return

View File

@ -38,17 +38,11 @@
(func $if/ifThenElseBlock (; 3 ;) (type $ii) (param $0 i32) (result i32)
(if
(get_local $0)
(block
(nop)
(return
(i32.const 1)
)
(return
(i32.const 1)
)
(block
(nop)
(return
(i32.const 0)
)
(return
(i32.const 0)
)
)
)

View File

@ -33,6 +33,7 @@
)
)
(func $export/ns.two (; 3 ;) (type $v)
(nop)
)
(func $start (; 4 ;) (type $v)
(drop

View File

@ -114,9 +114,7 @@
(get_local $1)
)
(block
(block
(nop)
)
(nop)
(set_local $0
(i32.add
(get_local $0)

View File

@ -16,7 +16,6 @@
(export "table" (table $0))
(start $start)
(func $inlining/test (; 1 ;) (type $i) (result i32)
(nop)
(return
(i32.add
(i32.const 1)

View File

@ -24,7 +24,6 @@
(local $11 f64)
(local $12 f64)
(local $13 i32)
(nop)
(set_local $1
(i64.reinterpret/f64
(get_local $0)

View File

@ -20,7 +20,6 @@
(set_local $3
(get_local $0)
)
(nop)
(block $break|0
(loop $continue|0
(if

View File

@ -285,22 +285,20 @@
(if
(get_local $2)
(block
(block
(i32.store8
(i32.add
(get_local $0)
(tee_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
(i32.store8
(i32.add
(get_local $0)
(tee_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
)
(i32.load8_u
(i32.add
(get_local $1)
(get_local $2)
)
)
(i32.load8_u
(i32.add
(get_local $1)
(get_local $2)
)
)
)

View File

@ -21,7 +21,6 @@
(set_local $0
(i32.const 127)
)
(nop)
(set_local $0
(i32.add
(get_local $0)
@ -305,7 +304,6 @@
(set_local $2
(i32.const 32767)
)
(nop)
(set_local $2
(i32.add
(get_local $2)
@ -589,7 +587,6 @@
(set_local $4
(i32.const 0)
)
(nop)
(set_local $4
(i32.sub
(get_local $4)
@ -846,7 +843,6 @@
(set_local $6
(i32.const 0)
)
(nop)
(set_local $6
(i32.sub
(get_local $6)

View File

@ -43,6 +43,7 @@
)
)
(func $export/ns.two (; 3 ;) (type $v)
(nop)
)
(func $start (; 4 ;) (type $v)
(drop

View File

@ -1,6 +1,7 @@
(module
(type $iiv (func (param i32 i32)))
(type $iiiiv (func (param i32 i32 i32 i32)))
(type $i (func (result i32)))
(type $v (func))
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
(global $retain-i32/si (mut i32) (i32.const 0))

View File

@ -1,4 +1,5 @@
(module
(type $i (func (result i32)))
(type $iv (func (param i32)))
(type $v (func))
(global $scoped/aGlobal (mut i32) (i32.const 1))
@ -11,16 +12,11 @@
(func $scoped/fn (; 0 ;) (type $iv) (param $0 i32)
(local $1 i32)
(local $2 i32)
(block
(set_local $1
(i32.const 0)
)
(set_local $1
(i32.const 0)
)
(block
(nop)
(set_local $2
(get_local $0)
)
(set_local $2
(get_local $0)
)
)
(func $start (; 1 ;) (type $v)
@ -80,10 +76,8 @@
(set_local $2
(i64.const 5)
)
(block
(set_local $3
(f32.const 10)
)
(set_local $3
(f32.const 10)
)
)
(call $scoped/fn

View File

@ -77,7 +77,6 @@
(start $start)
(func $~lib/math/NativeMath.scalbn (; 1 ;) (type $FiF) (param $0 f64) (param $1 i32) (result f64)
(local $2 f64)
(nop)
(set_local $2
(get_local $0)
)
@ -236,7 +235,6 @@
(local $38 f64)
(local $39 f64)
(local $40 i32)
(nop)
(set_local $2
(i64.reinterpret/f64
(get_local $0)
@ -708,8 +706,6 @@
)
)
)
(nop)
(nop)
(if
(i32.gt_s
(get_local $8)
@ -896,7 +892,6 @@
)
)
(block
(nop)
(set_local $27
(i32.const 0)
)
@ -1885,7 +1880,6 @@
)
)
)
(nop)
(if
(i32.eqz
(get_local $4)
@ -2198,7 +2192,6 @@
)
(func $~lib/math/NativeMathf.scalbn (; 5 ;) (type $fif) (param $0 f32) (param $1 i32) (result f32)
(local $2 f32)
(nop)
(set_local $2
(get_local $0)
)
@ -2351,7 +2344,6 @@
(local $34 f32)
(local $35 f32)
(local $36 i32)
(nop)
(set_local $2
(i32.reinterpret/f32
(get_local $0)
@ -2565,7 +2557,6 @@
(get_local $0)
)
)
(nop)
(if
(if (result i32)
(tee_local $6
@ -2689,8 +2680,6 @@
)
)
)
(nop)
(nop)
(if
(i32.gt_s
(get_local $5)
@ -2828,7 +2817,6 @@
)
)
(block
(nop)
(set_local $23
(i32.const 0)
)
@ -3766,7 +3754,6 @@
)
)
)
(nop)
(if
(i32.eqz
(get_local $4)
@ -4142,6 +4129,7 @@
)
)
(func $showcase/anExportedFunction (; 15 ;) (type $v)
(nop)
)
(func $memcpy/memcpy (; 16 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
@ -4151,7 +4139,6 @@
(set_local $3
(get_local $0)
)
(nop)
(block $break|0
(loop $continue|0
(if

View File

@ -488,7 +488,6 @@
(local $3 i32)
(local $4 i32)
(local $5 i32)
(nop)
(block $break|0
(loop $continue|0
(if
@ -2580,22 +2579,20 @@
(if
(get_local $2)
(block
(block
(i32.store8
(i32.add
(get_local $0)
(tee_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
(i32.store8
(i32.add
(get_local $0)
(tee_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
)
(i32.load8_u
(i32.add
(get_local $1)
(get_local $2)
)
)
(i32.load8_u
(i32.add
(get_local $1)
(get_local $2)
)
)
)
@ -2674,6 +2671,7 @@
)
)
(func $~lib/allocator/arena/free_memory (; 6 ;) (type $iv) (param $0 i32)
(nop)
)
(func $~lib/allocator/arena/reset_memory (; 7 ;) (type $v)
(set_global $~lib/allocator/arena/offset

View File

@ -588,7 +588,6 @@
(local $3 i32)
(local $4 i32)
(block
(nop)
(if
(i32.gt_u
(get_local $1)

File diff suppressed because it is too large Load Diff

View File

@ -578,7 +578,6 @@
(local $3 i32)
(local $4 i32)
(local $5 i32)
(nop)
(block $break|0
(loop $continue|0
(if
@ -2670,22 +2669,20 @@
(if
(get_local $2)
(block
(block
(i32.store8
(i32.add
(get_local $0)
(tee_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
(i32.store8
(i32.add
(get_local $0)
(tee_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
)
(i32.load8_u
(i32.add
(get_local $1)
(get_local $2)
)
)
(i32.load8_u
(i32.add
(get_local $1)
(get_local $2)
)
)
)

View File

@ -135,8 +135,7 @@
)
(func $std/constructor/EmptyCtor#constructor (; 1 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(block
)
(nop)
(tee_local $0
(if (result i32)
(get_local $0)
@ -156,8 +155,7 @@
)
(func $std/constructor/EmptyCtorWithFieldInit#constructor (; 2 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(block
)
(nop)
(tee_local $0
(if (result i32)
(get_local $0)
@ -181,8 +179,7 @@
)
(func $std/constructor/EmptyCtorWithFieldNoInit#constructor (; 3 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(block
)
(nop)
(tee_local $0
(if (result i32)
(get_local $0)
@ -213,13 +210,11 @@
)
(func $std/constructor/CtorConditionallyReturns#constructor (; 5 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(block
(if
(get_global $std/constructor/b)
(return
(call $~lib/allocator/arena/allocate_memory
(i32.const 0)
)
(if
(get_global $std/constructor/b)
(return
(call $~lib/allocator/arena/allocate_memory
(i32.const 0)
)
)
)
@ -242,7 +237,30 @@
)
(func $std/constructor/CtorAllocates#constructor (; 6 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(block
(drop
(tee_local $0
(if (result i32)
(get_local $0)
(get_local $0)
(tee_local $0
(block (result i32)
(set_local $1
(call $~lib/allocator/arena/allocate_memory
(i32.const 0)
)
)
(get_local $1)
)
)
)
)
)
(get_local $0)
)
(func $std/constructor/CtorConditionallyAllocates#constructor (; 7 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(if
(get_global $std/constructor/b)
(drop
(tee_local $0
(if (result i32)
@ -262,33 +280,6 @@
)
)
)
(get_local $0)
)
(func $std/constructor/CtorConditionallyAllocates#constructor (; 7 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(block
(if
(get_global $std/constructor/b)
(drop
(tee_local $0
(if (result i32)
(get_local $0)
(get_local $0)
(tee_local $0
(block (result i32)
(set_local $1
(call $~lib/allocator/arena/allocate_memory
(i32.const 0)
)
)
(get_local $1)
)
)
)
)
)
)
)
(tee_local $0
(if (result i32)
(get_local $0)

View File

@ -76,7 +76,6 @@
(func $~lib/math/R (; 1 ;) (type $FF) (param $0 f64) (result f64)
(local $1 f64)
(local $2 f64)
(nop)
(set_local $1
(f64.mul
(get_local $0)
@ -156,7 +155,6 @@
(local $6 f64)
(local $7 f64)
(local $8 f64)
(nop)
(set_local $1
(i32.wrap/i64
(i64.shr_u
@ -273,7 +271,6 @@
)
)
)
(nop)
(if
(i32.shr_u
(get_local $1)
@ -402,7 +399,6 @@
(local $13 f64)
(local $14 f64)
(local $15 f64)
(nop)
(set_local $1
(i64.reinterpret/f64
(get_local $0)
@ -756,7 +752,6 @@
(local $11 f64)
(local $12 f64)
(local $13 i32)
(nop)
(set_local $1
(i64.reinterpret/f64
(get_local $0)
@ -1048,7 +1043,6 @@
)
(func $~lib/math/NativeMath.acosh (; 6 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i64)
(nop)
(set_local $1
(i64.and
(i64.shr_u
@ -1160,7 +1154,6 @@
(local $7 f64)
(local $8 f64)
(local $9 f64)
(nop)
(set_local $1
(i32.wrap/i64
(i64.shr_u
@ -1398,7 +1391,6 @@
(local $1 i64)
(local $2 i64)
(local $3 i64)
(nop)
(set_local $1
(i64.reinterpret/f64
(get_local $0)
@ -1552,7 +1544,6 @@
(local $6 f64)
(local $7 f64)
(local $8 i32)
(nop)
(set_local $1
(i32.wrap/i64
(i64.shr_u
@ -1575,7 +1566,6 @@
(i32.const 2147483647)
)
)
(nop)
(if
(i32.ge_u
(get_local $1)
@ -1609,7 +1599,6 @@
)
)
)
(nop)
(if
(i32.lt_u
(get_local $1)
@ -2087,7 +2076,6 @@
(local $7 i32)
(local $8 i32)
(local $9 f64)
(nop)
(if
(if (result i32)
(tee_local $2
@ -2409,7 +2397,6 @@
)
)
)
(nop)
(if
(if (result i32)
(tee_local $2
@ -2567,7 +2554,6 @@
(local $4 f64)
(local $5 f64)
(local $6 f64)
(nop)
(set_local $1
(i64.reinterpret/f64
(get_local $0)
@ -2841,7 +2827,6 @@
(local $13 f64)
(local $14 f64)
(local $15 i32)
(nop)
(set_local $1
(i64.reinterpret/f64
(get_local $0)
@ -2919,7 +2904,6 @@
(i32.const 1071001154)
)
(block
(nop)
(if
(i32.lt_u
(get_local $2)
@ -3204,7 +3188,6 @@
(get_local $1)
)
)
(nop)
(if
(if (result i32)
(tee_local $15
@ -3315,7 +3298,6 @@
)
(func $~lib/math/NativeMath.scalbn (; 26 ;) (type $FiF) (param $0 f64) (param $1 i32) (result f64)
(local $2 f64)
(nop)
(set_local $2
(get_local $0)
)
@ -3443,7 +3425,6 @@
(local $6 f64)
(local $7 f64)
(local $8 f64)
(nop)
(set_local $1
(i32.wrap/i64
(i64.shr_u
@ -3669,7 +3650,6 @@
)
(func $~lib/math/expo2 (; 28 ;) (type $FF) (param $0 f64) (result f64)
(local $1 f64)
(nop)
(set_local $1
(f64.reinterpret/i64
(i64.shl
@ -3732,7 +3712,6 @@
)
)
)
(nop)
(if
(i32.lt_u
(get_local $2)
@ -3871,7 +3850,6 @@
(local $13 f64)
(local $14 f64)
(local $15 f64)
(nop)
(set_local $2
(i64.reinterpret/f64
(get_local $0)
@ -4210,7 +4188,6 @@
(local $16 f64)
(local $17 f64)
(local $18 f64)
(nop)
(set_local $1
(i64.reinterpret/f64
(get_local $0)
@ -4603,7 +4580,6 @@
(local $15 f64)
(local $16 f64)
(local $17 f64)
(nop)
(set_local $1
(i64.reinterpret/f64
(get_local $0)
@ -5023,7 +4999,6 @@
(local $38 f64)
(local $39 f64)
(local $40 i32)
(nop)
(set_local $2
(i64.reinterpret/f64
(get_local $0)
@ -5495,8 +5470,6 @@
)
)
)
(nop)
(nop)
(if
(i32.gt_s
(get_local $8)
@ -5683,7 +5656,6 @@
)
)
(block
(nop)
(set_local $27
(i32.const 0)
)
@ -6561,7 +6533,6 @@
(local $1 i64)
(local $2 i32)
(local $3 f64)
(nop)
(set_local $1
(i64.reinterpret/f64
(get_local $0)
@ -6605,7 +6576,6 @@
)
)
)
(nop)
(if
(i64.ne
(i64.shr_u
@ -6807,7 +6777,6 @@
)
)
)
(nop)
(if
(i32.lt_u
(get_local $4)
@ -6963,7 +6932,6 @@
)
)
)
(nop)
(if
(i32.gt_u
(get_local $3)

View File

@ -12510,138 +12510,136 @@
)
)
(block $break|2
(loop $continue|2
(if
(i32.lt_s
(get_local $2)
(get_local $6)
)
(block
(br_if $break|2
(i32.eq
(i32.add
(get_local $2)
(i32.const 1)
)
(get_local $6)
)
)
(return
(get_local $0)
)
)
)
(loop $continue|3
(if
(i32.lt_s
(i32.gt_s
(get_local $2)
(get_local $6)
)
(block
(br_if $break|2
(i32.eq
(i32.add
(get_local $2)
(i32.const 1)
(if
(i64.eq
(i64.shr_u
(tee_local $5
(i64.sub
(get_local $3)
(get_local $7)
)
)
(i64.const 63)
)
(i64.const 0)
)
(block
(set_local $3
(get_local $5)
)
(set_local $8
(i32.add
(get_local $8)
(i32.const 1)
)
)
(get_local $6)
)
)
(return
(get_local $0)
(set_local $3
(i64.shl
(get_local $3)
(i64.const 1)
)
)
(set_local $8
(i32.shl
(get_local $8)
(i32.const 1)
)
)
(set_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
)
(br $continue|3)
)
)
)
(if
(i64.eq
(i64.shr_u
(tee_local $5
(i64.sub
(get_local $3)
(get_local $7)
)
)
(i64.const 63)
)
(i64.const 0)
)
(block
(set_local $3
(get_local $5)
)
(set_local $8
(i32.add
(get_local $8)
(i32.const 1)
)
)
)
(loop $continue|3
)
(if
(i64.eq
(get_local $3)
(i64.const 0)
)
(set_local $2
(i32.const -60)
)
(loop $continue|4
(if
(i32.gt_s
(get_local $2)
(get_local $6)
(i64.eq
(i64.shr_u
(get_local $3)
(i64.const 52)
)
(i64.const 0)
)
(block
(if
(i64.eq
(i64.shr_u
(tee_local $5
(i64.sub
(get_local $3)
(get_local $7)
)
)
(i64.const 63)
)
(i64.const 0)
)
(block
(set_local $3
(get_local $5)
)
(set_local $8
(i32.add
(get_local $8)
(i32.const 1)
)
)
)
)
(set_local $3
(i64.shl
(get_local $3)
(i64.const 1)
)
)
(set_local $8
(i32.shl
(get_local $8)
(i32.const 1)
)
)
(set_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
)
(br $continue|3)
)
)
)
(if
(i64.eq
(i64.shr_u
(tee_local $5
(i64.sub
(get_local $3)
(get_local $7)
)
)
(i64.const 63)
)
(i64.const 0)
)
(block
(set_local $3
(get_local $5)
)
(set_local $8
(i32.add
(get_local $8)
(i32.const 1)
)
)
)
)
(if
(i64.eq
(get_local $3)
(i64.const 0)
)
(set_local $2
(i32.const -60)
)
(loop $continue|4
(if
(i64.eq
(i64.shr_u
(get_local $3)
(i64.const 52)
)
(i64.const 0)
)
(block
(set_local $3
(i64.shl
(get_local $3)
(i64.const 1)
)
)
(set_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
)
(br $continue|4)
)
(br $continue|4)
)
)
)
@ -12970,134 +12968,132 @@
(i32.const 0)
)
(block $break|2
(loop $continue|2
(if
(i32.lt_s
(get_local $3)
(get_local $6)
)
(block
(br_if $break|2
(i32.eq
(i32.add
(get_local $3)
(i32.const 1)
)
(get_local $6)
)
)
(return
(get_local $0)
)
)
)
(loop $continue|3
(if
(i32.lt_s
(i32.gt_s
(get_local $3)
(get_local $6)
)
(block
(br_if $break|2
(i32.eq
(i32.add
(get_local $3)
(i32.const 1)
(if
(i32.eqz
(i32.shr_u
(tee_local $2
(i32.sub
(get_local $4)
(get_local $7)
)
)
(i32.const 31)
)
)
(block
(set_local $4
(get_local $2)
)
(set_local $5
(i32.add
(get_local $5)
(i32.const 1)
)
)
(get_local $6)
)
)
(return
(get_local $0)
(set_local $4
(i32.shl
(get_local $4)
(i32.const 1)
)
)
(set_local $5
(i32.shl
(get_local $5)
(i32.const 1)
)
)
(set_local $3
(i32.sub
(get_local $3)
(i32.const 1)
)
)
(br $continue|3)
)
)
)
(if
(i32.eqz
(i32.shr_u
(tee_local $2
(i32.sub
(get_local $4)
(get_local $7)
)
)
(i32.const 31)
)
)
(block
(set_local $4
(get_local $2)
)
(set_local $5
(i32.add
(get_local $5)
(i32.const 1)
)
)
)
(loop $continue|3
)
(if
(get_local $4)
(loop $continue|4
(if
(i32.gt_s
(get_local $3)
(get_local $6)
(i32.eqz
(i32.shr_u
(get_local $4)
(i32.const 23)
)
)
(block
(if
(i32.eqz
(i32.shr_u
(tee_local $2
(i32.sub
(get_local $4)
(get_local $7)
)
)
(i32.const 31)
)
)
(block
(set_local $4
(get_local $2)
)
(set_local $5
(i32.add
(get_local $5)
(i32.const 1)
)
)
)
)
(set_local $4
(i32.shl
(get_local $4)
(i32.const 1)
)
)
(set_local $5
(i32.shl
(get_local $5)
(i32.const 1)
)
)
(set_local $3
(i32.sub
(get_local $3)
(i32.const 1)
)
)
(br $continue|3)
(br $continue|4)
)
)
)
(if
(i32.eqz
(i32.shr_u
(tee_local $2
(i32.sub
(get_local $4)
(get_local $7)
)
)
(i32.const 31)
)
)
(block
(set_local $4
(get_local $2)
)
(set_local $5
(i32.add
(get_local $5)
(i32.const 1)
)
)
)
)
(if
(get_local $4)
(loop $continue|4
(if
(i32.eqz
(i32.shr_u
(get_local $4)
(i32.const 23)
)
)
(block
(set_local $4
(i32.shl
(get_local $4)
(i32.const 1)
)
)
(set_local $3
(i32.sub
(get_local $3)
(i32.const 1)
)
)
(br $continue|4)
)
)
)
(set_local $3
(i32.const -30)
)
(set_local $3
(i32.const -30)
)
)
)

File diff suppressed because it is too large Load Diff

View File

@ -150,7 +150,6 @@
)
)
)
(nop)
(if
(i32.eqz
(get_local $4)
@ -667,7 +666,6 @@
)
)
)
(nop)
(if
(i32.eqz
(get_local $4)

View File

@ -184,8 +184,7 @@
)
(func $std/operator-overloading/Tester#constructor (; 2 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(block
)
(nop)
(tee_local $0
(if (result i32)
(get_local $0)
@ -328,7 +327,6 @@
)
(func $~lib/math/NativeMath.scalbn (; 8 ;) (type $FiF) (param $0 f64) (param $1 i32) (result f64)
(local $2 f64)
(nop)
(set_local $2
(get_local $0)
)
@ -487,7 +485,6 @@
(local $38 f64)
(local $39 f64)
(local $40 i32)
(nop)
(set_local $2
(i64.reinterpret/f64
(get_local $0)
@ -959,8 +956,6 @@
)
)
)
(nop)
(nop)
(if
(i32.gt_s
(get_local $8)
@ -1147,7 +1142,6 @@
)
)
(block
(nop)
(set_local $27
(i32.const 0)
)
@ -2275,8 +2269,7 @@
)
(func $std/operator-overloading/TesterInlineStatic#constructor (; 20 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(block
)
(nop)
(tee_local $0
(if (result i32)
(get_local $0)
@ -2304,8 +2297,7 @@
)
(func $std/operator-overloading/TesterInlineInstance#constructor (; 21 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(block
)
(nop)
(tee_local $0
(if (result i32)
(get_local $0)

View File

@ -25,7 +25,7 @@
(call $abort
(i32.const 0)
(i32.const 4)
(i32.const 25)
(i32.const 27)
(i32.const 2)
)
(unreachable)
@ -114,7 +114,7 @@
(call $abort
(i32.const 0)
(i32.const 4)
(i32.const 25)
(i32.const 27)
(i32.const 2)
)
(unreachable)
@ -292,7 +292,7 @@
(call $abort
(i32.const 0)
(i32.const 4)
(i32.const 25)
(i32.const 27)
(i32.const 2)
)
(unreachable)
@ -333,7 +333,7 @@
(call $abort
(i32.const 0)
(i32.const 4)
(i32.const 25)
(i32.const 27)
(i32.const 2)
)
(unreachable)

View File

@ -42,7 +42,7 @@
(call $abort
(i32.const 0)
(i32.const 4)
(i32.const 25)
(i32.const 27)
(i32.const 2)
)
(unreachable)
@ -142,15 +142,10 @@
(unreachable)
)
)
(block
(return
(call $~lib/polyfills/bswap16<u16>
(get_local $0)
)
)
)
(return
(get_local $0)
(call $~lib/polyfills/bswap16<u16>
(get_local $0)
)
)
)
(func $~lib/polyfills/bswap16<i16> (; 3 ;) (type $ii) (param $0 i32) (result i32)
@ -184,7 +179,7 @@
(call $abort
(i32.const 0)
(i32.const 4)
(i32.const 25)
(i32.const 27)
(i32.const 2)
)
(unreachable)
@ -287,15 +282,10 @@
(unreachable)
)
)
(block
(return
(call $~lib/polyfills/bswap16<i16>
(get_local $0)
)
)
)
(return
(get_local $0)
(call $~lib/polyfills/bswap16<i16>
(get_local $0)
)
)
)
(func $~lib/polyfills/bswap<u32> (; 5 ;) (type $ii) (param $0 i32) (result i32)
@ -344,29 +334,24 @@
(unreachable)
)
)
(block
(return
(i32.or
(i32.rotl
(i32.and
(get_local $0)
(i32.const -16711936)
)
(i32.const 8)
(return
(i32.or
(i32.rotl
(i32.and
(get_local $0)
(i32.const -16711936)
)
(i32.rotr
(i32.and
(get_local $0)
(i32.const 16711935)
)
(i32.const 8)
(i32.const 8)
)
(i32.rotr
(i32.and
(get_local $0)
(i32.const 16711935)
)
(i32.const 8)
)
)
)
(return
(get_local $0)
)
)
(func $~lib/polyfills/bswap<i32> (; 6 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
@ -414,29 +399,24 @@
(unreachable)
)
)
(block
(return
(i32.or
(i32.rotl
(i32.and
(get_local $0)
(i32.const -16711936)
)
(i32.const 8)
(return
(i32.or
(i32.rotl
(i32.and
(get_local $0)
(i32.const -16711936)
)
(i32.rotr
(i32.and
(get_local $0)
(i32.const 16711935)
)
(i32.const 8)
(i32.const 8)
)
(i32.rotr
(i32.and
(get_local $0)
(i32.const 16711935)
)
(i32.const 8)
)
)
)
(return
(get_local $0)
)
)
(func $~lib/polyfills/bswap<u64> (; 7 ;) (type $II) (param $0 i64) (result i64)
(local $1 i32)
@ -540,9 +520,6 @@
)
)
)
(return
(get_local $0)
)
)
(func $~lib/polyfills/bswap<i64> (; 8 ;) (type $II) (param $0 i64) (result i64)
(local $1 i32)
@ -646,9 +623,6 @@
)
)
)
(return
(get_local $0)
)
)
(func $~lib/polyfills/bswap<usize> (; 9 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
@ -696,29 +670,24 @@
(unreachable)
)
)
(block
(return
(i32.or
(i32.rotl
(i32.and
(get_local $0)
(i32.const -16711936)
)
(i32.const 8)
(return
(i32.or
(i32.rotl
(i32.and
(get_local $0)
(i32.const -16711936)
)
(i32.rotr
(i32.and
(get_local $0)
(i32.const 16711935)
)
(i32.const 8)
(i32.const 8)
)
(i32.rotr
(i32.and
(get_local $0)
(i32.const 16711935)
)
(i32.const 8)
)
)
)
(return
(get_local $0)
)
)
(func $~lib/polyfills/bswap<isize> (; 10 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
@ -766,29 +735,24 @@
(unreachable)
)
)
(block
(return
(i32.or
(i32.rotl
(i32.and
(get_local $0)
(i32.const -16711936)
)
(i32.const 8)
(return
(i32.or
(i32.rotl
(i32.and
(get_local $0)
(i32.const -16711936)
)
(i32.rotr
(i32.and
(get_local $0)
(i32.const 16711935)
)
(i32.const 8)
(i32.const 8)
)
(i32.rotr
(i32.and
(get_local $0)
(i32.const 16711935)
)
(i32.const 8)
)
)
)
(return
(get_local $0)
)
)
(func $~lib/polyfills/bswap16<u32> (; 11 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
@ -821,7 +785,7 @@
(call $abort
(i32.const 0)
(i32.const 4)
(i32.const 25)
(i32.const 27)
(i32.const 2)
)
(unreachable)
@ -901,7 +865,7 @@
(call $abort
(i32.const 0)
(i32.const 4)
(i32.const 25)
(i32.const 27)
(i32.const 2)
)
(unreachable)

View File

@ -141,7 +141,6 @@
(local $3 i32)
(local $4 i32)
(local $5 i32)
(nop)
(block $break|0
(loop $continue|0
(if
@ -2233,22 +2232,20 @@
(if
(get_local $2)
(block
(block
(i32.store8
(i32.add
(get_local $0)
(tee_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
(i32.store8
(i32.add
(get_local $0)
(tee_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
)
(i32.load8_u
(i32.add
(get_local $1)
(get_local $2)
)
)
(i32.load8_u
(i32.add
(get_local $1)
(get_local $2)
)
)
)
@ -2261,6 +2258,7 @@
)
)
(func $~lib/allocator/arena/free_memory (; 5 ;) (type $iv) (param $0 i32)
(nop)
)
(func $~lib/set/Set<i32>#add (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
@ -2418,25 +2416,23 @@
(get_local $3)
)
(block
(block
(if
(i32.eq
(i32.load
(i32.add
(i32.load
(get_local $0)
)
(i32.mul
(get_local $2)
(i32.const 4)
)
(if
(i32.eq
(i32.load
(i32.add
(i32.load
(get_local $0)
)
(i32.mul
(get_local $2)
(i32.const 4)
)
)
(get_local $1)
)
(return
(i32.const 1)
)
(get_local $1)
)
(return
(i32.const 1)
)
)
(set_local $2
@ -2492,10 +2488,31 @@
(get_local $3)
)
(block
(block
(if
(i32.eq
(i32.load
(if
(i32.eq
(i32.load
(i32.add
(i32.load
(get_local $0)
)
(i32.mul
(get_local $2)
(i32.const 4)
)
)
)
(get_local $1)
)
(block
(if
(i32.lt_u
(i32.add
(get_local $2)
(i32.const 1)
)
(get_local $3)
)
(call $~lib/memory/move_memory
(i32.add
(i32.load
(get_local $0)
@ -2505,62 +2522,39 @@
(i32.const 4)
)
)
)
(get_local $1)
)
(block
(if
(i32.lt_u
(i32.add
(get_local $2)
(i32.const 1)
)
(get_local $3)
)
(call $~lib/memory/move_memory
(i32.add
(i32.load
(get_local $0)
)
(i32.mul
(get_local $2)
(i32.const 4)
)
)
(i32.add
(i32.load
(get_local $0)
)
(i32.mul
(i32.add
(get_local $2)
(i32.const 1)
)
(i32.const 4)
)
)
(i32.sub
(i32.sub
(get_local $3)
(get_local $2)
)
(i32.const 1)
)
)
)
(i32.store offset=8
(get_local $0)
(i32.sub
(i32.load offset=8
(i32.add
(i32.load
(get_local $0)
)
(i32.mul
(i32.add
(get_local $2)
(i32.const 1)
)
(i32.const 4)
)
)
(i32.sub
(i32.sub
(get_local $3)
(get_local $2)
)
(i32.const 1)
)
)
(return
)
(i32.store offset=8
(get_local $0)
(i32.sub
(i32.load offset=8
(get_local $0)
)
(i32.const 1)
)
)
(return
(i32.const 1)
)
)
)
(set_local $2

View File

@ -599,7 +599,6 @@
(local $3 i32)
(local $4 i32)
(local $5 i32)
(nop)
(block $break|0
(loop $continue|0
(if
@ -2691,22 +2690,20 @@
(if
(get_local $2)
(block
(block
(i32.store8
(i32.add
(get_local $0)
(tee_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
(i32.store8
(i32.add
(get_local $0)
(tee_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
)
(i32.load8_u
(i32.add
(get_local $1)
(get_local $2)
)
)
(i32.load8_u
(i32.add
(get_local $1)
(get_local $2)
)
)
)
@ -2872,7 +2869,6 @@
(get_local $4)
)
(block
(nop)
(if
(i32.ge_u
(get_local $1)
@ -2990,7 +2986,6 @@
(get_local $4)
)
(block
(nop)
(if
(i32.ge_u
(get_local $1)
@ -3108,7 +3103,6 @@
(get_local $4)
)
(block
(nop)
(if
(i32.ge_u
(get_local $1)
@ -3226,7 +3220,6 @@
(get_local $4)
)
(block
(nop)
(if
(i32.ge_u
(get_local $1)

View File

@ -538,33 +538,31 @@
(get_local $4)
)
(block
(block
(if
(i32.eqz
(call $~lib/memory/compare_memory
(if
(i32.eqz
(call $~lib/memory/compare_memory
(i32.add
(i32.add
(i32.add
(get_local $0)
(i32.const 4)
)
(i32.shl
(get_local $5)
(i32.const 1)
)
)
(i32.add
(get_local $1)
(get_local $0)
(i32.const 4)
)
(i32.shl
(get_local $8)
(get_local $5)
(i32.const 1)
)
)
(i32.add
(get_local $1)
(i32.const 4)
)
(i32.shl
(get_local $8)
(i32.const 1)
)
)
(return
(get_local $5)
)
)
(return
(get_local $5)
)
)
(set_local $5
@ -673,7 +671,6 @@
(get_local $3)
)
)
(nop)
(if
(i32.eq
(get_local $4)
@ -877,10 +874,8 @@
(br $break|0)
)
)
(block
(set_local $1
(i32.const 10)
)
(set_local $1
(i32.const 10)
)
)
(set_local $1
@ -1099,7 +1094,6 @@
(get_local $2)
)
)
(nop)
(if
(i32.eq
(get_local $3)
@ -1512,7 +1506,6 @@
(local $3 i32)
(local $4 i32)
(local $5 i32)
(nop)
(block $break|0
(loop $continue|0
(if
@ -3604,22 +3597,20 @@
(if
(get_local $2)
(block
(block
(i32.store8
(i32.add
(get_local $0)
(tee_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
(i32.store8
(i32.add
(get_local $0)
(tee_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
)
(i32.load8_u
(i32.add
(get_local $1)
(get_local $2)
)
)
(i32.load8_u
(i32.add
(get_local $1)
(get_local $2)
)
)
)
@ -4314,21 +4305,19 @@
(get_local $6)
)
(block
(block
(call $~lib/memory/move_memory
(call $~lib/memory/move_memory
(i32.add
(i32.add
(i32.add
(get_local $4)
(i32.const 4)
)
(get_local $3)
)
(i32.add
(get_local $0)
(get_local $4)
(i32.const 4)
)
(get_local $5)
(get_local $3)
)
(i32.add
(get_local $0)
(i32.const 4)
)
(get_local $5)
)
(set_local $3
(i32.add

View File

@ -546,7 +546,6 @@
(local $3 i32)
(local $4 i32)
(block
(nop)
(if
(i32.gt_u
(get_local $1)
@ -643,7 +642,6 @@
(local $3 i32)
(local $4 i32)
(block
(nop)
(if
(i32.gt_u
(get_local $1)
@ -740,7 +738,6 @@
(local $3 i32)
(local $4 i32)
(block
(nop)
(if
(i32.gt_u
(get_local $1)
@ -837,7 +834,6 @@
(local $3 i32)
(local $4 i32)
(block
(nop)
(if
(i32.gt_u
(get_local $1)
@ -934,7 +930,6 @@
(local $3 i32)
(local $4 i32)
(block
(nop)
(if
(i32.gt_u
(get_local $1)
@ -1031,7 +1026,6 @@
(local $3 i32)
(local $4 i32)
(block
(nop)
(if
(i32.gt_u
(get_local $1)
@ -1128,7 +1122,6 @@
(local $3 i32)
(local $4 i32)
(block
(nop)
(if
(i32.gt_u
(get_local $1)
@ -1225,7 +1218,6 @@
(local $3 i32)
(local $4 i32)
(block
(nop)
(if
(i32.gt_u
(get_local $1)
@ -1322,7 +1314,6 @@
(local $3 i32)
(local $4 i32)
(block
(nop)
(if
(i32.gt_u
(get_local $1)
@ -1419,7 +1410,6 @@
(local $3 i32)
(local $4 i32)
(block
(nop)
(if
(i32.gt_u
(get_local $1)