Utilize Binaryen's -O4

When specifying -O3 or -Oz, asc now automatically increases the optimize level to 4, then including costly non-LLVM optimizations for blocky code, in turn achieving similar results as an LLVM-based generator.
This commit is contained in:
dcodeIO 2018-06-09 14:05:33 +02:00
parent e9094bbd6f
commit c6ec5e2832
46 changed files with 14240 additions and 16223 deletions

View File

@ -491,6 +491,10 @@ exports.main = function main(argv, options, callback) {
shrinkLevel = 2;
}
// Implicitly run costly non-LLVM optimizations on -O3 or -Oz
// see: https://github.com/WebAssembly/binaryen/pull/1596
if (optimizeLevel >= 3 || shrinkLevel >= 2) optimizeLevel = 4;
module.setOptimizeLevel(optimizeLevel > 0 ? optimizeLevel : 0);
module.setShrinkLevel(shrinkLevel);
module.setDebugInfo(debugInfo);

2
dist/asc.js vendored

File diff suppressed because one or more lines are too long

2
dist/asc.js.map vendored

File diff suppressed because one or more lines are too long

6
package-lock.json generated
View File

@ -1496,9 +1496,9 @@
"dev": true
},
"binaryen": {
"version": "48.0.0-nightly.20180605",
"resolved": "https://registry.npmjs.org/binaryen/-/binaryen-48.0.0-nightly.20180605.tgz",
"integrity": "sha512-P2Q7fl1k+SWUUhcO+nR0FvokwuTFTLU2JQhhSzGTSen70JFGArEAfr936sxiK/SGUQjBwXvHLoO6ggEYn82rbQ=="
"version": "48.0.0-nightly.20180609",
"resolved": "https://registry.npmjs.org/binaryen/-/binaryen-48.0.0-nightly.20180609.tgz",
"integrity": "sha512-+E+PO+B1JsXJb9F6PJelL/MsDzp1tCJW2/tDd98VrDL0HfMtSmaL2sACwUPDw2EQVcz70ZbItkcnuvGj+hlqdg=="
},
"binaryextensions": {
"version": "2.1.1",

View File

@ -12,7 +12,7 @@
},
"dependencies": {
"@protobufjs/utf8": "^1.1.0",
"binaryen": "48.0.0-nightly.20180605",
"binaryen": "48.0.0-nightly.20180609",
"glob": "^7.1.2",
"long": "^4.0.0",
"minimist": "^1.2.0",

View File

@ -123,7 +123,7 @@ tests.forEach(filename => {
filename,
"--baseDir", basedir,
"--validate",
"--optimize",
"-O3",
"--measure",
"--binaryFile" // -> stdout
];

View File

@ -31,46 +31,12 @@
)
)
(func $start (; 5 ;) (type $v)
(local $0 i32)
(drop
(call $abi/internal)
)
(set_global $abi/condition
(i32.const 1)
)
(set_local $0
(i32.const 256)
)
(if
(tee_local $0
(select
(i32.shr_s
(i32.shr_s
(i32.shl
(get_local $0)
(i32.const 24)
)
(i32.const 24)
)
(i32.const 24)
)
(i32.and
(get_local $0)
(i32.const 127)
)
(get_global $abi/condition)
)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 58)
(i32.const 2)
)
(unreachable)
)
)
(set_global $abi/y
(i32.const 0)
)

View File

@ -1,33 +1,6 @@
(module
(type $iiiiv (func (param i32 i32 i32 i32)))
(type $v (func))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1)
(data (i32.const 8) "\t\00\00\00a\00s\00s\00e\00r\00t\00.\00t\00s")
(data (i32.const 32) "\0c\00\00\00m\00u\00s\00t\00 \00b\00e\00 \00t\00r\00u\00e")
(export "memory" (memory $0))
(start $start)
(func $start (; 1 ;) (type $v)
(local $0 i32)
(if
(i32.eqz
(if (result i32)
(tee_local $0
(i32.const 1)
)
(get_local $0)
(block
(call $~lib/env/abort
(i32.const 32)
(i32.const 8)
(i32.const 10)
(i32.const 5)
)
(unreachable)
)
)
)
(unreachable)
)
)
)

File diff suppressed because it is too large Load Diff

View File

