Add a 'call_indirect' builtin to emit arbitrary calls (might trap at runtime); Optimize 'for' loop compilation a bit

This commit is contained in:
dcodeIO
2018-05-25 15:59:17 +02:00
parent 51ede113dd
commit 7ad13f9d65
47 changed files with 3311 additions and 22111 deletions

View File

@ -2419,7 +2419,7 @@
(set_global $std/allocator_arena/i
(i32.const 0)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.ge_u
(get_global $std/allocator_arena/i)
@ -2452,7 +2452,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
)
@ -2466,7 +2466,7 @@
(set_global $std/allocator_arena/i
(i32.const 0)
)
(loop $loop|1
(loop $repeat|1
(br_if $break|1
(i32.ge_u
(get_global $std/allocator_arena/i)
@ -2499,7 +2499,7 @@
(i32.const 1)
)
)
(br $loop|1)
(br $repeat|1)
)
)
)

View File

@ -2729,37 +2729,35 @@
(set_global $std/allocator_arena/i
(i32.const 0)
)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i32.lt_u
(get_global $std/allocator_arena/i)
(i32.const 42)
)
(loop $repeat|0
(br_if $break|0
(i32.eqz
(i32.lt_u
(get_global $std/allocator_arena/i)
(i32.const 42)
)
)
(if
(i32.eqz
(i32.eq
(i32.load8_u
(i32.add
(get_global $std/allocator_arena/ptr1)
(get_global $std/allocator_arena/i)
)
)
(if
(i32.eqz
(i32.eq
(i32.load8_u
(i32.add
(get_global $std/allocator_arena/ptr1)
(get_global $std/allocator_arena/i)
)
(i32.const 18)
)
(i32.const 18)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 13)
(i32.const 2)
)
(unreachable)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 13)
(i32.const 2)
)
(unreachable)
)
)
(set_global $std/allocator_arena/i
@ -2768,7 +2766,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(call $~lib/memory/move_memory
@ -2780,37 +2778,35 @@
(set_global $std/allocator_arena/i
(i32.const 0)
)
(loop $loop|1
(block $continue|1
(br_if $break|1
(i32.eqz
(i32.lt_u
(get_global $std/allocator_arena/i)
(i32.const 42)
)
(loop $repeat|1
(br_if $break|1
(i32.eqz
(i32.lt_u
(get_global $std/allocator_arena/i)
(i32.const 42)
)
)
(if
(i32.eqz
(i32.eq
(i32.load8_u
(i32.add
(get_global $std/allocator_arena/ptr2)
(get_global $std/allocator_arena/i)
)
)
(if
(i32.eqz
(i32.eq
(i32.load8_u
(i32.add
(get_global $std/allocator_arena/ptr2)
(get_global $std/allocator_arena/i)
)
(i32.const 18)
)
(i32.const 18)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 18)
(i32.const 2)
)
(unreachable)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 18)
(i32.const 2)
)
(unreachable)
)
)
(set_global $std/allocator_arena/i
@ -2819,7 +2815,7 @@
(i32.const 1)
)
)
(br $loop|1)
(br $repeat|1)
)
)
(if

View File

@ -2939,7 +2939,7 @@
(i32.const 1)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.ge_s
(get_local $1)
@ -2997,7 +2997,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(get_local $0)
@ -3364,7 +3364,7 @@
(get_local $0)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.eqz
(if (result i32)
@ -3417,7 +3417,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
)
@ -3481,7 +3481,7 @@
(get_local $0)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.eqz
(if (result i32)
@ -3506,29 +3506,24 @@
(set_global $~argc
(i32.const 3)
)
(i32.eqz
(i32.and
(call_indirect (type $iiii)
(i32.load offset=8
(i32.add
(get_local $3)
(i32.shl
(get_local $2)
(i32.const 2)
)
(i32.and
(call_indirect (type $iiii)
(i32.load offset=8
(i32.add
(get_local $3)
(i32.shl
(get_local $2)
(i32.const 2)
)
)
(get_local $2)
(get_local $0)
(get_local $1)
)
(i32.const 1)
(get_local $2)
(get_local $0)
(get_local $1)
)
(i32.const 1)
)
)
(return
(i32.const 0)
)
(block
(set_local $2
(i32.add
@ -3536,7 +3531,10 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
(return
(i32.const 0)
)
)
)
@ -3600,7 +3598,7 @@
(get_local $0)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.eqz
(if (result i32)
@ -3653,7 +3651,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
)
@ -3719,7 +3717,7 @@
(get_local $0)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.eqz
(if (result i32)
@ -3762,7 +3760,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
)
@ -3825,7 +3823,7 @@
)
)
(block $break|0
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.eqz
(if (result i32)
@ -3877,7 +3875,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(get_local $5)
@ -3952,7 +3950,7 @@
)
)
(block $break|0
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.eqz
(if (result i32)
@ -4004,7 +4002,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(get_local $5)
@ -4061,7 +4059,7 @@
)
)
(block $break|0
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.eqz
(if (result i32)
@ -4120,7 +4118,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(get_local $4)
@ -4194,7 +4192,7 @@
(get_local $0)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.eqz
(if (result i32)
@ -4240,7 +4238,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(get_local $2)
@ -4311,7 +4309,7 @@
(i32.const 1)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.lt_s
(get_local $3)
@ -4344,7 +4342,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(get_local $2)
@ -4421,7 +4419,7 @@
(set_local $0
(i32.const 0)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.ge_s
(get_local $0)
@ -4449,7 +4447,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(get_local $1)
@ -4532,7 +4530,7 @@
)
)
(block $break|0
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.ge_s
(get_local $1)
@ -4561,7 +4559,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(get_local $0)
@ -4597,7 +4595,7 @@
(get_local $0)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.ge_s
(get_local $2)
@ -4698,7 +4696,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(get_local $0)
@ -4750,7 +4748,7 @@
(i32.const 1)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.le_s
(get_local $4)
@ -4906,7 +4904,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(block $break|2
@ -4916,7 +4914,7 @@
(i32.const 1)
)
)
(loop $loop|2
(loop $repeat|2
(br_if $break|2
(i32.lt_s
(get_local $4)
@ -5098,7 +5096,7 @@
(i32.const 1)
)
)
(br $loop|2)
(br $repeat|2)
)
)
(call $~lib/allocator/arena/free_memory
@ -5228,7 +5226,7 @@
(get_local $0)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.ge_s
(get_local $2)
@ -5268,7 +5266,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
)
@ -5331,7 +5329,7 @@
)
)
(block $break|0
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.ge_s
(get_local $3)
@ -5359,7 +5357,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
)
@ -5390,7 +5388,7 @@
(set_local $0
(i32.const 0)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.ge_s
(get_local $0)
@ -5429,7 +5427,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(get_local $1)
@ -5577,7 +5575,7 @@
(set_local $0
(i32.const 0)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.ge_s
(get_local $0)
@ -5608,7 +5606,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(get_local $1)
@ -5946,7 +5944,7 @@
)
)
(block $break|0
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.ge_s
(get_local $3)
@ -5974,7 +5972,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
)
@ -6178,7 +6176,7 @@
(i32.const 544)
)
(block $break|0
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.ge_s
(get_local $2)
@ -6211,7 +6209,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(get_local $1)
@ -6228,7 +6226,7 @@
(set_local $0
(i32.const 0)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.ge_s
(get_local $0)
@ -6255,7 +6253,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(get_local $1)

File diff suppressed because it is too large Load Diff

View File

@ -26,7 +26,7 @@
(i32.const 1)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.ge_u
(get_local $1)
@ -53,7 +53,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(get_local $2)

View File

@ -44,29 +44,27 @@
)
)
)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i32.lt_u
(get_local $2)
(get_local $3)
)
(loop $repeat|0
(br_if $break|0
(i32.eqz
(i32.lt_u
(get_local $2)
(get_local $3)
)
)
(set_local $1
(i32.mul
(i32.xor
(get_local $1)
(i32.load8_u offset=4
(i32.add
(get_local $0)
(get_local $2)
)
)
(set_local $1
(i32.mul
(i32.xor
(get_local $1)
(i32.load8_u offset=4
(i32.add
(get_local $0)
(get_local $2)
)
)
(i32.const 16777619)
)
(i32.const 16777619)
)
)
(set_local $2
@ -75,7 +73,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(return

View File

@ -8607,7 +8607,7 @@
(i64.const 12)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.eqz
(i64.eqz
@ -8630,7 +8630,7 @@
(i64.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(i64.shl
@ -8663,7 +8663,7 @@
(i64.const 12)
)
)
(loop $loop|1
(loop $repeat|1
(br_if $break|1
(i32.eqz
(i64.eqz
@ -8686,7 +8686,7 @@
(i64.const 1)
)
)
(br $loop|1)
(br $repeat|1)
)
)
(i64.shl
@ -8702,7 +8702,7 @@
)
)
(block $break|2
(loop $loop|2
(loop $repeat|2
(br_if $break|2
(i32.le_s
(get_local $3)
@ -8744,7 +8744,7 @@
(i32.const 1)
)
)
(br $loop|2)
(br $repeat|2)
)
)
(if
@ -8771,7 +8771,7 @@
)
)
(block $break|3
(loop $loop|3
(loop $repeat|3
(br_if $break|3
(i32.eqz
(i64.eqz
@ -8794,7 +8794,7 @@
(i64.const 1)
)
)
(br $loop|3)
(br $repeat|3)
)
)
(return
@ -9000,7 +9000,7 @@
(i32.const 9)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.shr_u
(get_local $3)
@ -9019,7 +9019,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(i32.shl
@ -9050,7 +9050,7 @@
(i32.const 9)
)
)
(loop $loop|1
(loop $repeat|1
(br_if $break|1
(i32.shr_u
(get_local $3)
@ -9069,7 +9069,7 @@
(i32.const 1)
)
)
(br $loop|1)
(br $repeat|1)
)
)
(i32.shl
@ -9083,7 +9083,7 @@
)
)
(block $break|2
(loop $loop|2
(loop $repeat|2
(br_if $break|2
(i32.le_s
(get_local $4)
@ -9125,7 +9125,7 @@
(i32.const 1)
)
)
(br $loop|2)
(br $repeat|2)
)
)
(if
@ -9152,7 +9152,7 @@
)
)
(block $break|3
(loop $loop|3
(loop $repeat|3
(br_if $break|3
(i32.shr_u
(get_local $2)
@ -9171,7 +9171,7 @@
(i32.const 1)
)
)
(br $loop|3)
(br $repeat|3)
)
)
(return
@ -12401,7 +12401,7 @@
(i64.const 12)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i64.ne
(i64.shr_u
@ -12423,7 +12423,7 @@
(i64.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(i64.shl
@ -12464,7 +12464,7 @@
(i64.const 12)
)
)
(loop $loop|1
(loop $repeat|1
(br_if $break|1
(i64.ne
(i64.shr_u
@ -12486,7 +12486,7 @@
(i64.const 1)
)
)
(br $loop|1)
(br $repeat|1)
)
)
(i64.shl
@ -12531,7 +12531,7 @@
)
)
(block $break|3
(loop $loop|3
(loop $repeat|3
(br_if $break|3
(i32.le_s
(get_local $2)
@ -12581,7 +12581,7 @@
(i32.const 1)
)
)
(br $loop|3)
(br $repeat|3)
)
)
(if
@ -12618,7 +12618,7 @@
(i32.const -60)
)
(block $break|4
(loop $loop|4
(loop $repeat|4
(br_if $break|4
(i64.ne
(i64.shr_u
@ -12640,7 +12640,7 @@
(i32.const 1)
)
)
(br $loop|4)
(br $repeat|4)
)
)
)
@ -12866,7 +12866,7 @@
(i32.const 9)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.shr_u
(get_local $2)
@ -12885,7 +12885,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(i32.shl
@ -12922,7 +12922,7 @@
(i32.const 9)
)
)
(loop $loop|1
(loop $repeat|1
(br_if $break|1
(i32.shr_u
(get_local $2)
@ -12941,7 +12941,7 @@
(i32.const 1)
)
)
(br $loop|1)
(br $repeat|1)
)
)
(i32.shl
@ -12985,7 +12985,7 @@
)
)
(block $break|3
(loop $loop|3
(loop $repeat|3
(br_if $break|3
(i32.le_s
(get_local $3)
@ -13034,7 +13034,7 @@
(i32.const 1)
)
)
(br $loop|3)
(br $repeat|3)
)
)
(if
@ -13064,7 +13064,7 @@
(if
(get_local $4)
(block $break|4
(loop $loop|4
(loop $repeat|4
(br_if $break|4
(i32.shr_u
(get_local $4)
@ -13083,7 +13083,7 @@
(i32.const 1)
)
)
(br $loop|4)
(br $repeat|4)
)
)
(set_local $3
@ -44238,7 +44238,7 @@
)
)
(block $break|0
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.eqz
(f64.lt
@ -44272,7 +44272,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
(block
(call $~lib/env/abort
@ -44295,7 +44295,7 @@
(set_local $0
(i32.const 0)
)
(loop $loop|1
(loop $repeat|1
(br_if $break|1
(i32.eqz
(f64.lt
@ -44329,7 +44329,7 @@
(i32.const 1)
)
)
(br $loop|1)
(br $repeat|1)
)
(block
(call $~lib/env/abort

File diff suppressed because it is too large Load Diff

View File

@ -152,7 +152,7 @@
(i64.const 12)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.eqz
(i64.eqz
@ -175,7 +175,7 @@
(i64.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(i64.shl
@ -208,7 +208,7 @@
(i64.const 12)
)
)
(loop $loop|1
(loop $repeat|1
(br_if $break|1
(i32.eqz
(i64.eqz
@ -231,7 +231,7 @@
(i64.const 1)
)
)
(br $loop|1)
(br $repeat|1)
)
)
(i64.shl
@ -247,7 +247,7 @@
)
)
(block $break|2
(loop $loop|2
(loop $repeat|2
(br_if $break|2
(i32.le_s
(get_local $3)
@ -289,7 +289,7 @@
(i32.const 1)
)
)
(br $loop|2)
(br $repeat|2)
)
)
(if
@ -316,7 +316,7 @@
)
)
(block $break|3
(loop $loop|3
(loop $repeat|3
(br_if $break|3
(i32.eqz
(i64.eqz
@ -339,7 +339,7 @@
(i64.const 1)
)
)
(br $loop|3)
(br $repeat|3)
)
)
(return
@ -581,7 +581,7 @@
(i32.const 9)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.shr_u
(get_local $3)
@ -600,7 +600,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(i32.shl
@ -631,7 +631,7 @@
(i32.const 9)
)
)
(loop $loop|1
(loop $repeat|1
(br_if $break|1
(i32.shr_u
(get_local $3)
@ -650,7 +650,7 @@
(i32.const 1)
)
)
(br $loop|1)
(br $repeat|1)
)
)
(i32.shl
@ -664,7 +664,7 @@
)
)
(block $break|2
(loop $loop|2
(loop $repeat|2
(br_if $break|2
(i32.le_s
(get_local $4)
@ -706,7 +706,7 @@
(i32.const 1)
)
)
(br $loop|2)
(br $repeat|2)
)
)
(if
@ -733,7 +733,7 @@
)
)
(block $break|3
(loop $loop|3
(loop $repeat|3
(br_if $break|3
(i32.shr_u
(get_local $2)
@ -752,7 +752,7 @@
(i32.const 1)
)
)
(br $loop|3)
(br $repeat|3)
)
)
(return

View File

@ -160,23 +160,21 @@
(i64.const 12)
)
)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $8)
(i64.const 63)
)
(loop $repeat|0
(br_if $break|0
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $8)
(i64.const 63)
)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
)
(set_local $8
@ -185,7 +183,7 @@
(i64.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(set_local $2
@ -236,23 +234,21 @@
(i64.const 12)
)
)
(loop $loop|1
(block $continue|1
(br_if $break|1
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $8)
(i64.const 63)
)
(loop $repeat|1
(br_if $break|1
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $8)
(i64.const 63)
)
)
)
(set_local $5
(i32.sub
(get_local $5)
(i32.const 1)
)
)
(set_local $5
(i32.sub
(get_local $5)
(i32.const 1)
)
)
(set_local $8
@ -261,7 +257,7 @@
(i64.const 1)
)
)
(br $loop|1)
(br $repeat|1)
)
)
(set_local $3
@ -301,53 +297,50 @@
)
)
(block $break|2
(nop)
(loop $loop|2
(block $continue|2
(br_if $break|2
(i32.eqz
(i32.gt_s
(get_local $4)
(get_local $5)
(loop $repeat|2
(br_if $break|2
(i32.eqz
(i32.gt_s
(get_local $4)
(get_local $5)
)
)
)
(block
(set_local $8
(i64.sub
(get_local $2)
(get_local $3)
)
)
(if
(i64.eqz
(i64.shr_u
(get_local $8)
(i64.const 63)
)
)
(block
(if
(i64.eqz
(get_local $8)
)
(return
(f64.mul
(f64.const 0)
(get_local $0)
)
)
)
(set_local $2
(get_local $8)
)
)
)
(block
(set_local $8
(i64.sub
(get_local $2)
(get_local $3)
)
)
(if
(i64.eqz
(i64.shr_u
(get_local $8)
(i64.const 63)
)
)
(block
(if
(i64.eqz
(get_local $8)
)
(return
(f64.mul
(f64.const 0)
(get_local $0)
)
)
)
(set_local $2
(get_local $8)
)
)
)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 1)
)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 1)
)
)
)
@ -357,7 +350,7 @@
(i32.const 1)
)
)
(br $loop|2)
(br $repeat|2)
)
)
(set_local $8
@ -391,24 +384,21 @@
)
)
(block $break|3
(nop)
(loop $loop|3
(block $continue|3
(br_if $break|3
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $2)
(i64.const 52)
)
(loop $repeat|3
(br_if $break|3
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $2)
(i64.const 52)
)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
)
(set_local $2
@ -417,7 +407,7 @@
(i64.const 1)
)
)
(br $loop|3)
(br $repeat|3)
)
)
(if
@ -684,23 +674,21 @@
(i32.const 9)
)
)
(loop $loop|0
(block $continue|0
(br_if $break|0
(loop $repeat|0
(br_if $break|0
(i32.eqz
(i32.eqz
(i32.eqz
(i32.shr_u
(get_local $8)
(i32.const 31)
)
(i32.shr_u
(get_local $8)
(i32.const 31)
)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
)
(set_local $8
@ -709,7 +697,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(set_local $2
@ -758,23 +746,21 @@
(i32.const 9)
)
)
(loop $loop|1
(block $continue|1
(br_if $break|1
(loop $repeat|1
(br_if $break|1
(i32.eqz
(i32.eqz
(i32.eqz
(i32.shr_u
(get_local $8)
(i32.const 31)
)
(i32.shr_u
(get_local $8)
(i32.const 31)
)
)
)
(set_local $5
(i32.sub
(get_local $5)
(i32.const 1)
)
)
(set_local $5
(i32.sub
(get_local $5)
(i32.const 1)
)
)
(set_local $8
@ -783,7 +769,7 @@
(i32.const 1)
)
)
(br $loop|1)
(br $repeat|1)
)
)
(set_local $3
@ -821,53 +807,50 @@
)
)
(block $break|2
(nop)
(loop $loop|2
(block $continue|2
(br_if $break|2
(loop $repeat|2
(br_if $break|2
(i32.eqz
(i32.gt_s
(get_local $4)
(get_local $5)
)
)
)
(block
(set_local $8
(i32.sub
(get_local $2)
(get_local $3)
)
)
(if
(i32.eqz
(i32.gt_s
(get_local $4)
(get_local $5)
(i32.shr_u
(get_local $8)
(i32.const 31)
)
)
(block
(if
(i32.eqz
(get_local $8)
)
(return
(f32.mul
(f32.const 0)
(get_local $0)
)
)
)
(set_local $2
(get_local $8)
)
)
)
(block
(set_local $8
(i32.sub
(get_local $2)
(get_local $3)
)
)
(if
(i32.eqz
(i32.shr_u
(get_local $8)
(i32.const 31)
)
)
(block
(if
(i32.eqz
(get_local $8)
)
(return
(f32.mul
(f32.const 0)
(get_local $0)
)
)
)
(set_local $2
(get_local $8)
)
)
)
(set_local $2
(i32.shl
(get_local $2)
(i32.const 1)
)
(set_local $2
(i32.shl
(get_local $2)
(i32.const 1)
)
)
)
@ -877,7 +860,7 @@
(i32.const 1)
)
)
(br $loop|2)
(br $repeat|2)
)
)
(set_local $8
@ -911,24 +894,21 @@
)
)
(block $break|3
(nop)
(loop $loop|3
(block $continue|3
(br_if $break|3
(loop $repeat|3
(br_if $break|3
(i32.eqz
(i32.eqz
(i32.eqz
(i32.shr_u
(get_local $2)
(i32.const 23)
)
(i32.shr_u
(get_local $2)
(i32.const 23)
)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
)
(set_local $2
@ -937,7 +917,7 @@
(i32.const 1)
)
)
(br $loop|3)
(br $repeat|3)
)
)
(if

View File

@ -2110,7 +2110,7 @@
(get_local $0)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.ge_u
(get_local $2)
@ -2142,7 +2142,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
)
@ -2172,7 +2172,7 @@
(get_local $0)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.ge_u
(get_local $2)
@ -2254,7 +2254,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
)

View File

@ -2408,34 +2408,32 @@
)
)
)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i32.lt_u
(get_local $2)
(get_local $3)
)
(loop $repeat|0
(br_if $break|0
(i32.eqz
(i32.lt_u
(get_local $2)
(get_local $3)
)
)
(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
@ -2444,7 +2442,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(return
@ -2482,19 +2480,40 @@
)
)
)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i32.lt_u
(get_local $2)
(get_local $3)
)
(loop $repeat|0
(br_if $break|0
(i32.eqz
(i32.lt_u
(get_local $2)
(get_local $3)
)
)
(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)
@ -2504,62 +2523,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
@ -2568,7 +2564,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(return

View File

@ -403,7 +403,7 @@
)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.gt_s
(i32.add
@ -441,7 +441,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
(return
(get_local $2)
@ -3644,7 +3644,7 @@
(get_local $1)
)
)
(loop $loop|0
(loop $repeat|0
(br_if $break|0
(i32.ge_s
(get_local $2)
@ -3671,7 +3671,7 @@
(get_local $3)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(get_local $4)

View File

@ -504,45 +504,43 @@
(set_local $5
(get_local $7)
)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i32.le_s
(i32.add
(get_local $5)
(get_local $8)
)
(get_local $4)
(loop $repeat|0
(br_if $break|0
(i32.eqz
(i32.le_s
(i32.add
(get_local $5)
(get_local $8)
)
(get_local $4)
)
)
(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
@ -551,7 +549,7 @@
(i32.const 1)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(return
@ -4208,30 +4206,28 @@
)
)
)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i32.lt_s
(get_local $3)
(get_local $6)
)
(loop $repeat|0
(br_if $break|0
(i32.eqz
(i32.lt_s
(get_local $3)
(get_local $6)
)
)
(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
@ -4239,7 +4235,7 @@
(get_local $5)
)
)
(br $loop|0)
(br $repeat|0)
)
)
(return