Fix continue labels in 'for' loops skipping the incrementor

This commit is contained in:
dcodeIO 2018-05-23 11:32:12 +02:00
parent c897b8405b
commit 829af2285c
36 changed files with 6930 additions and 6625 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1601,6 +1601,7 @@ export class Compiler extends DiagnosticEmitter {
flow.breakLabel = breakLabel;
var continueLabel = "continue|" + label;
flow.continueLabel = continueLabel;
var loopLabel = "loop|" + label;
// Compile in correct order
var module = this.module;
@ -1645,13 +1646,16 @@ export class Compiler extends DiagnosticEmitter {
var expr = module.createBlock(breakLabel, [
initExpr,
module.createLoop(continueLabel, module.createBlock(null, [
module.createIf(condExpr, module.createBlock(null, [
bodyExpr,
module.createLoop(loopLabel,
module.createBlock(null, [
module.createBlock(continueLabel, [
module.createBreak(breakLabel, module.createUnary(UnaryOp.EqzI32, condExpr)),
bodyExpr
], NativeType.None),
incrExpr,
module.createBreak(continueLabel)
], NativeType.None))
], NativeType.None))
module.createBreak(loopLabel)
], NativeType.None)
)
], NativeType.None);
// If the loop is guaranteed to run and return, append a hint for Binaryen

View File

@ -1632,35 +1632,33 @@
(i32.const 8388608)
)
(block (result i32)
(set_local $3
(i32.shl
(get_local $2)
(i32.const 9)
(block $break|0
(set_local $3
(i32.shl
(get_local $2)
(i32.const 9)
)
)
)
(loop $continue|0
(if
(i32.eqz
(loop $loop|0
(br_if $break|0
(i32.shr_u
(get_local $3)
(i32.const 31)
)
)
(block
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
(set_local $3
(i32.shl
(get_local $3)
(i32.const 1)
)
)
(br $continue|0)
)
(set_local $3
(i32.shl
(get_local $3)
(i32.const 1)
)
)
(br $loop|0)
)
)
(i32.shl
@ -1684,35 +1682,33 @@
(i32.const 8388608)
)
(block (result i32)
(set_local $3
(i32.shl
(get_local $5)
(i32.const 9)
(block $break|1
(set_local $3
(i32.shl
(get_local $5)
(i32.const 9)
)
)
)
(loop $continue|1
(if
(i32.eqz
(loop $loop|1
(br_if $break|1
(i32.shr_u
(get_local $3)
(i32.const 31)
)
)
(block
(set_local $6
(i32.sub
(get_local $6)
(i32.const 1)
)
(set_local $6
(i32.sub
(get_local $6)
(i32.const 1)
)
(set_local $3
(i32.shl
(get_local $3)
(i32.const 1)
)
)
(br $continue|1)
)
(set_local $3
(i32.shl
(get_local $3)
(i32.const 1)
)
)
(br $loop|1)
)
)
(i32.shl
@ -1725,50 +1721,50 @@
)
)
)
(loop $continue|2
(if
(i32.gt_s
(get_local $4)
(get_local $6)
(block $break|2
(loop $loop|2
(br_if $break|2
(i32.le_s
(get_local $4)
(get_local $6)
)
)
(block
(if
(i32.eqz
(i32.shr_u
(tee_local $3
(i32.sub
(get_local $2)
(get_local $5)
)
(if
(i32.eqz
(i32.shr_u
(tee_local $3
(i32.sub
(get_local $2)
(get_local $5)
)
(i32.const 31)
)
(i32.const 31)
)
(block
(br_if $folding-inner0
(i32.eqz
(get_local $3)
)
)
(set_local $2
)
(block
(br_if $folding-inner0
(i32.eqz
(get_local $3)
)
)
)
(set_local $2
(i32.shl
(get_local $2)
(i32.const 1)
(set_local $2
(get_local $3)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
)
(br $continue|2)
)
(set_local $2
(i32.shl
(get_local $2)
(i32.const 1)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
)
(br $loop|2)
)
)
(if
@ -1794,29 +1790,27 @@
)
)
)
(loop $continue|3
(if
(i32.eqz
(block $break|3
(loop $loop|3
(br_if $break|3
(i32.shr_u
(get_local $2)
(i32.const 23)
)
)
(block
(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
(i32.shl
(get_local $2)
(i32.const 1)
)
)
(br $continue|3)
)
(set_local $2
(i32.shl
(get_local $2)
(i32.const 1)
)
)
(br $loop|3)
)
)
(return
@ -3256,35 +3250,37 @@
(i64.const 4503599627370496)
)
(block (result i64)
(set_local $4
(i64.shl
(get_local $2)
(i64.const 12)
(block $break|0
(set_local $4
(i64.shl
(get_local $2)
(i64.const 12)
)
)
)
(loop $continue|0
(if
(i64.eqz
(i64.shr_u
(loop $loop|0
(br_if $break|0
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $4)
(i64.const 63)
)
)
)
)
(set_local $3
(i32.sub
(get_local $3)
(i32.const 1)
)
)
(set_local $4
(i64.shl
(get_local $4)
(i64.const 63)
(i64.const 1)
)
)
(block
(set_local $3
(i32.sub
(get_local $3)
(i32.const 1)
)
)
(set_local $4
(i64.shl
(get_local $4)
(i64.const 1)
)
)
(br $continue|0)
)
(br $loop|0)
)
)
(i64.shl
@ -3310,35 +3306,37 @@
(i64.const 4503599627370496)
)
(block (result i64)
(set_local $4
(i64.shl
(get_local $5)
(i64.const 12)
(block $break|1
(set_local $4
(i64.shl
(get_local $5)
(i64.const 12)
)
)
)
(loop $continue|1
(if
(i64.eqz
(i64.shr_u
(loop $loop|1
(br_if $break|1
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $4)
(i64.const 63)
)
)
)
)
(set_local $6
(i32.sub
(get_local $6)
(i32.const 1)
)
)
(set_local $4
(i64.shl
(get_local $4)
(i64.const 63)
(i64.const 1)
)
)
(block
(set_local $6
(i32.sub
(get_local $6)
(i32.const 1)
)
)
(set_local $4
(i64.shl
(get_local $4)
(i64.const 1)
)
)
(br $continue|1)
)
(br $loop|1)
)
)
(i64.shl
@ -3353,50 +3351,50 @@
)
)
)
(loop $continue|2
(if
(i32.gt_s
(get_local $3)
(get_local $6)
(block $break|2
(loop $loop|2
(br_if $break|2
(i32.le_s
(get_local $3)
(get_local $6)
)
)
(block
(if
(i64.eqz
(i64.shr_u
(tee_local $4
(i64.sub
(get_local $2)
(get_local $5)
)
(if
(i64.eqz
(i64.shr_u
(tee_local $4
(i64.sub
(get_local $2)
(get_local $5)
)
(i64.const 63)
)
(i64.const 63)
)
(block
(br_if $folding-inner0
(i64.eqz
(get_local $4)
)
)
(set_local $2
)
(block
(br_if $folding-inner0
(i64.eqz
(get_local $4)
)
)
)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 1)
(set_local $2
(get_local $4)
)
)
(set_local $3
(i32.sub
(get_local $3)
(i32.const 1)
)
)
(br $continue|2)
)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 1)
)
)
(set_local $3
(i32.sub
(get_local $3)
(i32.const 1)
)
)
(br $loop|2)
)
)
(if
@ -3422,29 +3420,31 @@
)
)
)
(loop $continue|3
(if
(i64.eqz
(i64.shr_u
(block $break|3
(loop $loop|3
(br_if $break|3
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $2)
(i64.const 52)
)
)
)
)
(set_local $3
(i32.sub
(get_local $3)
(i32.const 1)
)
)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 52)
(i64.const 1)
)
)
(block
(set_local $3
(i32.sub
(get_local $3)
(i32.const 1)
)
)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 1)
)
)
(br $continue|3)
)
(br $loop|3)
)
)
(return

View File

@ -1831,30 +1831,32 @@
(i32.const 9)
)
)
(loop $continue|0
(if
(i32.eqz
(i32.shr_u
(get_local $8)
(i32.const 31)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i32.eqz
(i32.shr_u
(get_local $8)
(i32.const 31)
)
)
)
)
(block
(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
(i32.shl
(get_local $8)
(i32.const 1)
)
)
(br $continue|0)
)
)
(set_local $8
(i32.shl
(get_local $8)
(i32.const 1)
)
)
(br $loop|0)
)
)
(set_local $2
@ -1903,30 +1905,32 @@
(i32.const 9)
)
)
(loop $continue|1
(if
(i32.eqz
(i32.shr_u
(get_local $8)
(i32.const 31)
(loop $loop|1
(block $continue|1
(br_if $break|1
(i32.eqz
(i32.eqz
(i32.shr_u
(get_local $8)
(i32.const 31)
)
)
)
)
(block
(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
(i32.shl
(get_local $8)
(i32.const 1)
)
)
(br $continue|1)
)
)
(set_local $8
(i32.shl
(get_local $8)
(i32.const 1)
)
)
(br $loop|1)
)
)
(set_local $3
@ -1965,60 +1969,62 @@
)
(block $break|2
(nop)
(loop $continue|2
(if
(i32.gt_s
(get_local $4)
(get_local $5)
(loop $loop|2
(block $continue|2
(br_if $break|2
(i32.eqz
(i32.gt_s
(get_local $4)
(get_local $5)
)
)
)
(block
(block
(set_local $8
(i32.sub
(get_local $2)
(get_local $3)
(set_local $8
(i32.sub
(get_local $2)
(get_local $3)
)
)
(if
(i32.eqz
(i32.shr_u
(get_local $8)
(i32.const 31)
)
)
(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
(block
(if
(i32.eqz
(get_local $8)
)
(return
(f32.mul
(f32.const 0)
(get_local $0)
)
)
)
)
(set_local $2
(i32.shl
(get_local $2)
(i32.const 1)
(set_local $2
(get_local $8)
)
)
)
(set_local $4
(i32.sub
(get_local $4)
(set_local $2
(i32.shl
(get_local $2)
(i32.const 1)
)
)
(br $continue|2)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
)
(br $loop|2)
)
)
(set_local $8
@ -2053,30 +2059,32 @@
)
(block $break|3
(nop)
(loop $continue|3
(if
(i32.eqz
(i32.shr_u
(get_local $2)
(i32.const 23)
(loop $loop|3
(block $continue|3
(br_if $break|3
(i32.eqz
(i32.eqz
(i32.shr_u
(get_local $2)
(i32.const 23)
)
)
)
)
(block
(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
(i32.shl
(get_local $2)
(i32.const 1)
)
)
(br $continue|3)
)
)
(set_local $2
(i32.shl
(get_local $2)
(i32.const 1)
)
)
(br $loop|3)
)
)
(if
@ -3705,30 +3713,32 @@
(i64.const 12)
)
)
(loop $continue|0
(if
(i64.eqz
(i64.shr_u
(get_local $8)
(i64.const 63)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $8)
(i64.const 63)
)
)
)
)
(block
(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
(i64.shl
(get_local $8)
(i64.const 1)
)
)
(br $continue|0)
)
)
(set_local $8
(i64.shl
(get_local $8)
(i64.const 1)
)
)
(br $loop|0)
)
)
(set_local $2
@ -3779,30 +3789,32 @@
(i64.const 12)
)
)
(loop $continue|1
(if
(i64.eqz
(i64.shr_u
(get_local $8)
(i64.const 63)
(loop $loop|1
(block $continue|1
(br_if $break|1
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $8)
(i64.const 63)
)
)
)
)
(block
(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
(i64.shl
(get_local $8)
(i64.const 1)
)
)
(br $continue|1)
)
)
(set_local $8
(i64.shl
(get_local $8)
(i64.const 1)
)
)
(br $loop|1)
)
)
(set_local $3
@ -3843,60 +3855,62 @@
)
(block $break|2
(nop)
(loop $continue|2
(if
(i32.gt_s
(get_local $4)
(get_local $5)
(loop $loop|2
(block $continue|2
(br_if $break|2
(i32.eqz
(i32.gt_s
(get_local $4)
(get_local $5)
)
)
)
(block
(block
(set_local $8
(i64.sub
(get_local $2)
(get_local $3)
(set_local $8
(i64.sub
(get_local $2)
(get_local $3)
)
)
(if
(i64.eqz
(i64.shr_u
(get_local $8)
(i64.const 63)
)
)
(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
(block
(if
(i64.eqz
(get_local $8)
)
(return
(f64.mul
(f64.const 0)
(get_local $0)
)
)
)
)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 1)
(set_local $2
(get_local $8)
)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 1)
)
)
(br $continue|2)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
)
(br $loop|2)
)
)
(set_local $8
@ -3931,30 +3945,32 @@
)
(block $break|3
(nop)
(loop $continue|3
(if
(i64.eqz
(i64.shr_u
(get_local $2)
(i64.const 52)
(loop $loop|3
(block $continue|3
(br_if $break|3
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $2)
(i64.const 52)
)
)
)
)
(block
(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
(i64.shl
(get_local $2)
(i64.const 1)
)
)
(br $continue|3)
)
)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 1)
)
)
(br $loop|3)
)
)
(if

View File

@ -182,30 +182,30 @@
(unreachable)
)
)
(set_local $0
(i32.const 0)
)
(loop $continue|0
(if
(i32.lt_s
(get_local $0)
(get_global $comma/a)
)
(block
(set_global $comma/a
(i32.sub
(get_global $comma/a)
(i32.const 1)
)
(block $break|0
(set_local $0
(i32.const 0)
)
(loop $loop|0
(br_if $break|0
(i32.ge_s
(get_local $0)
(get_global $comma/a)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(br $continue|0)
)
(set_global $comma/a
(i32.sub
(get_global $comma/a)
(i32.const 1)
)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(br $loop|0)
)
)
(if

View File

@ -217,31 +217,33 @@
(set_local $1
(i32.const 0)
)
(loop $continue|0
(if
(i32.lt_s
(get_local $1)
(get_global $comma/a)
)
(block
(nop)
(block
(set_global $comma/a
(i32.sub
(get_global $comma/a)
(i32.const 1)
)
)
(set_local $1
(i32.add
(get_local $1)
(i32.const 1)
)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i32.lt_s
(get_local $1)
(get_global $comma/a)
)
)
(br $continue|0)
)
(nop)
)
(block
(set_global $comma/a
(i32.sub
(get_global $comma/a)
(i32.const 1)
)
)
(set_local $1
(i32.add
(get_local $1)
(i32.const 1)
)
)
)
(br $loop|0)
)
)
(if

View File

@ -9,24 +9,24 @@
(start $start)
(func $start (; 1 ;) (type $v)
(local $0 i32)
(set_global $for/i
(i32.const 0)
)
(loop $continue|0
(if
(i32.lt_s
(get_global $for/i)
(i32.const 10)
)
(block
(set_global $for/i
(i32.add
(get_global $for/i)
(i32.const 1)
)
(block $break|0
(set_global $for/i
(i32.const 0)
)
(loop $loop|0
(br_if $break|0
(i32.ge_s
(get_global $for/i)
(i32.const 10)
)
(br $continue|0)
)
(set_global $for/i
(i32.add
(get_global $for/i)
(i32.const 1)
)
)
(br $loop|0)
)
)
(if
@ -44,38 +44,38 @@
(unreachable)
)
)
(loop $continue|1
(if
(i32.lt_s
(get_local $0)
(i32.const 10)
)
(block
(set_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
(block $break|1
(loop $loop|1
(br_if $break|1
(i32.ge_s
(get_local $0)
(i32.const 10)
)
(br $continue|1)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(br $loop|1)
)
)
(loop $continue|2
(if
(i32.gt_s
(get_global $for/i)
(i32.const 0)
)
(block
(set_global $for/i
(i32.sub
(get_global $for/i)
(i32.const 1)
)
(block $break|2
(loop $loop|2
(br_if $break|2
(i32.le_s
(get_global $for/i)
(i32.const 0)
)
(br $continue|2)
)
(set_global $for/i
(i32.sub
(get_global $for/i)
(i32.const 1)
)
)
(br $loop|2)
)
)
(if
@ -91,7 +91,7 @@
)
)
(block $break|3
(loop $continue|3
(loop $loop|3
(br_if $break|3
(i32.eq
(get_global $for/i)
@ -104,19 +104,54 @@
(i32.const 1)
)
)
(br $continue|3)
(br $loop|3)
)
)
(loop $continue|4
(loop $loop|4
(set_global $for/i
(i32.sub
(get_global $for/i)
(i32.const 1)
)
)
(br_if $continue|4
(br_if $loop|4
(get_global $for/i)
)
)
(block $break|5
(set_local $0
(i32.const 0)
)
(loop $loop|5
(br_if $break|5
(i32.ge_s
(get_local $0)
(i32.const 10)
)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(br $loop|5)
)
)
(if
(i32.ne
(get_local $0)
(i32.const 10)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 19)
(i32.const 0)
)
(unreachable)
)
)
)
)

View File

@ -11,10 +11,9 @@ for (var j: i32 = 0; j < 10; ++j) {
for (; i > 0; --i);
assert(i == 0);
for (;; ++i)
if (i == 10)
break;
for (;; ++i) if (i == 10) break;
for (;;)
if (--i == 0)
break;
for (;;) if (--i == 0) break;
for (var k: i32 = 0; k < 10; ++k) continue;
assert(k == 10);

View File

@ -10,27 +10,30 @@
(start $start)
(func $start (; 1 ;) (type $v)
(local $0 i32)
(local $1 i32)
(block $break|0
(set_global $for/i
(i32.const 0)
)
(loop $continue|0
(if
(i32.lt_s
(get_global $for/i)
(i32.const 10)
)
(block
(nop)
(set_global $for/i
(i32.add
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i32.lt_s
(get_global $for/i)
(i32.const 1)
(i32.const 10)
)
)
(br $continue|0)
)
(nop)
)
(set_global $for/i
(i32.add
(get_global $for/i)
(i32.const 1)
)
)
(br $loop|0)
)
)
(if
@ -54,44 +57,48 @@
(set_local $0
(i32.const 0)
)
(loop $continue|1
(if
(i32.lt_s
(get_local $0)
(i32.const 10)
)
(block
(nop)
(set_local $0
(i32.add
(loop $loop|1
(block $continue|1
(br_if $break|1
(i32.eqz
(i32.lt_s
(get_local $0)
(i32.const 1)
(i32.const 10)
)
)
(br $continue|1)
)
(nop)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(br $loop|1)
)
)
(block $break|2
(nop)
(loop $continue|2
(if
(i32.gt_s
(get_global $for/i)
(i32.const 0)
)
(block
(nop)
(set_global $for/i
(i32.sub
(loop $loop|2
(block $continue|2
(br_if $break|2
(i32.eqz
(i32.gt_s
(get_global $for/i)
(i32.const 1)
(i32.const 0)
)
)
(br $continue|2)
)
(nop)
)
(set_global $for/i
(i32.sub
(get_global $for/i)
(i32.const 1)
)
)
(br $loop|2)
)
)
(if
@ -113,53 +120,99 @@
)
(block $break|3
(nop)
(loop $continue|3
(if
(i32.const 1)
(block
(if
(i32.eq
(get_global $for/i)
(i32.const 10)
)
(br $break|3)
(loop $loop|3
(block $continue|3
(br_if $break|3
(i32.eqz
(i32.const 1)
)
(set_global $for/i
(i32.add
(get_global $for/i)
(i32.const 1)
)
)
(if
(i32.eq
(get_global $for/i)
(i32.const 10)
)
(br $continue|3)
(br $break|3)
)
)
(set_global $for/i
(i32.add
(get_global $for/i)
(i32.const 1)
)
)
(br $loop|3)
)
)
(block $break|4
(nop)
(loop $continue|4
(if
(i32.const 1)
(block
(if
(i32.eq
(block (result i32)
(set_global $for/i
(i32.sub
(get_global $for/i)
(i32.const 1)
)
)
(get_global $for/i)
)
(i32.const 0)
)
(br $break|4)
(loop $loop|4
(block $continue|4
(br_if $break|4
(i32.eqz
(i32.const 1)
)
(nop)
(br $continue|4)
)
(if
(i32.eq
(block (result i32)
(set_global $for/i
(i32.sub
(get_global $for/i)
(i32.const 1)
)
)
(get_global $for/i)
)
(i32.const 0)
)
(br $break|4)
)
)
(nop)
(br $loop|4)
)
)
(block $break|5
(set_local $1
(i32.const 0)
)
(loop $loop|5
(block $continue|5
(br_if $break|5
(i32.eqz
(i32.lt_s
(get_local $1)
(i32.const 10)
)
)
)
(br $continue|5)
)
(set_local $1
(i32.add
(get_local $1)
(i32.const 1)
)
)
(br $loop|5)
)
)
(if
(i32.eqz
(i32.eq
(get_local $1)
(i32.const 10)
)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 19)
(i32.const 0)
)
(unreachable)
)
)
)

View File

@ -42,24 +42,24 @@
(set_global $infer-type/rF
(call $infer-type/refF)
)
(set_local $1
(i32.const 10)
)
(loop $continue|0
(if
(i32.lt_s
(get_local $0)
(get_local $1)
)
(block
(set_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
(block $break|0
(set_local $1
(i32.const 10)
)
(loop $loop|0
(br_if $break|0
(i32.ge_s
(get_local $0)
(get_local $1)
)
(br $continue|0)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(br $loop|0)
)
)
)

View File

@ -107,23 +107,25 @@
(i32.const 10)
)
)
(loop $continue|0
(if
(i32.lt_s
(get_local $0)
(get_local $1)
)
(block
(nop)
(set_local $0
(i32.add
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i32.lt_s
(get_local $0)
(i32.const 1)
(get_local $1)
)
)
(br $continue|0)
)
(nop)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(br $loop|0)
)
)
)

View File

@ -335,127 +335,58 @@
)
)
)
(set_local $2
(i32.const 0)
)
(loop $continue|0
(if
(i32.lt_u
(get_local $2)
(get_local $1)
(block $break|0
(set_local $2
(i32.const 0)
)
(loop $loop|0
(br_if $break|0
(i32.ge_u
(get_local $2)
(get_local $1)
)
)
(block
(set_local $10
(f64.mul
(f64.sub
(f64.convert_u/i32
(get_local $2)
)
(get_local $11)
)
(get_local $12)
)
)
(set_local $4
(f64.const 0)
)
(set_local $5
(f64.const 0)
)
(set_local $6
(i32.const 0)
)
(block $break|1
(loop $continue|1
(if
(f64.le
(f64.add
(tee_local $7
(f64.mul
(get_local $4)
(get_local $4)
)
)
(tee_local $8
(f64.mul
(get_local $5)
(get_local $5)
)
)
)
(f64.const 4)
)
(block
(set_local $5
(f64.add
(f64.mul
(f64.mul
(f64.const 2)
(get_local $4)
)
(get_local $5)
)
(get_local $9)
)
)
(set_local $4
(f64.add
(f64.sub
(get_local $7)
(get_local $8)
)
(get_local $10)
)
)
(br_if $break|1
(i32.ge_u
(get_local $6)
(get_local $3)
)
)
(set_local $6
(i32.add
(get_local $6)
(i32.const 1)
)
)
(br $continue|1)
)
)
)
)
(set_local $7
(f64.min
(f64.const 8)
(set_local $10
(f64.mul
(f64.sub
(f64.convert_u/i32
(get_local $3)
(get_local $2)
)
(get_local $11)
)
(get_local $12)
)
(loop $continue|2
)
(set_local $4
(f64.const 0)
)
(set_local $5
(f64.const 0)
)
(set_local $6
(i32.const 0)
)
(block $break|1
(loop $continue|1
(if
(f64.lt
(f64.convert_u/i32
(get_local $6)
(f64.le
(f64.add
(tee_local $7
(f64.mul
(get_local $4)
(get_local $4)
)
)
(tee_local $8
(f64.mul
(get_local $5)
(get_local $5)
)
)
)
(get_local $7)
(f64.const 4)
)
(block
(set_local $8
(f64.add
(f64.sub
(f64.mul
(get_local $4)
(get_local $4)
)
(f64.mul
(get_local $5)
(get_local $5)
)
)
(get_local $10)
)
)
(set_local $5
(f64.add
(f64.mul
@ -469,7 +400,19 @@
)
)
(set_local $4
(get_local $8)
(f64.add
(f64.sub
(get_local $7)
(get_local $8)
)
(get_local $10)
)
)
(br_if $break|1
(i32.ge_u
(get_local $6)
(get_local $3)
)
)
(set_local $6
(i32.add
@ -477,79 +420,138 @@
(i32.const 1)
)
)
(br $continue|2)
(br $continue|1)
)
)
)
(i32.store16
(i32.shl
(i32.add
(i32.mul
(get_local $0)
(get_local $1)
)
(get_local $2)
)
(i32.const 1)
)
(if (result i32)
(call $isFinite<f64>
(tee_local $7
(f64.div
(call $~lib/math/NativeMath.log
(call $~lib/math/NativeMath.log
(f64.sqrt
(f64.add
(f64.mul
(get_local $4)
(get_local $4)
)
(f64.mul
(get_local $5)
(get_local $5)
)
)
)
)
)
(f64.const 0.6931471805599453)
)
)
)
(i32.trunc_u/f64
(f64.mul
(f64.const 2047)
(call $../../examples/mandelbrot/assembly/index/clamp<f64>
(f64.div
(f64.sub
(f64.convert_u/i32
(i32.add
(get_local $6)
(i32.const 1)
)
)
(get_local $7)
)
(f64.convert_u/i32
(get_local $3)
)
)
(f64.const 0)
(f64.const 1)
)
)
)
(i32.const 2047)
)
)
(set_local $2
(i32.add
(get_local $2)
(i32.const 1)
)
)
(br $continue|0)
)
(block $break|2
(set_local $7
(f64.min
(f64.const 8)
(f64.convert_u/i32
(get_local $3)
)
)
)
(loop $loop|2
(br_if $break|2
(i32.eqz
(f64.lt
(f64.convert_u/i32
(get_local $6)
)
(get_local $7)
)
)
)
(set_local $8
(f64.add
(f64.sub
(f64.mul
(get_local $4)
(get_local $4)
)
(f64.mul
(get_local $5)
(get_local $5)
)
)
(get_local $10)
)
)
(set_local $5
(f64.add
(f64.mul
(f64.mul
(f64.const 2)
(get_local $4)
)
(get_local $5)
)
(get_local $9)
)
)
(set_local $4
(get_local $8)
)
(set_local $6
(i32.add
(get_local $6)
(i32.const 1)
)
)
(br $loop|2)
)
)
(i32.store16
(i32.shl
(i32.add
(i32.mul
(get_local $0)
(get_local $1)
)
(get_local $2)
)
(i32.const 1)
)
(if (result i32)
(call $isFinite<f64>
(tee_local $7
(f64.div
(call $~lib/math/NativeMath.log
(call $~lib/math/NativeMath.log
(f64.sqrt
(f64.add
(f64.mul
(get_local $4)
(get_local $4)
)
(f64.mul
(get_local $5)
(get_local $5)
)
)
)
)
)
(f64.const 0.6931471805599453)
)
)
)
(i32.trunc_u/f64
(f64.mul
(f64.const 2047)
(call $../../examples/mandelbrot/assembly/index/clamp<f64>
(f64.div
(f64.sub
(f64.convert_u/i32
(i32.add
(get_local $6)
(i32.const 1)
)
)
(get_local $7)
)
(f64.convert_u/i32
(get_local $3)
)
)
(f64.const 0)
(f64.const 1)
)
)
)
(i32.const 2047)
)
)
(set_local $2
(i32.add
(get_local $2)
(i32.const 1)
)
)
(br $loop|0)
)
)
)

View File

@ -398,150 +398,91 @@
(set_local $8
(i32.const 0)
)
(loop $continue|0
(if
(i32.lt_u
(get_local $8)
(get_local $1)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i32.lt_u
(get_local $8)
(get_local $1)
)
)
)
(block
(set_local $9
(f64.mul
(f64.sub
(f64.convert_u/i32
(get_local $8)
)
(get_local $4)
)
(get_local $6)
)
)
(block
(set_local $9
(f64.mul
(f64.sub
(f64.convert_u/i32
(get_local $8)
)
(get_local $4)
)
(get_local $6)
)
(set_local $10
(f64.const 0)
)
(block
(set_local $10
(f64.const 0)
)
(set_local $11
(f64.const 0)
)
(set_local $11
(f64.const 0)
)
(set_local $14
(i32.const 0)
)
(block $break|1
(loop $continue|1
(if
(f64.le
(f64.add
(tee_local $12
(f64.mul
(get_local $10)
(get_local $10)
)
)
(set_local $14
(i32.const 0)
)
(block $break|1
(loop $continue|1
(if
(f64.le
(f64.add
(tee_local $12
(f64.mul
(get_local $10)
(get_local $10)
)
(tee_local $13
)
(tee_local $13
(f64.mul
(get_local $11)
(get_local $11)
)
)
)
(f64.const 4)
)
(block
(block
(set_local $15
(f64.add
(f64.sub
(get_local $12)
(get_local $13)
)
(get_local $9)
)
)
(set_local $11
(f64.add
(f64.mul
(get_local $11)
(f64.mul
(f64.const 2)
(get_local $10)
)
(get_local $11)
)
(get_local $7)
)
)
(f64.const 4)
)
(block
(block
(set_local $15
(f64.add
(f64.sub
(get_local $12)
(get_local $13)
)
(get_local $9)
)
)
(set_local $11
(f64.add
(f64.mul
(f64.mul
(f64.const 2)
(get_local $10)
)
(get_local $11)
)
(get_local $7)
)
)
(set_local $10
(get_local $15)
)
(if
(i32.ge_u
(get_local $14)
(get_local $3)
)
(br $break|1)
)
(set_local $14
(i32.add
(get_local $14)
(i32.const 1)
)
)
(set_local $10
(get_local $15)
)
(br $continue|1)
)
)
)
)
(block $break|2
(set_local $15
(f64.min
(f64.const 8)
(f64.convert_u/i32
(get_local $3)
)
)
)
(loop $continue|2
(if
(f64.lt
(f64.convert_u/i32
(get_local $14)
)
(get_local $15)
)
(block
(block
(set_local $16
(f64.add
(f64.sub
(f64.mul
(get_local $10)
(get_local $10)
)
(f64.mul
(get_local $11)
(get_local $11)
)
)
(get_local $9)
)
)
(set_local $11
(f64.add
(f64.mul
(f64.mul
(f64.const 2)
(get_local $10)
)
(get_local $11)
)
(get_local $7)
)
)
(set_local $10
(get_local $16)
(if
(i32.ge_u
(get_local $14)
(get_local $3)
)
(br $break|1)
)
(set_local $14
(i32.add
@ -549,101 +490,164 @@
(i32.const 1)
)
)
(br $continue|2)
)
(br $continue|1)
)
)
)
)
(block $break|2
(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 $15
(f64.add
(f64.mul
(get_local $10)
(get_local $10)
)
(f64.mul
(get_local $11)
(get_local $11)
)
)
)
(br $~lib/math/NativeMath.sqrt|inlined.0
(f64.sqrt
(get_local $15)
)
)
)
)
(f64.min
(f64.const 8)
(f64.convert_u/i32
(get_local $3)
)
(f64.const 0.6931471805599453)
)
)
(set_local $17
(if (result i32)
(call $isFinite<f64>
(get_local $15)
)
(i32.trunc_u/f64
(f64.mul
(f64.convert_s/i32
(i32.sub
(i32.const 2048)
(i32.const 1)
(loop $loop|2
(block $continue|2
(br_if $break|2
(i32.eqz
(f64.lt
(f64.convert_u/i32
(get_local $14)
)
)
(call $../../examples/mandelbrot/assembly/index/clamp<f64>
(f64.div
(f64.sub
(f64.convert_u/i32
(i32.add
(get_local $14)
(i32.const 1)
)
)
(get_local $15)
)
(f64.convert_u/i32
(get_local $3)
)
)
(f64.const 0)
(f64.const 1)
(get_local $15)
)
)
)
(i32.sub
(i32.const 2048)
(block
(set_local $16
(f64.add
(f64.sub
(f64.mul
(get_local $10)
(get_local $10)
)
(f64.mul
(get_local $11)
(get_local $11)
)
)
(get_local $9)
)
)
(set_local $11
(f64.add
(f64.mul
(f64.mul
(f64.const 2)
(get_local $10)
)
(get_local $11)
)
(get_local $7)
)
)
(set_local $10
(get_local $16)
)
)
)
(set_local $14
(i32.add
(get_local $14)
(i32.const 1)
)
)
(br $loop|2)
)
(i32.store16
(i32.shl
(i32.add
(i32.mul
(get_local $0)
(get_local $1)
)
(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 $15
(f64.add
(f64.mul
(get_local $10)
(get_local $10)
)
(f64.mul
(get_local $11)
(get_local $11)
)
)
)
(br $~lib/math/NativeMath.sqrt|inlined.0
(f64.sqrt
(get_local $15)
)
)
)
(get_local $8)
)
)
(f64.const 0.6931471805599453)
)
)
(set_local $17
(if (result i32)
(call $isFinite<f64>
(get_local $15)
)
(i32.trunc_u/f64
(f64.mul
(f64.convert_s/i32
(i32.sub
(i32.const 2048)
(i32.const 1)
)
)
(call $../../examples/mandelbrot/assembly/index/clamp<f64>
(f64.div
(f64.sub
(f64.convert_u/i32
(i32.add
(get_local $14)
(i32.const 1)
)
)
(get_local $15)
)
(f64.convert_u/i32
(get_local $3)
)
)
(f64.const 0)
(f64.const 1)
)
)
)
(i32.sub
(i32.const 2048)
(i32.const 1)
)
(get_local $17)
)
)
(set_local $8
(i32.add
(get_local $8)
(i32.store16
(i32.shl
(i32.add
(i32.mul
(get_local $0)
(get_local $1)
)
(get_local $8)
)
(i32.const 1)
)
(get_local $17)
)
(br $continue|0)
)
)
(set_local $8
(i32.add
(get_local $8)
(i32.const 1)
)
)
(br $loop|0)
)
)
)

View File

@ -106,72 +106,72 @@
(i32.const 255)
(i32.const 255)
)
(set_local $0
(i32.const -128)
)
(loop $continue|0
(if
(i32.le_s
(get_local $0)
(i32.const 255)
)
(block
(call $retain-i32/test
(i32.const 0)
(block $break|0
(set_local $0
(i32.const -128)
)
(loop $loop|0
(br_if $break|0
(i32.gt_s
(get_local $0)
)
(call $retain-i32/test
(i32.const 1)
(get_local $0)
)
(call $retain-i32/test
(i32.const -1)
(get_local $0)
)
(call $retain-i32/test
(i32.const -128)
(get_local $0)
)
(call $retain-i32/test
(i32.const 127)
(get_local $0)
)
(call $retain-i32/test
(i32.const 255)
(get_local $0)
)
(call $retain-i32/test
(i32.const -32768)
(get_local $0)
)
(call $retain-i32/test
(i32.const 32767)
(get_local $0)
)
(call $retain-i32/test
(i32.const 65535)
(get_local $0)
)
(call $retain-i32/test
(i32.const 2147483647)
(get_local $0)
)
(call $retain-i32/test
(i32.const -2147483648)
(get_local $0)
)
(call $retain-i32/test
(i32.const -1)
(get_local $0)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(br $continue|0)
)
(call $retain-i32/test
(i32.const 0)
(get_local $0)
)
(call $retain-i32/test
(i32.const 1)
(get_local $0)
)
(call $retain-i32/test
(i32.const -1)
(get_local $0)
)
(call $retain-i32/test
(i32.const -128)
(get_local $0)
)
(call $retain-i32/test
(i32.const 127)
(get_local $0)
)
(call $retain-i32/test
(i32.const 255)
(get_local $0)
)
(call $retain-i32/test
(i32.const -32768)
(get_local $0)
)
(call $retain-i32/test
(i32.const 32767)
(get_local $0)
)
(call $retain-i32/test
(i32.const 65535)
(get_local $0)
)
(call $retain-i32/test
(i32.const 2147483647)
(get_local $0)
)
(call $retain-i32/test
(i32.const -2147483648)
(get_local $0)
)
(call $retain-i32/test
(i32.const -1)
(get_local $0)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(br $loop|0)
)
)
(set_global $retain-i32/si

View File

@ -558,72 +558,74 @@
(set_local $0
(i32.const -128)
)
(loop $continue|0
(if
(i32.le_s
(get_local $0)
(i32.const 255)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i32.le_s
(get_local $0)
(i32.const 255)
)
)
)
(block
(block
(call $retain-i32/test
(i32.const 0)
(get_local $0)
)
(call $retain-i32/test
(i32.const 1)
(get_local $0)
)
(call $retain-i32/test
(i32.const -1)
(get_local $0)
)
(call $retain-i32/test
(i32.const -128)
(get_local $0)
)
(call $retain-i32/test
(i32.const 127)
(get_local $0)
)
(call $retain-i32/test
(i32.const 255)
(get_local $0)
)
(call $retain-i32/test
(i32.const -32768)
(get_local $0)
)
(call $retain-i32/test
(i32.const 32767)
(get_local $0)
)
(call $retain-i32/test
(i32.const 65535)
(get_local $0)
)
(call $retain-i32/test
(i32.const 2147483647)
(get_local $0)
)
(call $retain-i32/test
(i32.const -2147483648)
(get_local $0)
)
(call $retain-i32/test
(i32.const -1)
(get_local $0)
)
(call $retain-i32/test
(i32.const 0)
(get_local $0)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
(call $retain-i32/test
(i32.const 1)
(get_local $0)
)
(call $retain-i32/test
(i32.const -1)
(get_local $0)
)
(call $retain-i32/test
(i32.const -128)
(get_local $0)
)
(call $retain-i32/test
(i32.const 127)
(get_local $0)
)
(call $retain-i32/test
(i32.const 255)
(get_local $0)
)
(call $retain-i32/test
(i32.const -32768)
(get_local $0)
)
(call $retain-i32/test
(i32.const 32767)
(get_local $0)
)
(call $retain-i32/test
(i32.const 65535)
(get_local $0)
)
(call $retain-i32/test
(i32.const 2147483647)
(get_local $0)
)
(call $retain-i32/test
(i32.const -2147483648)
(get_local $0)
)
(call $retain-i32/test
(i32.const -1)
(get_local $0)
)
(br $continue|0)
)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(br $loop|0)
)
)
(set_global $retain-i32/si

View File

@ -9,41 +9,41 @@
)
(func $start (; 1 ;) (type $v)
(local $0 i32)
(loop $continue|0
(if
(i32.lt_s
(get_local $0)
(i32.const 1)
)
(block
(set_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
(block $break|0
(loop $loop|0
(br_if $break|0
(i32.ge_s
(get_local $0)
(i32.const 1)
)
(br $continue|0)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(br $loop|0)
)
)
(set_local $0
(i32.const 0)
)
(loop $continue|1
(if
(i32.lt_s
(get_local $0)
(i32.const 1)
)
(block
(set_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
(block $break|1
(set_local $0
(i32.const 0)
)
(loop $loop|1
(br_if $break|1
(i32.ge_s
(get_local $0)
(i32.const 1)
)
(br $continue|1)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(br $loop|1)
)
)
(call $scoped/fn

View File

@ -26,48 +26,52 @@
(set_local $0
(i32.const 0)
)
(loop $continue|0
(if
(i32.lt_s
(get_local $0)
(i32.const 1)
)
(block
(nop)
(set_local $0
(i32.add
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i32.lt_s
(get_local $0)
(i32.const 1)
)
)
(br $continue|0)
)
(nop)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(br $loop|0)
)
)
(block $break|1
(set_local $1
(i32.const 0)
)
(loop $continue|1
(if
(i32.lt_s
(get_local $1)
(i32.const 1)
)
(block
(drop
(get_local $1)
)
(set_local $1
(i32.add
(loop $loop|1
(block $continue|1
(br_if $break|1
(i32.eqz
(i32.lt_s
(get_local $1)
(i32.const 1)
)
)
(br $continue|1)
)
(drop
(get_local $1)
)
)
(set_local $1
(i32.add
(get_local $1)
(i32.const 1)
)
)
(br $loop|1)
)
)
(block

View File

@ -1681,35 +1681,33 @@
(i32.const 8388608)
)
(block (result i32)
(set_local $3
(i32.shl
(get_local $2)
(i32.const 9)
(block $break|0
(set_local $3
(i32.shl
(get_local $2)
(i32.const 9)
)
)
)
(loop $continue|0
(if
(i32.eqz
(loop $loop|0
(br_if $break|0
(i32.shr_u
(get_local $3)
(i32.const 31)
)
)
(block
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
(set_local $3
(i32.shl
(get_local $3)
(i32.const 1)
)
)
(br $continue|0)
)
(set_local $3
(i32.shl
(get_local $3)
(i32.const 1)
)
)
(br $loop|0)
)
)
(i32.shl
@ -1733,35 +1731,33 @@
(i32.const 8388608)
)
(block (result i32)
(set_local $3
(i32.shl
(get_local $5)
(i32.const 9)
(block $break|1
(set_local $3
(i32.shl
(get_local $5)
(i32.const 9)
)
)
)
(loop $continue|1
(if
(i32.eqz
(loop $loop|1
(br_if $break|1
(i32.shr_u
(get_local $3)
(i32.const 31)
)
)
(block
(set_local $6
(i32.sub
(get_local $6)
(i32.const 1)
)
(set_local $6
(i32.sub
(get_local $6)
(i32.const 1)
)
(set_local $3
(i32.shl
(get_local $3)
(i32.const 1)
)
)
(br $continue|1)
)
(set_local $3
(i32.shl
(get_local $3)
(i32.const 1)
)
)
(br $loop|1)
)
)
(i32.shl
@ -1774,50 +1770,50 @@
)
)
)
(loop $continue|2
(if
(i32.gt_s
(get_local $4)
(get_local $6)
(block $break|2
(loop $loop|2
(br_if $break|2
(i32.le_s
(get_local $4)
(get_local $6)
)
)
(block
(if
(i32.eqz
(i32.shr_u
(tee_local $3
(i32.sub
(get_local $2)
(get_local $5)
)
(if
(i32.eqz
(i32.shr_u
(tee_local $3
(i32.sub
(get_local $2)
(get_local $5)
)
(i32.const 31)
)
(i32.const 31)
)
(block
(br_if $folding-inner0
(i32.eqz
(get_local $3)
)
)
(set_local $2
)
(block
(br_if $folding-inner0
(i32.eqz
(get_local $3)
)
)
)
(set_local $2
(i32.shl
(get_local $2)
(i32.const 1)
(set_local $2
(get_local $3)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
)
(br $continue|2)
)
(set_local $2
(i32.shl
(get_local $2)
(i32.const 1)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
)
(br $loop|2)
)
)
(if
@ -1843,29 +1839,27 @@
)
)
)
(loop $continue|3
(if
(i32.eqz
(block $break|3
(loop $loop|3
(br_if $break|3
(i32.shr_u
(get_local $2)
(i32.const 23)
)
)
(block
(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
(i32.shl
(get_local $2)
(i32.const 1)
)
)
(br $continue|3)
)
(set_local $2
(i32.shl
(get_local $2)
(i32.const 1)
)
)
(br $loop|3)
)
)
(return
@ -3305,35 +3299,37 @@
(i64.const 4503599627370496)
)
(block (result i64)
(set_local $4
(i64.shl
(get_local $2)
(i64.const 12)
(block $break|0
(set_local $4
(i64.shl
(get_local $2)
(i64.const 12)
)
)
)
(loop $continue|0
(if
(i64.eqz
(i64.shr_u
(loop $loop|0
(br_if $break|0
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $4)
(i64.const 63)
)
)
)
)
(set_local $3
(i32.sub
(get_local $3)
(i32.const 1)
)
)
(set_local $4
(i64.shl
(get_local $4)
(i64.const 63)
(i64.const 1)
)
)
(block
(set_local $3
(i32.sub
(get_local $3)
(i32.const 1)
)
)
(set_local $4
(i64.shl
(get_local $4)
(i64.const 1)
)
)
(br $continue|0)
)
(br $loop|0)
)
)
(i64.shl
@ -3359,35 +3355,37 @@
(i64.const 4503599627370496)
)
(block (result i64)
(set_local $4
(i64.shl
(get_local $5)
(i64.const 12)
(block $break|1
(set_local $4
(i64.shl
(get_local $5)
(i64.const 12)
)
)
)
(loop $continue|1
(if
(i64.eqz
(i64.shr_u
(loop $loop|1
(br_if $break|1
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $4)
(i64.const 63)
)
)
)
)
(set_local $6
(i32.sub
(get_local $6)
(i32.const 1)
)
)
(set_local $4
(i64.shl
(get_local $4)
(i64.const 63)
(i64.const 1)
)
)
(block
(set_local $6
(i32.sub
(get_local $6)
(i32.const 1)
)
)
(set_local $4
(i64.shl
(get_local $4)
(i64.const 1)
)
)
(br $continue|1)
)
(br $loop|1)
)
)
(i64.shl
@ -3402,50 +3400,50 @@
)
)
)
(loop $continue|2
(if
(i32.gt_s
(get_local $3)
(get_local $6)
(block $break|2
(loop $loop|2
(br_if $break|2
(i32.le_s
(get_local $3)
(get_local $6)
)
)
(block
(if
(i64.eqz
(i64.shr_u
(tee_local $4
(i64.sub
(get_local $2)
(get_local $5)
)
(if
(i64.eqz
(i64.shr_u
(tee_local $4
(i64.sub
(get_local $2)
(get_local $5)
)
(i64.const 63)
)
(i64.const 63)
)
(block
(br_if $folding-inner0
(i64.eqz
(get_local $4)
)
)
(set_local $2
)
(block
(br_if $folding-inner0
(i64.eqz
(get_local $4)
)
)
)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 1)
(set_local $2
(get_local $4)
)
)
(set_local $3
(i32.sub
(get_local $3)
(i32.const 1)
)
)
(br $continue|2)
)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 1)
)
)
(set_local $3
(i32.sub
(get_local $3)
(i32.const 1)
)
)
(br $loop|2)
)
)
(if
@ -3471,29 +3469,31 @@
)
)
)
(loop $continue|3
(if
(i64.eqz
(i64.shr_u
(block $break|3
(loop $loop|3
(br_if $break|3
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $2)
(i64.const 52)
)
)
)
)
(set_local $3
(i32.sub
(get_local $3)
(i32.const 1)
)
)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 52)
(i64.const 1)
)
)
(block
(set_local $3
(i32.sub
(get_local $3)
(i32.const 1)
)
)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 1)
)
)
(br $continue|3)
)
(br $loop|3)
)
)
(return

View File

@ -1887,30 +1887,32 @@
(i32.const 9)
)
)
(loop $continue|0
(if
(i32.eqz
(i32.shr_u
(get_local $8)
(i32.const 31)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i32.eqz
(i32.shr_u
(get_local $8)
(i32.const 31)
)
)
)
)
(block
(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
(i32.shl
(get_local $8)
(i32.const 1)
)
)
(br $continue|0)
)
)
(set_local $8
(i32.shl
(get_local $8)
(i32.const 1)
)
)
(br $loop|0)
)
)
(set_local $2
@ -1959,30 +1961,32 @@
(i32.const 9)
)
)
(loop $continue|1
(if
(i32.eqz
(i32.shr_u
(get_local $8)
(i32.const 31)
(loop $loop|1
(block $continue|1
(br_if $break|1
(i32.eqz
(i32.eqz
(i32.shr_u
(get_local $8)
(i32.const 31)
)
)
)
)
(block
(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
(i32.shl
(get_local $8)
(i32.const 1)
)
)
(br $continue|1)
)
)
(set_local $8
(i32.shl
(get_local $8)
(i32.const 1)
)
)
(br $loop|1)
)
)
(set_local $3
@ -2021,60 +2025,62 @@
)
(block $break|2
(nop)
(loop $continue|2
(if
(i32.gt_s
(get_local $4)
(get_local $5)
(loop $loop|2
(block $continue|2
(br_if $break|2
(i32.eqz
(i32.gt_s
(get_local $4)
(get_local $5)
)
)
)
(block
(block
(set_local $8
(i32.sub
(get_local $2)
(get_local $3)
(set_local $8
(i32.sub
(get_local $2)
(get_local $3)
)
)
(if
(i32.eqz
(i32.shr_u
(get_local $8)
(i32.const 31)
)
)
(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
(block
(if
(i32.eqz
(get_local $8)
)
(return
(f32.mul
(f32.const 0)
(get_local $0)
)
)
)
)
(set_local $2
(i32.shl
(get_local $2)
(i32.const 1)
(set_local $2
(get_local $8)
)
)
)
(set_local $4
(i32.sub
(get_local $4)
(set_local $2
(i32.shl
(get_local $2)
(i32.const 1)
)
)
(br $continue|2)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
)
(br $loop|2)
)
)
(set_local $8
@ -2109,30 +2115,32 @@
)
(block $break|3
(nop)
(loop $continue|3
(if
(i32.eqz
(i32.shr_u
(get_local $2)
(i32.const 23)
(loop $loop|3
(block $continue|3
(br_if $break|3
(i32.eqz
(i32.eqz
(i32.shr_u
(get_local $2)
(i32.const 23)
)
)
)
)
(block
(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
(i32.shl
(get_local $2)
(i32.const 1)
)
)
(br $continue|3)
)
)
(set_local $2
(i32.shl
(get_local $2)
(i32.const 1)
)
)
(br $loop|3)
)
)
(if
@ -3761,30 +3769,32 @@
(i64.const 12)
)
)
(loop $continue|0
(if
(i64.eqz
(i64.shr_u
(get_local $8)
(i64.const 63)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $8)
(i64.const 63)
)
)
)
)
(block
(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
(i64.shl
(get_local $8)
(i64.const 1)
)
)
(br $continue|0)
)
)
(set_local $8
(i64.shl
(get_local $8)
(i64.const 1)
)
)
(br $loop|0)
)
)
(set_local $2
@ -3835,30 +3845,32 @@
(i64.const 12)
)
)
(loop $continue|1
(if
(i64.eqz
(i64.shr_u
(get_local $8)
(i64.const 63)
(loop $loop|1
(block $continue|1
(br_if $break|1
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $8)
(i64.const 63)
)
)
)
)
(block
(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
(i64.shl
(get_local $8)
(i64.const 1)
)
)
(br $continue|1)
)
)
(set_local $8
(i64.shl
(get_local $8)
(i64.const 1)
)
)
(br $loop|1)
)
)
(set_local $3
@ -3899,60 +3911,62 @@
)
(block $break|2
(nop)
(loop $continue|2
(if
(i32.gt_s
(get_local $4)
(get_local $5)
(loop $loop|2
(block $continue|2
(br_if $break|2
(i32.eqz
(i32.gt_s
(get_local $4)
(get_local $5)
)
)
)
(block
(block
(set_local $8
(i64.sub
(get_local $2)
(get_local $3)
(set_local $8
(i64.sub
(get_local $2)
(get_local $3)
)
)
(if
(i64.eqz
(i64.shr_u
(get_local $8)
(i64.const 63)
)
)
(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
(block
(if
(i64.eqz
(get_local $8)
)
(return
(f64.mul
(f64.const 0)
(get_local $0)
)
)
)
)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 1)
(set_local $2
(get_local $8)
)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 1)
)
)
(br $continue|2)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
)
(br $loop|2)
)
)
(set_local $8
@ -3987,30 +4001,32 @@
)
(block $break|3
(nop)
(loop $continue|3
(if
(i64.eqz
(i64.shr_u
(get_local $2)
(i64.const 52)
(loop $loop|3
(block $continue|3
(br_if $break|3
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $2)
(i64.const 52)
)
)
)
)
(block
(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
(i64.shl
(get_local $2)
(i64.const 1)
)
)
(br $continue|3)
)
)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 1)
)
)
(br $loop|3)
)
)
(if

View File

@ -2415,43 +2415,45 @@
(i32.const 18)
(i32.const 42)
)
(set_global $std/allocator_arena/i
(i32.const 0)
)
(loop $continue|0
(if
(i32.lt_u
(get_global $std/allocator_arena/i)
(i32.const 42)
(block $break|0
(set_global $std/allocator_arena/i
(i32.const 0)
)
(loop $loop|0
(br_if $break|0
(i32.ge_u
(get_global $std/allocator_arena/i)
(i32.const 42)
)
)
(block
(if
(i32.ne
(i32.load8_u
(i32.add
(get_global $std/allocator_arena/ptr1)
(get_global $std/allocator_arena/i)
)
(if
(i32.ne
(i32.load8_u
(i32.add
(get_global $std/allocator_arena/ptr1)
(get_global $std/allocator_arena/i)
)
(i32.const 18)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 13)
(i32.const 2)
(i32.const 18)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 13)
(i32.const 2)
)
(unreachable)
)
(block
(set_global $std/allocator_arena/i
(i32.add
(get_global $std/allocator_arena/i)
(i32.const 1)
)
(unreachable)
)
(br $loop|0)
)
(set_global $std/allocator_arena/i
(i32.add
(get_global $std/allocator_arena/i)
(i32.const 1)
)
)
(br $continue|0)
)
)
)
@ -2460,43 +2462,45 @@
(get_global $std/allocator_arena/ptr1)
(i32.const 42)
)
(set_global $std/allocator_arena/i
(i32.const 0)
)
(loop $continue|1
(if
(i32.lt_u
(get_global $std/allocator_arena/i)
(i32.const 42)
(block $break|1
(set_global $std/allocator_arena/i
(i32.const 0)
)
(loop $loop|1
(br_if $break|1
(i32.ge_u
(get_global $std/allocator_arena/i)
(i32.const 42)
)
)
(block
(if
(i32.ne
(i32.load8_u
(i32.add
(get_global $std/allocator_arena/ptr2)
(get_global $std/allocator_arena/i)
)
(if
(i32.ne
(i32.load8_u
(i32.add
(get_global $std/allocator_arena/ptr2)
(get_global $std/allocator_arena/i)
)
)
(i32.const 18)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 18)
(i32.const 2)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 18)
(i32.const 2)
(unreachable)
)
(block
(set_global $std/allocator_arena/i
(i32.add
(get_global $std/allocator_arena/i)
(i32.const 1)
)
(unreachable)
)
(br $loop|1)
)
(set_global $std/allocator_arena/i
(i32.add
(get_global $std/allocator_arena/i)
(i32.const 1)
)
)
(br $continue|1)
)
)
)

View File

@ -2729,44 +2729,46 @@
(set_global $std/allocator_arena/i
(i32.const 0)
)
(loop $continue|0
(if
(i32.lt_u
(get_global $std/allocator_arena/i)
(i32.const 42)
)
(block
(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)
)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 13)
(i32.const 2)
)
(unreachable)
)
)
(set_global $std/allocator_arena/i
(i32.add
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i32.lt_u
(get_global $std/allocator_arena/i)
(i32.const 1)
(i32.const 42)
)
)
(br $continue|0)
)
(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)
)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 13)
(i32.const 2)
)
(unreachable)
)
)
)
(set_global $std/allocator_arena/i
(i32.add
(get_global $std/allocator_arena/i)
(i32.const 1)
)
)
(br $loop|0)
)
)
(call $~lib/memory/move_memory
@ -2778,44 +2780,46 @@
(set_global $std/allocator_arena/i
(i32.const 0)
)
(loop $continue|1
(if
(i32.lt_u
(get_global $std/allocator_arena/i)
(i32.const 42)
)
(block
(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)
)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 18)
(i32.const 2)
)
(unreachable)
)
)
(set_global $std/allocator_arena/i
(i32.add
(loop $loop|1
(block $continue|1
(br_if $break|1
(i32.eqz
(i32.lt_u
(get_global $std/allocator_arena/i)
(i32.const 1)
(i32.const 42)
)
)
(br $continue|1)
)
(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)
)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 18)
(i32.const 2)
)
(unreachable)
)
)
)
(set_global $std/allocator_arena/i
(i32.add
(get_global $std/allocator_arena/i)
(i32.const 1)
)
)
(br $loop|1)
)
)
(if

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -17,43 +17,43 @@
(set_local $2
(i32.const -2128831035)
)
(set_local $3
(i32.shl
(i32.load
(get_local $0)
(block $break|0
(set_local $3
(i32.shl
(i32.load
(get_local $0)
)
(i32.const 1)
)
(i32.const 1)
)
)
(loop $continue|0
(if
(i32.lt_u
(get_local $1)
(get_local $3)
(loop $loop|0
(br_if $break|0
(i32.ge_u
(get_local $1)
(get_local $3)
)
)
(block
(set_local $2
(i32.mul
(i32.xor
(get_local $2)
(i32.load8_u offset=4
(i32.add
(get_local $0)
(get_local $1)
)
(set_local $2
(i32.mul
(i32.xor
(get_local $2)
(i32.load8_u offset=4
(i32.add
(get_local $0)
(get_local $1)
)
)
(i32.const 16777619)
)
(i32.const 16777619)
)
(set_local $1
(i32.add
(get_local $1)
(i32.const 1)
)
)
(br $continue|0)
)
(set_local $1
(i32.add
(get_local $1)
(i32.const 1)
)
)
(br $loop|0)
)
)
(get_local $2)

View File

@ -44,36 +44,38 @@
)
)
)
(loop $continue|0
(if
(i32.lt_u
(get_local $2)
(get_local $3)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i32.lt_u
(get_local $2)
(get_local $3)
)
)
)
(block
(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
(i32.add
(get_local $2)
(i32.const 1)
)
)
(br $continue|0)
)
)
(set_local $2
(i32.add
(get_local $2)
(i32.const 1)
)
)
(br $loop|0)
)
)
(return

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -145,35 +145,37 @@
(i64.const 4503599627370496)
)
(block (result i64)
(set_local $4
(i64.shl
(get_local $2)
(i64.const 12)
(block $break|0
(set_local $4
(i64.shl
(get_local $2)
(i64.const 12)
)
)
)
(loop $continue|0
(if
(i64.eqz
(i64.shr_u
(loop $loop|0
(br_if $break|0
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $4)
(i64.const 63)
)
)
)
)
(set_local $3
(i32.sub
(get_local $3)
(i32.const 1)
)
)
(set_local $4
(i64.shl
(get_local $4)
(i64.const 63)
(i64.const 1)
)
)
(block
(set_local $3
(i32.sub
(get_local $3)
(i32.const 1)
)
)
(set_local $4
(i64.shl
(get_local $4)
(i64.const 1)
)
)
(br $continue|0)
)
(br $loop|0)
)
)
(i64.shl
@ -199,35 +201,37 @@
(i64.const 4503599627370496)
)
(block (result i64)
(set_local $4
(i64.shl
(get_local $5)
(i64.const 12)
(block $break|1
(set_local $4
(i64.shl
(get_local $5)
(i64.const 12)
)
)
)
(loop $continue|1
(if
(i64.eqz
(i64.shr_u
(loop $loop|1
(br_if $break|1
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $4)
(i64.const 63)
)
)
)
)
(set_local $6
(i32.sub
(get_local $6)
(i32.const 1)
)
)
(set_local $4
(i64.shl
(get_local $4)
(i64.const 63)
(i64.const 1)
)
)
(block
(set_local $6
(i32.sub
(get_local $6)
(i32.const 1)
)
)
(set_local $4
(i64.shl
(get_local $4)
(i64.const 1)
)
)
(br $continue|1)
)
(br $loop|1)
)
)
(i64.shl
@ -242,50 +246,50 @@
)
)
)
(loop $continue|2
(if
(i32.gt_s
(get_local $3)
(get_local $6)
(block $break|2
(loop $loop|2
(br_if $break|2
(i32.le_s
(get_local $3)
(get_local $6)
)
)
(block
(if
(i64.eqz
(i64.shr_u
(tee_local $4
(i64.sub
(get_local $2)
(get_local $5)
)
(if
(i64.eqz
(i64.shr_u
(tee_local $4
(i64.sub
(get_local $2)
(get_local $5)
)
(i64.const 63)
)
(i64.const 63)
)
(block
(br_if $folding-inner0
(i64.eqz
(get_local $4)
)
)
(set_local $2
)
(block
(br_if $folding-inner0
(i64.eqz
(get_local $4)
)
)
)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 1)
(set_local $2
(get_local $4)
)
)
(set_local $3
(i32.sub
(get_local $3)
(i32.const 1)
)
)
(br $continue|2)
)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 1)
)
)
(set_local $3
(i32.sub
(get_local $3)
(i32.const 1)
)
)
(br $loop|2)
)
)
(if
@ -311,29 +315,31 @@
)
)
)
(loop $continue|3
(if
(i64.eqz
(i64.shr_u
(block $break|3
(loop $loop|3
(br_if $break|3
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $2)
(i64.const 52)
)
)
)
)
(set_local $3
(i32.sub
(get_local $3)
(i32.const 1)
)
)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 52)
(i64.const 1)
)
)
(block
(set_local $3
(i32.sub
(get_local $3)
(i32.const 1)
)
)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 1)
)
)
(br $continue|3)
)
(br $loop|3)
)
)
(return
@ -568,35 +574,33 @@
(i32.const 8388608)
)
(block (result i32)
(set_local $3
(i32.shl
(get_local $2)
(i32.const 9)
(block $break|0
(set_local $3
(i32.shl
(get_local $2)
(i32.const 9)
)
)
)
(loop $continue|0
(if
(i32.eqz
(loop $loop|0
(br_if $break|0
(i32.shr_u
(get_local $3)
(i32.const 31)
)
)
(block
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
(set_local $3
(i32.shl
(get_local $3)
(i32.const 1)
)
)
(br $continue|0)
)
(set_local $3
(i32.shl
(get_local $3)
(i32.const 1)
)
)
(br $loop|0)
)
)
(i32.shl
@ -620,35 +624,33 @@
(i32.const 8388608)
)
(block (result i32)
(set_local $3
(i32.shl
(get_local $5)
(i32.const 9)
(block $break|1
(set_local $3
(i32.shl
(get_local $5)
(i32.const 9)
)
)
)
(loop $continue|1
(if
(i32.eqz
(loop $loop|1
(br_if $break|1
(i32.shr_u
(get_local $3)
(i32.const 31)
)
)
(block
(set_local $6
(i32.sub
(get_local $6)
(i32.const 1)
)
(set_local $6
(i32.sub
(get_local $6)
(i32.const 1)
)
(set_local $3
(i32.shl
(get_local $3)
(i32.const 1)
)
)
(br $continue|1)
)
(set_local $3
(i32.shl
(get_local $3)
(i32.const 1)
)
)
(br $loop|1)
)
)
(i32.shl
@ -661,50 +663,50 @@
)
)
)
(loop $continue|2
(if
(i32.gt_s
(get_local $4)
(get_local $6)
(block $break|2
(loop $loop|2
(br_if $break|2
(i32.le_s
(get_local $4)
(get_local $6)
)
)
(block
(if
(i32.eqz
(i32.shr_u
(tee_local $3
(i32.sub
(get_local $2)
(get_local $5)
)
(if
(i32.eqz
(i32.shr_u
(tee_local $3
(i32.sub
(get_local $2)
(get_local $5)
)
(i32.const 31)
)
(i32.const 31)
)
(block
(br_if $folding-inner0
(i32.eqz
(get_local $3)
)
)
(set_local $2
)
(block
(br_if $folding-inner0
(i32.eqz
(get_local $3)
)
)
)
(set_local $2
(i32.shl
(get_local $2)
(i32.const 1)
(set_local $2
(get_local $3)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
)
(br $continue|2)
)
(set_local $2
(i32.shl
(get_local $2)
(i32.const 1)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
)
(br $loop|2)
)
)
(if
@ -730,29 +732,27 @@
)
)
)
(loop $continue|3
(if
(i32.eqz
(block $break|3
(loop $loop|3
(br_if $break|3
(i32.shr_u
(get_local $2)
(i32.const 23)
)
)
(block
(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
(i32.shl
(get_local $2)
(i32.const 1)
)
)
(br $continue|3)
)
(set_local $2
(i32.shl
(get_local $2)
(i32.const 1)
)
)
(br $loop|3)
)
)
(return

View File

@ -160,30 +160,32 @@
(i64.const 12)
)
)
(loop $continue|0
(if
(i64.eqz
(i64.shr_u
(get_local $8)
(i64.const 63)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $8)
(i64.const 63)
)
)
)
)
(block
(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
(i64.shl
(get_local $8)
(i64.const 1)
)
)
(br $continue|0)
)
)
(set_local $8
(i64.shl
(get_local $8)
(i64.const 1)
)
)
(br $loop|0)
)
)
(set_local $2
@ -234,30 +236,32 @@
(i64.const 12)
)
)
(loop $continue|1
(if
(i64.eqz
(i64.shr_u
(get_local $8)
(i64.const 63)
(loop $loop|1
(block $continue|1
(br_if $break|1
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $8)
(i64.const 63)
)
)
)
)
(block
(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
(i64.shl
(get_local $8)
(i64.const 1)
)
)
(br $continue|1)
)
)
(set_local $8
(i64.shl
(get_local $8)
(i64.const 1)
)
)
(br $loop|1)
)
)
(set_local $3
@ -298,60 +302,62 @@
)
(block $break|2
(nop)
(loop $continue|2
(if
(i32.gt_s
(get_local $4)
(get_local $5)
(loop $loop|2
(block $continue|2
(br_if $break|2
(i32.eqz
(i32.gt_s
(get_local $4)
(get_local $5)
)
)
)
(block
(block
(set_local $8
(i64.sub
(get_local $2)
(get_local $3)
(set_local $8
(i64.sub
(get_local $2)
(get_local $3)
)
)
(if
(i64.eqz
(i64.shr_u
(get_local $8)
(i64.const 63)
)
)
(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
(block
(if
(i64.eqz
(get_local $8)
)
(return
(f64.mul
(f64.const 0)
(get_local $0)
)
)
)
)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 1)
(set_local $2
(get_local $8)
)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 1)
)
)
(br $continue|2)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
)
(br $loop|2)
)
)
(set_local $8
@ -386,30 +392,32 @@
)
(block $break|3
(nop)
(loop $continue|3
(if
(i64.eqz
(i64.shr_u
(get_local $2)
(i64.const 52)
(loop $loop|3
(block $continue|3
(br_if $break|3
(i32.eqz
(i64.eqz
(i64.shr_u
(get_local $2)
(i64.const 52)
)
)
)
)
(block
(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
(i64.shl
(get_local $2)
(i64.const 1)
)
)
(br $continue|3)
)
)
(set_local $2
(i64.shl
(get_local $2)
(i64.const 1)
)
)
(br $loop|3)
)
)
(if
@ -676,30 +684,32 @@
(i32.const 9)
)
)
(loop $continue|0
(if
(i32.eqz
(i32.shr_u
(get_local $8)
(i32.const 31)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i32.eqz
(i32.shr_u
(get_local $8)
(i32.const 31)
)
)
)
)
(block
(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
(i32.shl
(get_local $8)
(i32.const 1)
)
)
(br $continue|0)
)
)
(set_local $8
(i32.shl
(get_local $8)
(i32.const 1)
)
)
(br $loop|0)
)
)
(set_local $2
@ -748,30 +758,32 @@
(i32.const 9)
)
)
(loop $continue|1
(if
(i32.eqz
(i32.shr_u
(get_local $8)
(i32.const 31)
(loop $loop|1
(block $continue|1
(br_if $break|1
(i32.eqz
(i32.eqz
(i32.shr_u
(get_local $8)
(i32.const 31)
)
)
)
)
(block
(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
(i32.shl
(get_local $8)
(i32.const 1)
)
)
(br $continue|1)
)
)
(set_local $8
(i32.shl
(get_local $8)
(i32.const 1)
)
)
(br $loop|1)
)
)
(set_local $3
@ -810,60 +822,62 @@
)
(block $break|2
(nop)
(loop $continue|2
(if
(i32.gt_s
(get_local $4)
(get_local $5)
(loop $loop|2
(block $continue|2
(br_if $break|2
(i32.eqz
(i32.gt_s
(get_local $4)
(get_local $5)
)
)
)
(block
(block
(set_local $8
(i32.sub
(get_local $2)
(get_local $3)
(set_local $8
(i32.sub
(get_local $2)
(get_local $3)
)
)
(if
(i32.eqz
(i32.shr_u
(get_local $8)
(i32.const 31)
)
)
(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
(block
(if
(i32.eqz
(get_local $8)
)
(return
(f32.mul
(f32.const 0)
(get_local $0)
)
)
)
)
(set_local $2
(i32.shl
(get_local $2)
(i32.const 1)
(set_local $2
(get_local $8)
)
)
)
(set_local $4
(i32.sub
(get_local $4)
(set_local $2
(i32.shl
(get_local $2)
(i32.const 1)
)
)
(br $continue|2)
)
)
(set_local $4
(i32.sub
(get_local $4)
(i32.const 1)
)
)
(br $loop|2)
)
)
(set_local $8
@ -898,30 +912,32 @@
)
(block $break|3
(nop)
(loop $continue|3
(if
(i32.eqz
(i32.shr_u
(get_local $2)
(i32.const 23)
(loop $loop|3
(block $continue|3
(br_if $break|3
(i32.eqz
(i32.eqz
(i32.shr_u
(get_local $2)
(i32.const 23)
)
)
)
)
(block
(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
(i32.shl
(get_local $2)
(i32.const 1)
)
)
(br $continue|3)
)
)
(set_local $2
(i32.shl
(get_local $2)
(i32.const 1)
)
)
(br $loop|3)
)
)
(if

View File

@ -2104,44 +2104,46 @@
(unreachable)
)
)
(set_local $3
(i32.load offset=8
(get_local $0)
)
)
(loop $continue|0
(if
(i32.lt_u
(get_local $2)
(get_local $3)
(block $break|0
(set_local $3
(i32.load offset=8
(get_local $0)
)
(block
(if
(i32.eq
(i32.load
(i32.add
(i32.load
(get_local $0)
)
(i32.shl
(get_local $2)
(i32.const 2)
)
)
(loop $loop|0
(br_if $break|0
(i32.ge_u
(get_local $2)
(get_local $3)
)
)
(if
(i32.eq
(i32.load
(i32.add
(i32.load
(get_local $0)
)
(i32.shl
(get_local $2)
(i32.const 2)
)
)
(get_local $1)
)
(return
(i32.const 1)
)
(get_local $1)
)
(set_local $2
(i32.add
(get_local $2)
(i32.const 1)
)
(return
(i32.const 1)
)
(block
(set_local $2
(i32.add
(get_local $2)
(i32.const 1)
)
)
(br $loop|0)
)
(br $continue|0)
)
)
)
@ -2164,21 +2166,44 @@
(unreachable)
)
)
(set_local $3
(i32.load offset=8
(get_local $0)
)
)
(loop $continue|0
(if
(i32.lt_u
(get_local $2)
(get_local $3)
(block $break|0
(set_local $3
(i32.load offset=8
(get_local $0)
)
(block
(if
(i32.eq
(i32.load
)
(loop $loop|0
(br_if $break|0
(i32.ge_u
(get_local $2)
(get_local $3)
)
)
(if
(i32.eq
(i32.load
(i32.add
(i32.load
(get_local $0)
)
(i32.shl
(get_local $2)
(i32.const 2)
)
)
)
(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)
@ -2188,70 +2213,49 @@
(i32.const 2)
)
)
)
(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.shl
(get_local $2)
(i32.const 2)
)
)
(i32.add
(i32.load
(get_local $0)
)
(i32.shl
(i32.add
(get_local $2)
(i32.const 1)
)
(i32.const 2)
)
)
(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.shl
(i32.add
(get_local $2)
(i32.const 1)
)
(i32.const 2)
)
)
(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)
)
)
)
(set_local $2
(i32.add
(get_local $2)
(return
(i32.const 1)
)
)
(br $continue|0)
(block
(set_local $2
(i32.add
(get_local $2)
(i32.const 1)
)
)
(br $loop|0)
)
)
)
)

View File

@ -2408,41 +2408,43 @@
)
)
)
(loop $continue|0
(if
(i32.lt_u
(get_local $2)
(get_local $3)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i32.lt_u
(get_local $2)
(get_local $3)
)
)
)
(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)
)
(set_local $2
(i32.add
(get_local $2)
(i32.const 1)
)
(return
(i32.const 1)
)
(br $continue|0)
)
)
(set_local $2
(i32.add
(get_local $2)
(i32.const 1)
)
)
(br $loop|0)
)
)
(return
@ -2480,16 +2482,41 @@
)
)
)
(loop $continue|0
(if
(i32.lt_u
(get_local $2)
(get_local $3)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i32.lt_u
(get_local $2)
(get_local $3)
)
)
)
(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)
@ -2499,72 +2526,49 @@
(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)
)
)
)
(set_local $2
(i32.add
(get_local $2)
(return
(i32.const 1)
)
)
(br $continue|0)
)
)
(set_local $2
(i32.add
(get_local $2)
(i32.const 1)
)
)
(br $loop|0)
)
)
(return

View File

@ -23,39 +23,57 @@
(set_local $1
(i32.const 1)
)
(set_local $4
(i32.load
(get_local $0)
)
)
(loop $continue|0
(if
(i32.lt_u
(get_local $2)
(get_local $4)
(block $break|0
(set_local $4
(i32.load
(get_local $0)
)
(block
(set_local $2
(if (result i32)
(i32.lt_u
(tee_local $3
(i32.load16_u offset=4
(i32.add
(get_local $0)
(i32.shl
(get_local $2)
(i32.const 1)
)
)
(loop $loop|0
(br_if $break|0
(i32.ge_u
(get_local $2)
(get_local $4)
)
)
(set_local $2
(if (result i32)
(i32.lt_u
(tee_local $3
(i32.load16_u offset=4
(i32.add
(get_local $0)
(i32.shl
(get_local $2)
(i32.const 1)
)
)
)
(i32.const 128)
)
(i32.const 128)
)
(block (result i32)
(set_local $1
(i32.add
(get_local $1)
(i32.const 1)
)
)
(i32.add
(get_local $2)
(i32.const 1)
)
)
(if (result i32)
(i32.lt_u
(get_local $3)
(i32.const 2048)
)
(block (result i32)
(set_local $1
(i32.add
(get_local $1)
(i32.const 1)
(i32.const 2)
)
)
(i32.add
@ -64,15 +82,53 @@
)
)
(if (result i32)
(i32.lt_u
(if (result i32)
(tee_local $3
(i32.eq
(i32.and
(get_local $3)
(i32.const 64512)
)
(i32.const 55296)
)
)
(i32.eq
(i32.and
(i32.load16_u offset=4
(i32.add
(get_local $0)
(i32.shl
(i32.add
(get_local $2)
(i32.const 1)
)
(i32.const 1)
)
)
)
(i32.const 64512)
)
(i32.const 56320)
)
(get_local $3)
(i32.const 2048)
)
(block (result i32)
(set_local $1
(i32.add
(get_local $1)
(i32.const 2)
(i32.const 4)
)
)
(i32.add
(get_local $2)
(i32.const 2)
)
)
(block (result i32)
(set_local $1
(i32.add
(get_local $1)
(i32.const 3)
)
)
(i32.add
@ -80,67 +136,11 @@
(i32.const 1)
)
)
(if (result i32)
(if (result i32)
(tee_local $3
(i32.eq
(i32.and
(get_local $3)
(i32.const 64512)
)
(i32.const 55296)
)
)
(i32.eq
(i32.and
(i32.load16_u offset=4
(i32.add
(get_local $0)
(i32.shl
(i32.add
(get_local $2)
(i32.const 1)
)
(i32.const 1)
)
)
)
(i32.const 64512)
)
(i32.const 56320)
)
(get_local $3)
)
(block (result i32)
(set_local $1
(i32.add
(get_local $1)
(i32.const 4)
)
)
(i32.add
(get_local $2)
(i32.const 2)
)
)
(block (result i32)
(set_local $1
(i32.add
(get_local $1)
(i32.const 3)
)
)
(i32.add
(get_local $2)
(i32.const 1)
)
)
)
)
)
)
(br $continue|0)
)
(br $loop|0)
)
)
(get_local $1)
@ -249,18 +249,20 @@
)
)
)
(set_local $6
(i32.load
(get_local $0)
)
)
(loop $continue|0
(if
(i32.lt_u
(get_local $2)
(get_local $6)
(block $break|0
(set_local $6
(i32.load
(get_local $0)
)
(block
)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.ge_u
(get_local $2)
(get_local $6)
)
)
(set_local $3
(if (result i32)
(i32.lt_u
@ -450,7 +452,7 @@
(i32.const 2)
)
)
(br $continue|0)
(br $loop|0)
)
)
)
@ -501,8 +503,8 @@
)
)
)
(br $continue|0)
)
(br $loop|0)
)
)
(i32.store8

View File

@ -40,35 +40,57 @@
)
)
)
(loop $continue|0
(if
(i32.lt_u
(get_local $2)
(get_local $3)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i32.lt_u
(get_local $2)
(get_local $3)
)
)
)
(block
(block
(set_local $4
(i32.load16_u offset=4
(set_local $4
(i32.load16_u offset=4
(i32.add
(get_local $0)
(i32.shl
(get_local $2)
(i32.const 1)
)
)
)
)
(if
(i32.lt_u
(get_local $4)
(i32.const 128)
)
(block
(set_local $1
(i32.add
(get_local $0)
(i32.shl
(get_local $2)
(i32.const 1)
)
(get_local $1)
(i32.const 1)
)
)
(set_local $2
(i32.add
(get_local $2)
(i32.const 1)
)
)
)
(if
(i32.lt_u
(get_local $4)
(i32.const 128)
(i32.const 2048)
)
(block
(set_local $1
(i32.add
(get_local $1)
(i32.const 1)
(i32.const 2)
)
)
(set_local $2
@ -79,17 +101,57 @@
)
)
(if
(i32.lt_u
(get_local $4)
(i32.const 2048)
(if (result i32)
(tee_local $5
(i32.eq
(i32.and
(get_local $4)
(i32.const 64512)
)
(i32.const 55296)
)
)
(i32.eq
(i32.and
(i32.load16_u offset=4
(i32.add
(get_local $0)
(i32.shl
(i32.add
(get_local $2)
(i32.const 1)
)
(i32.const 1)
)
)
)
(i32.const 64512)
)
(i32.const 56320)
)
(get_local $5)
)
(block
(set_local $1
(i32.add
(get_local $1)
(i32.const 4)
)
)
(set_local $2
(i32.add
(get_local $2)
(i32.const 2)
)
)
)
(block
(set_local $1
(i32.add
(get_local $1)
(i32.const 3)
)
)
(set_local $2
(i32.add
(get_local $2)
@ -97,73 +159,13 @@
)
)
)
(if
(if (result i32)
(tee_local $5
(i32.eq
(i32.and
(get_local $4)
(i32.const 64512)
)
(i32.const 55296)
)
)
(i32.eq
(i32.and
(i32.load16_u offset=4
(i32.add
(get_local $0)
(i32.shl
(i32.add
(get_local $2)
(i32.const 1)
)
(i32.const 1)
)
)
)
(i32.const 64512)
)
(i32.const 56320)
)
(get_local $5)
)
(block
(set_local $1
(i32.add
(get_local $1)
(i32.const 4)
)
)
(set_local $2
(i32.add
(get_local $2)
(i32.const 2)
)
)
)
(block
(set_local $1
(i32.add
(get_local $1)
(i32.const 3)
)
)
(set_local $2
(i32.add
(get_local $2)
(i32.const 1)
)
)
)
)
)
)
)
(nop)
(br $continue|0)
)
)
(nop)
(br $loop|0)
)
)
(return
@ -313,42 +315,90 @@
)
)
)
(loop $continue|0
(if
(i32.lt_u
(get_local $4)
(get_local $5)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i32.lt_u
(get_local $4)
(get_local $5)
)
)
)
(block
(block
(set_local $6
(i32.load16_u offset=4
(set_local $6
(i32.load16_u offset=4
(i32.add
(get_local $0)
(i32.shl
(get_local $4)
(i32.const 1)
)
)
)
)
(if
(i32.lt_u
(get_local $6)
(i32.const 128)
)
(block
(i32.store8
(i32.add
(get_local $0)
(i32.shl
(get_local $4)
(i32.const 1)
)
(get_local $2)
(get_local $3)
)
(get_local $6)
)
(set_local $3
(i32.add
(get_local $3)
(i32.const 1)
)
)
(set_local $4
(i32.add
(get_local $4)
(i32.const 1)
)
)
)
(if
(i32.lt_u
(get_local $6)
(i32.const 128)
(i32.const 2048)
)
(block
(i32.store8
(set_local $7
(i32.add
(get_local $2)
(get_local $3)
)
(get_local $6)
)
(i32.store8
(get_local $7)
(i32.or
(i32.shr_u
(get_local $6)
(i32.const 6)
)
(i32.const 192)
)
)
(i32.store8 offset=1
(get_local $7)
(i32.or
(i32.and
(get_local $6)
(i32.const 63)
)
(i32.const 128)
)
)
(set_local $3
(i32.add
(get_local $3)
(i32.const 1)
(i32.const 2)
)
)
(set_local $4
@ -358,224 +408,178 @@
)
)
)
(if
(i32.lt_u
(get_local $6)
(i32.const 2048)
(block
(set_local $7
(i32.add
(get_local $2)
(get_local $3)
)
)
(block
(set_local $7
(i32.add
(get_local $2)
(get_local $3)
(if
(i32.eq
(i32.and
(get_local $6)
(i32.const 64512)
)
(i32.const 55296)
)
(block
(set_local $8
(i32.load16_u offset=4
(i32.add
(get_local $0)
(i32.shl
(i32.add
(get_local $4)
(i32.const 1)
)
(i32.const 1)
)
)
)
)
(if
(i32.eq
(i32.and
(get_local $8)
(i32.const 64512)
)
(i32.const 56320)
)
(block
(set_local $6
(i32.add
(i32.add
(i32.const 65536)
(i32.shl
(i32.and
(get_local $6)
(i32.const 1023)
)
(i32.const 10)
)
)
(i32.and
(get_local $8)
(i32.const 1023)
)
)
)
(i32.store8
(get_local $7)
(i32.or
(i32.shr_u
(get_local $6)
(i32.const 18)
)
(i32.const 240)
)
)
(i32.store8 offset=1
(get_local $7)
(i32.or
(i32.and
(i32.shr_u
(get_local $6)
(i32.const 12)
)
(i32.const 63)
)
(i32.const 128)
)
)
(i32.store8 offset=2
(get_local $7)
(i32.or
(i32.and
(i32.shr_u
(get_local $6)
(i32.const 6)
)
(i32.const 63)
)
(i32.const 128)
)
)
(i32.store8 offset=3
(get_local $7)
(i32.or
(i32.and
(get_local $6)
(i32.const 63)
)
(i32.const 128)
)
)
(set_local $3
(i32.add
(get_local $3)
(i32.const 4)
)
)
(set_local $4
(i32.add
(get_local $4)
(i32.const 2)
)
)
(br $continue|0)
)
)
)
(i32.store8
(get_local $7)
(i32.or
)
(i32.store8
(get_local $7)
(i32.or
(i32.shr_u
(get_local $6)
(i32.const 12)
)
(i32.const 224)
)
)
(i32.store8 offset=1
(get_local $7)
(i32.or
(i32.and
(i32.shr_u
(get_local $6)
(i32.const 6)
)
(i32.const 192)
)
)
(i32.store8 offset=1
(get_local $7)
(i32.or
(i32.and
(get_local $6)
(i32.const 63)
)
(i32.const 128)
)
)
(set_local $3
(i32.add
(get_local $3)
(i32.const 2)
)
)
(set_local $4
(i32.add
(get_local $4)
(i32.const 1)
(i32.const 63)
)
(i32.const 128)
)
)
(block
(set_local $7
(i32.add
(get_local $2)
(get_local $3)
(i32.store8 offset=2
(get_local $7)
(i32.or
(i32.and
(get_local $6)
(i32.const 63)
)
(i32.const 128)
)
(if
(i32.eq
(i32.and
(get_local $6)
(i32.const 64512)
)
(i32.const 55296)
)
(block
(set_local $8
(i32.load16_u offset=4
(i32.add
(get_local $0)
(i32.shl
(i32.add
(get_local $4)
(i32.const 1)
)
(i32.const 1)
)
)
)
)
(if
(i32.eq
(i32.and
(get_local $8)
(i32.const 64512)
)
(i32.const 56320)
)
(block
(set_local $6
(i32.add
(i32.add
(i32.const 65536)
(i32.shl
(i32.and
(get_local $6)
(i32.const 1023)
)
(i32.const 10)
)
)
(i32.and
(get_local $8)
(i32.const 1023)
)
)
)
(i32.store8
(get_local $7)
(i32.or
(i32.shr_u
(get_local $6)
(i32.const 18)
)
(i32.const 240)
)
)
(i32.store8 offset=1
(get_local $7)
(i32.or
(i32.and
(i32.shr_u
(get_local $6)
(i32.const 12)
)
(i32.const 63)
)
(i32.const 128)
)
)
(i32.store8 offset=2
(get_local $7)
(i32.or
(i32.and
(i32.shr_u
(get_local $6)
(i32.const 6)
)
(i32.const 63)
)
(i32.const 128)
)
)
(i32.store8 offset=3
(get_local $7)
(i32.or
(i32.and
(get_local $6)
(i32.const 63)
)
(i32.const 128)
)
)
(set_local $3
(i32.add
(get_local $3)
(i32.const 4)
)
)
(set_local $4
(i32.add
(get_local $4)
(i32.const 2)
)
)
(br $continue|0)
)
)
)
)
(set_local $3
(i32.add
(get_local $3)
(i32.const 3)
)
(i32.store8
(get_local $7)
(i32.or
(i32.shr_u
(get_local $6)
(i32.const 12)
)
(i32.const 224)
)
)
(i32.store8 offset=1
(get_local $7)
(i32.or
(i32.and
(i32.shr_u
(get_local $6)
(i32.const 6)
)
(i32.const 63)
)
(i32.const 128)
)
)
(i32.store8 offset=2
(get_local $7)
(i32.or
(i32.and
(get_local $6)
(i32.const 63)
)
(i32.const 128)
)
)
(set_local $3
(i32.add
(get_local $3)
(i32.const 3)
)
)
(set_local $4
(i32.add
(get_local $4)
(i32.const 1)
)
)
(set_local $4
(i32.add
(get_local $4)
(i32.const 1)
)
)
)
)
)
(nop)
(br $continue|0)
)
)
(nop)
(br $loop|0)
)
)
(i32.store8

View File

@ -377,75 +377,75 @@
(get_local $1)
)
)
(set_local $2
(select
(tee_local $2
(select
(get_local $2)
(i32.const 0)
(i32.gt_s
(block $break|0
(set_local $2
(select
(tee_local $2
(select
(get_local $2)
(get_local $3)
)
)
)
(tee_local $3
(tee_local $5
(i32.load
(get_local $0)
)
)
)
(i32.lt_s
(get_local $2)
(get_local $3)
)
)
)
(loop $continue|0
(if
(i32.le_s
(i32.add
(get_local $2)
(get_local $4)
)
(get_local $5)
)
(block
(if
(i32.eqz
(call $~lib/memory/compare_memory
(i32.add
(i32.add
(get_local $0)
(i32.const 4)
)
(i32.shl
(get_local $2)
(i32.const 1)
)
)
(i32.add
(get_local $1)
(i32.const 4)
)
(i32.shl
(get_local $4)
(i32.const 1)
)
(i32.const 0)
(i32.gt_s
(get_local $2)
(get_local $3)
)
)
(return
(get_local $2)
)
(tee_local $3
(tee_local $5
(i32.load
(get_local $0)
)
)
)
(set_local $2
(i32.lt_s
(get_local $2)
(get_local $3)
)
)
)
(loop $loop|0
(br_if $break|0
(i32.gt_s
(i32.add
(get_local $2)
(get_local $4)
)
(get_local $5)
)
)
(if
(call $~lib/memory/compare_memory
(i32.add
(i32.add
(get_local $0)
(i32.const 4)
)
(i32.shl
(get_local $2)
(i32.const 1)
)
)
(i32.add
(get_local $1)
(i32.const 4)
)
(i32.shl
(get_local $4)
(i32.const 1)
)
)
(br $continue|0)
(block
(set_local $2
(i32.add
(get_local $2)
(i32.const 1)
)
)
(br $loop|0)
)
(return
(get_local $2)
)
)
)
)
@ -3629,49 +3629,49 @@
)
)
)
(set_local $2
(i32.const 0)
)
(set_local $1
(i32.mul
(tee_local $3
(i32.shl
(get_local $3)
(i32.const 1)
)
)
(get_local $1)
(block $break|0
(set_local $2
(i32.const 0)
)
)
(loop $continue|0
(if
(i32.lt_s
(get_local $2)
(set_local $1
(i32.mul
(tee_local $3
(i32.shl
(get_local $3)
(i32.const 1)
)
)
(get_local $1)
)
(block
(call $~lib/memory/move_memory
)
(loop $loop|0
(br_if $break|0
(i32.ge_s
(get_local $2)
(get_local $1)
)
)
(call $~lib/memory/move_memory
(i32.add
(i32.add
(i32.add
(get_local $4)
(i32.const 4)
)
(get_local $2)
)
(i32.add
(get_local $0)
(get_local $4)
(i32.const 4)
)
(get_local $2)
)
(i32.add
(get_local $0)
(i32.const 4)
)
(get_local $3)
)
(set_local $2
(i32.add
(get_local $2)
(get_local $3)
)
(set_local $2
(i32.add
(get_local $2)
(get_local $3)
)
)
(br $continue|0)
)
(br $loop|0)
)
)
(get_local $4)

View File

@ -504,52 +504,54 @@
(set_local $5
(get_local $7)
)
(loop $continue|0
(if
(i32.le_s
(i32.add
(get_local $5)
(get_local $8)
(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)
)
)
(get_local $4)
)
(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)
)
)
)
(return
(get_local $5)
(i32.add
(get_local $1)
(i32.const 4)
)
(i32.shl
(get_local $8)
(i32.const 1)
)
)
)
(set_local $5
(i32.add
(get_local $5)
(i32.const 1)
)
(return
(get_local $5)
)
(br $continue|0)
)
)
(set_local $5
(i32.add
(get_local $5)
(i32.const 1)
)
)
(br $loop|0)
)
)
(return
@ -4206,36 +4208,38 @@
)
)
)
(loop $continue|0
(if
(i32.lt_s
(get_local $3)
(get_local $6)
)
(block
(call $~lib/memory/move_memory
(i32.add
(i32.add
(get_local $4)
(i32.const 4)
)
(loop $loop|0
(block $continue|0
(br_if $break|0
(i32.eqz
(i32.lt_s
(get_local $3)
(get_local $6)
)
)
)
(call $~lib/memory/move_memory
(i32.add
(i32.add
(get_local $0)
(get_local $4)
(i32.const 4)
)
(get_local $5)
(get_local $3)
)
(set_local $3
(i32.add
(get_local $3)
(get_local $5)
)
(i32.add
(get_local $0)
(i32.const 4)
)
(br $continue|0)
(get_local $5)
)
)
(set_local $3
(i32.add
(get_local $3)
(get_local $5)
)
)
(br $loop|0)
)
)
(return