@ -60,24 +60,6 @@
(nop)
)
(func $start (; 7 ;) (type $v)
(local $0 i32)
(local $1 i32)
(local $2 i64)
(local $3 i64)
(drop
(select
(tee_local $0
(i32.const 1)
)
(tee_local $1
(i32.const 2)
)
(i32.gt_s
(get_local $0)
(get_local $1)
)
)
)
(set_global $builtins/i
(i32.const 31)
)
@ -94,19 +76,7 @@
(i32.const -2147483648)
)
(set_global $builtins/i
(select
(tee_local $0
(i32.const -42)
)
(i32.sub
(i32.const 0)
(get_local $0)
)
(i32.gt_s
(get_local $0)
(i32.const 0)
)
)
(i32.const 42)
)
(if
(i32.ne
@ -124,16 +94,7 @@
)
)
(set_global $builtins/i
(select
(tee_local $0
(i32.const 1)
)
(i32.const 2)
(i32.gt_s
(get_local $0)
(get_local $1)
)
)
)
(if
(i32.ne
@ -151,14 +112,7 @@
)
)
(set_global $builtins/i
(select
(i32.const 1)
(i32.const 2)
(i32.lt_s
(get_local $0)
(get_local $1)
)
)
)
(if
(i32.ne
@ -191,19 +145,7 @@
(i64.const -9223372036854775808)
)
(set_global $builtins/I
(select
(tee_local $2
(i64.const -42)
)
(i64.sub
(i64.const 0)
(get_local $2)
)
(i64.gt_s
(get_local $2)
(i64.const 0)
)
)
(i64.const 42)
)
(if
(i64.ne
@ -221,19 +163,8 @@
)
)
(set_global $builtins/I
(select
(tee_local $2
(i64.const 1)
)
(tee_local $3
(i64.const 2)
)
(i64.gt_s
(get_local $2)
(get_local $3)
)
)
)
(if
(i64.ne
(get_global $builtins/I)
@ -250,14 +181,7 @@
)
)
(set_global $builtins/I
(select
(i64.const 1)
(i64.const 2)
(i64.lt_s
(get_local $2)
(get_local $3)
)
)
)
(if
(i32.ne

View File

@ -50,17 +50,15 @@
)
)
(func $start (; 3 ;) (type $v)
(if
(block (result i32)
(set_global $~argc
(i32.const 1)
)
(if
(call $call-optional/opt|trampoline
(i32.const 3)
(i32.const 0)
(i32.const 0)
)
)
(block
(call $~lib/env/abort
(i32.const 0)
@ -71,11 +69,10 @@
(unreachable)
)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 2)
)
(if
(i32.ne
(call $call-optional/opt|trampoline
(i32.const 3)
@ -84,7 +81,6 @@
)
(i32.const 5)
)
)
(block
(call $~lib/env/abort
(i32.const 0)
@ -114,18 +110,16 @@
(unreachable)
)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 1)
)
(if
(call_indirect (type $iiii)
(i32.const 3)
(i32.const 0)
(i32.const 0)
(get_global $call-optional/optIndirect)
)
)
(block
(call $~lib/env/abort
(i32.const 0)
@ -136,11 +130,10 @@
(unreachable)
)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 2)
)
(if
(i32.ne
(call_indirect (type $iiii)
(i32.const 3)
@ -150,7 +143,6 @@
)
(i32.const 5)
)
)
(block
(call $~lib/env/abort
(i32.const 0)
@ -161,11 +153,10 @@
(unreachable)
)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 3)
)
(if
(i32.ne
(call_indirect (type $iiii)
(i32.const 3)
@ -175,7 +166,6 @@
)
(i32.const 12)
)
)
(block
(call $~lib/env/abort
(i32.const 0)

View File

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

View File

@ -10,8 +10,6 @@
(start $start)
(func $start (; 1 ;) (type $v)
(local $0 i32)
(set_global $comma/b
(block (result i32)
(set_global $comma/a
(i32.add
(tee_local $0
@ -20,9 +18,9 @@
(i32.const 1)
)
)
(set_global $comma/b
(get_local $0)
)
)
(if
(i32.ne
(get_global $comma/a)
@ -89,25 +87,21 @@
(unreachable)
)
)
(set_global $comma/a
(block (result i32)
(set_global $comma/b
(i32.const 0)
)
(set_global $comma/a
(get_global $comma/b)
)
)
(set_global $comma/b
(block (result i32)
(set_global $comma/a
(i32.add
(get_global $comma/a)
(i32.const 1)
)
)
(set_global $comma/b
(get_global $comma/a)
)
)
(if
(i32.ne
(get_global $comma/a)
@ -138,8 +132,6 @@
(unreachable)
)
)
(set_global $comma/a
(block (result i32)
(set_global $comma/a
(i32.add
(get_global $comma/a)
@ -149,9 +141,9 @@
(set_global $comma/b
(get_global $comma/a)
)
(set_global $comma/a
(get_global $comma/b)
)
)
(if
(i32.ne
(get_global $comma/a)

View File

@ -90,7 +90,6 @@
(local $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(if
(get_local $0)
(block
@ -129,7 +128,6 @@
(grow_memory
(select
(get_local $2)
(tee_local $4
(tee_local $3
(i32.shr_u
(i32.and
@ -145,10 +143,9 @@
(i32.const 16)
)
)
)
(i32.gt_s
(get_local $2)
(get_local $4)
(get_local $3)
)
)
)
@ -176,25 +173,21 @@
(i32.const 0)
)
(func $exports/Car#constructor (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(i32.store
(if (result i32)
(if
(i32.eqz
(get_local $0)
(get_local $0)
(block (result i32)
)
(i32.store
(tee_local $2
(tee_local $0
(call $~lib/allocator/arena/allocate_memory
(i32.const 4)
)
)
(get_local $1)
)
(tee_local $0
(get_local $2)
)
)
)
(i32.store
(get_local $0)
(get_local $1)
)
(get_local $0)

View File

@ -26,11 +26,10 @@
(i32.const 1)
)
(func $start (; 4 ;) (type $v)
(if
(block (result i32)
(set_global $~argc
(i32.const 1)
)
(if
(i32.ne
(call_indirect (type $ii)
(i32.const 1)
@ -38,7 +37,6 @@
)
(i32.const 1)
)
)
(block
(call $~lib/env/abort
(i32.const 0)
@ -49,11 +47,10 @@
(unreachable)
)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 1)
)
(if
(i32.ne
(call_indirect (type $ii)
(i32.const 2)
@ -61,7 +58,6 @@
)
(i32.const 2)
)
)
(block
(call $~lib/env/abort
(i32.const 0)
@ -78,18 +74,16 @@
(call_indirect (type $v)
(get_global $function-expression/f3)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 0)
)
(if
(i32.ne
(call_indirect (type $i)
(get_global $function-expression/f4)
)
(i32.const 1)
)
)
(block
(call $~lib/env/abort
(i32.const 0)

View File

@ -91,11 +91,10 @@
(set_global $function-types/i32Adder
(call $function-types/makeAdder<i32>)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 2)
)
(if
(i32.ne
(call_indirect (type $iii)
(i32.const 1)
@ -104,7 +103,6 @@
)
(i32.const 3)
)
)
(block
(call $~lib/env/abort
(i32.const 0)
@ -118,11 +116,10 @@
(set_global $function-types/i64Adder
(call $function-types/makeAdder<i64>)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 2)
)
(if
(i64.ne
(call_indirect (type $III)
(i64.const 10)
@ -131,7 +128,6 @@
)
(i64.const 30)
)
)
(block
(call $~lib/env/abort
(i32.const 0)
@ -142,11 +138,10 @@
(unreachable)
)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 2)
)
(if
(f64.ne
(call_indirect (type $FFF)
(f64.const 1.5)
@ -155,7 +150,6 @@
)
(f64.const 4)
)
)
(block
(call $~lib/env/abort
(i32.const 0)
@ -222,11 +216,10 @@
(unreachable)
)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 2)
)
(if
(i32.ne
(call $function-types/makeAndAdd<i32>|trampoline
(i32.const 1)
@ -235,7 +228,6 @@
)
(i32.const 3)
)
)
(block
(call $~lib/env/abort
(i32.const 0)

View File

@ -48,16 +48,14 @@
(unreachable)
)
)
(if
(block (result i32)
(call $getter-setter/Foo.set:bar
(i32.const 2)
)
(if
(i32.ne
(call $getter-setter/Foo.get:bar)
(i32.const 2)
)
)
(block
(call $~lib/env/abort
(i32.const 0)

View File

@ -12,10 +12,10 @@
(export "memory" (memory $0))
(start $start)
(func $if/ifThenElse (; 1 ;) (type $ii) (param $0 i32) (result i32)
(select
(if (result i32)
(get_local $0)
(i32.const 1)
(i32.const 0)
(get_local $0)
)
)
(func $if/ifThen (; 2 ;) (type $ii) (param $0 i32) (result i32)

View File

@ -28,7 +28,6 @@
)
(func $start (; 5 ;) (type $v)
(local $0 i32)
(local $1 i32)
(call $infer-type/locals)
(set_global $infer-type/ri
(call $infer-type/reti)
@ -43,14 +42,11 @@
(call $infer-type/refF)
)
(block $break|0
(set_local $1
(i32.const 10)
)
(loop $repeat|0
(br_if $break|0
(i32.ge_s
(get_local $0)
(get_local $1)
(i32.const 10)
)
)
(set_local $0

View File

@ -20,117 +20,10 @@
(get_local $0)
)
(func $inlining/test_funcs (; 3 ;) (type $v)
(local $0 i32)
(if
(i32.ne
(block $inlining/func_ii|inlined.0 (result i32)
(drop
(br_if $inlining/func_ii|inlined.0
(i32.const 1)
(i32.eq
(tee_local $0
(i32.const 42)
)
(i32.const 42)
)
)
)
(select
(i32.const 2)
(i32.const 3)
(i32.lt_s
(get_local $0)
(i32.const 42)
)
)
)
(i32.const 1)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 60)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(block $inlining/func_ii|inlined.1 (result i32)
(drop
(br_if $inlining/func_ii|inlined.1
(i32.const 1)
(i32.eq
(tee_local $0
(i32.const 41)
)
(i32.const 42)
)
)
)
(select
(i32.const 2)
(i32.const 3)
(i32.lt_s
(get_local $0)
(i32.const 42)
)
)
)
(i32.const 2)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 61)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(block $inlining/func_ii|inlined.2 (result i32)
(drop
(br_if $inlining/func_ii|inlined.2
(i32.const 1)
(i32.eq
(tee_local $0
(i32.const 43)
)
(i32.const 42)
)
)
)
(select
(i32.const 2)
(i32.const 3)
(i32.lt_s
(get_local $0)
(i32.const 42)
)
)
)
(i32.const 3)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 62)
(i32.const 2)
)
(unreachable)
)
)
(if
(block (result i32)
(set_global $~argc
(i32.const 1)
)
(if
(i32.ne
(call_indirect (type $ii)
(i32.const 2)
@ -138,7 +31,6 @@
)
(i32.const 2)
)
)
(block
(call $~lib/env/abort
(i32.const 0)

View File

@ -11,25 +11,6 @@
(export "memory" (memory $0))
(start $start)
(func $start (; 1 ;) (type $v)
(local $0 i32)
(local $1 f64)
(if
(i32.eqz
(tee_local $0
(i32.const 2)
)
)
(unreachable)
)
(if
(f64.eq
(tee_local $1
(f64.const 2)
)
(f64.const 0)
)
(unreachable)
)
(set_global $logical/i
(i32.const 2)
)

View File

@ -9,20 +9,19 @@
(func $~lib/math/NativeMath.log (; 0 ;) (type $FF) (param $0 f64) (result f64)
(local $1 i32)
(local $2 i32)
(local $3 i64)
(local $4 f64)
(local $5 i32)
(local $3 i32)
(local $4 i64)
(local $5 f64)
(local $6 f64)
(local $7 f64)
(local $8 f64)
(if
(if (result i32)
(tee_local $5
(i32.eqz
(tee_local $2
(i32.lt_u
(tee_local $1
(i32.wrap/i64
(i64.shr_u
(tee_local $3
(tee_local $4
(i64.reinterpret/f64
(get_local $0)
)
@ -34,17 +33,21 @@
(i32.const 1048576)
)
)
(get_local $5)
)
(set_local $2
(i32.shr_u
(get_local $1)
(i32.const 31)
)
)
)
(if
(get_local $2)
(block
(if
(i64.eq
(i64.shl
(get_local $3)
(get_local $4)
(i64.const 1)
)
(i64.const 0)
@ -74,16 +77,13 @@
)
)
)
(set_local $2
(i32.sub
(get_local $2)
(i32.const 54)
)
(set_local $3
(i32.const -54)
)
(set_local $1
(i32.wrap/i64
(i64.shr_u
(tee_local $3
(tee_local $4
(i64.reinterpret/f64
(f64.mul
(get_local $0)
@ -104,32 +104,36 @@
(return
(get_local $0)
)
(block
(if
(if (result i32)
(tee_local $5
(tee_local $2
(i32.eq
(get_local $1)
(i32.const 1072693248)
)
)
(set_local $2
(i64.eq
(i64.shl
(get_local $3)
(get_local $4)
(i64.const 32)
)
(i64.const 0)
)
(get_local $5)
)
)
(if
(get_local $2)
(return
(f64.const 0)
)
)
)
)
(set_local $2
)
(set_local $3
(i32.add
(get_local $2)
(get_local $3)
(i32.sub
(i32.shr_s
(tee_local $1
@ -144,11 +148,13 @@
)
)
)
(set_local $6
(set_local $0
(f64.mul
(tee_local $7
(f64.mul
(f64.const 0.5)
(tee_local $4
(tee_local $6
(f64.div
(tee_local $5
(f64.sub
(f64.reinterpret/i64
(i64.or
@ -165,7 +171,7 @@
(i64.const 32)
)
(i64.and
(get_local $3)
(get_local $4)
(i64.const 4294967295)
)
)
@ -173,40 +179,37 @@
(f64.const 1)
)
)
)
(get_local $4)
)
)
(set_local $0
(f64.mul
(tee_local $8
(f64.mul
(tee_local $7
(f64.div
(get_local $4)
(f64.add
(f64.const 2)
(get_local $4)
(get_local $5)
)
)
)
(get_local $6)
)
)
(get_local $7)
)
)
(get_local $8)
)
)
(f64.add
(f64.add
(f64.sub
(f64.add
(f64.mul
(get_local $7)
(f64.add
(get_local $6)
(f64.add
(tee_local $6
(f64.mul
(get_local $8)
(f64.mul
(f64.const 0.5)
(get_local $5)
)
(get_local $5)
)
)
(f64.add
(f64.mul
(get_local $7)
(f64.add
(f64.const 0.6666666666666735)
(f64.mul
@ -247,20 +250,20 @@
)
)
(f64.mul
(tee_local $0
(f64.convert_s/i32
(get_local $2)
(get_local $3)
)
)
(f64.const 1.9082149292705877e-10)
)
)
(get_local $6)
)
(get_local $4)
(get_local $5)
)
(f64.mul
(f64.convert_s/i32
(get_local $2)
)
(get_local $0)
(f64.const 0.6931471803691238)
)
)
@ -286,18 +289,20 @@
(func $../../examples/mandelbrot/assembly/index/computeLine (; 3 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
(local $4 f64)
(local $5 f64)
(local $6 i32)
(local $6 f64)
(local $7 f64)
(local $8 f64)
(local $8 i32)
(local $9 f64)
(local $10 f64)
(local $11 f64)
(local $12 f64)
(set_local $11
(f64.div
(tee_local $6
(f64.convert_u/i32
(get_local $1)
)
)
(f64.const 1.6)
)
)
@ -307,28 +312,28 @@
(f64.convert_u/i32
(get_local $0)
)
(tee_local $7
(f64.div
(tee_local $4
(f64.convert_u/i32
(get_local $2)
)
)
(f64.const 2)
)
)
)
(tee_local $12
(f64.div
(f64.const 10)
(f64.min
(f64.mul
(f64.const 3)
(f64.convert_u/i32
(get_local $1)
)
(get_local $6)
)
(f64.mul
(f64.const 4)
(f64.convert_u/i32
(get_local $2)
)
(get_local $4)
)
)
)
@ -336,13 +341,10 @@
)
)
(block $break|0
(set_local $2
(i32.const 0)
)
(loop $repeat|0
(br_if $break|0
(i32.ge_u
(get_local $2)
(get_local $8)
(get_local $1)
)
)
@ -350,7 +352,7 @@
(f64.mul
(f64.sub
(f64.convert_u/i32
(get_local $2)
(get_local $8)
)
(get_local $11)
)
@ -363,7 +365,7 @@
(set_local $5
(f64.const 0)
)
(set_local $6
(set_local $2
(i32.const 0)
)
(block $break|1
@ -371,13 +373,13 @@
(if
(f64.le
(f64.add
(tee_local $7
(tee_local $6
(f64.mul
(get_local $4)
(get_local $4)
)
)
(tee_local $8
(tee_local $7
(f64.mul
(get_local $5)
(get_local $5)
@ -402,21 +404,21 @@
(set_local $4
(f64.add
(f64.sub
(get_local $6)
(get_local $7)
(get_local $8)
)
(get_local $10)
)
)
(br_if $break|1
(i32.ge_u
(get_local $6)
(get_local $2)
(get_local $3)
)
)
(set_local $6
(set_local $2
(i32.add
(get_local $6)
(get_local $2)
(i32.const 1)
)
)
@ -426,7 +428,7 @@
)
)
(block $break|2
(set_local $7
(set_local $6
(f64.min
(f64.const 8)
(f64.convert_u/i32
@ -439,13 +441,13 @@
(i32.eqz
(f64.lt
(f64.convert_u/i32
(get_local $2)
)
(get_local $6)
)
(get_local $7)
)
)
)
(set_local $8
(set_local $7
(f64.add
(f64.sub
(f64.mul
@ -473,11 +475,11 @@
)
)
(set_local $4
(get_local $8)
(get_local $7)
)
(set_local $6
(set_local $2
(i32.add
(get_local $6)
(get_local $2)
(i32.const 1)
)
)
@ -491,16 +493,18 @@
(get_local $0)
(get_local $1)
)
(get_local $2)
(get_local $8)
)
(i32.const 1)
)
(tee_local $2
(if (result i32)
(call $isFinite<f64>
(tee_local $7
(tee_local $6
(f64.div
(call $~lib/math/NativeMath.log
(call $~lib/math/NativeMath.log
(tee_local $7
(f64.sqrt
(f64.add
(f64.mul
@ -515,6 +519,7 @@
)
)
)
)
(f64.const 0.6931471805599453)
)
)
@ -527,11 +532,11 @@
(f64.sub
(f64.convert_u/i32
(i32.add
(get_local $6)
(get_local $2)
(i32.const 1)
)
)
(get_local $7)
(get_local $6)
)
(f64.convert_u/i32
(get_local $3)
@ -545,9 +550,10 @@
(i32.const 2047)
)
)
(set_local $2
)
(set_local $8
(i32.add
(get_local $2)
(get_local $8)
(i32.const 1)
)
)

File diff suppressed because it is too large Load Diff

View File

@ -11,6 +11,7 @@
(func $memmove/memmove (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(set_local $4
(get_local $0)
)
@ -65,14 +66,13 @@
(set_local $0
(i32.add
(tee_local $3
(tee_local $5
(get_local $0)
)
)
(i32.const 1)
)
)
(i32.store8
(get_local $3)
(block (result i32)
(set_local $1
(i32.add
(tee_local $3
@ -81,11 +81,12 @@
(i32.const 1)
)
)
(i32.store8
(get_local $5)
(i32.load8_u
(get_local $3)
)
)
)
(br $continue|0)
)
)
@ -134,14 +135,13 @@
(set_local $0
(i32.add
(tee_local $3
(tee_local $5
(get_local $0)
)
)
(i32.const 1)
)
)
(i32.store8
(get_local $3)
(block (result i32)
(set_local $1
(i32.add
(tee_local $3
@ -150,11 +150,12 @@
(i32.const 1)
)
)
(i32.store8
(get_local $5)
(i32.load8_u
(get_local $3)
)
)
)
(set_local $2
(i32.sub
(get_local $2)

View File

@ -11,8 +11,8 @@
(start $start)
(func $memset/memset (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i64)
(local $5 i32)
(local $4 i32)
(local $5 i64)
(block $folding-inner0
(set_local $3
(get_local $0)
@ -23,13 +23,13 @@
)
)
(i32.store8
(get_local $0)
(get_local $3)
(get_local $1)
)
(i32.store8
(i32.sub
(i32.add
(get_local $0)
(get_local $3)
(get_local $2)
)
(i32.const 1)
@ -44,34 +44,33 @@
)
(i32.store8
(i32.add
(get_local $0)
(get_local $3)
(i32.const 1)
)
(get_local $1)
)
(i32.store8
(i32.add
(get_local $0)
(get_local $3)
(i32.const 2)
)
(get_local $1)
)
(i32.store8
(i32.sub
(tee_local $0
(i32.add
(get_local $0)
(get_local $3)
(get_local $2)
)
)
(i32.const 2)
)
(get_local $1)
)
(i32.store8
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(i32.const 3)
)
(get_local $1)
@ -84,7 +83,7 @@
)
(i32.store8
(i32.add
(get_local $0)
(get_local $3)
(i32.const 3)
)
(get_local $1)
@ -92,7 +91,7 @@
(i32.store8
(i32.sub
(i32.add
(get_local $0)
(get_local $3)
(get_local $2)
)
(i32.const 4)
@ -105,21 +104,27 @@
(i32.const 8)
)
)
(i32.store
(tee_local $0
(i32.add
(get_local $0)
(tee_local $5
(set_local $2
(i32.sub
(get_local $2)
(tee_local $4
(i32.and
(i32.sub
(i32.const 0)
(get_local $0)
(get_local $3)
)
(i32.const 3)
)
)
)
)
(i32.store
(tee_local $0
(i32.add
(get_local $3)
(get_local $4)
)
)
(tee_local $1
(i32.mul
(i32.and
@ -136,10 +141,7 @@
(get_local $0)
(tee_local $2
(i32.and
(i32.sub
(get_local $2)
(get_local $5)
)
(i32.const -4)
)
)
@ -170,20 +172,19 @@
)
(i32.store
(i32.sub
(tee_local $4
(i32.add
(get_local $0)
(get_local $2)
)
)
(i32.const 12)
)
(get_local $1)
)
(i32.store
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(get_local $4)
(i32.const 8)
)
(get_local $1)
@ -224,40 +225,33 @@
)
(i32.store
(i32.sub
(tee_local $4
(i32.add
(get_local $0)
(get_local $2)
)
)
(i32.const 28)
)
(get_local $1)
)
(i32.store
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(get_local $4)
(i32.const 24)
)
(get_local $1)
)
(i32.store
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(get_local $4)
(i32.const 20)
)
(get_local $1)
)
(i32.store
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(get_local $4)
(i32.const 16)
)
(get_local $1)
@ -265,7 +259,7 @@
(set_local $0
(i32.add
(get_local $0)
(tee_local $5
(tee_local $4
(i32.add
(i32.and
(get_local $0)
@ -279,18 +273,18 @@
(set_local $2
(i32.sub
(get_local $2)
(get_local $5)
(get_local $4)
)
)
(set_local $4
(set_local $5
(i64.or
(tee_local $5
(i64.extend_u/i32
(get_local $1)
)
)
(i64.shl
(i64.extend_u/i32
(get_local $1)
)
(get_local $5)
(i64.const 32)
)
)
@ -304,28 +298,28 @@
(block
(i64.store
(get_local $0)
(get_local $4)
(get_local $5)
)
(i64.store
(i32.add
(get_local $0)
(i32.const 8)
)
(get_local $4)
(get_local $5)
)
(i64.store
(i32.add
(get_local $0)
(i32.const 16)
)
(get_local $4)
(get_local $5)
)
(i64.store
(i32.add
(get_local $0)
(i32.const 24)
)
(get_local $4)
(get_local $5)
)
(set_local $2
(i32.sub

View File

@ -1,815 +1,5 @@
(module
(type $iiiiv (func (param i32 i32 i32 i32)))
(type $v (func))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1)
(data (i32.const 8) "\0b\00\00\00o\00v\00e\00r\00f\00l\00o\00w\00.\00t\00s")
(export "memory" (memory $0))
(start $start)
(func $start (; 1 ;) (type $v)
(local $0 i32)
(local $1 i32)
(if
(i32.ne
(tee_local $0
(i32.const 128)
)
(i32.const 128)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 10)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(i32.and
(tee_local $0
(i32.sub
(get_local $0)
(i32.const 1)
)
)
(i32.const 255)
)
(i32.const 127)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 13)
(i32.const 2)
)
(unreachable)
)
)
(set_local $0
(i32.add
(tee_local $1
(get_local $0)
)
(i32.const 1)
)
)
(if
(i32.ne
(i32.and
(get_local $0)
(i32.const 255)
)
(i32.const 128)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 16)
(i32.const 2)
)
(unreachable)
)
)
(set_local $0
(i32.sub
(tee_local $1
(get_local $0)
)
(i32.const 1)
)
)
(if
(i32.ne
(i32.and
(get_local $0)
(i32.const 255)
)
(i32.const 127)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 19)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(i32.and
(tee_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(i32.const 255)
)
(i32.const 128)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 22)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(i32.and
(tee_local $0
(i32.sub
(get_local $0)
(i32.const 1)
)
)
(i32.const 255)
)
(i32.const 127)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 25)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(i32.and
(tee_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(i32.const 255)
)
(i32.const 128)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 28)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(i32.and
(tee_local $0
(i32.sub
(get_local $0)
(i32.const 1)
)
)
(i32.const 255)
)
(i32.const 127)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 31)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(i32.and
(i32.add
(get_local $0)
(i32.const 1)
)
(i32.const 255)
)
(i32.const 128)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 33)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(tee_local $0
(i32.const 32768)
)
(i32.const 32768)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 42)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(i32.and
(tee_local $0
(i32.sub
(get_local $0)
(i32.const 1)
)
)
(i32.const 65535)
)
(i32.const 32767)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 45)
(i32.const 2)
)
(unreachable)
)
)
(set_local $0
(i32.add
(tee_local $1
(get_local $0)
)
(i32.const 1)
)
)
(if
(i32.ne
(i32.and
(get_local $0)
(i32.const 65535)
)
(i32.const 32768)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 48)
(i32.const 2)
)
(unreachable)
)
)
(set_local $0
(i32.sub
(tee_local $1
(get_local $0)
)
(i32.const 1)
)
)
(if
(i32.ne
(i32.and
(get_local $0)
(i32.const 65535)
)
(i32.const 32767)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 51)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(i32.and
(tee_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(i32.const 65535)
)
(i32.const 32768)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 54)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(i32.and
(tee_local $0
(i32.sub
(get_local $0)
(i32.const 1)
)
)
(i32.const 65535)
)
(i32.const 32767)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 57)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(i32.and
(tee_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(i32.const 65535)
)
(i32.const 32768)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 60)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(i32.and
(tee_local $0
(i32.sub
(get_local $0)
(i32.const 1)
)
)
(i32.const 65535)
)
(i32.const 32767)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 63)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(i32.and
(i32.add
(get_local $0)
(i32.const 1)
)
(i32.const 65535)
)
(i32.const 32768)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 65)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(i32.and
(tee_local $0
(i32.const -1)
)
(i32.const 255)
)
(i32.const 255)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 74)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.and
(tee_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(i32.const 255)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 77)
(i32.const 2)
)
(unreachable)
)
)
(set_local $0
(i32.sub
(tee_local $1
(get_local $0)
)
(i32.const 1)
)
)
(if
(i32.ne
(i32.and
(get_local $0)
(i32.const 255)
)
(i32.const 255)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 80)
(i32.const 2)
)
(unreachable)
)
)
(set_local $0
(i32.add
(tee_local $1
(get_local $0)
)
(i32.const 1)
)
)
(if
(i32.and
(get_local $0)
(i32.const 255)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 83)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(i32.and
(tee_local $0
(i32.sub
(get_local $0)
(i32.const 1)
)
)
(i32.const 255)
)
(i32.const 255)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 86)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.and
(tee_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(i32.const 255)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 89)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(i32.and
(tee_local $0
(i32.sub
(get_local $0)
(i32.const 1)
)
)
(i32.const 255)
)
(i32.const 255)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 92)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.and
(tee_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(i32.const 255)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 95)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(i32.and
(i32.sub
(get_local $0)
(i32.const 1)
)
(i32.const 255)
)
(i32.const 255)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 97)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(i32.and
(tee_local $0
(i32.const -1)
)
(i32.const 65535)
)
(i32.const 65535)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 106)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.and
(tee_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(i32.const 65535)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 109)
(i32.const 2)
)
(unreachable)
)
)
(set_local $0
(i32.sub
(tee_local $1
(get_local $0)
)
(i32.const 1)
)
)
(if
(i32.ne
(i32.and
(get_local $0)
(i32.const 65535)
)
(i32.const 65535)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 112)
(i32.const 2)
)
(unreachable)
)
)
(set_local $0
(i32.add
(tee_local $1
(get_local $0)
)
(i32.const 1)
)
)
(if
(i32.and
(get_local $0)
(i32.const 65535)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 115)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(i32.and
(tee_local $0
(i32.sub
(get_local $0)
(i32.const 1)
)
)
(i32.const 65535)
)
(i32.const 65535)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 118)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.and
(tee_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(i32.const 65535)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 121)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(i32.and
(tee_local $0
(i32.sub
(get_local $0)
(i32.const 1)
)
)
(i32.const 65535)
)
(i32.const 65535)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 124)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.and
(tee_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(i32.const 65535)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 127)
(i32.const 2)
)
(unreachable)
)
)
(if
(i32.ne
(i32.and
(i32.sub
(get_local $0)
(i32.const 1)
)
(i32.const 65535)
)
(i32.const 65535)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 129)
(i32.const 2)
)
(unreachable)
)
)
)
)

File diff suppressed because it is too large Load Diff

View File

@ -14,13 +14,13 @@
(export "stringArrayArrayMethodCall" (func $std/array-access/stringArrayArrayMethodCall))
(export "memory" (memory $0))
(func $~lib/array/Array<Array<i32>>#__get (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(tee_local $0
(if (result i32)
(i32.lt_u
(get_local $1)
(i32.shr_u
(i32.load
(tee_local $2
(tee_local $0
(i32.load
(get_local $0)
)
@ -31,7 +31,7 @@
)
(i32.load offset=8
(i32.add
(get_local $2)
(get_local $0)
(i32.shl
(get_local $1)
(i32.const 2)
@ -41,6 +41,7 @@
(unreachable)
)
)
)
(func $std/array-access/i32ArrayArrayElementAccess (; 2 ;) (type $ii) (param $0 i32) (result i32)
(call $~lib/array/Array<Array<i32>>#__get
(call $~lib/array/Array<Array<i32>>#__get
@ -105,6 +106,7 @@
)
)
)
(tee_local $0
(if (result i32)
(get_local $2)
(i32.sub
@ -118,10 +120,10 @@
(i32.const 0)
)
)
)
(func $~lib/string/String#startsWith (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(if
(i32.eqz
(get_local $0)
@ -152,33 +154,31 @@
(get_local $1)
)
)
(tee_local $2
(tee_local $3
(select
(tee_local $2
(tee_local $3
(select
(get_local $2)
(i32.const 0)
(i32.gt_s
(get_local $2)
(get_local $3)
(i32.const 0)
)
)
)
(tee_local $3
(tee_local $5
(tee_local $2
(i32.load
(get_local $0)
)
)
)
(i32.lt_s
(get_local $2)
(get_local $3)
(get_local $2)
)
)
)
)
(get_local $5)
(get_local $2)
)
(return
(i32.const 0)
@ -192,7 +192,7 @@
(i32.const 4)
)
(i32.shl
(get_local $2)
(get_local $3)
(i32.const 1)
)
)

View File

@ -25,13 +25,13 @@
)
)
(func $~lib/array/Array<i32>#__get (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(tee_local $0
(if (result i32)
(i32.lt_u
(get_local $1)
(i32.shr_u
(i32.load
(tee_local $2
(tee_local $0
(i32.load
(get_local $0)
)
@ -42,7 +42,7 @@
)
(i32.load offset=8
(i32.add
(get_local $2)
(get_local $0)
(i32.shl
(get_local $1)
(i32.const 2)
@ -52,6 +52,7 @@
(unreachable)
)
)
)
(func $~lib/internal/arraybuffer/computeSize (; 3 ;) (type $ii) (param $0 i32) (result i32)
(i32.shl
(i32.const 1)
@ -70,7 +71,6 @@
(local $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(if
(get_local $0)
(block
@ -109,7 +109,6 @@
(grow_memory
(select
(get_local $2)
(tee_local $4
(tee_local $3
(i32.shr_u
(i32.and
@ -125,10 +124,9 @@
(i32.const 16)
)
)
)
(i32.gt_s
(get_local $2)
(get_local $4)
(get_local $3)
)
)
)
@ -185,8 +183,8 @@
(get_local $1)
)
(func $~lib/memory/set_memory (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i64)
(local $4 i32)
(local $3 i32)
(local $4 i64)
(if
(i32.eqz
(get_local $2)
@ -230,20 +228,19 @@
)
(i32.store8
(i32.sub
(tee_local $3
(i32.add
(get_local $0)
(get_local $2)
)
)
(i32.const 2)
)
(get_local $1)
)
(i32.store8
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(get_local $3)
(i32.const 3)
)
(get_local $1)
@ -279,11 +276,10 @@
)
(return)
)
(i32.store
(tee_local $0
(i32.add
(get_local $0)
(tee_local $4
(set_local $2
(i32.sub
(get_local $2)
(tee_local $3
(i32.and
(i32.sub
(i32.const 0)
@ -294,6 +290,13 @@
)
)
)
(i32.store
(tee_local $0
(i32.add
(get_local $0)
(get_local $3)
)
)
(tee_local $1
(i32.mul
(i32.and
@ -310,10 +313,7 @@
(get_local $0)
(tee_local $2
(i32.and
(i32.sub
(get_local $2)
(get_local $4)
)
(i32.const -4)
)
)
@ -345,20 +345,19 @@
)
(i32.store
(i32.sub
(tee_local $3
(i32.add
(get_local $0)
(get_local $2)
)
)
(i32.const 12)
)
(get_local $1)
)
(i32.store
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(get_local $3)
(i32.const 8)
)
(get_local $1)
@ -400,40 +399,33 @@
)
(i32.store
(i32.sub
(tee_local $3
(i32.add
(get_local $0)
(get_local $2)
)
)
(i32.const 28)
)
(get_local $1)
)
(i32.store
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(get_local $3)
(i32.const 24)
)
(get_local $1)
)
(i32.store
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(get_local $3)
(i32.const 20)
)
(get_local $1)
)
(i32.store
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(get_local $3)
(i32.const 16)
)
(get_local $1)
@ -441,7 +433,7 @@
(set_local $0
(i32.add
(get_local $0)
(tee_local $4
(tee_local $3
(i32.add
(i32.and
(get_local $0)
@ -455,18 +447,18 @@
(set_local $2
(i32.sub
(get_local $2)
(get_local $4)
(get_local $3)
)
)
(set_local $3
(set_local $4
(i64.or
(tee_local $4
(i64.extend_u/i32
(get_local $1)
)
)
(i64.shl
(i64.extend_u/i32
(get_local $1)
)
(get_local $4)
(i64.const 32)
)
)
@ -480,28 +472,28 @@
(block
(i64.store
(get_local $0)
(get_local $3)
(get_local $4)
)
(i64.store
(i32.add
(get_local $0)
(i32.const 8)
)
(get_local $3)
(get_local $4)
)
(i64.store
(i32.add
(get_local $0)
(i32.const 16)
)
(get_local $3)
(get_local $4)
)
(i64.store
(i32.add
(get_local $0)
(i32.const 24)
)
(get_local $3)
(get_local $4)
)
(set_local $2
(i32.sub
@ -548,11 +540,11 @@
)
)
)
(i32.store
(if (result i32)
(if
(i32.eqz
(get_local $0)
(get_local $0)
(block (result i32)
)
(block
(i32.store
(tee_local $0
(call $~lib/allocator/arena/allocate_memory
@ -565,9 +557,10 @@
(get_local $0)
(i32.const 0)
)
)
)
(i32.store
(get_local $0)
)
)
(get_local $2)
)
(i32.store offset=4
@ -700,8 +693,6 @@
(unreachable)
)
)
(set_global $std/array-literal/dynamicArray
(block (result i32)
(call $~lib/array/Array<i32>#__unchecked_set
(tee_local $0
(call $~lib/array/Array<i32>#constructor
@ -712,35 +703,31 @@
(i32.const 0)
(get_global $std/array-literal/i)
)
(call $~lib/array/Array<i32>#__unchecked_set
(get_local $0)
(i32.const 1)
(block (result i32)
(set_global $std/array-literal/i
(i32.add
(get_global $std/array-literal/i)
(i32.const 1)
)
)
(call $~lib/array/Array<i32>#__unchecked_set
(get_local $0)
(i32.const 1)
(get_global $std/array-literal/i)
)
(set_global $std/array-literal/i
(i32.add
(get_global $std/array-literal/i)
(i32.const 1)
)
)
(call $~lib/array/Array<i32>#__unchecked_set
(get_local $0)
(i32.const 2)
(block (result i32)
(set_global $std/array-literal/i
(i32.add
(get_global $std/array-literal/i)
(i32.const 1)
)
)
(get_global $std/array-literal/i)
)
)
(set_global $std/array-literal/dynamicArray
(get_local $0)
)
)
(if
(i32.ne
(call $~lib/array/Array<i32>#get:length

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -22,7 +22,6 @@
(local $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(if
(get_local $0)
(block
@ -61,7 +60,6 @@
(grow_memory
(select
(get_local $2)
(tee_local $4
(tee_local $3
(i32.shr_u
(i32.and
@ -77,10 +75,9 @@
(i32.const 16)
)
)
)
(i32.gt_s
(get_local $2)
(get_local $4)
(get_local $3)
)
)
)
@ -117,40 +114,36 @@
)
)
(func $std/constructor/EmptyCtorWithFieldInit#constructor (; 2 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(if (result i32)
(if
(i32.eqz
(get_local $0)
(get_local $0)
(block (result i32)
)
(i32.store
(tee_local $1
(tee_local $0
(call $~lib/allocator/arena/allocate_memory
(i32.const 4)
)
)
(i32.const 1)
)
(get_local $1)
)
)
(get_local $0)
)
(func $std/constructor/EmptyCtorWithFieldNoInit#constructor (; 3 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(if (result i32)
(if
(i32.eqz
(get_local $0)
(get_local $0)
(block (result i32)
)
(i32.store
(tee_local $1
(tee_local $0
(call $~lib/allocator/arena/allocate_memory
(i32.const 4)
)
)
(i32.const 0)
)
(get_local $1)
)
)
(get_local $0)
)
(func $std/constructor/CtorReturns#constructor (; 4 ;) (type $ii) (param $0 i32) (result i32)
(call $~lib/allocator/arena/allocate_memory
@ -188,14 +181,18 @@
)
)
)
(if (result i32)
(get_local $0)
(if
(i32.eqz
(get_local $0)
)
(set_local $0
(call $~lib/allocator/arena/allocate_memory
(i32.const 0)
)
)
)
(get_local $0)
)
(func $start (; 7 ;) (type $v)
(local $0 i32)
(set_global $~lib/allocator/arena/startOffset
@ -230,8 +227,6 @@
(i32.const 0)
)
)
(set_global $std/constructor/justFieldInit
(block (result i32)
(i32.store
(tee_local $0
(call $~lib/allocator/arena/allocate_memory
@ -240,11 +235,9 @@
)
(i32.const 1)
)
(set_global $std/constructor/justFieldInit
(get_local $0)
)
)
(set_global $std/constructor/justFieldNoInit
(block (result i32)
(i32.store
(tee_local $0
(call $~lib/allocator/arena/allocate_memory
@ -253,9 +246,9 @@
)
(i32.const 0)
)
(set_global $std/constructor/justFieldNoInit
(get_local $0)
)
)
(set_global $std/constructor/ctorReturns
(call $std/constructor/CtorReturns#constructor
(i32.const 0)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -28,6 +28,7 @@
(local $5 i64)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(block $folding-inner0
(set_local $3
(i32.wrap/i64
@ -59,9 +60,16 @@
)
)
)
(set_local $8
(i32.wrap/i64
(i64.shr_u
(get_local $2)
(i64.const 63)
)
)
)
(if
(if (result i32)
(if (result i32)
(i32.eqz
(tee_local $7
(i64.eq
(i64.shl
@ -71,29 +79,35 @@
(i64.const 0)
)
)
(get_local $7)
(tee_local $7
)
(set_local $7
(call $isNaN<f64>
(get_local $1)
)
)
)
(if
(i32.eqz
(get_local $7)
)
(set_local $7
(i32.eq
(get_local $3)
(i32.const 2047)
)
)
)
(if
(get_local $7)
(return
(f64.div
(tee_local $0
(f64.mul
(get_local $0)
(get_local $1)
)
(f64.mul
(get_local $0)
(get_local $1)
)
(get_local $0)
)
)
)
@ -126,14 +140,6 @@
)
)
)
(set_local $7
(i32.wrap/i64
(i64.shr_u
(get_local $2)
(i64.const 63)
)
)
)
(set_local $2
(if (result i64)
(get_local $3)
@ -346,7 +352,11 @@
(f64.reinterpret/i64
(i64.or
(tee_local $2
(select
(if (result i64)
(i32.gt_s
(get_local $3)
(i32.const 0)
)
(i64.or
(i64.sub
(get_local $2)
@ -368,15 +378,11 @@
)
)
)
(i32.gt_s
(get_local $3)
(i32.const 0)
)
)
)
(i64.shl
(i64.extend_u/i32
(get_local $7)
(get_local $8)
)
(i64.const 63)
)
@ -425,7 +431,7 @@
)
(func $std/mod/test_fmod (; 5 ;) (type $FFFi) (param $0 f64) (param $1 f64) (param $2 f64) (result i32)
(local $3 i32)
(if (result i32)
(if
(tee_local $3
(call $std/mod/check<f64>
(call $~lib/math/NativeMath.mod
@ -435,21 +441,19 @@
(get_local $2)
)
)
(if (result i32)
(tee_local $3
(i32.const 0)
)
(get_local $3)
(set_local $3
(call $std/mod/check<f64>
(tee_local $0
(call $std/mod/JSOp.mod
(get_local $0)
(get_local $1)
)
)
(get_local $2)
)
)
(get_local $3)
)
(get_local $3)
)
(func $isNaN<f32> (; 6 ;) (type $fi) (param $0 f32) (result i32)
(f32.ne
@ -491,9 +495,14 @@
(i32.const 255)
)
)
(set_local $7
(i32.and
(get_local $2)
(i32.const -2147483648)
)
)
(if
(if (result i32)
(if (result i32)
(i32.eqz
(tee_local $3
(i32.eqz
(i32.shl
@ -502,29 +511,35 @@
)
)
)
(get_local $3)
(tee_local $3
)
(set_local $3
(call $isNaN<f32>
(get_local $1)
)
)
)
(if
(i32.eqz
(get_local $3)
)
(set_local $3
(i32.eq
(get_local $4)
(i32.const 255)
)
)
)
(if
(get_local $3)
(return
(f32.div
(tee_local $0
(f32.mul
(get_local $0)
(get_local $1)
)
(f32.mul
(get_local $0)
(get_local $1)
)
(get_local $0)
)
)
)
@ -557,12 +572,6 @@
)
)
)
(set_local $7
(i32.and
(get_local $2)
(i32.const -2147483648)
)
)
(set_local $2
(if (result i32)
(get_local $4)
@ -759,7 +768,11 @@
(f32.reinterpret/i32
(i32.or
(tee_local $2
(select
(if (result i32)
(i32.gt_s
(get_local $4)
(i32.const 0)
)
(i32.or
(i32.sub
(get_local $2)
@ -777,10 +790,6 @@
(get_local $4)
)
)
(i32.gt_s
(get_local $4)
(i32.const 0)
)
)
)
(get_local $7)

View File

@ -13,7 +13,6 @@
(local $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(if
(get_local $0)
(block
@ -52,7 +51,6 @@
(grow_memory
(select
(get_local $2)
(tee_local $4
(tee_local $3
(i32.shr_u
(i32.and
@ -68,10 +66,9 @@
(i32.const 16)
)
)
)
(i32.gt_s
(get_local $2)
(get_local $4)
(get_local $3)
)
)
)
@ -100,16 +97,15 @@
)
(func $std/new/AClass#constructor (; 1 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32)
(local $2 i32)
(i32.store
(get_local $0)
(i32.add
(i32.load
(if (result i32)
(get_local $0)
(get_local $0)
(block (result i32)
(i32.store
(if
(i32.eqz
(tee_local $2
(get_local $0)
)
)
(block
(i32.store
(tee_local $0
(call $~lib/allocator/arena/allocate_memory
(i32.const 8)
)
@ -117,14 +113,16 @@
(i32.const 1)
)
(f32.store offset=4
(get_local $2)
(get_local $0)
(f32.const 2)
)
(tee_local $0
)
)
(i32.store
(get_local $2)
)
)
)
(i32.add
(i32.load
(get_local $0)
)
(i32.const 1)
)

File diff suppressed because it is too large Load Diff

View File

@ -13,14 +13,18 @@
(local $1 i32)
(if
(i32.eqz
(if (result i32)
(tee_local $1
(i32.const 1)
)
(get_local $1)
)
(set_local $1
(i32.const 0)
)
)
(if
(i32.eqz
(get_local $1)
)
(block
(call $~lib/env/abort
(i32.const 0)
@ -32,13 +36,9 @@
)
)
(if
(if (result i32)
(tee_local $1
(i32.const 1)
)
(get_local $1)
(i32.const 0)
)
(return
(i32.or
(i32.or
@ -70,20 +70,26 @@
(local $1 i32)
(if
(i32.eqz
(if (result i32)
(if (result i32)
(tee_local $1
(i32.const 1)
)
(get_local $1)
(tee_local $1
)
(set_local $1
(i32.const 0)
)
)
(if
(i32.eqz
(get_local $1)
)
(set_local $1
(i32.const 0)
)
)
(if
(i32.eqz
(get_local $1)
)
(block
(call $~lib/env/abort
(i32.const 0)
@ -102,14 +108,18 @@
(local $1 i32)
(if
(i32.eqz
(if (result i32)
(tee_local $1
(i32.const 1)
)
(get_local $1)
)
(set_local $1
(i32.const 0)
)
)
(if
(i32.eqz
(get_local $1)
)
(block
(call $~lib/env/abort
(i32.const 0)
@ -121,13 +131,9 @@
)
)
(if
(if (result i32)
(tee_local $1
(i32.const 1)
)
(get_local $1)
(i32.const 0)
)
(return
(i32.or
(i32.or
@ -162,20 +168,26 @@
(local $1 i32)
(if
(i32.eqz
(if (result i32)
(if (result i32)
(tee_local $1
(i32.const 1)
)
(get_local $1)
(tee_local $1
)
(set_local $1
(i32.const 0)
)
)
(if
(i32.eqz
(get_local $1)
)
(set_local $1
(i32.const 0)
)
)
(if
(i32.eqz
(get_local $1)
)
(block
(call $~lib/env/abort
(i32.const 0)
@ -194,14 +206,18 @@
(local $1 i32)
(if
(i32.eqz
(if (result i32)
(tee_local $1
(i32.const 1)
)
(get_local $1)
)
(set_local $1
(i32.const 0)
)
)
(if
(i32.eqz
(get_local $1)
)
(block
(call $~lib/env/abort
(i32.const 0)
@ -230,21 +246,6 @@
)
)
(func $~lib/polyfills/bswap<u64> (; 6 ;) (type $II) (param $0 i64) (result i64)
(local $1 i32)
(if
(i32.eqz
(i32.const 1)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 2)
(i32.const 2)
)
(unreachable)
)
)
(i64.rotr
(i64.or
(i64.and
@ -283,22 +284,6 @@
)
)
(func $~lib/polyfills/bswap16<u32> (; 7 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(if
(i32.eqz
(i32.const 1)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 27)
(i32.const 2)
)
(unreachable)
)
)
(return
(i32.or
(i32.or
(i32.and
@ -322,24 +307,7 @@
)
)
)
)
(func $~lib/polyfills/bswap16<i32> (; 8 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(if
(i32.eqz
(i32.const 1)
)
(block
(call $~lib/env/abort
(i32.const 0)
(i32.const 8)
(i32.const 27)
(i32.const 2)
)
(unreachable)
)
)
(return
(i32.or
(i32.or
(i32.and
@ -363,7 +331,6 @@
)
)
)
)
(func $start (; 9 ;) (type $v)
(if
(i32.ne

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -80,9 +80,8 @@
(i32.const 1)
)
)
(if (result i32)
(if (result i32)
(if (result i32)
(block (result i32)
(if
(tee_local $3
(i32.eq
(i32.and
@ -92,7 +91,7 @@
(i32.const 55296)
)
)
(tee_local $3
(set_local $3
(i32.lt_u
(i32.add
(get_local $2)
@ -101,8 +100,10 @@
(get_local $4)
)
)
(get_local $3)
)
(if
(get_local $3)
(set_local $3
(i32.eq
(i32.and
(i32.load16_u offset=4
@ -121,8 +122,10 @@
)
(i32.const 56320)
)
(get_local $3)
)
)
(if (result i32)
(get_local $3)
(block (result i32)
(set_local $1
(i32.add
@ -151,6 +154,7 @@
)
)
)
)
(br $continue|0)
)
)
@ -161,7 +165,6 @@
(local $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(if
(get_local $0)
(block
@ -200,7 +203,6 @@
(grow_memory
(select
(get_local $2)
(tee_local $4
(tee_local $3
(i32.shr_u
(i32.and
@ -216,10 +218,9 @@
(i32.const 16)
)
)
)
(i32.gt_s
(get_local $2)
(get_local $4)
(get_local $3)
)
)
)
@ -349,7 +350,6 @@
)
)
(if
(if (result i32)
(tee_local $6
(i32.eq
(i32.and
@ -359,6 +359,7 @@
(i32.const 55296)
)
)
(set_local $6
(i32.lt_u
(i32.add
(get_local $3)
@ -366,8 +367,10 @@
)
(get_local $7)
)
(get_local $6)
)
)
(if
(get_local $6)
(if
(i32.eq
(i32.and

File diff suppressed because it is too large Load Diff

View File

@ -36,7 +36,6 @@
(local $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(if
(get_local $0)
(block
@ -75,7 +74,6 @@
(grow_memory
(select
(get_local $2)
(tee_local $4
(tee_local $3
(i32.shr_u
(i32.and
@ -91,10 +89,9 @@
(i32.const 16)
)
)
)
(i32.gt_s
(get_local $2)
(get_local $4)
(get_local $3)
)
)
)
@ -151,8 +148,8 @@
(get_local $1)
)
(func $~lib/memory/set_memory (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i64)
(local $4 i32)
(local $3 i32)
(local $4 i64)
(if
(i32.eqz
(get_local $2)
@ -196,20 +193,19 @@
)
(i32.store8
(i32.sub
(tee_local $3
(i32.add
(get_local $0)
(get_local $2)
)
)
(i32.const 2)
)
(get_local $1)
)
(i32.store8
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(get_local $3)
(i32.const 3)
)
(get_local $1)
@ -245,11 +241,10 @@
)
(return)
)
(i32.store
(tee_local $0
(i32.add
(get_local $0)
(tee_local $4
(set_local $2
(i32.sub
(get_local $2)
(tee_local $3
(i32.and
(i32.sub
(i32.const 0)
@ -260,6 +255,13 @@
)
)
)
(i32.store
(tee_local $0
(i32.add
(get_local $0)
(get_local $3)
)
)
(tee_local $1
(i32.mul
(i32.and
@ -276,10 +278,7 @@
(get_local $0)
(tee_local $2
(i32.and
(i32.sub
(get_local $2)
(get_local $4)
)
(i32.const -4)
)
)
@ -311,20 +310,19 @@
)
(i32.store
(i32.sub
(tee_local $3
(i32.add
(get_local $0)
(get_local $2)
)
)
(i32.const 12)
)
(get_local $1)
)
(i32.store
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(get_local $3)
(i32.const 8)
)
(get_local $1)
@ -366,40 +364,33 @@
)
(i32.store
(i32.sub
(tee_local $3
(i32.add
(get_local $0)
(get_local $2)
)
)
(i32.const 28)
)
(get_local $1)
)
(i32.store
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(get_local $3)
(i32.const 24)
)
(get_local $1)
)
(i32.store
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(get_local $3)
(i32.const 20)
)
(get_local $1)
)
(i32.store
(i32.sub
(i32.add
(get_local $0)
(get_local $2)
)
(get_local $3)
(i32.const 16)
)
(get_local $1)
@ -407,7 +398,7 @@
(set_local $0
(i32.add
(get_local $0)
(tee_local $4
(tee_local $3
(i32.add
(i32.and
(get_local $0)
@ -421,18 +412,18 @@
(set_local $2
(i32.sub
(get_local $2)
(get_local $4)
(get_local $3)
)
)
(set_local $3
(set_local $4
(i64.or
(tee_local $4
(i64.extend_u/i32
(get_local $1)
)
)
(i64.shl
(i64.extend_u/i32
(get_local $1)
)
(get_local $4)
(i64.const 32)
)
)
@ -446,28 +437,28 @@
(block
(i64.store
(get_local $0)
(get_local $3)
(get_local $4)
)
(i64.store
(i32.add
(get_local $0)
(i32.const 8)
)
(get_local $3)
(get_local $4)
)
(i64.store
(i32.add
(get_local $0)
(i32.const 16)
)
(get_local $3)
(get_local $4)
)
(i64.store
(i32.add
(get_local $0)
(i32.const 24)
)
(get_local $3)
(get_local $4)
)
(set_local $2
(i32.sub
@ -488,7 +479,6 @@
)
(func $~lib/internal/typedarray/TypedArray<i8,i32>#constructor (; 5 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
(if
(i32.gt_u
(get_local $1)
@ -506,23 +496,21 @@
)
(call $~lib/memory/set_memory
(i32.add
(tee_local $3
(call $~lib/internal/arraybuffer/allocUnsafe
(tee_local $2
(call $~lib/internal/arraybuffer/allocUnsafe
(get_local $1)
)
)
)
(i32.const 8)
)
(i32.const 0)
(get_local $1)
)
(i32.store
(if (result i32)
(if
(i32.eqz
(get_local $0)
(get_local $0)
(block (result i32)
)
(block
(i32.store
(tee_local $0
(call $~lib/allocator/arena/allocate_memory
@ -539,10 +527,11 @@
(get_local $0)
(i32.const 0)
)
)
)
(i32.store
(get_local $0)
)
)
(get_local $3)
(get_local $2)
)
(i32.store offset=4
(get_local $0)
@ -550,7 +539,7 @@
)
(i32.store offset=8
(get_local $0)
(get_local $2)
(get_local $1)
)
(get_local $0)
)
@ -598,11 +587,11 @@
(i32.const 0)
(get_local $1)
)
(i32.store
(if (result i32)
(if
(i32.eqz
(get_local $0)
(get_local $0)
(block (result i32)
)
(block
(i32.store
(tee_local $0
(call $~lib/allocator/arena/allocate_memory
@ -619,9 +608,10 @@
(get_local $0)
(i32.const 0)
)
)
)
(i32.store
(get_local $0)
)
)
(get_local $2)
)
(i32.store offset=4
@ -681,11 +671,11 @@
(i32.const 0)
(get_local $1)
)
(i32.store
(if (result i32)
(if
(i32.eqz
(get_local $0)
(get_local $0)
(block (result i32)
)
(block
(i32.store
(tee_local $0
(call $~lib/allocator/arena/allocate_memory
@ -702,9 +692,10 @@
(get_local $0)
(i32.const 0)
)
)
)
(i32.store
(get_local $0)
)
)
(get_local $2)
)
(i32.store offset=4
@ -764,11 +755,11 @@
(i32.const 0)
(get_local $1)
)
(i32.store
(if (result i32)
(if
(i32.eqz
(get_local $0)
(get_local $0)
(block (result i32)
)
(block
(i32.store
(tee_local $0
(call $~lib/allocator/arena/allocate_memory
@ -785,9 +776,10 @@
(get_local $0)
(i32.const 0)
)
)
)
(i32.store
(get_local $0)
)
)
(get_local $2)
)
(i32.store offset=4
@ -1497,6 +1489,7 @@
(unreachable)
)
)
(tee_local $0
(i32.load offset=8
(i32.add
(i32.add
@ -1512,9 +1505,11 @@
)
)
)
)
(func $~lib/typedarray/Int32Array#subarray (; 16 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(block $~lib/internal/typedarray/TypedArray<i32,i32>#subarray|inlined.0
(set_local $4
(call $~lib/internal/typedarray/TypedArray<i32,i32>#get:length
(get_local $0)
@ -1533,24 +1528,20 @@
(get_local $1)
)
)
(tee_local $1
(i32.const 0)
)
(i32.gt_s
(get_local $3)
(get_local $1)
(i32.const 0)
)
)
(select
(tee_local $3
(get_local $1)
)
(tee_local $1
(get_local $4)
)
(i32.lt_s
(get_local $3)
(get_local $1)
(get_local $4)
)
)
)
@ -1577,12 +1568,10 @@
(select
(tee_local $3
(select
(tee_local $3
(get_local $2)
)
(get_local $4)
(i32.lt_s
(get_local $3)
(get_local $2)
(get_local $4)
)
)
@ -1619,6 +1608,7 @@
(i32.const 2)
)
)
)
(get_local $3)
)
(func $~lib/internal/typedarray/TypedArray<u8,u32>#__set (; 17 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
@ -1661,28 +1651,25 @@
)
)
(func $~lib/typedarray/Uint8ClampedArray#__set (; 18 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32)
(call $~lib/internal/typedarray/TypedArray<u8,u32>#__set
(get_local $0)
(get_local $1)
(select
(tee_local $2
(tee_local $3
(select
(get_local $2)
(tee_local $0
(i32.const 255)
)
(i32.lt_s
(get_local $2)
(get_local $0)
(i32.const 255)
)
)
)
(tee_local $0
(i32.const 0)
)
(i32.gt_s
(get_local $2)
(get_local $0)
(get_local $3)
(i32.const 0)
)
)
)
@ -1713,6 +1700,7 @@
(unreachable)
)
)
(tee_local $0
(i32.load8_u offset=8
(i32.add
(i32.add
@ -1725,6 +1713,7 @@
)
)
)
)
(func $start (; 20 ;) (type $v)
(set_global $~lib/allocator/arena/startOffset
(i32.and

View File

@ -13,29 +13,29 @@
(block $case2|0
(if
(i32.ne
(tee_local $1
(get_local $0)
)
(i32.const 1)
)
(block
(br_if $case2|0
(i32.eqz
(get_local $1)
(tee_local $1
(get_local $0)
)
)
)
(br_if $case4|0
(i32.or
(i32.eq
(get_local $1)
(i32.const 2)
)
)
(br_if $case4|0
(i32.eq
(get_local $1)
(i32.const 3)
)
)
)
(br $case2|0)
)
)
@ -55,24 +55,24 @@
(block $case2|0
(if
(i32.ne
(tee_local $1
(get_local $0)
)
(i32.const 1)
)
(block
(br_if $case2|0
(i32.or
(i32.eq
(get_local $1)
(tee_local $1
(get_local $0)
)
(i32.const 2)
)
)
(br_if $case2|0
(i32.eq
(get_local $1)
(i32.const 3)
)
)
)
(br $break|0)
)
)
@ -87,6 +87,36 @@
(i32.const 0)
)
(func $switch/doSwitchBreakCase (; 3 ;) (type $ii) (param $0 i32) (result i32)
(block $break|0
(br_if $break|0
(i32.eq
(get_local $0)
(i32.const 1)
)
)
(return
(i32.const 2)
)
)
(i32.const 1)
)
(func $switch/doSwitchBreakDefault (; 4 ;) (type $ii) (param $0 i32) (result i32)
(block $break|0
(block $case1|0
(br_if $break|0
(i32.ne
(get_local $0)
(i32.const 1)
)
)
(return
(i32.const 1)
)
)
)
(i32.const 2)
)
(func $switch/doSwitchFallThroughCase (; 5 ;) (type $ii) (param $0 i32) (result i32)
(if
(i32.ne
(get_local $0)
@ -98,7 +128,7 @@
)
(i32.const 1)
)
(func $switch/doSwitchBreakDefault (; 4 ;) (type $ii) (param $0 i32) (result i32)
(func $switch/doSwitchFallThroughDefault (; 6 ;) (type $ii) (param $0 i32) (result i32)
(if
(i32.eq
(get_local $0)
@ -110,10 +140,10 @@
)
(i32.const 2)
)
(func $switch/doSwitchEmpty (; 5 ;) (type $ii) (param $0 i32) (result i32)
(func $switch/doSwitchEmpty (; 7 ;) (type $ii) (param $0 i32) (result i32)
(i32.const 2)
)
(func $start (; 6 ;) (type $v)
(func $start (; 8 ;) (type $v)
(if
(call $switch/doSwitch
(i32.const 0)
@ -455,7 +485,7 @@
)
(if
(i32.ne
(call $switch/doSwitchBreakCase
(call $switch/doSwitchFallThroughCase
(i32.const 0)
)
(i32.const 2)
@ -472,7 +502,7 @@
)
(if
(i32.ne
(call $switch/doSwitchBreakCase
(call $switch/doSwitchFallThroughCase
(i32.const 1)
)
(i32.const 1)
@ -489,7 +519,7 @@
)
(if
(i32.ne
(call $switch/doSwitchBreakCase
(call $switch/doSwitchFallThroughCase
(i32.const 2)
)
(i32.const 2)
@ -506,7 +536,7 @@
)
(if
(i32.ne
(call $switch/doSwitchBreakDefault
(call $switch/doSwitchFallThroughDefault
(i32.const 0)
)
(i32.const 2)
@ -523,7 +553,7 @@
)
(if
(i32.ne
(call $switch/doSwitchBreakDefault
(call $switch/doSwitchFallThroughDefault
(i32.const 1)
)
(i32.const 1)
@ -540,7 +570,7 @@
)
(if
(i32.ne
(call $switch/doSwitchBreakDefault
(call $switch/doSwitchFallThroughDefault
(i32.const 2)
)
(i32.const 2)

View File

@ -65,30 +65,18 @@
(i32.const -1)
)
)
(set_global $unary/i
(block (result i32)
(set_global $unary/i
(i32.add
(get_global $unary/i)
(i32.const 1)
)
)
(get_global $unary/i)
)
)
(set_global $unary/i
(block (result i32)
(set_global $unary/i
(i32.sub
(get_global $unary/i)
(i32.const 1)
)
)
(get_global $unary/i)
)
)
(set_global $unary/i
(block (result i32)
(set_global $unary/i
(i32.add
(tee_local $0
@ -97,11 +85,9 @@
(i32.const 1)
)
)
(set_global $unary/i
(get_local $0)
)
)
(set_global $unary/i
(block (result i32)
(set_global $unary/i
(i32.sub
(tee_local $0
@ -110,9 +96,9 @@
(i32.const 1)
)
)
(set_global $unary/i
(get_local $0)
)
)
(set_global $unary/I
(i64.add
(get_global $unary/I)
@ -168,30 +154,18 @@
(i64.const -1)
)
)
(set_global $unary/I
(block (result i64)
(set_global $unary/I
(i64.add
(get_global $unary/I)
(i64.const 1)
)
)
(get_global $unary/I)
)
)
(set_global $unary/I
(block (result i64)
(set_global $unary/I
(i64.sub
(get_global $unary/I)
(i64.const 1)
)
)
(get_global $unary/I)
)
)
(set_global $unary/I
(block (result i64)
(set_global $unary/I
(i64.add
(tee_local $1
@ -200,11 +174,9 @@
(i64.const 1)
)
)
(set_global $unary/I
(get_local $1)
)
)
(set_global $unary/I
(block (result i64)
(set_global $unary/I
(i64.sub
(tee_local $1
@ -213,9 +185,9 @@
(i64.const 1)
)
)
(set_global $unary/I
(get_local $1)
)
)
(set_global $unary/f
(f32.add
(get_global $unary/f)
@ -260,30 +232,18 @@
(f32.const 0)
)
)
(set_global $unary/f
(block (result f32)
(set_global $unary/f
(f32.add
(get_global $unary/f)
(f32.const 1)
)
)
(get_global $unary/f)
)
)
(set_global $unary/f
(block (result f32)
(set_global $unary/f
(f32.sub
(get_global $unary/f)
(f32.const 1)
)
)
(get_global $unary/f)
)
)
(set_global $unary/f
(block (result f32)
(set_global $unary/f
(f32.add
(tee_local $2
@ -292,11 +252,9 @@
(f32.const 1)
)
)
(set_global $unary/f
(get_local $2)
)
)
(set_global $unary/f
(block (result f32)
(set_global $unary/f
(f32.sub
(tee_local $2
@ -305,9 +263,9 @@
(f32.const 1)
)
)
(set_global $unary/f
(get_local $2)
)
)
(set_global $unary/F
(f64.add
(get_global $unary/F)
@ -354,30 +312,18 @@
)
)
)
(set_global $unary/F
(block (result f64)
(set_global $unary/F
(f64.add
(get_global $unary/F)
(f64.const 1)
)
)
(get_global $unary/F)
)
)
(set_global $unary/F
(block (result f64)
(set_global $unary/F
(f64.sub
(get_global $unary/F)
(f64.const 1)
)
)
(get_global $unary/F)
)
)
(set_global $unary/F
(block (result f64)
(set_global $unary/F
(f64.add
(tee_local $3
@ -386,11 +332,9 @@
(f64.const 1)
)
)
(set_global $unary/F
(get_local $3)
)
)
(set_global $unary/F
(block (result f64)
(set_global $unary/F
(f64.sub
(tee_local $3
@ -399,8 +343,8 @@
(f64.const 1)
)
)
(set_global $unary/F
(get_local $3)
)
)
)
)

View File

@ -180,9 +180,6 @@
(i32.const 0)
)
(loop $continue|3
(br_if $continue|3
(if (result i32)
(block (result i32)
(set_global $while/n
(i32.sub
(tee_local $0
@ -191,20 +188,23 @@
(i32.const 1)
)
)
(if
(get_local $0)
)
(block (result i32)
(block
(set_global $while/m
(i32.add
(get_global $while/m)
(i32.const 1)
)
)
(set_local $0
(get_global $while/m)
)
(get_local $0)
)
)
(br_if $continue|3
(get_local $0)
)
)
(if
(i32.ne