From 041db06a0f808f62fcc0e11598f8ca55c366f0b5 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 31 Oct 2020 02:49:43 +0200 Subject: [PATCH 1/8] update --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index e39fc37819..83a41ae08f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -713,9 +713,9 @@ "optional": true }, "binaryen": { - "version": "98.0.0-nightly.20201030", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-98.0.0-nightly.20201030.tgz", - "integrity": "sha512-84r0ByOUNmydprOZ43adZyjvLQkPoYMTdzEZdxYC5tnD6cURv1BOj9Ue7eOin3huVCrqTqpaZ2M/wuTETyihNg==" + "version": "98.0.0-nightly.20201031", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-98.0.0-nightly.20201031.tgz", + "integrity": "sha512-4rV7iDHH9EgTOz8maFhs8eeYQ+qr3lKK44FuIeXhDXcdveMlQJ6CXGQbjRjgtwROLfQ5wOeTdfTb8kiv/XfLjA==" }, "bluebird": { "version": "3.7.2", diff --git a/package.json b/package.json index ce408da6a3..0177bfeffb 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "98.0.0-nightly.20201030", + "binaryen": "98.0.0-nightly.20201031", "long": "^4.0.0", "source-map-support": "^0.5.19", "ts-node": "^6.2.0" From 37fba637f2998c2659fdbf1213c0093d4e372a80 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 31 Oct 2020 02:50:01 +0200 Subject: [PATCH 2/8] update --- tests/compiler/assert-nonnull.optimized.wat | 8 +- tests/compiler/call-super.optimized.wat | 4 +- tests/compiler/class-implements.optimized.wat | 4 +- .../compiler/class-overloading.optimized.wat | 4 +- tests/compiler/class.optimized.wat | 4 +- tests/compiler/comma.optimized.wat | 4 +- tests/compiler/constructor.optimized.wat | 4 +- tests/compiler/do.optimized.wat | 8 +- tests/compiler/empty.optimized.wat | 12 +- tests/compiler/exports.optimized.wat | 4 +- .../exportstar-rereexport.optimized.wat | 4 +- .../extends-baseaggregate.optimized.wat | 12 +- .../field-initialization.optimized.wat | 4 +- tests/compiler/for.optimized.wat | 8 +- tests/compiler/function-call.optimized.wat | 8 +- .../function-expression.optimized.wat | 8 +- tests/compiler/getter-call.optimized.wat | 4 +- tests/compiler/heap.optimized.wat | 12 +- .../implicit-getter-setter.optimized.wat | 12 +- tests/compiler/infer-array.optimized.wat | 12 +- tests/compiler/inlining.optimized.wat | 4 +- tests/compiler/instanceof-class.optimized.wat | 4 +- tests/compiler/issues/1095.optimized.wat | 8 +- tests/compiler/issues/1225.optimized.wat | 8 +- tests/compiler/logical.optimized.wat | 8 +- tests/compiler/managed-cast.optimized.wat | 8 +- tests/compiler/new.optimized.wat | 4 +- tests/compiler/number.optimized.wat | 24 +- tests/compiler/object-literal.optimized.wat | 16 +- .../optional-typeparameters.optimized.wat | 4 +- tests/compiler/rc/local-init.optimized.wat | 8 +- .../rc/logical-and-mismatch.optimized.wat | 8 +- .../rc/logical-or-mismatch.optimized.wat | 8 +- tests/compiler/rc/optimize.optimized.wat | 8 +- tests/compiler/rc/rereturn.optimized.wat | 12 +- .../rc/ternary-mismatch.optimized.wat | 8 +- tests/compiler/reexport.optimized.wat | 4 +- tests/compiler/rereexport.optimized.wat | 4 +- tests/compiler/resolve-access.optimized.wat | 8 +- tests/compiler/resolve-binary.optimized.wat | 24 +- .../resolve-elementaccess.optimized.wat | 28 +- .../resolve-function-expression.optimized.wat | 4 +- tests/compiler/resolve-nested.optimized.wat | 4 +- tests/compiler/resolve-new.optimized.wat | 4 +- .../resolve-propertyaccess.optimized.wat | 4 +- tests/compiler/resolve-ternary.optimized.wat | 32 +- tests/compiler/resolve-unary.optimized.wat | 4 +- .../retain-release-sanity.optimized.wat | 16 +- tests/compiler/retain-release.optimized.wat | 4 +- tests/compiler/retain-return.optimized.wat | 8 +- tests/compiler/rt/finalize.optimized.wat | 12 +- tests/compiler/rt/instanceof.optimized.wat | 4 +- tests/compiler/rt/stub-realloc.optimized.wat | 8 +- tests/compiler/runtime-full.optimized.wat | 12 +- tests/compiler/runtime-stub.optimized.wat | 8 +- tests/compiler/std/array-access.optimized.wat | 19 +- .../compiler/std/array-literal.optimized.wat | 8 +- tests/compiler/std/array.optimized.wat | 272 ++++----- tests/compiler/std/arraybuffer.optimized.wat | 24 +- tests/compiler/std/dataview.optimized.wat | 102 ++-- tests/compiler/std/date.optimized.wat | 8 +- tests/compiler/std/map.optimized.wat | 72 +-- tests/compiler/std/math.optimized.wat | 321 +++++----- tests/compiler/std/mod.optimized.wat | 8 +- tests/compiler/std/new.optimized.wat | 8 +- .../std/operator-overloading.optimized.wat | 4 +- tests/compiler/std/set.optimized.wat | 76 +-- tests/compiler/std/static-array.optimized.wat | 32 +- tests/compiler/std/staticarray.optimized.wat | 12 +- .../std/string-casemapping.optimized.wat | 28 +- .../std/string-encoding.optimized.wat | 20 +- tests/compiler/std/string.optimized.wat | 248 ++++---- tests/compiler/std/symbol.optimized.wat | 4 +- tests/compiler/std/typedarray.optimized.wat | 561 ++++++++---------- tests/compiler/super-inline.optimized.wat | 4 +- tests/compiler/typeof.optimized.wat | 8 +- tests/compiler/wasi/abort.optimized.wat | 4 +- tests/compiler/wasi/seed.optimized.wat | 4 +- tests/compiler/wasi/trace.optimized.wat | 24 +- tests/compiler/while.optimized.wat | 8 +- 80 files changed, 1124 insertions(+), 1227 deletions(-) diff --git a/tests/compiler/assert-nonnull.optimized.wat b/tests/compiler/assert-nonnull.optimized.wat index 4fd2524864..6930d328e0 100644 --- a/tests/compiler/assert-nonnull.optimized.wat +++ b/tests/compiler/assert-nonnull.optimized.wat @@ -76,10 +76,10 @@ call $~lib/builtins/abort unreachable end - i32.const 0 local.get $0 i32.load offset=12 - i32.ge_u + i32.const 0 + i32.le_u if i32.const 1184 i32.const 1248 @@ -104,10 +104,10 @@ local.get $0 ) (func $~lib/array/Array#__get (param $0 i32) (result i32) - i32.const 0 local.get $0 i32.load offset=12 - i32.ge_u + i32.const 0 + i32.le_u if i32.const 1184 i32.const 1248 diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index c02f429ea5..230c6c2fc8 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -67,9 +67,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/class-implements.optimized.wat b/tests/compiler/class-implements.optimized.wat index d3b1b7cc93..0a233d116e 100644 --- a/tests/compiler/class-implements.optimized.wat +++ b/tests/compiler/class-implements.optimized.wat @@ -49,9 +49,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $4 local.get $2 - i32.gt_s + local.get $4 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/class-overloading.optimized.wat b/tests/compiler/class-overloading.optimized.wat index 52ec50b398..edd979249f 100644 --- a/tests/compiler/class-overloading.optimized.wat +++ b/tests/compiler/class-overloading.optimized.wat @@ -59,9 +59,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $4 local.get $2 - i32.gt_s + local.get $4 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index 37a8bba3ec..90081c45c6 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -90,9 +90,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/comma.optimized.wat b/tests/compiler/comma.optimized.wat index 586fb1e100..d162cda189 100644 --- a/tests/compiler/comma.optimized.wat +++ b/tests/compiler/comma.optimized.wat @@ -81,9 +81,9 @@ i32.const 2 global.set $comma/a loop $for-loop|0 - local.get $0 global.get $comma/a - i32.lt_s + local.get $0 + i32.gt_s if global.get $comma/a i32.const 1 diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index d6010eda56..cbd3c05ba4 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -64,9 +64,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index e532d11a61..92ccdab2a5 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -649,10 +649,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -811,9 +811,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/empty.optimized.wat b/tests/compiler/empty.optimized.wat index 65aa2744e1..ea3dd62ae1 100644 --- a/tests/compiler/empty.optimized.wat +++ b/tests/compiler/empty.optimized.wat @@ -61,9 +61,9 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 @@ -303,16 +303,16 @@ i32.const 1 i32.shr_u local.tee $0 - i32.const 2 local.get $0 - i32.lt_s + i32.const 2 + i32.gt_s select local.tee $1 i32.const 2147483647 local.get $0 - i32.const 2147483647 local.get $0 - i32.lt_s + i32.const 2147483647 + i32.gt_s select local.tee $2 local.get $1 diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index 24c1fc8467..f6bd5cb29e 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -96,9 +96,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $4 local.get $2 - i32.gt_s + local.get $4 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/exportstar-rereexport.optimized.wat b/tests/compiler/exportstar-rereexport.optimized.wat index 81784c7bc2..d38d15a10b 100644 --- a/tests/compiler/exportstar-rereexport.optimized.wat +++ b/tests/compiler/exportstar-rereexport.optimized.wat @@ -76,9 +76,9 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $3 local.get $1 - i32.gt_s + local.get $3 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index 7895d93b48..55c80b001c 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -578,10 +578,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -970,12 +970,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1344 @@ -1395,6 +1395,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -1403,8 +1404,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 diff --git a/tests/compiler/field-initialization.optimized.wat b/tests/compiler/field-initialization.optimized.wat index 7afd43c6d0..1113a1f90b 100644 --- a/tests/compiler/field-initialization.optimized.wat +++ b/tests/compiler/field-initialization.optimized.wat @@ -77,9 +77,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 2ca56ab28c..d7ff7b4865 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -646,10 +646,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -808,9 +808,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/function-call.optimized.wat b/tests/compiler/function-call.optimized.wat index 6b3b185d26..17f2ed8243 100644 --- a/tests/compiler/function-call.optimized.wat +++ b/tests/compiler/function-call.optimized.wat @@ -93,7 +93,6 @@ call $~lib/builtins/abort unreachable end - i32.const 1388 memory.size local.tee $1 i32.const 16 @@ -103,7 +102,8 @@ i32.const -16 i32.and local.tee $0 - i32.gt_u + i32.const 1388 + i32.lt_u if local.get $1 i32.const 66923 @@ -114,9 +114,9 @@ i32.const 16 i32.shr_u local.tee $0 - local.get $1 local.get $0 - i32.gt_s + local.get $1 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/function-expression.optimized.wat b/tests/compiler/function-expression.optimized.wat index 585bf34ed0..d0dc6ad3d3 100644 --- a/tests/compiler/function-expression.optimized.wat +++ b/tests/compiler/function-expression.optimized.wat @@ -231,7 +231,6 @@ call $~lib/builtins/abort unreachable end - i32.const 1676 memory.size local.tee $1 i32.const 16 @@ -241,7 +240,8 @@ i32.const -16 i32.and local.tee $0 - i32.gt_u + i32.const 1676 + i32.lt_u if local.get $1 i32.const 67211 @@ -252,9 +252,9 @@ i32.const 16 i32.shr_u local.tee $0 - local.get $1 local.get $0 - i32.gt_s + local.get $1 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index b61037a143..ff9abc4d35 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -48,9 +48,9 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/heap.optimized.wat b/tests/compiler/heap.optimized.wat index 95b3131144..a99e3ad5a5 100644 --- a/tests/compiler/heap.optimized.wat +++ b/tests/compiler/heap.optimized.wat @@ -570,10 +570,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -962,12 +962,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1056 @@ -1294,6 +1294,7 @@ i32.const 1 i32.and if + local.get $4 local.get $3 i32.const 4 i32.add @@ -1302,8 +1303,7 @@ i32.and i32.add local.tee $3 - local.get $4 - i32.ge_u + i32.le_u if local.get $2 local.get $6 diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index 47ec7054ff..2620585d15 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -581,10 +581,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -973,12 +973,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1184 @@ -1360,6 +1360,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -1368,8 +1369,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index ddf4887d25..bf3e8ffbaf 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -99,9 +99,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 @@ -368,7 +368,6 @@ call $~lib/rt/__newArray drop block $folding-inner0 - i32.const 1 i32.const 2 i32.const 2 i32.const 5 @@ -376,7 +375,8 @@ call $~lib/rt/__newArray local.tee $0 i32.load offset=12 - i32.ge_u + i32.const 1 + i32.le_u br_if $folding-inner0 local.get $0 i32.load offset=4 @@ -397,7 +397,6 @@ i32.const 1328 call $~lib/rt/__newArray drop - i32.const 1 i32.const 3 i32.const 2 i32.const 6 @@ -405,7 +404,8 @@ call $~lib/rt/__newArray local.tee $0 i32.load offset=12 - i32.ge_u + i32.const 1 + i32.le_u br_if $folding-inner0 local.get $0 i32.load offset=4 diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index b40c8a157a..da04bf14e3 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -79,9 +79,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/instanceof-class.optimized.wat b/tests/compiler/instanceof-class.optimized.wat index 55c8f44eb1..8fc4d542a4 100644 --- a/tests/compiler/instanceof-class.optimized.wat +++ b/tests/compiler/instanceof-class.optimized.wat @@ -47,9 +47,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $4 local.get $2 - i32.gt_s + local.get $4 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index 283e11e2ab..af3f6372bf 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -566,10 +566,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -728,9 +728,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/issues/1225.optimized.wat b/tests/compiler/issues/1225.optimized.wat index 899a6925eb..50e98931be 100644 --- a/tests/compiler/issues/1225.optimized.wat +++ b/tests/compiler/issues/1225.optimized.wat @@ -568,10 +568,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -730,9 +730,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/logical.optimized.wat b/tests/compiler/logical.optimized.wat index 0f72f7d26b..c98a372150 100644 --- a/tests/compiler/logical.optimized.wat +++ b/tests/compiler/logical.optimized.wat @@ -565,10 +565,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -727,9 +727,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index f698376a1e..422fd7181d 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -568,10 +568,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -730,9 +730,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/new.optimized.wat b/tests/compiler/new.optimized.wat index fc5c605759..551af3de28 100644 --- a/tests/compiler/new.optimized.wat +++ b/tests/compiler/new.optimized.wat @@ -41,9 +41,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $3 local.get $2 - i32.gt_s + local.get $3 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 3377ad615e..d44d628210 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -139,9 +139,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $4 local.get $2 - i32.gt_s + local.get $4 + i32.lt_s select memory.grow i32.const 0 @@ -590,11 +590,11 @@ i64.lt_u select i32.const 0 + local.get $2 local.get $4 local.get $0 i64.sub - local.get $2 - i64.ge_u + i64.le_u i32.const 0 local.get $0 local.get $8 @@ -664,12 +664,12 @@ i32.const 1 i32.sub local.set $7 + local.get $4 local.get $2 local.get $11 i64.and local.tee $6 - local.get $4 - i64.ge_u + i64.le_u br_if $while-continue|4 end local.get $7 @@ -709,16 +709,16 @@ local.get $2 i64.sub i64.gt_u - local.get $6 local.get $2 - i64.lt_u + local.get $6 + i64.gt_u select i32.const 0 + local.get $10 local.get $4 local.get $0 i64.sub - local.get $10 - i64.ge_u + i64.le_u i32.const 0 local.get $0 local.get $2 @@ -1010,9 +1010,9 @@ i32.const 0 i32.le_s i32.const 0 - i32.const -6 local.get $3 - i32.lt_s + i32.const -6 + i32.gt_s select if (result i32) i32.const 2 diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index 3f55a21c6d..dd2369aaaf 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -572,10 +572,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -960,12 +960,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1232 @@ -1858,16 +1858,16 @@ i32.const 1 i32.shr_u local.tee $1 - i32.const 0 local.get $1 - i32.lt_s + i32.const 0 + i32.gt_s select local.tee $2 i32.const 5 local.get $1 - i32.const 5 local.get $1 - i32.lt_s + i32.const 5 + i32.gt_s select local.tee $3 local.get $2 diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index 96dc54cba7..b62c0907e3 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -41,9 +41,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $3 local.get $2 - i32.gt_s + local.get $3 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index 92d4970379..5e5f9eae39 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -564,10 +564,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -726,9 +726,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index d47eea9c94..c00e0e75d0 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -565,10 +565,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -727,9 +727,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index bd85492b5e..cd04b79677 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -565,10 +565,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -727,9 +727,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 8eced93628..7c5c968827 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -653,10 +653,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -1041,12 +1041,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1184 diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index ac659eb7fc..084fb51c7c 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -572,10 +572,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -964,12 +964,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1184 @@ -1351,6 +1351,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -1359,8 +1360,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index bf65446550..0fddb93e16 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -567,10 +567,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -729,9 +729,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/reexport.optimized.wat b/tests/compiler/reexport.optimized.wat index d3e16366c3..3460d6f7d5 100644 --- a/tests/compiler/reexport.optimized.wat +++ b/tests/compiler/reexport.optimized.wat @@ -130,9 +130,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $4 local.get $2 - i32.gt_s + local.get $4 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/rereexport.optimized.wat b/tests/compiler/rereexport.optimized.wat index 81784c7bc2..d38d15a10b 100644 --- a/tests/compiler/rereexport.optimized.wat +++ b/tests/compiler/rereexport.optimized.wat @@ -76,9 +76,9 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $3 local.get $1 - i32.gt_s + local.get $3 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index 62e4f2b896..f954721b09 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -82,9 +82,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 @@ -496,10 +496,10 @@ local.get $0 i32.const 1 i32.store offset=12 - i32.const 0 local.get $0 i32.load offset=12 - i32.ge_u + i32.const 0 + i32.le_u if i32.const 1088 i32.const 1152 diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index 3466deb879..f9ca74c455 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -268,9 +268,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 @@ -604,11 +604,11 @@ i64.lt_u select i32.const 0 + local.get $2 local.get $4 local.get $0 i64.sub - local.get $2 - i64.ge_u + i64.le_u i32.const 0 local.get $0 local.get $8 @@ -678,12 +678,12 @@ i32.const 1 i32.sub local.set $7 + local.get $4 local.get $2 local.get $11 i64.and local.tee $6 - local.get $4 - i64.ge_u + i64.le_u br_if $while-continue|4 end local.get $7 @@ -723,16 +723,16 @@ local.get $2 i64.sub i64.gt_u - local.get $6 local.get $2 - i64.lt_u + local.get $6 + i64.gt_u select i32.const 0 + local.get $10 local.get $4 local.get $0 i64.sub - local.get $10 - i64.ge_u + i64.le_u i32.const 0 local.get $0 local.get $2 @@ -1024,9 +1024,9 @@ i32.const 0 i32.le_s i32.const 0 - i32.const -6 local.get $2 - i32.lt_s + i32.const -6 + i32.gt_s select if (result i32) i32.const 2 diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index 8e1d40fe17..f0ba58a4e8 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -105,9 +105,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 @@ -322,11 +322,11 @@ local.get $0 i32.const 0 i32.store offset=8 - i32.const 2 i32.const 1073741820 local.get $1 i32.shr_u - i32.gt_u + i32.const 2 + i32.lt_u if i32.const 1056 i32.const 1104 @@ -675,11 +675,11 @@ i64.lt_u select i32.const 0 + local.get $2 local.get $4 local.get $0 i64.sub - local.get $2 - i64.ge_u + i64.le_u i32.const 0 local.get $0 local.get $8 @@ -749,12 +749,12 @@ i32.const 1 i32.sub local.set $7 + local.get $4 local.get $2 local.get $11 i64.and local.tee $6 - local.get $4 - i64.ge_u + i64.le_u br_if $while-continue|4 end local.get $7 @@ -794,16 +794,16 @@ local.get $2 i64.sub i64.gt_u - local.get $6 local.get $2 - i64.lt_u + local.get $6 + i64.gt_u select i32.const 0 + local.get $10 local.get $4 local.get $0 i64.sub - local.get $10 - i64.ge_u + i64.le_u i32.const 0 local.get $0 local.get $2 @@ -1121,9 +1121,9 @@ i32.const 0 i32.le_s i32.const 0 - i32.const -6 local.get $3 - i32.lt_s + i32.const -6 + i32.gt_s select if (result i32) local.get $0 diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index b57e50e03f..407f565a23 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -157,9 +157,9 @@ i32.const 16 i32.shr_u local.tee $4 - local.get $7 local.get $4 - i32.gt_s + local.get $7 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/resolve-nested.optimized.wat b/tests/compiler/resolve-nested.optimized.wat index 2de1acb600..81f64a59a7 100644 --- a/tests/compiler/resolve-nested.optimized.wat +++ b/tests/compiler/resolve-nested.optimized.wat @@ -53,9 +53,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $4 local.get $2 - i32.gt_s + local.get $4 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/resolve-new.optimized.wat b/tests/compiler/resolve-new.optimized.wat index 0a33c8b8c8..d4df6fd549 100644 --- a/tests/compiler/resolve-new.optimized.wat +++ b/tests/compiler/resolve-new.optimized.wat @@ -40,9 +40,9 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index 9bbbc137cf..d0e0130438 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -85,9 +85,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index bd5f0c7304..6d7b084970 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -597,10 +597,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -989,12 +989,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1184 @@ -1376,6 +1376,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -1384,8 +1385,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 @@ -1931,11 +1931,11 @@ i64.lt_u select i32.const 0 + local.get $2 local.get $4 local.get $0 i64.sub - local.get $2 - i64.ge_u + i64.le_u i32.const 0 local.get $0 local.get $8 @@ -2005,12 +2005,12 @@ i32.const 1 i32.sub local.set $7 + local.get $4 local.get $2 local.get $11 i64.and local.tee $6 - local.get $4 - i64.ge_u + i64.le_u br_if $while-continue|4 end local.get $7 @@ -2050,16 +2050,16 @@ local.get $2 i64.sub i64.gt_u - local.get $6 local.get $2 - i64.lt_u + local.get $6 + i64.gt_u select i32.const 0 + local.get $10 local.get $4 local.get $0 i64.sub - local.get $10 - i64.ge_u + i64.le_u i32.const 0 local.get $0 local.get $2 @@ -2178,9 +2178,9 @@ i32.const 0 i32.le_s i32.const 0 - i32.const -6 local.get $3 - i32.lt_s + i32.const -6 + i32.gt_s select if (result i32) i32.const 2 diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index bba1750db5..7d3cb450f2 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -90,9 +90,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index 7bb37ef329..09de344bba 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -590,10 +590,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -982,12 +982,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1280 @@ -1578,6 +1578,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -1586,8 +1587,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 @@ -2438,9 +2438,9 @@ global.get $~lib/rt/pure/CUR local.set $0 loop $for-loop|0 - local.get $4 local.get $0 - i32.lt_u + local.get $4 + i32.gt_u if local.get $4 i32.load diff --git a/tests/compiler/retain-release.optimized.wat b/tests/compiler/retain-release.optimized.wat index 8461371248..e26dc6aa83 100644 --- a/tests/compiler/retain-release.optimized.wat +++ b/tests/compiler/retain-release.optimized.wat @@ -112,9 +112,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index dbca389ca6..4930d5f70a 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -574,10 +574,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -736,9 +736,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/rt/finalize.optimized.wat b/tests/compiler/rt/finalize.optimized.wat index 325ff6ffd5..0d60f39abf 100644 --- a/tests/compiler/rt/finalize.optimized.wat +++ b/tests/compiler/rt/finalize.optimized.wat @@ -592,10 +592,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -980,12 +980,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1296 @@ -2061,9 +2061,9 @@ global.get $~lib/rt/pure/CUR local.set $0 loop $for-loop|0 - local.get $4 local.get $0 - i32.lt_u + local.get $4 + i32.gt_u if local.get $4 i32.load diff --git a/tests/compiler/rt/instanceof.optimized.wat b/tests/compiler/rt/instanceof.optimized.wat index 64c70a99ff..1b13854d22 100644 --- a/tests/compiler/rt/instanceof.optimized.wat +++ b/tests/compiler/rt/instanceof.optimized.wat @@ -53,9 +53,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $4 local.get $2 - i32.gt_s + local.get $4 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/rt/stub-realloc.optimized.wat b/tests/compiler/rt/stub-realloc.optimized.wat index eecb8c92b7..f54be35f2e 100644 --- a/tests/compiler/rt/stub-realloc.optimized.wat +++ b/tests/compiler/rt/stub-realloc.optimized.wat @@ -61,9 +61,9 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 @@ -369,9 +369,9 @@ i32.const 1 i32.shl local.tee $1 - local.get $2 local.get $1 - i32.gt_u + local.get $2 + i32.lt_u select call $~lib/rt/stub/__alloc local.tee $1 diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index 747980eac8..155ed68ffe 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -571,10 +571,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -963,12 +963,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1184 @@ -1350,6 +1350,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -1358,8 +1359,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 diff --git a/tests/compiler/runtime-stub.optimized.wat b/tests/compiler/runtime-stub.optimized.wat index 41459d0914..0f9e024fb2 100644 --- a/tests/compiler/runtime-stub.optimized.wat +++ b/tests/compiler/runtime-stub.optimized.wat @@ -56,9 +56,9 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 @@ -364,9 +364,9 @@ i32.const 1 i32.shl local.tee $1 - local.get $2 local.get $1 - i32.gt_u + local.get $2 + i32.lt_u select call $~lib/rt/stub/__alloc local.tee $1 diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 164c236f80..ec3e72a1f2 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -49,13 +49,13 @@ local.get $0 ) (func $std/array-access/i32ArrayArrayElementAccess (param $0 i32) (result i32) - i32.const 1 local.get $0 i32.const 0 call $~lib/array/Array<~lib/array/Array>#__get local.tee $0 i32.load offset=12 - i32.ge_u + i32.const 1 + i32.le_u if i32.const 1056 i32.const 1120 @@ -161,13 +161,14 @@ (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) i32.const 1292 i32.load i32.const 1 i32.shr_u - local.tee $1 - local.set $2 - local.get $1 + local.tee $3 + local.set $4 + local.get $3 i32.const 0 local.get $0 i32.const 20 @@ -176,11 +177,11 @@ i32.const 1 i32.shr_u local.tee $1 - i32.const 0 local.get $1 - i32.lt_s + i32.const 0 + i32.gt_u select - local.tee $3 + local.tee $2 i32.add local.get $1 i32.gt_s @@ -189,8 +190,8 @@ return end local.get $0 - local.get $3 local.get $2 + local.get $4 call $~lib/util/string/compareImpl i32.eqz ) diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index abbe3d1e3a..e7a7cabde1 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -621,10 +621,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -1009,12 +1009,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1600 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index a4e0ef99fb..22e3414d7e 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -1069,10 +1069,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -1461,12 +1461,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1280 @@ -2326,9 +2326,9 @@ br_if $folding-inner1 end loop $for-loop|0 - local.get $3 local.get $2 - i32.lt_s + local.get $3 + i32.gt_s if local.get $0 local.get $3 @@ -2523,6 +2523,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -2531,8 +2532,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 @@ -2687,11 +2687,11 @@ (local $2 i32) (local $3 i32) (local $4 i32) + local.get $1 local.get $0 i32.load offset=12 local.tee $2 - local.get $1 - i32.gt_s + i32.lt_s if local.get $0 i32.load offset=4 @@ -2881,9 +2881,9 @@ local.get $1 i32.sub local.tee $1 - local.get $2 local.get $1 - i32.lt_s + local.get $2 + i32.gt_s select i32.const 2 i32.shl @@ -2986,9 +2986,9 @@ i32.add local.set $1 loop $while-continue|0 - local.get $2 local.get $1 - i32.lt_u + local.get $2 + i32.gt_u if local.get $2 i32.load @@ -3197,9 +3197,9 @@ local.tee $1 i32.sub local.tee $2 - i32.const 2 local.get $2 - i32.lt_s + i32.const 2 + i32.gt_s select local.tee $2 i32.const 0 @@ -3303,9 +3303,9 @@ local.get $0 i32.load offset=12 local.tee $3 - i32.const 0 local.get $3 - i32.lt_s + i32.const 0 + i32.gt_s select local.set $2 i32.const 1 @@ -3313,9 +3313,9 @@ local.get $2 i32.sub local.tee $1 - i32.const 1 local.get $1 - i32.lt_s + i32.const 1 + i32.gt_s select local.tee $1 i32.const 0 @@ -3445,9 +3445,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $4 local.get $3 - i32.lt_s + local.get $4 + i32.gt_s select i32.lt_s if @@ -3538,9 +3538,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $4 local.get $3 - i32.lt_s + local.get $4 + i32.gt_s select i32.lt_s if @@ -3632,9 +3632,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $4 local.get $3 - i32.lt_s + local.get $4 + i32.gt_s select i32.lt_s if @@ -3729,9 +3729,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $4 local.get $3 - i32.lt_s + local.get $4 + i32.gt_s select i32.lt_s if @@ -3953,9 +3953,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $4 local.get $3 - i32.lt_s + local.get $4 + i32.gt_s select i32.lt_s if @@ -4044,9 +4044,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $5 local.get $3 - i32.lt_s + local.get $5 + i32.gt_s select i32.lt_s if @@ -4149,9 +4149,9 @@ local.get $0 i32.load offset=12 local.tee $4 - local.get $5 local.get $4 - i32.lt_s + local.get $5 + i32.gt_s select i32.lt_s if @@ -4377,9 +4377,9 @@ call $~lib/rt/pure/__retain local.set $5 loop $for-loop|0 - local.get $4 local.get $1 - i32.lt_s + local.get $4 + i32.gt_s if local.get $0 local.get $4 @@ -4621,6 +4621,7 @@ i32.const 1 local.set $1 loop $while-continue|3 + local.get $3 local.get $5 local.get $1 i32.const 5 @@ -4638,8 +4639,7 @@ i32.shl i32.add local.tee $2 - local.get $3 - i32.lt_s + i32.gt_s if local.get $2 local.set $1 @@ -4920,9 +4920,9 @@ call $~lib/rt/pure/__retain local.set $5 loop $for-loop|0 - local.get $4 local.get $1 - i32.lt_s + local.get $4 + i32.gt_s if local.get $0 local.get $4 @@ -5147,6 +5147,7 @@ i32.const 1 local.set $1 loop $while-continue|3 + local.get $3 local.get $5 local.get $1 i32.const 5 @@ -5164,8 +5165,7 @@ i32.shl i32.add local.tee $2 - local.get $3 - i32.lt_s + i32.gt_s if local.get $2 local.set $1 @@ -5467,9 +5467,9 @@ call $~lib/rt/pure/__retain local.set $5 loop $for-loop|0 - local.get $4 local.get $1 - i32.lt_s + local.get $4 + i32.gt_s if local.get $0 local.get $4 @@ -5694,6 +5694,7 @@ i32.const 1 local.set $1 loop $while-continue|3 + local.get $3 local.get $4 local.get $1 i32.const 5 @@ -5711,8 +5712,7 @@ i32.shl i32.add local.tee $2 - local.get $3 - i32.lt_s + i32.gt_s if local.get $2 local.set $1 @@ -5918,9 +5918,9 @@ call $~lib/array/Array#constructor local.set $2 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_s + local.get $1 + i32.gt_s if local.get $2 local.get $1 @@ -5987,9 +5987,9 @@ call $~lib/array/Array#constructor local.set $2 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_s + local.get $1 + i32.gt_s if local.get $2 local.get $1 @@ -6278,9 +6278,9 @@ call $~lib/rt/pure/__retain local.set $6 loop $for-loop|0 - local.get $3 local.get $1 - i32.lt_s + local.get $3 + i32.gt_s if local.get $0 local.get $3 @@ -6790,9 +6790,9 @@ local.get $1 local.get $3 local.get $2 - local.get $3 local.get $2 - i32.lt_s + local.get $3 + i32.gt_s select call $~lib/util/string/compareImpl local.get $0 @@ -7122,9 +7122,9 @@ i32.const 8256 local.set $1 loop $for-loop|0 - local.get $4 local.get $0 - i32.lt_s + local.get $4 + i32.gt_s if local.get $1 local.tee $2 @@ -7199,9 +7199,9 @@ i32.const 1 i32.shr_u local.tee $2 - i32.const 0 local.get $2 - i32.lt_s + i32.const 0 + i32.gt_s select local.tee $3 local.get $1 @@ -7217,18 +7217,18 @@ i32.lt_s select local.tee $1 - local.get $3 local.get $1 - i32.gt_s + local.get $3 + i32.lt_s select i32.const 1 i32.shl local.tee $4 local.get $3 local.get $1 - local.get $3 local.get $1 - i32.lt_s + local.get $3 + i32.gt_s select i32.const 1 i32.shl @@ -7323,9 +7323,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|1 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $0 local.get $6 @@ -7625,9 +7625,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $3 @@ -7808,9 +7808,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $3 @@ -8074,6 +8074,7 @@ i32.const 1 i32.sub local.set $9 + local.get $5 local.get $7 local.get $2 i64.extend_i32_u @@ -8082,8 +8083,7 @@ i64.shl i64.add local.tee $1 - local.get $5 - i64.le_u + i64.ge_u if local.get $9 global.get $~lib/util/number/_K @@ -8126,11 +8126,11 @@ i64.lt_u select i32.const 0 + local.get $10 local.get $5 local.get $1 i64.sub - local.get $10 - i64.ge_u + i64.le_u i32.const 0 local.get $1 local.get $8 @@ -8251,11 +8251,11 @@ i64.lt_u select i32.const 0 + local.get $10 local.get $5 local.get $1 i64.sub - local.get $10 - i64.ge_u + i64.le_u i32.const 0 local.get $1 local.get $8 @@ -8374,9 +8374,9 @@ i32.const 0 i32.le_s i32.const 0 - i32.const -6 local.get $3 - i32.lt_s + i32.const -6 + i32.gt_s select if (result i32) local.get $0 @@ -8969,9 +8969,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $7 local.get $5 - i32.lt_s + local.get $7 + i32.gt_s if local.get $1 local.get $2 @@ -9524,9 +9524,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $2 @@ -9677,9 +9677,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $2 @@ -9957,9 +9957,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $7 local.get $4 - i32.lt_s + local.get $7 + i32.gt_s if local.get $1 local.get $2 @@ -10207,9 +10207,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $7 local.get $5 - i32.lt_s + local.get $7 + i32.gt_s if local.get $1 local.get $2 @@ -10550,9 +10550,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $3 @@ -13435,11 +13435,11 @@ i32.const 0 local.set $1 block $__inlined_func$~lib/array/Array#indexOf - i32.const 0 local.get $0 i32.load offset=12 local.tee $2 - i32.ge_s + i32.const 0 + i32.le_s i32.const 1 local.get $2 select @@ -13497,11 +13497,11 @@ i32.const 0 local.set $1 block $__inlined_func$~lib/array/Array#indexOf - i32.const 0 local.get $2 i32.load offset=12 local.tee $7 - i32.ge_s + i32.const 0 + i32.le_s i32.const 1 local.get $7 select @@ -13696,7 +13696,6 @@ i32.const 0 local.set $0 i32.const 0 - i32.const 0 i32.const 1 i32.const 2 i32.const 9 @@ -13706,7 +13705,8 @@ local.tee $7 i32.load offset=12 local.tee $2 - i32.ge_s + i32.const 0 + i32.le_s i32.const 1 local.get $2 select @@ -13759,7 +13759,6 @@ i32.const 0 local.set $2 i32.const 0 - i32.const 0 i32.const 1 i32.const 3 i32.const 10 @@ -13769,7 +13768,8 @@ local.tee $0 i32.load offset=12 local.tee $3 - i32.ge_s + i32.const 0 + i32.le_s i32.const 1 local.get $3 select @@ -17668,9 +17668,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $5 local.get $3 - i32.lt_s + local.get $5 + i32.gt_s select i32.lt_s if @@ -17980,9 +17980,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $4 local.get $3 - i32.lt_s + local.get $4 + i32.gt_s select i32.lt_s if @@ -18032,9 +18032,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $4 local.get $3 - i32.lt_s + local.get $4 + i32.gt_s select i32.lt_s if @@ -18291,9 +18291,9 @@ local.get $1 i32.sub local.tee $1 - local.get $2 local.get $1 - i32.lt_s + local.get $2 + i32.gt_s select call $~lib/memory/memory.copy local.get $0 @@ -18343,9 +18343,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $4 local.get $3 - i32.lt_s + local.get $4 + i32.gt_s select i32.lt_s if @@ -18395,9 +18395,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $5 local.get $3 - i32.lt_s + local.get $5 + i32.gt_s select i32.lt_s if @@ -18487,9 +18487,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $4 local.get $3 - i32.lt_s + local.get $4 + i32.gt_s select i32.lt_s if @@ -18724,9 +18724,9 @@ i32.add local.set $1 loop $while-continue|0 - local.get $2 local.get $1 - i32.lt_u + local.get $2 + i32.gt_u if local.get $2 i32.load8_u @@ -18763,9 +18763,9 @@ call $~lib/rt/pure/__retain local.set $5 loop $for-loop|0 - local.get $4 local.get $1 - i32.lt_s + local.get $4 + i32.gt_s if local.get $0 local.get $4 @@ -18972,6 +18972,7 @@ i32.const 1 local.set $1 loop $while-continue|3 + local.get $3 local.get $4 local.get $1 i32.const 5 @@ -18989,8 +18990,7 @@ i32.shl i32.add local.tee $2 - local.get $3 - i32.lt_s + i32.gt_s if local.get $2 local.set $1 @@ -19179,9 +19179,9 @@ else local.get $2 local.get $1 - local.get $2 local.get $1 - i32.lt_s + local.get $2 + i32.gt_s select end local.set $2 @@ -19201,16 +19201,16 @@ else local.get $3 local.get $1 - local.get $3 local.get $1 - i32.lt_s + local.get $3 + i32.gt_s select end local.set $1 loop $for-loop|0 - local.get $2 local.get $1 - i32.lt_s + local.get $2 + i32.gt_s if local.get $4 local.get $5 @@ -19390,9 +19390,9 @@ i32.load offset=4 local.set $0 loop $for-loop|0 - local.get $4 local.get $2 - i32.lt_u + local.get $4 + i32.gt_u if local.get $3 local.get $4 @@ -19544,9 +19544,9 @@ i32.add i32.lt_s i32.const 0 - local.get $2 local.get $1 - i32.lt_s + local.get $2 + i32.gt_s select if local.get $2 @@ -19710,9 +19710,9 @@ local.get $0 i32.load offset=12 local.tee $1 - local.get $5 local.get $1 - i32.lt_s + local.get $5 + i32.gt_s select i32.lt_s if @@ -20046,9 +20046,9 @@ i32.add local.set $1 loop $while-continue|0 - local.get $2 local.get $1 - i32.lt_u + local.get $2 + i32.gt_u if local.get $2 i32.load @@ -20336,9 +20336,9 @@ i32.const 1 i32.sub local.get $2 - local.get $2 local.get $0 - i32.ge_s + local.get $2 + i32.le_s select local.get $2 i32.const 0 @@ -20564,9 +20564,9 @@ i32.const 1 i32.sub local.get $2 - local.get $2 local.get $0 - i32.ge_s + local.get $2 + i32.le_s select local.get $2 i32.const 0 @@ -20821,9 +20821,9 @@ i32.const 1 i32.sub local.get $2 - local.get $2 local.get $0 - i32.ge_s + local.get $2 + i32.le_s select local.get $2 i32.const 0 diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 615ce47e6a..a525a51917 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -582,10 +582,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -970,12 +970,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1296 @@ -1512,11 +1512,11 @@ local.get $0 i32.const 0 i32.store offset=8 - i32.const 1 i32.const 1073741820 local.get $1 i32.shr_u - i32.gt_u + i32.const 1 + i32.lt_u if i32.const 1056 i32.const 1104 @@ -1846,11 +1846,11 @@ local.set $7 local.get $5 i32.load - local.tee $1 + local.tee $0 i32.const 20 i32.sub i32.load offset=16 - local.tee $0 + local.tee $1 local.set $8 i32.const 12 i32.const 15 @@ -1865,17 +1865,17 @@ local.get $3 i32.const 0 i32.store offset=8 - local.get $0 - i32.const 1073741820 - i32.gt_u - local.get $0 local.get $1 + local.get $0 call $~lib/rt/pure/__retain local.tee $0 i32.const 20 i32.sub i32.load offset=16 i32.gt_u + local.get $1 + i32.const 1073741820 + i32.gt_u i32.or if i32.const 1056 diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 6fd320e629..d06543a9cb 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -589,10 +589,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -977,12 +977,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1296 @@ -1208,18 +1208,18 @@ local.get $4 i32.const 0 i32.store offset=8 - local.get $2 - i32.const 1073741820 - i32.gt_u - local.get $1 - local.get $2 - i32.add local.get $0 call $~lib/rt/pure/__retain local.tee $0 i32.const 20 i32.sub i32.load offset=16 + local.get $1 + local.get $2 + i32.add + i32.lt_u + local.get $2 + i32.const 1073741820 i32.gt_u i32.or if @@ -1276,12 +1276,12 @@ local.get $1 i32.const 31 i32.shr_u + local.get $0 + i32.load offset=8 local.get $1 i32.const 4 i32.add - local.get $0 - i32.load offset=8 - i32.gt_s + i32.lt_s i32.or if i32.const 1360 @@ -1335,10 +1335,10 @@ i64.rotr ) (func $~lib/dataview/DataView#getFloat64 (param $0 i32) (param $1 i32) (result f64) - i32.const 8 local.get $0 i32.load offset=8 - i32.gt_s + i32.const 8 + i32.lt_s if i32.const 1360 i32.const 1488 @@ -1396,12 +1396,12 @@ local.get $1 i32.const 31 i32.shr_u + local.get $0 + i32.load offset=8 local.get $1 i32.const 2 i32.add - local.get $0 - i32.load offset=8 - i32.gt_s + i32.lt_s i32.or if i32.const 1360 @@ -1429,12 +1429,12 @@ local.get $1 i32.const 31 i32.shr_u + local.get $0 + i32.load offset=8 local.get $1 i32.const 4 i32.add - local.get $0 - i32.load offset=8 - i32.gt_s + i32.lt_s i32.or if i32.const 1360 @@ -1460,10 +1460,10 @@ ) (func $~lib/dataview/DataView#getInt64 (param $0 i32) (param $1 i32) (result i64) (local $2 i64) - i32.const 8 local.get $0 i32.load offset=8 - i32.gt_s + i32.const 8 + i32.lt_s if i32.const 1360 i32.const 1488 @@ -1518,12 +1518,12 @@ local.get $1 i32.const 31 i32.shr_u + local.get $0 + i32.load offset=8 local.get $1 i32.const 2 i32.add - local.get $0 - i32.load offset=8 - i32.gt_s + i32.lt_s i32.or if i32.const 1360 @@ -1551,12 +1551,12 @@ local.get $1 i32.const 31 i32.shr_u + local.get $0 + i32.load offset=8 local.get $1 i32.const 4 i32.add - local.get $0 - i32.load offset=8 - i32.gt_s + i32.lt_s i32.or if i32.const 1360 @@ -1582,10 +1582,10 @@ ) (func $~lib/dataview/DataView#getUint64 (param $0 i32) (param $1 i32) (result i64) (local $2 i64) - i32.const 8 local.get $0 i32.load offset=8 - i32.gt_s + i32.const 8 + i32.lt_s if i32.const 1360 i32.const 1488 @@ -1607,10 +1607,10 @@ end ) (func $~lib/dataview/DataView#setFloat32 (param $0 i32) (param $1 f32) (param $2 i32) - i32.const 4 local.get $0 i32.load offset=8 - i32.gt_s + i32.const 4 + i32.lt_s if i32.const 1360 i32.const 1488 @@ -1635,10 +1635,10 @@ end ) (func $~lib/dataview/DataView#setFloat64 (param $0 i32) (param $1 f64) (param $2 i32) - i32.const 8 local.get $0 i32.load offset=8 - i32.gt_s + i32.const 8 + i32.lt_s if i32.const 1360 i32.const 1488 @@ -1663,10 +1663,10 @@ end ) (func $~lib/dataview/DataView#setInt16 (param $0 i32) (param $1 i32) (param $2 i32) - i32.const 2 local.get $0 i32.load offset=8 - i32.gt_s + i32.const 2 + i32.lt_s if i32.const 1360 i32.const 1488 @@ -1687,10 +1687,10 @@ i32.store16 ) (func $~lib/dataview/DataView#setInt32 (param $0 i32) (param $1 i32) (param $2 i32) - i32.const 4 local.get $0 i32.load offset=8 - i32.gt_s + i32.const 4 + i32.lt_s if i32.const 1360 i32.const 1488 @@ -1711,10 +1711,10 @@ i32.store ) (func $~lib/dataview/DataView#setInt64 (param $0 i32) (param $1 i64) (param $2 i32) - i32.const 8 local.get $0 i32.load offset=8 - i32.gt_s + i32.const 8 + i32.lt_s if i32.const 1360 i32.const 1488 @@ -1735,10 +1735,10 @@ i64.store ) (func $~lib/dataview/DataView#setUint16 (param $0 i32) (param $1 i32) (param $2 i32) - i32.const 2 local.get $0 i32.load offset=8 - i32.gt_s + i32.const 2 + i32.lt_s if i32.const 1360 i32.const 1488 @@ -1759,10 +1759,10 @@ i32.store16 ) (func $~lib/dataview/DataView#setUint32 (param $0 i32) (param $1 i32) (param $2 i32) - i32.const 4 local.get $0 i32.load offset=8 - i32.gt_s + i32.const 4 + i32.lt_s if i32.const 1360 i32.const 1488 @@ -1783,10 +1783,10 @@ i32.store ) (func $~lib/dataview/DataView#setUint64 (param $0 i32) (param $1 i64) (param $2 i32) - i32.const 8 local.get $0 i32.load offset=8 - i32.gt_s + i32.const 8 + i32.lt_s if i32.const 1360 i32.const 1488 @@ -3082,10 +3082,10 @@ call $~lib/builtins/abort unreachable end - i32.const 0 local.get $0 i32.load offset=8 - i32.ge_u + i32.const 0 + i32.le_u if i32.const 1360 i32.const 1488 @@ -3221,10 +3221,10 @@ call $~lib/builtins/abort unreachable end - i32.const 0 local.get $0 i32.load offset=8 - i32.ge_u + i32.const 0 + i32.le_u if i32.const 1360 i32.const 1488 diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index 5fdf447dde..7f19d178cd 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -89,7 +89,6 @@ end global.get $std/date/creationTime local.set $2 - i32.const 1116 memory.size local.tee $1 i32.const 16 @@ -99,7 +98,8 @@ i32.const -16 i32.and local.tee $0 - i32.gt_u + i32.const 1116 + i32.lt_u if local.get $1 i32.const 66651 @@ -110,9 +110,9 @@ i32.const 16 i32.shr_u local.tee $0 - local.get $1 local.get $0 - i32.gt_s + local.get $1 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index ae6b4f7e09..c40bc41662 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -588,10 +588,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -980,12 +980,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1184 @@ -1930,6 +1930,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -1938,8 +1939,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 @@ -3030,9 +3030,9 @@ local.get $0 i32.load offset=20 local.tee $1 - i32.const 4 local.get $1 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -4309,9 +4309,9 @@ local.get $0 i32.load offset=20 local.tee $1 - i32.const 4 local.get $1 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -5288,9 +5288,9 @@ local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $9 local.get $8 - i32.lt_s + local.get $9 + i32.gt_s if local.get $5 local.get $9 @@ -5633,9 +5633,9 @@ local.get $0 i32.load offset=20 local.tee $1 - i32.const 4 local.get $1 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -6522,9 +6522,9 @@ local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $9 local.get $8 - i32.lt_s + local.get $9 + i32.gt_s if local.get $5 local.get $9 @@ -6863,9 +6863,9 @@ local.get $0 i32.load offset=20 local.tee $1 - i32.const 4 local.get $1 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -7453,9 +7453,9 @@ local.get $0 i32.load offset=20 local.tee $1 - i32.const 4 local.get $1 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -8019,9 +8019,9 @@ local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $9 local.get $8 - i32.lt_s + local.get $9 + i32.gt_s if local.get $5 local.get $9 @@ -9012,9 +9012,9 @@ local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $9 local.get $8 - i32.lt_s + local.get $9 + i32.gt_s if local.get $5 local.get $9 @@ -9420,9 +9420,9 @@ local.get $0 i32.load offset=20 local.tee $2 - i32.const 4 local.get $2 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -10030,9 +10030,9 @@ local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $9 local.get $8 - i32.lt_s + local.get $9 + i32.gt_s if local.get $5 local.get $9 @@ -10920,9 +10920,9 @@ local.get $8 i32.store offset=12 loop $for-loop|0 - local.get $10 local.get $9 - i32.lt_s + local.get $10 + i32.gt_s if local.get $6 local.get $10 @@ -11255,9 +11255,9 @@ local.get $0 i32.load offset=20 local.tee $2 - i32.const 4 local.get $2 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -12148,9 +12148,9 @@ local.get $8 i32.store offset=12 loop $for-loop|0 - local.get $10 local.get $9 - i32.lt_s + local.get $10 + i32.gt_s if local.get $6 local.get $10 @@ -12519,9 +12519,9 @@ local.get $0 i32.load offset=20 local.tee $2 - i32.const 4 local.get $2 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 2f334b9099..082fed9474 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -21,7 +21,6 @@ (type $i64_=>_i64 (func (param i64) (result i64))) (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (type $f32_i32_=>_f32 (func (param f32 i32) (result f32))) - (type $f32_f32_f32_=>_f32 (func (param f32 f32 f32) (result f32))) (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) (type $f64_f64_i32_=>_f64 (func (param f64 f64 i32) (result f64))) (type $f64_f64_f64_=>_f64 (func (param f64 f64 f64) (result f64))) @@ -216,7 +215,7 @@ end local.get $1 f64.sub - i32.const 0 + i32.const 1075 local.get $1 i64.reinterpret_f64 i64.const 52 @@ -232,8 +231,6 @@ i32.const 1 i32.add end - i32.const -1075 - i32.add i32.sub call $~lib/math/NativeMath.scalbn local.get $2 @@ -345,81 +342,8 @@ f32.reinterpret_i32 f32.mul ) - (func $std/math/ulperrf (param $0 f32) (param $1 f32) (param $2 f32) (result f32) - (local $3 i32) - local.get $1 - local.get $1 - f32.ne - i32.const 0 - local.get $0 - local.get $0 - f32.ne - select - if - f32.const 0 - return - end - local.get $0 - local.get $1 - f32.eq - if - local.get $0 - i32.reinterpret_f32 - i32.const 31 - i32.shr_u - local.get $1 - i32.reinterpret_f32 - i32.const 31 - i32.shr_u - i32.eq - if - local.get $2 - return - end - f32.const inf - return - end - local.get $0 - local.get $0 - f32.sub - f32.const 0 - f32.ne - if (result f32) - local.get $1 - f32.const 0.5 - f32.mul - local.set $1 - f32.const 1701411834604692317316873e14 - local.get $0 - f32.copysign - else - local.get $0 - end - local.get $1 - f32.sub - i32.const 0 - local.get $1 - i32.reinterpret_f32 - i32.const 23 - i32.shr_u - i32.const 255 - i32.and - local.tee $3 - if (result i32) - local.get $3 - else - local.get $3 - i32.const 1 - i32.add - end - i32.const -150 - i32.add - i32.sub - call $~lib/math/NativeMathf.scalbn - local.get $2 - f32.add - ) (func $std/math/check (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (local $3 i32) local.get $0 local.get $1 f32.eq @@ -436,10 +360,78 @@ f32.ne return end - local.get $0 - local.get $1 + block $__inlined_func$std/math/ulperrf + local.get $1 + local.get $1 + f32.ne + i32.const 0 + local.get $0 + local.get $0 + f32.ne + select + if + f32.const 0 + local.set $2 + br $__inlined_func$std/math/ulperrf + end + local.get $0 + local.get $1 + f32.eq + if + local.get $0 + i32.reinterpret_f32 + i32.const 31 + i32.shr_u + local.get $1 + i32.reinterpret_f32 + i32.const 31 + i32.shr_u + i32.eq + br_if $__inlined_func$std/math/ulperrf + f32.const inf + local.set $2 + br $__inlined_func$std/math/ulperrf + end + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.ne + if (result f32) + local.get $1 + f32.const 0.5 + f32.mul + local.set $1 + f32.const 1701411834604692317316873e14 + local.get $0 + f32.copysign + else + local.get $0 + end + local.get $1 + f32.sub + i32.const 150 + local.get $1 + i32.reinterpret_f32 + i32.const 23 + i32.shr_u + i32.const 255 + i32.and + local.tee $3 + if (result i32) + local.get $3 + else + local.get $3 + i32.const 1 + i32.add + end + i32.sub + call $~lib/math/NativeMathf.scalbn + local.get $2 + f32.add + local.set $2 + end local.get $2 - call $std/math/ulperrf f32.abs f32.const 1.5 f32.ge @@ -2648,18 +2640,18 @@ local.get $4 i32.const 2146435072 i32.eq + local.get $4 local.get $5 i32.const 67108864 i32.add - local.get $4 - i32.lt_u + i32.gt_u select br_if $folding-inner0 + local.get $5 local.get $4 i32.const 67108864 i32.add - local.get $5 - i32.lt_u + i32.gt_u i32.const 0 local.get $2 i32.const 2 @@ -2865,18 +2857,18 @@ local.get $3 i32.const 2139095040 i32.eq + local.get $3 local.get $4 i32.const 218103808 i32.add - local.get $3 - i32.lt_u + i32.gt_u select br_if $folding-inner0 + local.get $4 local.get $3 i32.const 218103808 i32.add - local.get $4 - i32.lt_u + i32.gt_u i32.const 0 local.get $2 i32.const 2 @@ -3206,7 +3198,7 @@ i64.shr_u i64.const 1045 i64.sub - local.tee $2 + local.tee $4 i64.const 6 i64.shr_s i32.wrap_i64 @@ -3219,42 +3211,42 @@ local.set $6 local.get $7 i64.load offset=8 - local.set $4 + local.set $3 local.get $7 i64.load offset=16 local.set $1 - local.get $2 + local.get $4 i64.const 63 i64.and - local.tee $2 + local.tee $4 i64.const 0 i64.ne if local.get $6 - local.get $2 - i64.shl local.get $4 + i64.shl + local.get $3 i64.const 64 - local.get $2 + local.get $4 i64.sub - local.tee $3 + local.tee $2 i64.shr_u i64.or local.set $6 + local.get $3 local.get $4 - local.get $2 i64.shl local.get $1 - local.get $3 + local.get $2 i64.shr_u i64.or - local.set $4 + local.set $3 local.get $1 - local.get $2 + local.get $4 i64.shl local.get $7 i64.load offset=24 - local.get $3 + local.get $2 i64.shr_u i64.or local.set $1 @@ -3264,121 +3256,122 @@ i64.and i64.const 4503599627370496 i64.or - local.tee $2 + local.tee $4 i64.const 4294967295 i64.and - local.tee $3 - local.get $4 + local.tee $2 + local.get $3 i64.const 32 i64.shr_u local.tee $8 i64.mul - local.get $4 + local.get $3 i64.const 4294967295 i64.and local.tee $5 - local.get $3 + local.get $2 i64.mul local.tee $9 i64.const 32 i64.shr_u i64.add - local.set $4 + local.set $3 local.get $5 - local.get $2 + local.get $4 i64.const 32 i64.shr_u local.tee $5 i64.mul - local.get $4 + local.get $3 i64.const 4294967295 i64.and i64.add - local.set $3 + local.set $2 local.get $5 local.get $8 i64.mul - local.get $4 + local.get $3 i64.const 32 i64.shr_u i64.add - local.get $3 + local.get $2 i64.const 32 i64.shr_u i64.add global.set $~lib/math/res128_hi - global.get $~lib/math/res128_hi - local.get $2 - local.get $6 - i64.mul - i64.add - local.get $2 + local.get $4 i64.const 32 i64.shr_s local.get $1 i64.const 32 i64.shr_u i64.mul - local.tee $4 + local.tee $3 local.get $9 i64.const 4294967295 i64.and - local.get $3 + local.get $2 i64.const 32 i64.shl i64.add i64.add - local.tee $2 - local.get $4 + local.set $1 + local.get $1 + local.get $3 i64.lt_u i64.extend_i32_u + global.get $~lib/math/res128_hi + local.get $4 + local.get $6 + i64.mul + i64.add i64.add local.tee $8 i64.const 2 i64.shl - local.get $2 + local.get $1 i64.const 62 i64.shr_u i64.or local.tee $6 i64.const 63 i64.shr_s - local.tee $1 + local.tee $4 i64.const 1 i64.shr_s local.get $6 i64.xor - local.tee $3 + local.tee $2 i64.clz - local.set $4 + local.set $3 + local.get $2 local.get $3 - local.get $4 i64.shl + local.get $4 local.get $1 - local.get $2 i64.const 2 i64.shl i64.xor local.tee $5 i64.const 64 - local.get $4 + local.get $3 i64.sub i64.shr_u i64.or - local.tee $2 + local.tee $1 i64.const 4294967295 i64.and - local.set $3 - local.get $2 + local.set $2 + local.get $1 i64.const 32 i64.shr_u local.tee $9 i64.const 560513588 i64.mul - local.get $3 + local.get $2 i64.const 3373259426 i64.mul - local.get $3 + local.get $2 i64.const 560513588 i64.mul local.tee $10 @@ -3389,7 +3382,7 @@ i64.const 4294967295 i64.and i64.add - local.set $3 + local.set $2 local.get $9 i64.const 3373259426 i64.mul @@ -3397,7 +3390,7 @@ i64.const 32 i64.shr_u i64.add - local.get $3 + local.get $2 i64.const 32 i64.shr_u i64.add @@ -3405,24 +3398,24 @@ local.get $10 i64.const 4294967295 i64.and - local.get $3 + local.get $2 i64.const 32 i64.shl i64.add - local.tee $3 - local.get $2 + local.tee $2 + local.get $1 f64.convert_i64_u f64.const 3.753184150245214e-04 f64.mul local.get $5 - local.get $4 + local.get $3 i64.shl f64.convert_i64_u f64.const 3.834951969714103e-04 f64.mul f64.add i64.trunc_f64_u - local.tee $2 + local.tee $1 i64.lt_u i64.extend_i32_u global.get $~lib/math/res128_hi @@ -3432,11 +3425,11 @@ i64.add f64.convert_i64_u global.set $~lib/math/rempio2_y0 - local.get $2 + local.get $1 local.get $5 i64.const 53 i64.shl - local.get $3 + local.get $2 i64.const 11 i64.shr_u i64.or @@ -3447,7 +3440,7 @@ global.set $~lib/math/rempio2_y1 global.get $~lib/math/rempio2_y0 i64.const 4372995238176751616 - local.get $4 + local.get $3 i64.const 52 i64.shl i64.sub @@ -3468,7 +3461,7 @@ local.get $8 i64.const 62 i64.shr_s - local.get $1 + local.get $4 i64.sub i32.wrap_i64 ) @@ -5403,17 +5396,17 @@ (local $9 f64) (local $10 f64) (local $11 f64) - local.get $0 + local.get $1 i64.reinterpret_f64 i64.const 9223372036854775807 i64.and - local.tee $3 - local.get $1 + local.tee $2 + local.get $0 i64.reinterpret_f64 i64.const 9223372036854775807 i64.and - local.tee $2 - i64.lt_u + local.tee $3 + i64.gt_u if local.get $3 local.get $2 @@ -5567,17 +5560,17 @@ (local $3 i32) (local $4 i32) (local $5 f32) - local.get $0 + local.get $1 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $3 - local.get $1 + local.tee $2 + local.get $0 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $2 - i32.lt_u + local.tee $3 + i32.gt_u if local.get $3 local.get $2 @@ -6531,12 +6524,12 @@ f64.div return end + local.get $6 local.get $2 i64.const 1 i64.shl local.tee $8 - local.get $6 - i64.le_u + i64.ge_u if local.get $0 local.get $6 @@ -6754,12 +6747,12 @@ f32.div return end + local.get $6 local.get $2 i32.const 1 i32.shl local.tee $8 - local.get $6 - i32.le_u + i32.ge_u if local.get $0 local.get $6 @@ -8501,9 +8494,9 @@ local.tee $8 f64.eq select - local.get $8 local.get $1 - f64.gt + local.get $8 + f64.lt select i32.const 0 local.get $5 @@ -8738,9 +8731,9 @@ local.tee $8 f32.eq select - local.get $8 local.get $1 - f32.gt + local.get $8 + f32.lt select i32.const 0 local.get $5 diff --git a/tests/compiler/std/mod.optimized.wat b/tests/compiler/std/mod.optimized.wat index 5adbf0b09a..c6a3c675c3 100644 --- a/tests/compiler/std/mod.optimized.wat +++ b/tests/compiler/std/mod.optimized.wat @@ -77,12 +77,12 @@ f64.div return end + local.get $6 local.get $2 i64.const 1 i64.shl local.tee $8 - local.get $6 - i64.le_u + i64.ge_u if local.get $0 local.get $6 @@ -325,12 +325,12 @@ f32.div return end + local.get $6 local.get $2 i32.const 1 i32.shl local.tee $8 - local.get $6 - i32.le_u + i32.ge_u if local.get $0 local.get $6 diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index 2f3f991f33..46c1a33ae8 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -6,7 +6,6 @@ (func $~start (local $0 i32) (local $1 i32) - i32.const 1068 memory.size local.tee $1 i32.const 16 @@ -16,7 +15,8 @@ i32.const -16 i32.and local.tee $0 - i32.gt_u + i32.const 1068 + i32.lt_u if local.get $1 i32.const 66603 @@ -27,9 +27,9 @@ i32.const 16 i32.shr_u local.tee $0 - local.get $1 local.get $0 - i32.gt_s + local.get $1 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 8517eb637a..80fe6fe3f1 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -111,9 +111,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $4 local.get $2 - i32.gt_s + local.get $4 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 0867c00c16..53daead8c4 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -585,10 +585,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -977,12 +977,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1184 @@ -1913,6 +1913,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -1921,8 +1922,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 @@ -2239,9 +2239,9 @@ local.get $0 i32.load offset=20 local.tee $1 - i32.const 4 local.get $1 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -3047,9 +3047,9 @@ local.get $0 i32.load offset=20 local.tee $1 - i32.const 4 local.get $1 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -3823,9 +3823,9 @@ local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $9 local.get $8 - i32.lt_s + local.get $9 + i32.gt_s if local.get $5 local.get $9 @@ -3920,9 +3920,9 @@ local.get $0 i32.load offset=20 local.tee $1 - i32.const 4 local.get $1 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -4592,9 +4592,9 @@ local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $9 local.get $8 - i32.lt_s + local.get $9 + i32.gt_s if local.get $5 local.get $9 @@ -4687,9 +4687,9 @@ local.get $0 i32.load offset=20 local.tee $1 - i32.const 4 local.get $1 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -5469,9 +5469,9 @@ local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $9 local.get $8 - i32.lt_s + local.get $9 + i32.gt_s if local.get $5 local.get $9 @@ -5562,9 +5562,9 @@ local.get $0 i32.load offset=20 local.tee $1 - i32.const 4 local.get $1 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -5995,9 +5995,9 @@ local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $9 local.get $8 - i32.lt_s + local.get $9 + i32.gt_s if local.get $5 local.get $9 @@ -6817,9 +6817,9 @@ local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $9 local.get $8 - i32.lt_s + local.get $9 + i32.gt_s if local.get $5 local.get $9 @@ -6911,9 +6911,9 @@ local.get $0 i32.load offset=20 local.tee $2 - i32.const 4 local.get $2 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -7378,9 +7378,9 @@ local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $9 local.get $8 - i32.lt_s + local.get $9 + i32.gt_s if local.get $5 local.get $9 @@ -8089,9 +8089,9 @@ local.get $8 i32.store offset=12 loop $for-loop|0 - local.get $10 local.get $9 - i32.lt_s + local.get $10 + i32.gt_s if local.get $6 local.get $10 @@ -8217,9 +8217,9 @@ local.get $0 i32.load offset=20 local.tee $2 - i32.const 4 local.get $2 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -8915,9 +8915,9 @@ local.get $8 i32.store offset=12 loop $for-loop|0 - local.get $10 local.get $9 - i32.lt_s + local.get $10 + i32.gt_s if local.get $6 local.get $10 @@ -9043,9 +9043,9 @@ local.get $0 i32.load offset=20 local.tee $2 - i32.const 4 local.get $2 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 5070f3571e..9b24262cb8 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -88,9 +88,9 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 @@ -341,9 +341,9 @@ i32.const 1 i32.shl local.tee $1 - local.get $2 local.get $1 - i32.gt_u + local.get $2 + i32.lt_u select local.tee $2 i32.const 1073741820 @@ -547,19 +547,19 @@ (local $3 i32) (local $4 i32) (local $5 i32) - i32.const 1 local.get $0 i32.load offset=8 local.tee $4 local.get $1 i32.shr_u - i32.gt_u + i32.const 1 + i32.lt_u if - i32.const 1 i32.const 1073741820 local.get $1 i32.shr_u - i32.gt_u + i32.const 1 + i32.lt_u if i32.const 1584 i32.const 1536 @@ -721,10 +721,10 @@ end i32.const 1676 global.set $~lib/rt/stub/offset - i32.const 0 i32.const 1100 i32.load - i32.ge_u + i32.const 0 + i32.le_u if i32.const 1088 i32.const 2 @@ -785,10 +785,10 @@ call $~lib/builtins/abort unreachable end - i32.const 0 i32.const 1196 i32.load - i32.ge_u + i32.const 0 + i32.le_u if i32.const 1184 i32.const 3 @@ -849,10 +849,10 @@ call $~lib/builtins/abort unreachable end - i32.const 0 i32.const 1276 i32.load - i32.ge_u + i32.const 0 + i32.le_u if i32.const 1264 i32.const 2 @@ -913,10 +913,10 @@ call $~lib/builtins/abort unreachable end - i32.const 0 i32.const 1372 i32.load - i32.ge_u + i32.const 0 + i32.le_u if i32.const 1360 i32.const 3 diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index f91ef3bed0..51594aec18 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -48,14 +48,14 @@ i32.load ) (func $~lib/staticarray/StaticArray#__set (param $0 i32) (param $1 i32) - i32.const 1 local.get $0 i32.const 20 i32.sub i32.load offset=16 i32.const 2 i32.shr_u - i32.ge_u + i32.const 1 + i32.le_u if i32.const 1088 i32.const 1152 @@ -618,10 +618,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -1006,12 +1006,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1472 diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index e40d126df2..17bbb07e7e 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -899,10 +899,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -1291,12 +1291,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1216 @@ -1480,9 +1480,9 @@ i32.sub return else - local.get $6 local.get $5 - i32.gt_u + local.get $6 + i32.lt_u if (result i32) local.get $3 else @@ -1829,6 +1829,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -1837,8 +1838,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 @@ -2020,9 +2020,9 @@ local.set $9 block $~lib/util/casemap/bsearch|inlined.0 loop $while-continue|1 - local.get $9 local.get $1 - i32.le_s + local.get $9 + i32.ge_s if local.get $1 local.get $9 @@ -2514,9 +2514,9 @@ i32.const 30 i32.sub local.tee $1 - i32.const 0 local.get $1 - i32.gt_s + i32.const 0 + i32.lt_s select local.set $9 loop $while-continue|1 @@ -2645,9 +2645,9 @@ select local.set $2 loop $while-continue|2 - local.get $3 local.get $2 - i32.lt_s + local.get $3 + i32.gt_s if local.get $0 local.get $3 diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index c19a4c1a08..fb61989356 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -649,10 +649,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -1041,12 +1041,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1280 @@ -1841,11 +1841,11 @@ i32.const 2 i32.add else + local.get $4 local.get $0 i32.const 2 i32.add - local.get $4 - i32.lt_u + i32.gt_u i32.const 0 local.get $3 i32.const 64512 @@ -1942,11 +1942,11 @@ i32.const 2 i32.add else + local.get $4 local.get $0 i32.const 2 i32.add - local.get $4 - i32.lt_u + i32.gt_u i32.const 0 local.get $2 i32.const 64512 @@ -2527,6 +2527,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -2535,8 +2536,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index fa247f52d8..87cf52c5a9 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -1239,10 +1239,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -1631,12 +1631,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1488 @@ -2052,9 +2052,9 @@ i32.mul local.set $3 loop $while-continue|0 - local.get $4 local.get $3 - i32.lt_u + local.get $4 + i32.gt_u if local.get $0 local.get $4 @@ -2088,10 +2088,6 @@ i32.shl local.tee $4 i32.eqz - local.get $1 - i32.const 1 - i32.shl - local.tee $3 local.get $0 i32.const 20 i32.sub @@ -2101,7 +2097,11 @@ i32.const 1 i32.shl local.tee $5 - i32.lt_u + local.get $1 + i32.const 1 + i32.shl + local.tee $3 + i32.gt_u select if local.get $0 @@ -2114,12 +2114,12 @@ i32.const 1 call $~lib/rt/pure/__new local.set $1 + local.get $4 local.get $3 local.get $5 i32.sub local.tee $3 - local.get $4 - i32.gt_u + i32.lt_u if local.get $1 local.get $2 @@ -2176,10 +2176,6 @@ i32.shl local.tee $3 i32.eqz - local.get $1 - i32.const 1 - i32.shl - local.tee $4 local.get $0 i32.const 20 i32.sub @@ -2188,8 +2184,12 @@ i32.shr_u i32.const 1 i32.shl - local.tee $1 - i32.lt_u + local.tee $4 + local.get $1 + i32.const 1 + i32.shl + local.tee $5 + i32.gt_u select if local.get $0 @@ -2198,24 +2198,24 @@ call $~lib/rt/pure/__release return end - local.get $4 + local.get $5 i32.const 1 call $~lib/rt/pure/__new - local.tee $5 + local.tee $1 local.get $0 - local.get $1 + local.get $4 call $~lib/memory/memory.copy + local.get $3 + local.get $5 local.get $4 - local.get $1 i32.sub local.tee $0 - local.get $3 - i32.gt_u + i32.lt_u if local.get $1 - local.get $5 + local.get $4 i32.add - local.tee $1 + local.tee $4 local.get $2 local.get $3 local.get $0 @@ -2223,28 +2223,28 @@ i32.sub local.get $3 i32.div_u - local.tee $4 + local.tee $5 call $~lib/memory/memory.repeat - local.get $1 - local.get $3 local.get $4 + local.get $3 + local.get $5 i32.mul - local.tee $1 + local.tee $3 i32.add local.get $2 local.get $0 - local.get $1 + local.get $3 i32.sub call $~lib/memory/memory.copy else local.get $1 - local.get $5 + local.get $4 i32.add local.get $2 local.get $0 call $~lib/memory/memory.copy end - local.get $5 + local.get $1 call $~lib/rt/pure/__retain local.get $2 call $~lib/rt/pure/__release @@ -2368,9 +2368,9 @@ call $~lib/rt/pure/__release i32.const 1 i32.const -1 - local.get $3 local.get $2 - i32.gt_s + local.get $3 + i32.lt_s select return end @@ -2608,9 +2608,9 @@ end end loop $while-continue|1 - local.get $2 local.get $1 - i32.lt_u + local.get $2 + i32.gt_u if (result i32) local.get $0 local.get $2 @@ -2859,6 +2859,7 @@ local.set $0 local.get $2 if + local.get $1 local.get $4 i32.load16_u local.tee $2 @@ -2892,8 +2893,7 @@ select end local.tee $2 - local.get $1 - i32.ge_u + i32.le_u if local.get $6 i64.reinterpret_f64 @@ -3094,6 +3094,7 @@ local.set $0 local.get $1 if + local.get $6 local.get $3 i32.load16_u local.tee $1 @@ -3127,8 +3128,7 @@ select end local.tee $1 - local.get $6 - i32.ge_u + i32.le_u if local.get $5 i32.eqz @@ -3311,6 +3311,7 @@ local.set $0 local.get $1 if + local.get $6 local.get $3 i32.load16_u local.tee $1 @@ -3344,8 +3345,7 @@ select end local.tee $1 - local.get $6 - i32.ge_u + i32.le_u if local.get $5 i64.eqz @@ -3799,9 +3799,9 @@ select i32.const 19 local.get $1 - i32.const 19 local.get $1 - i32.lt_s + i32.const 19 + i32.gt_s select i32.sub block $~lib/util/string/parseExp|inlined.0 (result i32) @@ -4472,9 +4472,9 @@ local.get $1 local.get $3 local.get $2 - local.get $3 local.get $2 - i32.lt_s + local.get $3 + i32.gt_s select call $~lib/util/string/compareImpl i32.const 0 @@ -4596,21 +4596,21 @@ call $~lib/rt/pure/__retain local.set $2 block $folding-inner0 - local.get $0 + local.get $1 i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u - local.tee $3 - local.get $1 + local.tee $5 + local.get $0 i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u - local.tee $5 - i32.le_u + local.tee $3 + i32.ge_u if local.get $3 local.get $5 @@ -4856,6 +4856,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -4864,8 +4865,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 @@ -4921,21 +4921,21 @@ call $~lib/rt/pure/__retain local.set $5 block $folding-inner1 (result i32) - local.get $0 + local.get $7 i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u - local.tee $4 - local.get $7 + local.tee $10 + local.get $0 i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u - local.tee $10 - i32.le_u + local.tee $4 + i32.ge_u if local.get $4 local.get $10 @@ -4992,9 +4992,9 @@ local.get $2 local.set $1 loop $for-loop|0 - local.get $9 local.get $4 - i32.lt_u + local.get $9 + i32.gt_u if local.get $3 local.get $1 @@ -5099,9 +5099,9 @@ call $~lib/rt/pure/__new local.set $3 end - local.get $8 local.get $1 - i32.gt_u + local.get $8 + i32.lt_u if local.get $3 local.get $1 @@ -5156,9 +5156,9 @@ end local.get $8 if - local.get $8 local.get $1 - i32.gt_u + local.get $8 + i32.lt_u if local.get $3 local.get $1 @@ -5378,9 +5378,9 @@ i32.const 1 i32.shr_u local.tee $1 - local.get $3 local.get $1 - i32.lt_s + local.get $3 + i32.gt_s select local.tee $3 local.get $2 @@ -5391,23 +5391,23 @@ select local.tee $2 local.get $1 - local.get $2 local.get $1 - i32.lt_s + local.get $2 + i32.gt_s select local.tee $2 - local.get $3 local.get $2 - i32.gt_s + local.get $3 + i32.lt_s select i32.const 1 i32.shl local.tee $4 local.get $3 local.get $2 - local.get $3 local.get $2 - i32.lt_s + local.get $3 + i32.gt_s select i32.const 1 i32.shl @@ -5786,9 +5786,9 @@ br_if $folding-inner0 local.get $3 local.get $2 - local.get $3 local.get $2 - i32.lt_s + local.get $3 + i32.gt_s select local.tee $2 call $~lib/rt/__newArray @@ -5797,9 +5797,9 @@ i32.load offset=4 local.set $3 loop $for-loop|0 - local.get $6 local.get $2 - i32.lt_s + local.get $6 + i32.gt_s if i32.const 2 i32.const 1 @@ -6984,11 +6984,11 @@ i64.lt_u select i32.const 0 + local.get $2 local.get $4 local.get $0 i64.sub - local.get $2 - i64.ge_u + i64.le_u i32.const 0 local.get $0 local.get $8 @@ -7058,12 +7058,12 @@ i32.const 1 i32.sub local.set $7 + local.get $4 local.get $2 local.get $11 i64.and local.tee $6 - local.get $4 - i64.ge_u + i64.le_u br_if $while-continue|4 end local.get $7 @@ -7103,16 +7103,16 @@ local.get $2 i64.sub i64.gt_u - local.get $6 local.get $2 - i64.lt_u + local.get $6 + i64.gt_u select i32.const 0 + local.get $10 local.get $4 local.get $0 i64.sub - local.get $10 - i64.ge_u + i64.le_u i32.const 0 local.get $0 local.get $2 @@ -7230,9 +7230,9 @@ i32.const 0 i32.le_s i32.const 0 - i32.const -6 local.get $3 - i32.lt_s + i32.const -6 + i32.gt_s select if (result i32) local.get $0 @@ -7716,8 +7716,8 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 f32) - (local $9 i32) + (local $8 i32) + (local $9 f32) (local $10 i32) (local $11 i32) (local $12 i32) @@ -8073,7 +8073,6 @@ end block $__inlined_func$~lib/string/String#charCodeAt (result i32) i32.const -1 - i32.const 0 global.get $std/string/str local.tee $0 i32.const 20 @@ -8081,7 +8080,8 @@ i32.load offset=16 i32.const 1 i32.shr_u - i32.ge_u + i32.const 0 + i32.le_u br_if $__inlined_func$~lib/string/String#charCodeAt drop local.get $0 @@ -8132,7 +8132,7 @@ global.set $~argumentsLength i32.const 0 call $~lib/string/String.fromCharCode@varargs - local.tee $9 + local.tee $10 i32.const 1360 call $~lib/string/String.__eq i32.eqz @@ -8148,7 +8148,7 @@ global.set $~argumentsLength i32.const 54 call $~lib/string/String.fromCharCode@varargs - local.tee $10 + local.tee $11 i32.const 1552 call $~lib/string/String.__eq i32.eqz @@ -8164,7 +8164,7 @@ global.set $~argumentsLength i32.const 65590 call $~lib/string/String.fromCharCode@varargs - local.tee $11 + local.tee $12 i32.const 1552 call $~lib/string/String.__eq i32.eqz @@ -8179,7 +8179,7 @@ i32.const 55296 i32.const 57088 call $~lib/string/String.fromCharCode - local.tee $12 + local.tee $13 i32.const 1584 call $~lib/string/String.__eq i32.eqz @@ -8193,7 +8193,7 @@ end i32.const 0 call $~lib/string/String.fromCodePoint - local.tee $13 + local.tee $14 i32.const 1360 call $~lib/string/String.__eq i32.eqz @@ -8207,7 +8207,7 @@ end i32.const 54 call $~lib/string/String.fromCodePoint - local.tee $14 + local.tee $15 i32.const 1552 call $~lib/string/String.__eq i32.eqz @@ -8221,7 +8221,7 @@ end i32.const 119558 call $~lib/string/String.fromCodePoint - local.tee $15 + local.tee $16 i32.const 1664 call $~lib/string/String.__eq i32.eqz @@ -8249,9 +8249,9 @@ i32.load offset=16 i32.const 1 i32.shr_u - local.tee $0 - local.set $4 - local.get $0 + local.tee $5 + local.set $6 + local.get $5 i32.const 0 local.get $2 i32.const 20 @@ -8260,11 +8260,11 @@ i32.const 1 i32.shr_u local.tee $0 - i32.const 0 local.get $0 - i32.lt_s + i32.const 0 + i32.gt_u select - local.tee $5 + local.tee $4 i32.add local.get $0 i32.gt_s @@ -8275,9 +8275,9 @@ br $__inlined_func$~lib/string/String#startsWith end local.get $2 - local.get $5 - i32.const 1696 local.get $4 + i32.const 1696 + local.get $6 call $~lib/util/string/compareImpl i32.eqz i32.const 1696 @@ -8309,9 +8309,9 @@ i32.const 1 i32.shr_u local.tee $5 - i32.const 536870910 local.get $5 - i32.lt_s + i32.const 536870910 + i32.gt_u select local.get $2 i32.sub @@ -8398,7 +8398,7 @@ i32.const 3 i32.const 1824 call $~lib/string/String#padStart - local.tee $16 + local.tee $6 i32.const 1856 call $~lib/string/String.__eq i32.eqz @@ -9626,11 +9626,11 @@ i32.const 0 call $~lib/util/string/strtol f32.demote_f64 - local.set $8 + local.set $9 i32.const 3728 call $~lib/rt/pure/__release - local.get $8 - local.get $8 + local.get $9 + local.get $9 f32.eq if i32.const 0 @@ -11861,9 +11861,9 @@ call $~lib/string/String.fromCodePoint local.tee $2 call $~lib/string/String.__concat - local.tee $6 - call $~lib/rt/pure/__retain local.tee $7 + call $~lib/rt/pure/__retain + local.tee $8 call $~lib/string/String.__gt i32.eqz if @@ -11880,10 +11880,10 @@ call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release local.get $7 call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release i32.const 1948 i32.load i32.const 1 @@ -11901,7 +11901,7 @@ i32.const 1328 i32.const 100 call $~lib/string/String#repeat - local.tee $6 + local.tee $7 i32.const 1328 call $~lib/string/String.__eq i32.eqz @@ -11916,7 +11916,7 @@ i32.const 1392 i32.const 0 call $~lib/string/String#repeat - local.tee $7 + local.tee $8 i32.const 1328 call $~lib/string/String.__eq i32.eqz @@ -16659,8 +16659,6 @@ end global.get $std/string/str call $~lib/rt/pure/__release - local.get $9 - call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release local.get $11 @@ -16673,11 +16671,13 @@ call $~lib/rt/pure/__release local.get $15 call $~lib/rt/pure/__release + local.get $16 + call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $16 + local.get $6 call $~lib/rt/pure/__release local.get $17 call $~lib/rt/pure/__release @@ -16737,9 +16737,9 @@ call $~lib/rt/pure/__release local.get $44 call $~lib/rt/pure/__release - local.get $7 + local.get $8 call $~lib/rt/pure/__release - local.get $6 + local.get $7 call $~lib/rt/pure/__release local.get $47 call $~lib/rt/pure/__release diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index b30c054363..45f11fa014 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -124,9 +124,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 17dfd3ff22..d829e32ad8 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -971,10 +971,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -1363,12 +1363,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1296 @@ -2441,9 +2441,9 @@ local.get $2 local.get $1 local.get $0 - local.get $1 local.get $0 - i32.gt_s + local.get $1 + i32.lt_s select local.get $0 i32.sub @@ -2552,9 +2552,9 @@ local.get $2 local.get $1 local.get $0 - local.get $1 local.get $0 - i32.gt_s + local.get $1 + i32.lt_s select local.get $0 i32.sub @@ -2576,9 +2576,9 @@ call $~lib/rt/pure/__retain local.set $5 loop $for-loop|0 - local.get $4 local.get $1 - i32.lt_s + local.get $4 + i32.gt_s if local.get $0 local.get $4 @@ -2847,6 +2847,7 @@ i32.const 1 local.set $1 loop $while-continue|3 + local.get $3 local.get $4 local.get $1 i32.const 5 @@ -2864,8 +2865,7 @@ i32.shl i32.add local.tee $2 - local.get $3 - i32.lt_s + i32.gt_s if local.get $2 local.set $1 @@ -3606,9 +3606,9 @@ local.get $2 local.get $1 local.get $0 - local.get $1 local.get $0 - i32.gt_s + local.get $1 + i32.lt_s select local.get $0 i32.sub @@ -3650,9 +3650,9 @@ else local.get $2 local.get $1 - local.get $2 local.get $1 - i32.lt_s + local.get $2 + i32.gt_s select end local.set $0 @@ -3672,9 +3672,9 @@ else local.get $3 local.get $1 - local.get $3 local.get $1 - i32.lt_s + local.get $3 + i32.gt_s select end local.set $1 @@ -3962,9 +3962,9 @@ local.get $1 i32.sub local.tee $0 - local.get $2 local.get $0 - i32.lt_s + local.get $2 + i32.gt_s select i32.const 2 i32.shl @@ -4550,9 +4550,9 @@ call $~lib/rt/pure/__new local.set $4 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_s + local.get $1 + i32.gt_s if local.get $1 local.get $6 @@ -4626,9 +4626,9 @@ call $~lib/rt/pure/__new local.set $4 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_s + local.get $1 + i32.gt_s if local.get $1 local.get $6 @@ -4721,9 +4721,9 @@ call $~lib/rt/pure/__new local.set $4 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_s + local.get $1 + i32.gt_s if local.get $1 local.get $6 @@ -4804,9 +4804,9 @@ call $~lib/rt/pure/__new local.set $4 loop $for-loop|0 - local.get $3 local.get $0 - i32.lt_s + local.get $3 + i32.gt_s if local.get $6 local.get $3 @@ -4913,9 +4913,9 @@ call $~lib/rt/pure/__new local.set $4 loop $for-loop|0 - local.get $3 local.get $0 - i32.lt_s + local.get $3 + i32.gt_s if local.get $6 local.get $3 @@ -5022,9 +5022,9 @@ call $~lib/rt/pure/__new local.set $4 loop $for-loop|0 - local.get $3 local.get $0 - i32.lt_s + local.get $3 + i32.gt_s if local.get $6 local.get $3 @@ -5108,9 +5108,9 @@ call $~lib/rt/pure/__new local.set $4 loop $for-loop|0 - local.get $3 local.get $0 - i32.lt_s + local.get $3 + i32.gt_s if local.get $6 local.get $3 @@ -5222,9 +5222,9 @@ call $~lib/rt/pure/__new local.set $4 loop $for-loop|0 - local.get $3 local.get $0 - i32.lt_s + local.get $3 + i32.gt_s if local.get $6 local.get $3 @@ -5331,9 +5331,9 @@ call $~lib/rt/pure/__new local.set $4 loop $for-loop|0 - local.get $3 local.get $0 - i32.lt_s + local.get $3 + i32.gt_s if local.get $6 local.get $3 @@ -5445,9 +5445,9 @@ call $~lib/rt/pure/__new local.set $4 loop $for-loop|0 - local.get $3 local.get $0 - i32.lt_s + local.get $3 + i32.gt_s if local.get $6 local.get $3 @@ -5559,9 +5559,9 @@ call $~lib/rt/pure/__new local.set $4 loop $for-loop|0 - local.get $3 local.get $0 - i32.lt_s + local.get $3 + i32.gt_s if local.get $6 local.get $3 @@ -5718,6 +5718,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -5726,8 +5727,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 @@ -5797,9 +5797,9 @@ i32.load offset=4 local.set $8 loop $for-loop|0 - local.get $4 local.get $0 - i32.lt_s + local.get $4 + i32.gt_s if local.get $4 local.get $8 @@ -5992,9 +5992,9 @@ i32.load offset=4 local.set $8 loop $for-loop|0 - local.get $4 local.get $0 - i32.lt_s + local.get $4 + i32.gt_s if local.get $4 local.get $8 @@ -6180,9 +6180,9 @@ i32.load offset=4 local.set $8 loop $for-loop|0 - local.get $4 local.get $0 - i32.lt_s + local.get $4 + i32.gt_s if local.get $4 local.get $8 @@ -6381,9 +6381,9 @@ i32.load offset=4 local.set $8 loop $for-loop|0 - local.get $2 local.get $0 - i32.lt_s + local.get $2 + i32.gt_s if local.get $8 local.get $2 @@ -6589,9 +6589,9 @@ i32.load offset=4 local.set $8 loop $for-loop|0 - local.get $2 local.get $0 - i32.lt_s + local.get $2 + i32.gt_s if local.get $8 local.get $2 @@ -6795,9 +6795,9 @@ i32.load offset=4 local.set $8 loop $for-loop|0 - local.get $2 local.get $0 - i32.lt_s + local.get $2 + i32.gt_s if local.get $8 local.get $2 @@ -7001,9 +7001,9 @@ i32.load offset=4 local.set $8 loop $for-loop|0 - local.get $2 local.get $0 - i32.lt_s + local.get $2 + i32.gt_s if local.get $8 local.get $2 @@ -7207,9 +7207,9 @@ i32.load offset=4 local.set $8 loop $for-loop|0 - local.get $2 local.get $0 - i32.lt_s + local.get $2 + i32.gt_s if local.get $8 local.get $2 @@ -7413,9 +7413,9 @@ i32.load offset=4 local.set $8 loop $for-loop|0 - local.get $2 local.get $0 - i32.lt_s + local.get $2 + i32.gt_s if local.get $8 local.get $2 @@ -7619,9 +7619,9 @@ i32.load offset=4 local.set $8 loop $for-loop|0 - local.get $2 local.get $0 - i32.lt_s + local.get $2 + i32.gt_s if local.get $8 local.get $2 @@ -7825,9 +7825,9 @@ i32.load offset=4 local.set $8 loop $for-loop|0 - local.get $2 local.get $0 - i32.lt_s + local.get $2 + i32.gt_s if local.get $8 local.get $2 @@ -10502,9 +10502,9 @@ i32.sub local.set $0 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_u + local.get $1 + i32.gt_u if local.get $1 local.get $4 @@ -10716,9 +10716,9 @@ i32.sub local.set $0 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_u + local.get $1 + i32.gt_u if local.get $1 local.get $4 @@ -10758,9 +10758,9 @@ local.tee $3 i32.load offset=8 local.tee $0 - i32.const 4 local.get $0 - i32.lt_s + i32.const 4 + i32.gt_s select local.set $2 local.get $1 @@ -10779,9 +10779,9 @@ else local.get $1 local.get $0 - local.get $1 local.get $0 - i32.lt_s + local.get $1 + i32.gt_s select end local.set $0 @@ -10980,9 +10980,9 @@ local.tee $3 i32.load offset=8 local.tee $0 - i32.const 4 local.get $0 - i32.lt_s + i32.const 4 + i32.gt_s select local.set $2 local.get $1 @@ -11001,9 +11001,9 @@ else local.get $1 local.get $0 - local.get $1 local.get $0 - i32.lt_s + local.get $1 + i32.gt_s select end local.set $0 @@ -11212,9 +11212,9 @@ i32.sub local.set $0 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_u + local.get $1 + i32.gt_u if local.get $4 local.get $1 @@ -11260,9 +11260,9 @@ i32.const 1 i32.shr_u local.tee $0 - i32.const 4 local.get $0 - i32.lt_s + i32.const 4 + i32.gt_s select local.set $2 local.get $1 @@ -11281,9 +11281,9 @@ else local.get $1 local.get $0 - local.get $1 local.get $0 - i32.lt_s + local.get $1 + i32.gt_s select end local.set $0 @@ -11502,9 +11502,9 @@ i32.sub local.set $0 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_u + local.get $1 + i32.gt_u if local.get $4 local.get $1 @@ -11550,9 +11550,9 @@ i32.const 1 i32.shr_u local.tee $0 - i32.const 4 local.get $0 - i32.lt_s + i32.const 4 + i32.gt_s select local.set $2 local.get $1 @@ -11571,9 +11571,9 @@ else local.get $1 local.get $0 - local.get $1 local.get $0 - i32.lt_s + local.get $1 + i32.gt_s select end local.set $0 @@ -11786,9 +11786,9 @@ i32.sub local.set $0 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_u + local.get $1 + i32.gt_u if local.get $4 local.get $1 @@ -11986,9 +11986,9 @@ i32.const 2 i32.shr_u local.tee $0 - i32.const 4 local.get $0 - i32.lt_s + i32.const 4 + i32.gt_s select local.set $2 local.get $1 @@ -12007,9 +12007,9 @@ else local.get $1 local.get $0 - local.get $1 local.get $0 - i32.lt_s + local.get $1 + i32.gt_s select end local.set $0 @@ -12216,9 +12216,9 @@ i32.sub local.set $0 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_u + local.get $1 + i32.gt_u if local.get $4 local.get $1 @@ -12264,9 +12264,9 @@ i32.const 3 i32.shr_u local.tee $0 - i32.const 4 local.get $0 - i32.lt_s + i32.const 4 + i32.gt_s select local.set $2 local.get $1 @@ -12285,9 +12285,9 @@ else local.get $1 local.get $0 - local.get $1 local.get $0 - i32.lt_s + local.get $1 + i32.gt_s select end local.set $0 @@ -12489,9 +12489,9 @@ i32.const 3 i32.shr_u local.tee $0 - i32.const 4 local.get $0 - i32.lt_s + i32.const 4 + i32.gt_s select local.set $2 local.get $1 @@ -12510,9 +12510,9 @@ else local.get $1 local.get $0 - local.get $1 local.get $0 - i32.lt_s + local.get $1 + i32.gt_s select end local.set $0 @@ -12722,9 +12722,9 @@ i32.sub local.set $0 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_u + local.get $1 + i32.gt_u if local.get $4 local.get $1 @@ -12770,9 +12770,9 @@ i32.const 2 i32.shr_u local.tee $0 - i32.const 4 local.get $0 - i32.lt_s + i32.const 4 + i32.gt_s select local.set $2 local.get $1 @@ -12791,9 +12791,9 @@ else local.get $1 local.get $0 - local.get $1 local.get $0 - i32.lt_s + local.get $1 + i32.gt_s select end local.set $0 @@ -13003,9 +13003,9 @@ i32.sub local.set $0 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_u + local.get $1 + i32.gt_u if local.get $4 local.get $1 @@ -19008,9 +19008,9 @@ i32.const 1 i32.shr_u local.tee $2 - i32.const 0 local.get $2 - i32.lt_s + i32.const 0 + i32.gt_s select local.tee $3 local.get $1 @@ -19026,18 +19026,18 @@ i32.lt_s select local.tee $1 - local.get $3 local.get $1 - i32.gt_s + local.get $3 + i32.lt_s select i32.const 1 i32.shl local.tee $4 local.get $3 local.get $1 - local.get $3 local.get $1 - i32.lt_s + local.get $3 + i32.gt_s select i32.const 1 i32.shl @@ -19127,9 +19127,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $2 @@ -19460,9 +19460,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $2 @@ -19653,9 +19653,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $2 @@ -19821,9 +19821,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $2 @@ -20002,9 +20002,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $2 @@ -20161,9 +20161,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $2 @@ -20498,9 +20498,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $7 local.get $5 - i32.lt_s + local.get $7 + i32.gt_s if local.get $1 local.get $2 @@ -20713,9 +20713,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $7 local.get $4 - i32.lt_s + local.get $7 + i32.gt_s if local.get $1 local.get $2 @@ -20977,6 +20977,7 @@ i32.const 1 i32.sub local.set $9 + local.get $5 local.get $7 local.get $2 i64.extend_i32_u @@ -20985,8 +20986,7 @@ i64.shl i64.add local.tee $1 - local.get $5 - i64.le_u + i64.ge_u if local.get $9 global.get $~lib/util/number/_K @@ -21029,11 +21029,11 @@ i64.lt_u select i32.const 0 + local.get $10 local.get $5 local.get $1 i64.sub - local.get $10 - i64.ge_u + i64.le_u i32.const 0 local.get $1 local.get $8 @@ -21154,11 +21154,11 @@ i64.lt_u select i32.const 0 + local.get $10 local.get $5 local.get $1 i64.sub - local.get $10 - i64.ge_u + i64.le_u i32.const 0 local.get $1 local.get $8 @@ -21277,9 +21277,9 @@ i32.const 0 i32.le_s i32.const 0 - i32.const -6 local.get $3 - i32.lt_s + i32.const -6 + i32.gt_s select if (result i32) local.get $0 @@ -21877,9 +21877,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $2 @@ -22017,9 +22017,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $2 @@ -22128,18 +22128,17 @@ (func $~lib/typedarray/Uint8Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) - local.get $1 local.get $0 call $~lib/rt/pure/__retain - local.tee $5 + local.tee $4 call $~lib/rt/pure/__retain local.tee $3 i32.const 20 i32.sub i32.load offset=16 - local.tee $4 - i32.gt_u + local.tee $0 + local.get $1 + i32.lt_u if i32.const 1424 i32.const 1488 @@ -22156,7 +22155,7 @@ i32.const -1 i32.eq if (result i32) - local.get $4 + local.get $0 local.get $1 i32.sub else @@ -22169,12 +22168,12 @@ end local.set $0 else + local.get $0 local.get $2 local.tee $0 local.get $1 i32.add - local.get $4 - i32.gt_s + i32.lt_s if i32.const 1056 i32.const 1488 @@ -22203,7 +22202,7 @@ call $~lib/rt/pure/__retain local.get $3 call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release ) (func $~lib/typedarray/Uint8Array.wrap@varargs (param $0 i32) (param $1 i32) (result i32) @@ -22365,19 +22364,7 @@ i32.const 20 i32.sub i32.load offset=16 - local.tee $2 local.set $7 - i32.const 0 - local.get $2 - i32.gt_u - if - i32.const 1424 - i32.const 1488 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end i32.const 12 i32.const 3 call $~lib/rt/pure/__new @@ -22598,19 +22585,7 @@ i32.const 20 i32.sub i32.load offset=16 - local.tee $2 local.set $7 - i32.const 0 - local.get $2 - i32.gt_u - if - i32.const 1424 - i32.const 1488 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end i32.const 12 i32.const 5 call $~lib/rt/pure/__new @@ -22684,7 +22659,7 @@ i32.load local.tee $3 call $~lib/typedarray/Int16Array#constructor - local.tee $6 + local.tee $5 call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -22728,26 +22703,17 @@ local.set $4 i32.const 1 global.set $~argumentsLength - i32.const 0 local.get $4 call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $~lib/rt/pure/__retain local.tee $0 i32.const 20 i32.sub i32.load offset=16 - local.tee $5 - i32.gt_u - if - i32.const 1424 - i32.const 1488 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 + local.tee $2 + local.set $7 + local.get $2 i32.const 1 i32.and if @@ -22766,7 +22732,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $7 i32.store offset=8 local.get $2 local.get $0 @@ -22776,7 +22742,7 @@ local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -22807,7 +22773,7 @@ br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release i32.const 8608 call $~lib/rt/pure/__release @@ -22831,7 +22797,7 @@ i32.load local.tee $3 call $~lib/typedarray/Uint16Array#constructor - local.tee $6 + local.tee $5 call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -22873,26 +22839,17 @@ local.set $4 i32.const 1 global.set $~argumentsLength - i32.const 0 local.get $4 call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $~lib/rt/pure/__retain local.tee $0 i32.const 20 i32.sub i32.load offset=16 - local.tee $5 - i32.gt_u - if - i32.const 1424 - i32.const 1488 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 + local.tee $2 + local.set $7 + local.get $2 i32.const 1 i32.and if @@ -22911,7 +22868,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $7 i32.store offset=8 local.get $2 local.get $0 @@ -22921,7 +22878,7 @@ local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -22952,7 +22909,7 @@ br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release i32.const 8608 call $~lib/rt/pure/__release @@ -22976,7 +22933,7 @@ i32.load local.tee $3 call $~lib/typedarray/Int32Array#constructor - local.tee $6 + local.tee $5 call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -23016,26 +22973,17 @@ local.set $4 i32.const 1 global.set $~argumentsLength - i32.const 0 local.get $4 call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $~lib/rt/pure/__retain local.tee $0 i32.const 20 i32.sub i32.load offset=16 - local.tee $5 - i32.gt_u - if - i32.const 1424 - i32.const 1488 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 + local.tee $2 + local.set $7 + local.get $2 i32.const 3 i32.and if @@ -23054,7 +23002,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $7 i32.store offset=8 local.get $2 local.get $0 @@ -23064,7 +23012,7 @@ local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -23095,7 +23043,7 @@ br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release i32.const 8608 call $~lib/rt/pure/__release @@ -23119,7 +23067,7 @@ i32.load local.tee $3 call $~lib/typedarray/Uint32Array#constructor - local.tee $6 + local.tee $5 call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -23159,26 +23107,17 @@ local.set $4 i32.const 1 global.set $~argumentsLength - i32.const 0 local.get $4 call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $~lib/rt/pure/__retain local.tee $0 i32.const 20 i32.sub i32.load offset=16 - local.tee $5 - i32.gt_u - if - i32.const 1424 - i32.const 1488 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 + local.tee $2 + local.set $7 + local.get $2 i32.const 3 i32.and if @@ -23197,7 +23136,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $7 i32.store offset=8 local.get $2 local.get $0 @@ -23207,7 +23146,7 @@ local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -23238,7 +23177,7 @@ br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release i32.const 8608 call $~lib/rt/pure/__release @@ -23262,7 +23201,7 @@ i32.load local.tee $3 call $~lib/typedarray/Int64Array#constructor - local.tee $6 + local.tee $5 call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -23303,26 +23242,17 @@ local.set $4 i32.const 1 global.set $~argumentsLength - i32.const 0 local.get $4 call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $~lib/rt/pure/__retain local.tee $0 i32.const 20 i32.sub i32.load offset=16 - local.tee $5 - i32.gt_u - if - i32.const 1424 - i32.const 1488 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 + local.tee $2 + local.set $7 + local.get $2 i32.const 7 i32.and if @@ -23341,7 +23271,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $7 i32.store offset=8 local.get $2 local.get $0 @@ -23351,7 +23281,7 @@ local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -23382,7 +23312,7 @@ br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release i32.const 8608 call $~lib/rt/pure/__release @@ -23406,7 +23336,7 @@ i32.load local.tee $3 call $~lib/typedarray/Uint64Array#constructor - local.tee $6 + local.tee $5 call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -23447,26 +23377,17 @@ local.set $4 i32.const 1 global.set $~argumentsLength - i32.const 0 local.get $4 call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $~lib/rt/pure/__retain local.tee $0 i32.const 20 i32.sub i32.load offset=16 - local.tee $5 - i32.gt_u - if - i32.const 1424 - i32.const 1488 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 + local.tee $2 + local.set $7 + local.get $2 i32.const 7 i32.and if @@ -23485,7 +23406,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $7 i32.store offset=8 local.get $2 local.get $0 @@ -23495,7 +23416,7 @@ local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -23526,7 +23447,7 @@ br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release i32.const 8608 call $~lib/rt/pure/__release @@ -23550,7 +23471,7 @@ i32.load local.tee $3 call $~lib/typedarray/Float32Array#constructor - local.tee $6 + local.tee $5 call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -23591,26 +23512,17 @@ local.set $4 i32.const 1 global.set $~argumentsLength - i32.const 0 local.get $4 call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $~lib/rt/pure/__retain local.tee $0 i32.const 20 i32.sub i32.load offset=16 - local.tee $5 - i32.gt_u - if - i32.const 1424 - i32.const 1488 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 + local.tee $2 + local.set $7 + local.get $2 i32.const 3 i32.and if @@ -23629,7 +23541,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $7 i32.store offset=8 local.get $2 local.get $0 @@ -23639,7 +23551,7 @@ local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -23670,7 +23582,7 @@ br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release i32.const 8608 call $~lib/rt/pure/__release @@ -23694,7 +23606,7 @@ i32.load local.tee $3 call $~lib/typedarray/Float64Array#constructor - local.tee $6 + local.tee $5 call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -23735,26 +23647,17 @@ local.set $4 i32.const 1 global.set $~argumentsLength - i32.const 0 local.get $4 call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $~lib/rt/pure/__retain local.tee $0 i32.const 20 i32.sub i32.load offset=16 - local.tee $5 - i32.gt_u - if - i32.const 1424 - i32.const 1488 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 + local.tee $2 + local.set $7 + local.get $2 i32.const 7 i32.and if @@ -23773,7 +23676,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $7 i32.store offset=8 local.get $2 local.get $0 @@ -23783,7 +23686,7 @@ local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -23814,7 +23717,7 @@ br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release i32.const 8608 call $~lib/rt/pure/__release @@ -25118,15 +25021,15 @@ call $~lib/builtins/abort unreachable end + local.get $1 + i32.load offset=8 local.get $2 local.get $0 i32.load offset=8 i32.const 3 i32.shr_u i32.add - local.get $1 - i32.load offset=8 - i32.gt_s + i32.lt_s if i32.const 1424 i32.const 1488 @@ -25302,15 +25205,15 @@ call $~lib/builtins/abort unreachable end + local.get $1 + i32.load offset=8 local.get $2 local.get $0 i32.load offset=8 i32.const 1 i32.shr_u i32.add - local.get $1 - i32.load offset=8 - i32.gt_s + i32.lt_s if i32.const 1424 i32.const 1488 @@ -30308,9 +30211,9 @@ i32.add i32.load local.tee $7 - i32.const 255 local.get $7 - i32.lt_u + i32.const 255 + i32.gt_u select i32.store8 local.get $2 @@ -35377,7 +35280,6 @@ i32.const 0 local.set $0 block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - i32.const 0 local.get $2 call $~lib/rt/pure/__retain local.tee $1 @@ -35385,7 +35287,8 @@ i32.const 3 i32.shr_u local.tee $3 - i32.ge_s + i32.const 0 + i32.le_u i32.const 1 local.get $3 select @@ -35466,7 +35369,6 @@ i32.const 0 local.set $0 block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - i32.const 0 local.get $3 call $~lib/rt/pure/__retain local.tee $1 @@ -35474,7 +35376,8 @@ i32.const 2 i32.shr_u local.tee $4 - i32.ge_s + i32.const 0 + i32.le_u i32.const 1 local.get $4 select diff --git a/tests/compiler/super-inline.optimized.wat b/tests/compiler/super-inline.optimized.wat index daba6f212c..19d8f463b1 100644 --- a/tests/compiler/super-inline.optimized.wat +++ b/tests/compiler/super-inline.optimized.wat @@ -42,9 +42,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $4 local.get $2 - i32.gt_s + local.get $4 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/typeof.optimized.wat b/tests/compiler/typeof.optimized.wat index abcd09a4d6..a789d4c5eb 100644 --- a/tests/compiler/typeof.optimized.wat +++ b/tests/compiler/typeof.optimized.wat @@ -352,7 +352,6 @@ call $~lib/builtins/abort unreachable end - i32.const 1420 memory.size local.tee $1 i32.const 16 @@ -362,7 +361,8 @@ i32.const -16 i32.and local.tee $0 - i32.gt_u + i32.const 1420 + i32.lt_u if local.get $1 i32.const 66955 @@ -373,9 +373,9 @@ i32.const 16 i32.shr_u local.tee $0 - local.get $1 local.get $0 - i32.gt_s + local.get $1 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/wasi/abort.optimized.wat b/tests/compiler/wasi/abort.optimized.wat index 05dd74de1f..b2971607ce 100644 --- a/tests/compiler/wasi/abort.optimized.wat +++ b/tests/compiler/wasi/abort.optimized.wat @@ -65,11 +65,11 @@ i32.const 2 i32.add else + local.get $4 local.get $0 i32.const 2 i32.add - local.get $4 - i32.lt_u + i32.gt_u i32.const 0 local.get $3 i32.const 64512 diff --git a/tests/compiler/wasi/seed.optimized.wat b/tests/compiler/wasi/seed.optimized.wat index cd9cbcdff7..049af36062 100644 --- a/tests/compiler/wasi/seed.optimized.wat +++ b/tests/compiler/wasi/seed.optimized.wat @@ -128,11 +128,11 @@ i32.const 2 i32.add else + local.get $3 local.get $2 i32.const 2 i32.add - local.get $3 - i32.lt_u + i32.gt_u i32.const 0 local.get $1 i32.const 64512 diff --git a/tests/compiler/wasi/trace.optimized.wat b/tests/compiler/wasi/trace.optimized.wat index ce0a5ac17e..84c73a941b 100644 --- a/tests/compiler/wasi/trace.optimized.wat +++ b/tests/compiler/wasi/trace.optimized.wat @@ -62,11 +62,11 @@ i32.const 2 i32.add else + local.get $2 local.get $0 i32.const 2 i32.add - local.get $2 - i32.lt_u + i32.gt_u i32.const 0 local.get $3 i32.const 64512 @@ -161,11 +161,11 @@ i32.const 2 i32.add else + local.get $4 local.get $0 i32.const 2 i32.add - local.get $4 - i32.lt_u + i32.gt_u i32.const 0 local.get $3 i32.const 64512 @@ -501,6 +501,7 @@ i32.const 1 i32.sub local.set $9 + local.get $5 local.get $7 local.get $2 i64.extend_i32_u @@ -509,8 +510,7 @@ i64.shl i64.add local.tee $1 - local.get $5 - i64.le_u + i64.ge_u if local.get $9 global.get $~lib/util/number/_K @@ -553,11 +553,11 @@ i64.lt_u select i32.const 0 + local.get $10 local.get $5 local.get $1 i64.sub - local.get $10 - i64.ge_u + i64.le_u i32.const 0 local.get $1 local.get $8 @@ -678,11 +678,11 @@ i64.lt_u select i32.const 0 + local.get $10 local.get $5 local.get $1 i64.sub - local.get $10 - i64.ge_u + i64.le_u i32.const 0 local.get $1 local.get $8 @@ -1001,9 +1001,9 @@ i32.const 0 i32.le_s i32.const 0 - i32.const -6 local.get $3 - i32.lt_s + i32.const -6 + i32.gt_s select if (result i32) local.get $0 diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 74708a377e..01d4fdf079 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -654,10 +654,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -816,9 +816,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 From 1dd9748d63f3675220645f135903fb511d92a316 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sun, 1 Nov 2020 02:34:56 +0200 Subject: [PATCH 3/8] update --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 83a41ae08f..c2066a7e84 100644 --- a/package-lock.json +++ b/package-lock.json @@ -713,9 +713,9 @@ "optional": true }, "binaryen": { - "version": "98.0.0-nightly.20201031", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-98.0.0-nightly.20201031.tgz", - "integrity": "sha512-4rV7iDHH9EgTOz8maFhs8eeYQ+qr3lKK44FuIeXhDXcdveMlQJ6CXGQbjRjgtwROLfQ5wOeTdfTb8kiv/XfLjA==" + "version": "98.0.0-nightly.20201101", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-98.0.0-nightly.20201101.tgz", + "integrity": "sha512-GNi3S/3tF8+CrlIK40CUDlfRRvSB3K9A5uTILA0dNPUKWItkgQdfn3RZvHxRIK/pse4s7moFIRwpAXTkwcIAhQ==" }, "bluebird": { "version": "3.7.2", diff --git a/package.json b/package.json index 0177bfeffb..2aef78c284 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "98.0.0-nightly.20201031", + "binaryen": "98.0.0-nightly.20201101", "long": "^4.0.0", "source-map-support": "^0.5.19", "ts-node": "^6.2.0" From d430c2d1fde841b5dfb09114691c7fab1134aa6f Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Mon, 2 Nov 2020 02:41:00 +0200 Subject: [PATCH 4/8] update --- package-lock.json | 6 ++-- package.json | 2 +- tests/compiler/number.optimized.wat | 31 ++++++++++-------- tests/compiler/resolve-binary.optimized.wat | 31 ++++++++++-------- .../resolve-function-expression.optimized.wat | 13 ++++---- .../resolve-propertyaccess.optimized.wat | 25 +++++++-------- tests/compiler/resolve-unary.optimized.wat | 25 +++++++-------- tests/compiler/std/array.optimized.wat | 32 +++++++++---------- .../std/string-casemapping.optimized.wat | 21 ++++++------ tests/compiler/std/string.optimized.wat | 24 +++++++------- tests/compiler/std/typedarray.optimized.wat | 32 +++++++++---------- 11 files changed, 119 insertions(+), 123 deletions(-) diff --git a/package-lock.json b/package-lock.json index c2066a7e84..fb830a539e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -713,9 +713,9 @@ "optional": true }, "binaryen": { - "version": "98.0.0-nightly.20201101", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-98.0.0-nightly.20201101.tgz", - "integrity": "sha512-GNi3S/3tF8+CrlIK40CUDlfRRvSB3K9A5uTILA0dNPUKWItkgQdfn3RZvHxRIK/pse4s7moFIRwpAXTkwcIAhQ==" + "version": "98.0.0-nightly.20201102", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-98.0.0-nightly.20201102.tgz", + "integrity": "sha512-p5eVO9pCq1PNpPYzdnc2wovjTq1b9qbW3FM01ntV2p0vlOr3UffznXldghrPw606VcDpbJjZD1hh7GiyvzAxwA==" }, "bluebird": { "version": "3.7.2", diff --git a/package.json b/package.json index 2aef78c284..f13e2f9132 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "98.0.0-nightly.20201101", + "binaryen": "98.0.0-nightly.20201102", "long": "^4.0.0", "source-map-support": "^0.5.19", "ts-node": "^6.2.0" diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index d44d628210..351a18deba 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -210,19 +210,24 @@ (local $1 i32) (local $2 i32) (local $3 i32) - local.get $0 - if (result i32) + block $__inlined_func$~lib/util/number/itoa32 local.get $0 - i32.const 31 - i32.shr_u - local.tee $1 + i32.eqz if - i32.const 0 - local.get $0 - i32.sub + i32.const 1248 local.set $0 + br $__inlined_func$~lib/util/number/itoa32 end + i32.const 0 + local.get $0 + i32.sub + local.get $0 local.get $0 + i32.const 31 + i32.shr_u + local.tee $1 + select + local.tee $2 call $~lib/util/number/decimalCount32 local.get $1 i32.add @@ -230,20 +235,18 @@ i32.const 1 i32.shl call $~lib/rt/stub/__new - local.tee $2 - local.get $0 + local.tee $0 + local.get $2 local.get $3 call $~lib/util/number/utoa_dec_simple local.get $1 if - local.get $2 + local.get $0 i32.const 45 i32.store16 end - local.get $2 - else - i32.const 1248 end + local.get $0 ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index f9ca74c455..ba76748c8b 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -339,19 +339,24 @@ (local $1 i32) (local $2 i32) (local $3 i32) - local.get $0 - if (result i32) + block $__inlined_func$~lib/util/number/itoa32 local.get $0 - i32.const 31 - i32.shr_u - local.tee $1 + i32.eqz if - i32.const 0 - local.get $0 - i32.sub + i32.const 1408 local.set $0 + br $__inlined_func$~lib/util/number/itoa32 end + i32.const 0 + local.get $0 + i32.sub + local.get $0 local.get $0 + i32.const 31 + i32.shr_u + local.tee $1 + select + local.tee $2 call $~lib/util/number/decimalCount32 local.get $1 i32.add @@ -360,20 +365,18 @@ i32.shl i32.const 1 call $~lib/rt/stub/__new - local.tee $2 - local.get $0 + local.tee $0 + local.get $2 local.get $3 call $~lib/util/number/utoa_dec_simple local.get $1 if - local.get $2 + local.get $0 i32.const 45 i32.store16 end - local.get $2 - else - i32.const 1408 end + local.get $0 ) (func $~lib/util/number/genDigits (param $0 i64) (param $1 i32) (param $2 i64) (param $3 i32) (param $4 i64) (result i32) (local $5 i32) diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index 407f565a23..2dca9dc39f 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -50,17 +50,16 @@ i32.const 1424 return end + i32.const 0 + local.get $0 + i32.sub + local.get $0 local.get $0 i32.const 31 i32.shr_u local.tee $5 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 + select + local.tee $0 i32.const 10 i32.ge_u i32.const 1 diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index d0e0130438..8637f34713 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -137,17 +137,16 @@ i32.const 1248 return end + i32.const 0 + local.get $0 + i32.sub + local.get $0 local.get $0 i32.const 31 i32.shr_u - local.tee $1 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 + local.tee $2 + select + local.tee $0 i32.const 10 i32.ge_u i32.const 1 @@ -187,9 +186,9 @@ i32.const 100000 i32.lt_u select - local.get $1 + local.get $2 i32.add - local.tee $2 + local.tee $1 i32.const 1 i32.shl i32.const 1 @@ -206,10 +205,10 @@ i32.div_u local.set $0 local.get $4 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.tee $2 + local.tee $1 i32.const 1 i32.shl i32.add @@ -220,7 +219,7 @@ local.get $0 br_if $do-continue|0 end - local.get $1 + local.get $2 if local.get $3 i32.const 45 diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index 7d3cb450f2..cbb269ac5f 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -142,17 +142,16 @@ i32.const 1248 return end + i32.const 0 + local.get $0 + i32.sub + local.get $0 local.get $0 i32.const 31 i32.shr_u - local.tee $1 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 + local.tee $2 + select + local.tee $0 i32.const 10 i32.ge_u i32.const 1 @@ -192,9 +191,9 @@ i32.const 100000 i32.lt_u select - local.get $1 + local.get $2 i32.add - local.tee $2 + local.tee $1 i32.const 1 i32.shl i32.const 1 @@ -211,10 +210,10 @@ i32.div_u local.set $0 local.get $4 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.tee $2 + local.tee $1 i32.const 1 i32.shl i32.add @@ -225,7 +224,7 @@ local.get $0 br_if $do-continue|0 end - local.get $1 + local.get $2 if local.get $3 i32.const 45 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 22e3414d7e..52e69e75c1 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -7498,19 +7498,18 @@ i32.const 8880 return end + i32.const 0 + local.get $0 + i32.sub + local.get $0 local.get $0 i32.const 31 i32.shr_u + local.tee $0 + select local.tee $1 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 call $~lib/util/number/decimalCount32 - local.get $1 + local.get $0 i32.add local.tee $3 i32.const 1 @@ -7518,10 +7517,10 @@ i32.const 1 call $~lib/rt/pure/__new local.tee $2 - local.get $0 + local.get $1 local.get $3 call $~lib/util/number/utoa_dec_simple - local.get $1 + local.get $0 if local.get $2 i32.const 45 @@ -10128,18 +10127,17 @@ i64.eqz br_if $__inlined_func$~lib/util/number/itoa64 drop + i64.const 0 + local.get $3 + i64.sub + local.get $3 local.get $3 i64.const 63 i64.shr_u i32.wrap_i64 local.tee $0 - if - i64.const 0 - local.get $3 - i64.sub - local.set $3 - end - local.get $3 + select + local.tee $3 i64.const 4294967295 i64.le_u if diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 17bbb07e7e..5cda75908e 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -2501,6 +2501,8 @@ i32.const 1 i32.shl i32.add + i32.const 962 + i32.const 963 local.get $8 i32.const 1 i32.gt_u @@ -2730,11 +2732,7 @@ else i32.const 0 end - if (result i32) - i32.const 962 - else - i32.const 963 - end + select i32.store16 else local.get $1 @@ -2962,18 +2960,17 @@ i32.const 18720 return end + i64.const 0 + local.get $0 + i64.sub + local.get $0 local.get $0 i64.const 63 i64.shr_u i32.wrap_i64 local.tee $3 - if - i64.const 0 - local.get $0 - i64.sub - local.set $0 - end - local.get $0 + select + local.tee $0 i64.const 4294967295 i64.le_u if diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 87cf52c5a9..59120f2e50 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -6255,16 +6255,16 @@ i32.const 2576 return end + i32.const 0 + local.get $0 + i32.sub + local.get $0 local.get $0 i32.const 31 i32.shr_u local.tee $2 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end + select + local.set $0 local.get $1 i32.const 10 i32.eq @@ -6655,17 +6655,17 @@ i32.const 2576 return end + i64.const 0 + local.get $0 + i64.sub + local.get $0 local.get $0 i64.const 63 i64.shr_u i32.wrap_i64 local.tee $2 - if - i64.const 0 - local.get $0 - i64.sub - local.set $0 - end + select + local.set $0 local.get $1 i32.const 10 i32.eq diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index d829e32ad8..03aebf13dc 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -18903,19 +18903,18 @@ i32.const 7152 return end + i32.const 0 + local.get $0 + i32.sub + local.get $0 local.get $0 i32.const 31 i32.shr_u + local.tee $0 + select local.tee $1 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 call $~lib/util/number/decimalCount32 - local.get $1 + local.get $0 i32.add local.tee $3 i32.const 1 @@ -18923,10 +18922,10 @@ i32.const 1 call $~lib/rt/pure/__new local.tee $2 - local.get $0 + local.get $1 local.get $3 call $~lib/util/number/utoa_dec_simple - local.get $1 + local.get $0 if local.get $2 i32.const 45 @@ -20419,18 +20418,17 @@ i64.eqz br_if $__inlined_func$~lib/util/number/itoa64 drop + i64.const 0 + local.get $3 + i64.sub + local.get $3 local.get $3 i64.const 63 i64.shr_u i32.wrap_i64 local.tee $0 - if - i64.const 0 - local.get $3 - i64.sub - local.set $3 - end - local.get $3 + select + local.tee $3 i64.const 4294967295 i64.le_u if From f47fcaa43c9a7ec8a9dfeb368ab285834c1ba2ea Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 3 Nov 2020 03:09:08 +0200 Subject: [PATCH 5/8] update --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index fb830a539e..535a0f882f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -713,9 +713,9 @@ "optional": true }, "binaryen": { - "version": "98.0.0-nightly.20201102", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-98.0.0-nightly.20201102.tgz", - "integrity": "sha512-p5eVO9pCq1PNpPYzdnc2wovjTq1b9qbW3FM01ntV2p0vlOr3UffznXldghrPw606VcDpbJjZD1hh7GiyvzAxwA==" + "version": "98.0.0-nightly.20201103", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-98.0.0-nightly.20201103.tgz", + "integrity": "sha512-E2KolZWACr2TW8gvH0yapzrGEMR/FpfW5lgQkjG6jXLMLQSMeo3GrPfkIrWbPJDrj4j8x6hJZp8Sat3JZCmsQw==" }, "bluebird": { "version": "3.7.2", diff --git a/package.json b/package.json index f13e2f9132..9d6e21bf45 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "98.0.0-nightly.20201102", + "binaryen": "98.0.0-nightly.20201103", "long": "^4.0.0", "source-map-support": "^0.5.19", "ts-node": "^6.2.0" From 5549a28c9f5bd507307babaa70a6cd727883149f Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Wed, 4 Nov 2020 02:51:48 +0200 Subject: [PATCH 6/8] update --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 535a0f882f..35a8e9485d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -713,9 +713,9 @@ "optional": true }, "binaryen": { - "version": "98.0.0-nightly.20201103", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-98.0.0-nightly.20201103.tgz", - "integrity": "sha512-E2KolZWACr2TW8gvH0yapzrGEMR/FpfW5lgQkjG6jXLMLQSMeo3GrPfkIrWbPJDrj4j8x6hJZp8Sat3JZCmsQw==" + "version": "98.0.0-nightly.20201104", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-98.0.0-nightly.20201104.tgz", + "integrity": "sha512-0hS1M/XbPLZIayrtIY0jGUV2RmUxsDf6ASL501tLYV5F1fk/KuyrEB0UclqZDgSmyd/GEYIhhiaTiiAgt7Q4Pw==" }, "bluebird": { "version": "3.7.2", diff --git a/package.json b/package.json index 9d6e21bf45..32e9e095dc 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "98.0.0-nightly.20201103", + "binaryen": "98.0.0-nightly.20201104", "long": "^4.0.0", "source-map-support": "^0.5.19", "ts-node": "^6.2.0" From a979f8452c6f454f49842cf5c6443514b4963190 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Thu, 5 Nov 2020 02:37:43 +0200 Subject: [PATCH 7/8] update --- package-lock.json | 6 +- package.json | 2 +- tests/compiler/assert-nonnull.optimized.wat | 6 +- tests/compiler/builtins.optimized.wat | 159 +- .../compiler/class-overloading.optimized.wat | 159 +- tests/compiler/do.optimized.wat | 353 +- tests/compiler/empty.optimized.wat | 14 +- .../extends-baseaggregate.optimized.wat | 127 +- .../field-initialization.optimized.wat | 159 +- tests/compiler/for.optimized.wat | 373 +- .../implicit-getter-setter.optimized.wat | 3 +- tests/compiler/infer-array.optimized.wat | 18 +- tests/compiler/inlining.optimized.wat | 39 +- tests/compiler/issues/1095.optimized.wat | 242 +- tests/compiler/issues/1225.optimized.wat | 212 +- tests/compiler/logical.optimized.wat | 239 +- tests/compiler/managed-cast.optimized.wat | 200 +- tests/compiler/number.optimized.wat | 175 +- tests/compiler/object-literal.optimized.wat | 484 +- tests/compiler/rc/local-init.optimized.wat | 173 +- .../rc/logical-and-mismatch.optimized.wat | 244 +- .../rc/logical-or-mismatch.optimized.wat | 244 +- tests/compiler/rc/optimize.optimized.wat | 319 +- tests/compiler/rc/rereturn.optimized.wat | 3 +- .../rc/ternary-mismatch.optimized.wat | 260 +- tests/compiler/resolve-access.optimized.wat | 37 +- tests/compiler/resolve-binary.optimized.wat | 175 +- .../resolve-elementaccess.optimized.wat | 176 +- .../resolve-function-expression.optimized.wat | 242 +- .../resolve-propertyaccess.optimized.wat | 175 +- tests/compiler/resolve-ternary.optimized.wat | 19 +- tests/compiler/resolve-unary.optimized.wat | 175 +- .../retain-release-sanity.optimized.wat | 155 +- tests/compiler/retain-return.optimized.wat | 262 +- tests/compiler/rt/finalize.optimized.wat | 342 +- tests/compiler/runtime-full.optimized.wat | 3 +- tests/compiler/runtime-stub.optimized.wat | 68 +- tests/compiler/std/array-access.optimized.wat | 181 +- .../compiler/std/array-literal.optimized.wat | 368 +- tests/compiler/std/array.optimized.wat | 4050 ++-- tests/compiler/std/arraybuffer.optimized.wat | 319 +- tests/compiler/std/dataview.optimized.wat | 752 +- tests/compiler/std/map.optimized.wat | 59 +- tests/compiler/std/math.optimized.wat | 666 +- tests/compiler/std/object.optimized.wat | 159 +- tests/compiler/std/set.optimized.wat | 3 +- tests/compiler/std/static-array.optimized.wat | 12 +- tests/compiler/std/staticarray.optimized.wat | 319 +- .../std/string-casemapping.optimized.wat | 42 +- .../std/string-encoding.optimized.wat | 3 +- tests/compiler/std/string.optimized.wat | 97 +- tests/compiler/std/symbol.optimized.wat | 337 +- tests/compiler/std/typedarray.optimized.wat | 17174 ++++++++-------- tests/compiler/typeof.optimized.wat | 159 +- tests/compiler/wasi/abort.optimized.wat | 51 +- tests/compiler/wasi/seed.optimized.wat | 53 +- tests/compiler/wasi/trace.optimized.wat | 228 +- tests/compiler/while.optimized.wat | 258 +- 58 files changed, 15224 insertions(+), 16108 deletions(-) diff --git a/package-lock.json b/package-lock.json index 35a8e9485d..3593e4fa81 100644 --- a/package-lock.json +++ b/package-lock.json @@ -713,9 +713,9 @@ "optional": true }, "binaryen": { - "version": "98.0.0-nightly.20201104", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-98.0.0-nightly.20201104.tgz", - "integrity": "sha512-0hS1M/XbPLZIayrtIY0jGUV2RmUxsDf6ASL501tLYV5F1fk/KuyrEB0UclqZDgSmyd/GEYIhhiaTiiAgt7Q4Pw==" + "version": "98.0.0-nightly.20201105", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-98.0.0-nightly.20201105.tgz", + "integrity": "sha512-Km/GltRKVqln2BxvU5R9i0XfRw9naKUye8qnM3kcArA2YXJq87rYswmoNdz+ap0QSFPfhbWxIvWDEcfCNo+Ifw==" }, "bluebird": { "version": "3.7.2", diff --git a/package.json b/package.json index 32e9e095dc..12fd10c38a 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "98.0.0-nightly.20201104", + "binaryen": "98.0.0-nightly.20201105", "long": "^4.0.0", "source-map-support": "^0.5.19", "ts-node": "^6.2.0" diff --git a/tests/compiler/assert-nonnull.optimized.wat b/tests/compiler/assert-nonnull.optimized.wat index 6930d328e0..e829adc8c0 100644 --- a/tests/compiler/assert-nonnull.optimized.wat +++ b/tests/compiler/assert-nonnull.optimized.wat @@ -78,8 +78,7 @@ end local.get $0 i32.load offset=12 - i32.const 0 - i32.le_u + i32.eqz if i32.const 1184 i32.const 1248 @@ -106,8 +105,7 @@ (func $~lib/array/Array#__get (param $0 i32) (result i32) local.get $0 i32.load offset=12 - i32.const 0 - i32.le_u + i32.eqz if i32.const 1184 i32.const 1248 diff --git a/tests/compiler/builtins.optimized.wat b/tests/compiler/builtins.optimized.wat index 98bb4d10f8..1203504998 100644 --- a/tests/compiler/builtins.optimized.wat +++ b/tests/compiler/builtins.optimized.wat @@ -4,7 +4,6 @@ (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_f64_f64_f64_f64_f64_=>_none (func (param i32 i32 f64 f64 f64 f64 f64))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) @@ -49,84 +48,10 @@ local.get $1 i32.add ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.eq @@ -156,10 +81,82 @@ i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $0 + local.tee $3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if + local.get $3 + i32.load16_u + local.tee $2 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $2 + local.get $4 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz return end diff --git a/tests/compiler/class-overloading.optimized.wat b/tests/compiler/class-overloading.optimized.wat index edd979249f..c30108abdd 100644 --- a/tests/compiler/class-overloading.optimized.wat +++ b/tests/compiler/class-overloading.optimized.wat @@ -4,7 +4,6 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1040) "\01\00\00\00\00\00\00\00\01") @@ -115,84 +114,10 @@ call $~lib/rt/stub/__new end ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.eq @@ -222,10 +147,82 @@ i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $0 + local.tee $3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if + local.get $3 + i32.load16_u + local.tee $2 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $2 + local.get $4 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz return end diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index 92ccdab2a5..ea304a6d3b 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -1,8 +1,8 @@ (module + (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -16,89 +16,6 @@ (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $do/testNested - (local $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 10 - local.set $0 - loop $do-continue|0 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - loop $do-continue|1 - local.get $1 - i32.const 1 - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.tee $0 - br_if $do-continue|1 - end - local.get $0 - if - i32.const 0 - i32.const 1056 - i32.const 39 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 9 - i32.ne - if - i32.const 0 - i32.const 1056 - i32.const 40 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - br_if $do-continue|0 - end - local.get $0 - if - i32.const 0 - i32.const 1056 - i32.const 42 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1056 - i32.const 43 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 9 - i32.ne - if - i32.const 0 - i32.const 1056 - i32.const 44 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $do/ran - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -646,85 +563,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - memory.size - local.tee $0 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1248 - i32.const 0 - i32.store - i32.const 2816 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1248 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1248 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1248 - i32.const 2820 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1248 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -924,14 +762,87 @@ end local.get $1 ) - (func $do/Ref#constructor (result i32) + (func $~lib/rt/pure/__new (result i32) (local $0 i32) (local $1 i32) - (local $2 i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if - call $~lib/rt/tlsf/initialize + memory.size + local.tee $1 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1248 + i32.const 0 + i32.store + i32.const 2816 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 1248 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $1 + local.get $0 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1248 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 1248 + i32.const 2820 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1248 + global.set $~lib/rt/tlsf/ROOT end global.get $~lib/rt/tlsf/ROOT call $~lib/rt/tlsf/allocateBlock @@ -955,7 +866,11 @@ local.get $1 i32.const 16 i32.add - local.tee $0 + ) + (func $~lib/rt/pure/__retain (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 i32.const 1248 i32.gt_u if @@ -1081,29 +996,98 @@ global.set $do/ran i32.const 0 global.set $do/ran - call $do/testNested - global.get $do/ran - i32.eqz + i32.const 0 + local.set $0 + i32.const 10 + local.set $1 + loop $do-continue|01 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + local.get $2 + i32.const 1 + i32.add + local.set $2 + loop $do-continue|1 + local.get $0 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.sub + local.tee $1 + br_if $do-continue|1 + end + local.get $1 + if + i32.const 0 + i32.const 1056 + i32.const 39 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 9 + i32.ne + if + i32.const 0 + i32.const 1056 + i32.const 40 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + br_if $do-continue|01 + end + local.get $1 if i32.const 0 i32.const 1056 - i32.const 49 - i32.const 1 + i32.const 42 + i32.const 3 call $~lib/builtins/abort unreachable end + local.get $2 + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1056 + i32.const 43 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 9 + i32.ne + if + i32.const 0 + i32.const 1056 + i32.const 44 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $do/ran i32.const 0 global.set $do/ran i32.const 0 local.set $0 - loop $do-continue|01 + loop $do-continue|012 local.get $0 i32.const 1 i32.add local.tee $0 i32.const 10 i32.ne - br_if $do-continue|01 + br_if $do-continue|012 end local.get $0 i32.const 10 @@ -1192,14 +1176,14 @@ i32.const 10 i32.ne if - loop $do-continue|1 + loop $do-continue|15 local.get $0 i32.const 1 i32.add local.tee $0 i32.const 10 i32.rem_s - br_if $do-continue|1 + br_if $do-continue|15 end br $do-continue|04 end @@ -1230,7 +1214,10 @@ global.set $do/ran i32.const 0 global.set $do/ran - call $do/Ref#constructor + i32.const 0 + local.set $2 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.set $1 loop $do-continue|05 local.get $2 @@ -1248,7 +1235,8 @@ call $~lib/rt/pure/__release end else - call $do/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.set $0 local.get $1 call $~lib/rt/pure/__release @@ -1295,7 +1283,8 @@ global.set $do/ran i32.const 0 local.set $2 - call $do/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.set $1 loop $do-continue|06 block $do-break|0 @@ -1315,7 +1304,8 @@ local.set $1 br $do-break|0 end - call $do/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.tee $0 call $~lib/rt/pure/__release local.get $0 @@ -1434,8 +1424,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1152 diff --git a/tests/compiler/empty.optimized.wat b/tests/compiler/empty.optimized.wat index ea3dd62ae1..e9410e2dbf 100644 --- a/tests/compiler/empty.optimized.wat +++ b/tests/compiler/empty.optimized.wat @@ -308,25 +308,19 @@ i32.gt_s select local.tee $1 - i32.const 2147483647 local.get $0 local.get $0 - i32.const 2147483647 - i32.gt_s - select - local.tee $2 local.get $1 - local.get $2 - i32.gt_s + i32.lt_s select i32.const 1 i32.shl local.tee $3 local.get $1 - local.get $2 + local.get $0 + local.get $0 local.get $1 - local.get $2 - i32.lt_s + i32.gt_s select i32.const 1 i32.shl diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index 55c80b001c..01b23f62d2 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -1,10 +1,10 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -1613,32 +1613,54 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/array/Array#push (param $0 i32) + (func $start:extends-baseaggregate + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) + i32.const 6 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.tee $0 + i32.eqz + if + i32.const 4 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.set $0 + end + local.get $0 + f64.const 0 + f64.store + local.get $0 + f64.const 0 + f64.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=16 local.get $0 call $~lib/rt/pure/__retain - local.set $1 + local.set $3 i32.const 1180 i32.load - local.tee $5 + local.tee $6 i32.const 1 i32.add - local.tee $2 - local.set $0 - local.get $2 + local.tee $4 + local.set $1 + local.get $4 i32.const 1176 i32.load - local.tee $3 + local.tee $5 i32.const 2 i32.shr_u i32.gt_u if - local.get $0 + local.get $1 i32.const 268435455 i32.gt_u if @@ -1649,78 +1671,56 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 i32.const 1168 i32.load - local.tee $6 - local.get $0 + local.tee $7 + local.get $1 i32.const 2 i32.shl - local.tee $4 + local.tee $1 call $~lib/rt/pure/__renew - local.tee $0 + local.tee $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $5 i32.sub call $~lib/memory/memory.fill - local.get $0 - local.get $6 + local.get $2 + local.get $7 i32.ne if i32.const 1168 - local.get $0 + local.get $2 i32.store i32.const 1172 - local.get $0 + local.get $2 i32.store end i32.const 1176 - local.get $4 + local.get $1 i32.store end i32.const 1172 i32.load - local.get $5 + local.get $6 i32.const 2 i32.shl i32.add - local.get $1 + local.get $3 call $~lib/rt/pure/__retain i32.store i32.const 1180 - local.get $2 + local.get $4 i32.store - local.get $1 + local.get $3 call $~lib/rt/pure/__release - ) - (func $~start - (local $0 i32) - i32.const 6 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.tee $0 - i32.eqz - if - i32.const 4 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - f64.const 0 - f64.store - local.get $0 - f64.const 0 - f64.store offset=8 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $0 - call $~lib/array/Array#push local.get $0 call $~lib/rt/pure/__release ) + (func $~start + call $start:extends-baseaggregate + ) (func $~lib/rt/pure/decrement (param $0 i32) (local $1 i32) (local $2 i32) @@ -1767,8 +1767,7 @@ end else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1280 @@ -1931,8 +1930,7 @@ i32.load offset=4 i32.const 268435455 i32.and - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1280 @@ -1981,8 +1979,6 @@ local.get $1 i32.const 268435455 i32.and - i32.const 0 - i32.gt_u if local.get $0 call $~lib/rt/pure/scanBlack @@ -2114,35 +2110,36 @@ unreachable end local.get $0 - i32.load offset=4 local.tee $2 + i32.load offset=4 + local.tee $3 local.get $0 i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $4 loop $while-continue|0 - local.get $2 local.get $3 + local.get $4 i32.lt_u if - local.get $2 + local.get $3 i32.load - local.tee $4 + local.tee $0 if - local.get $4 + local.get $0 local.get $1 call $~lib/rt/pure/__visit end - local.get $2 + local.get $3 i32.const 4 i32.add - local.set $2 + local.set $3 br $while-continue|0 end end - local.get $0 + local.get $2 i32.load local.get $1 call $~lib/rt/pure/__visit diff --git a/tests/compiler/field-initialization.optimized.wat b/tests/compiler/field-initialization.optimized.wat index 1113a1f90b..1cc3558017 100644 --- a/tests/compiler/field-initialization.optimized.wat +++ b/tests/compiler/field-initialization.optimized.wat @@ -4,7 +4,6 @@ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) ".\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00.\00\00\00f\00i\00e\00l\00d\00-\00i\00n\00i\00t\00i\00a\00l\00i\00z\00a\00t\00i\00o\00n\00.\00t\00s") @@ -150,84 +149,10 @@ i32.store offset=4 local.get $0 ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.eq @@ -257,10 +182,82 @@ i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $0 + local.tee $3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if + local.get $3 + i32.load16_u + local.tee $2 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $2 + local.get $4 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz return end diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index d7ff7b4865..436839e991 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -1,8 +1,8 @@ (module + (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -16,86 +16,6 @@ (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $for/testNestedContinue - (local $0 i32) - (local $1 i32) - (local $2 i32) - loop $for-loop|0 - local.get $0 - i32.const 10 - i32.lt_s - if - local.get $0 - i32.const 2 - i32.ge_s - if - i32.const 0 - local.set $1 - loop $for-loop|1 - local.get $1 - i32.const 10 - i32.lt_s - if - local.get $2 - i32.const 1 - i32.add - local.get $2 - local.get $0 - local.get $1 - i32.lt_s - select - local.set $2 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|1 - end - end - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $0 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 1056 - i32.const 120 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 1056 - i32.const 121 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 28 - i32.ne - if - i32.const 0 - i32.const 1056 - i32.const 122 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $for/ran - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -643,85 +563,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - memory.size - local.tee $0 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1248 - i32.const 0 - i32.store - i32.const 2816 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1248 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1248 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1248 - i32.const 2820 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1248 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -921,14 +762,87 @@ end local.get $1 ) - (func $for/Ref#constructor (result i32) + (func $~lib/rt/pure/__new (result i32) (local $0 i32) (local $1 i32) - (local $2 i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if - call $~lib/rt/tlsf/initialize + memory.size + local.tee $1 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1248 + i32.const 0 + i32.store + i32.const 2816 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 1248 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $1 + local.get $0 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1248 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 1248 + i32.const 2820 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1248 + global.set $~lib/rt/tlsf/ROOT end global.get $~lib/rt/tlsf/ROOT call $~lib/rt/tlsf/allocateBlock @@ -952,7 +866,11 @@ local.get $1 i32.const 16 i32.add - local.tee $0 + ) + (func $~lib/rt/pure/__retain (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 i32.const 1248 i32.gt_u if @@ -1216,22 +1134,91 @@ global.set $for/ran i32.const 0 global.set $for/ran - call $for/testNestedContinue - global.get $for/ran - i32.eqz + i32.const 0 + local.set $0 + loop $for-loop|06 + local.get $0 + i32.const 10 + i32.lt_s + if + local.get $0 + i32.const 2 + i32.ge_s + if + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 10 + i32.lt_s + if + local.get $2 + i32.const 1 + i32.add + local.get $2 + local.get $0 + local.get $1 + i32.lt_s + select + local.set $2 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|06 + end + end + local.get $0 + i32.const 10 + i32.ne if i32.const 0 i32.const 1056 - i32.const 127 - i32.const 1 + i32.const 120 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 1056 + i32.const 121 + i32.const 3 call $~lib/builtins/abort unreachable end + local.get $2 + i32.const 28 + i32.ne + if + i32.const 0 + i32.const 1056 + i32.const 122 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $for/ran i32.const 0 global.set $for/ran - call $for/Ref#constructor + i32.const 0 + local.set $2 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.set $0 - loop $for-loop|06 + loop $for-loop|07 local.get $0 if local.get $2 @@ -1249,14 +1236,15 @@ call $~lib/rt/pure/__release end else - call $for/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.set $1 local.get $0 call $~lib/rt/pure/__release end local.get $1 local.set $0 - br $for-loop|06 + br $for-loop|07 end end local.get $2 @@ -1297,16 +1285,19 @@ global.set $for/ran i32.const 0 local.set $2 - call $for/Ref#constructor - call $for/Ref#constructor - local.set $1 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.set $0 call $~lib/rt/pure/__release - loop $for-loop|07 + loop $for-loop|08 block $for-break0 - call $for/Ref#constructor - local.tee $0 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.tee $1 call $~lib/rt/pure/__release - local.get $0 + local.get $1 if local.get $2 i32.const 1 @@ -1315,20 +1306,21 @@ i32.const 10 i32.eq if - local.get $1 + local.get $0 if - local.get $1 + local.get $0 call $~lib/rt/pure/__release end i32.const 0 - local.set $1 + local.set $0 br $for-break0 end - call $for/Ref#constructor - local.get $1 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.get $0 call $~lib/rt/pure/__release - local.set $1 - br $for-loop|07 + local.set $0 + br $for-loop|08 end end end @@ -1343,7 +1335,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 if i32.const 0 i32.const 1056 @@ -1354,7 +1346,7 @@ end i32.const 1 global.set $for/ran - local.get $1 + local.get $0 call $~lib/rt/pure/__release global.get $for/ran i32.eqz @@ -1444,8 +1436,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1152 diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index 2620585d15..fa01df3f53 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -1600,8 +1600,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index bf3e8ffbaf..102a793fd7 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -367,18 +367,20 @@ i32.const 1200 call $~lib/rt/__newArray drop + i32.const 2 + i32.const 2 + i32.const 5 + i32.const 1248 + call $~lib/rt/__newArray + local.tee $0 + local.set $1 block $folding-inner0 - i32.const 2 - i32.const 2 - i32.const 5 - i32.const 1248 - call $~lib/rt/__newArray - local.tee $0 + local.get $0 i32.load offset=12 i32.const 1 i32.le_u br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 i32.load offset=4 i32.const -1 @@ -403,11 +405,11 @@ i32.const 1376 call $~lib/rt/__newArray local.tee $0 + local.get $0 i32.load offset=12 i32.const 1 i32.le_u br_if $folding-inner0 - local.get $0 i32.load offset=4 f32.load offset=4 drop diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index da04bf14e3..e3ce174f60 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -1,6 +1,6 @@ (module - (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) @@ -119,8 +119,24 @@ i32.const 16 i32.add ) - (func $inlining/test_ctor + (func $~start (local $0 i32) + i32.const 2 + i32.const 1104 + i32.load + call_indirect (type $i32_=>_i32) + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 1056 + i32.const 68 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1116 + global.set $~lib/rt/stub/offset i32.const 16 i32.const 5 call $~lib/rt/stub/__new @@ -199,23 +215,4 @@ unreachable end ) - (func $~start - i32.const 2 - i32.const 1104 - i32.load - call_indirect (type $i32_=>_i32) - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1056 - i32.const 68 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1116 - global.set $~lib/rt/stub/offset - call $inlining/test_ctor - ) ) diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index af3f6372bf..8bde10b084 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -1,10 +1,11 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "(\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") @@ -563,85 +564,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - memory.size - local.tee $0 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1376 - i32.const 0 - i32.store - i32.const 2944 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1376 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1376 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1376 - i32.const 2948 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1376 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -841,6 +763,111 @@ end local.get $1 ) + (func $~lib/rt/pure/__new (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + memory.size + local.tee $1 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1376 + i32.const 0 + i32.store + i32.const 2944 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 1376 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $1 + local.get $0 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1376 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 1376 + i32.const 2948 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1376 + global.set $~lib/rt/tlsf/ROOT + end + global.get $~lib/rt/tlsf/ROOT + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $1 + i32.const 4 + i32.sub + local.tee $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 3 + i32.store offset=12 + local.get $0 + i32.const 4 + i32.store offset=16 + local.get $1 + i32.const 16 + i32.add + ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -906,44 +933,18 @@ (local $1 i32) (local $2 i32) (local $3 i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $1 - i32.const 4 - i32.sub - local.tee $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 3 - i32.store offset=12 - local.get $0 - i32.const 4 - i32.store offset=16 - local.get $1 - i32.const 16 - i32.add + call $~lib/rt/pure/__new call $~lib/rt/pure/__retain - local.tee $1 + local.tee $2 i32.const 1248 i32.store - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.tee $2 + local.tee $0 local.set $3 - local.get $2 + local.get $0 i32.load - local.tee $0 + local.tee $1 i32.eqz if i32.const 1280 @@ -953,24 +954,24 @@ call $~lib/builtins/abort unreachable end + local.get $1 local.get $0 - local.get $2 i32.load - local.tee $2 + local.tee $0 i32.ne if - local.get $0 + local.get $1 call $~lib/rt/pure/__retain - local.set $0 - local.get $2 + local.set $1 + local.get $0 call $~lib/rt/pure/__release end local.get $3 - local.get $0 + local.get $1 i32.store local.get $3 call $~lib/rt/pure/__release - local.get $1 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/rt/pure/decrement (param $0 i32) @@ -1047,8 +1048,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/issues/1225.optimized.wat b/tests/compiler/issues/1225.optimized.wat index 50e98931be..46f0718225 100644 --- a/tests/compiler/issues/1225.optimized.wat +++ b/tests/compiler/issues/1225.optimized.wat @@ -1,8 +1,8 @@ (module - (type $none_=>_none (func)) - (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -565,85 +565,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - memory.size - local.tee $0 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1280 - i32.const 0 - i32.store - i32.const 2848 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1280 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1280 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1280 - i32.const 2852 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1280 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -843,45 +764,124 @@ end local.get $1 ) - (func $issues/1225/normal (result i32) - global.get $issues/1225/x - i32.load - ) - (func $issues/1225/viaThis (result i32) - global.get $issues/1225/x - i32.load offset=4 - ) - (func $start:issues/1225 + (func $~lib/rt/pure/__new (result i32) (local $0 i32) (local $1 i32) - (local $2 i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if - call $~lib/rt/tlsf/initialize + memory.size + local.tee $1 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1280 + i32.const 0 + i32.store + i32.const 2848 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 1280 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $1 + local.get $0 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1280 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 1280 + i32.const 2852 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1280 + global.set $~lib/rt/tlsf/ROOT end global.get $~lib/rt/tlsf/ROOT call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.tee $0 + local.tee $1 i32.const 4 i32.sub - local.tee $1 + local.tee $0 i32.const 0 i32.store offset=4 - local.get $1 + local.get $0 i32.const 0 i32.store offset=8 - local.get $1 + local.get $0 i32.const 3 i32.store offset=12 - local.get $1 + local.get $0 i32.const 12 i32.store offset=16 - local.get $0 + local.get $1 i32.const 16 i32.add + ) + (func $issues/1225/normal (result i32) + global.get $issues/1225/x + i32.load + ) + (func $issues/1225/viaThis (result i32) + global.get $issues/1225/x + i32.load offset=4 + ) + (func $~start + (local $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/rt/pure/__new local.tee $0 i32.const 1276 i32.gt_u @@ -889,12 +889,12 @@ local.get $0 i32.const 20 i32.sub - local.tee $2 - i32.load offset=4 local.tee $1 + i32.load offset=4 + local.tee $2 i32.const -268435456 i32.and - local.get $1 + local.get $2 i32.const 1 i32.add i32.const -268435456 @@ -908,12 +908,12 @@ call $~lib/builtins/abort unreachable end - local.get $2 local.get $1 + local.get $2 i32.const 1 i32.add i32.store offset=4 - local.get $2 + local.get $1 i32.load i32.const 1 i32.and @@ -984,9 +984,6 @@ i32.const 0 global.set $issues/1225/x ) - (func $~start - call $start:issues/1225 - ) (func $~lib/rt/pure/decrement (param $0 i32) (local $1 i32) (local $2 i32) @@ -1061,8 +1058,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/logical.optimized.wat b/tests/compiler/logical.optimized.wat index c98a372150..09426d4f58 100644 --- a/tests/compiler/logical.optimized.wat +++ b/tests/compiler/logical.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -562,85 +562,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - memory.size - local.tee $0 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1264 - i32.const 0 - i32.store - i32.const 2832 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1264 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1264 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1264 - i32.const 2836 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1264 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -840,6 +761,111 @@ end local.get $1 ) + (func $~lib/rt/pure/__new (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + memory.size + local.tee $1 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1264 + i32.const 0 + i32.store + i32.const 2832 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 1264 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $1 + local.get $0 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1264 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 1264 + i32.const 2836 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1264 + global.set $~lib/rt/tlsf/ROOT + end + global.get $~lib/rt/tlsf/ROOT + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $1 + i32.const 4 + i32.sub + local.tee $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 3 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 16 + i32.add + ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -889,38 +915,6 @@ end local.get $0 ) - (func $logical/Obj#constructor (result i32) - (local $0 i32) - (local $1 i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $1 - i32.const 4 - i32.sub - local.tee $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 3 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - ) (func $~lib/rt/pure/__release (param $0 i32) local.get $0 i32.const 1264 @@ -936,8 +930,10 @@ (local $0 i32) (local $1 i32) (local $2 i32) - call $logical/Obj#constructor - local.tee $1 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.tee $0 + local.get $0 call $~lib/rt/pure/__retain local.tee $0 call $~lib/rt/pure/__release @@ -951,12 +947,15 @@ call $~lib/builtins/abort unreachable end - call $logical/Obj#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.tee $0 + local.set $2 + local.get $0 call $~lib/rt/pure/__retain - local.tee $2 + local.tee $0 call $~lib/rt/pure/__release - local.get $2 + local.get $0 i32.eqz if i32.const 0 @@ -966,9 +965,8 @@ call $~lib/builtins/abort unreachable end - local.get $1 call $~lib/rt/pure/__release - local.get $0 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/rt/pure/decrement (param $0 i32) @@ -1045,8 +1043,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1168 diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index 422fd7181d..94655ddbd1 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -1,7 +1,7 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) + (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -565,85 +565,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - memory.size - local.tee $0 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1472 - i32.const 0 - i32.store - i32.const 3040 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1472 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1472 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1472 - i32.const 3044 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1472 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -849,7 +770,81 @@ global.get $~lib/rt/tlsf/ROOT i32.eqz if - call $~lib/rt/tlsf/initialize + memory.size + local.tee $2 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $2 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1472 + i32.const 0 + i32.store + i32.const 3040 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $1 + i32.const 23 + i32.lt_u + if + local.get $1 + i32.const 2 + i32.shl + i32.const 1472 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $2 + loop $for-loop|1 + local.get $2 + i32.const 16 + i32.lt_u + if + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1472 + i32.add + i32.const 0 + i32.store offset=96 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|1 + end + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + i32.const 1472 + i32.const 3044 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1472 + global.set $~lib/rt/tlsf/ROOT end global.get $~lib/rt/tlsf/ROOT call $~lib/rt/tlsf/allocateBlock @@ -1001,7 +996,7 @@ (local $9 i32) call $managed-cast/Cat#constructor call $managed-cast/Cat#constructor - local.tee $5 + local.tee $3 call $~lib/rt/pure/__retain local.tee $0 i32.eqz @@ -1016,13 +1011,13 @@ local.get $0 call $~lib/rt/pure/__release call $managed-cast/Cat#constructor - local.tee $6 + local.tee $4 call $managed-cast/testDowncastToNullable call $managed-cast/Cat#constructor - local.tee $7 + local.tee $5 call $managed-cast/testDowncastToNullable call $managed-cast/Cat#constructor - local.tee $8 + local.tee $6 call $~lib/rt/pure/__retain local.tee $0 call $~lib/rt/__instanceof @@ -1038,10 +1033,10 @@ local.get $0 call $~lib/rt/pure/__release call $managed-cast/Cat#constructor - local.tee $9 + local.tee $7 call $~lib/rt/pure/__retain - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i32.eqz if i32.const 1248 @@ -1061,13 +1056,13 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $~lib/rt/pure/__release call $managed-cast/Cat#constructor - local.tee $2 + local.tee $8 call $~lib/rt/pure/__retain - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 call $~lib/rt/__instanceof i32.eqz if @@ -1079,14 +1074,14 @@ unreachable end call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release call $~lib/rt/pure/__release call $managed-cast/Cat#constructor - local.tee $1 + local.tee $9 call $~lib/rt/pure/__retain - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 call $~lib/rt/__instanceof i32.eqz if @@ -1098,9 +1093,13 @@ unreachable end call $~lib/rt/pure/__retain - local.get $0 + local.get $1 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release call $~lib/rt/pure/__release + local.get $3 call $~lib/rt/pure/__release + local.get $4 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release @@ -1112,10 +1111,6 @@ call $~lib/rt/pure/__release local.get $9 call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release ) (func $~start call $start:managed-cast @@ -1194,8 +1189,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 351a18deba..69d2b922c2 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -7,7 +7,6 @@ (type $f64_=>_i32 (func (param f64) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i64_i32_i64_i32_i64_=>_i32 (func (param i64 i32 i64 i32 i64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -180,16 +179,7 @@ i32.add ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i32.const 10 - i32.rem_u - local.set $3 - local.get $1 - i32.const 10 - i32.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -198,11 +188,16 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end ) @@ -248,84 +243,10 @@ end local.get $0 ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.eq @@ -355,10 +276,82 @@ i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $0 + local.tee $3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if + local.get $3 + i32.load16_u + local.tee $2 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $2 + local.get $4 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz return end diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index dd2369aaaf..df0052b0fd 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -777,86 +777,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load - local.set $3 - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1232 - i32.const 360 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const -4 - i32.and - local.get $2 - i32.sub - local.tee $4 - i32.const 16 - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 4 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - i32.load - i32.const -3 - i32.and - i32.store - end - ) (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $1 i32.const 1073741820 i32.ge_u @@ -977,10 +901,79 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 + i32.load + local.set $3 + local.get $2 + i32.const 4 + i32.add + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1232 + i32.const 360 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const -4 + i32.and local.get $2 - call $~lib/rt/tlsf/prepareBlock + i32.sub + local.tee $4 + i32.const 16 + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $2 + local.get $1 + i32.const 4 + i32.add + i32.add + local.tee $2 + local.get $4 + i32.const 4 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $~lib/rt/tlsf/insertBlock + else + local.get $1 + local.get $3 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 4 + i32.add + local.tee $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + i32.load + i32.const -3 + i32.and + i32.store + end local.get $1 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) @@ -1424,80 +1417,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $object-literal/testUnmanaged (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load - i32.const 123 - i32.ne - if - i32.const 0 - i32.const 1296 - i32.const 27 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 1392 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1296 - i32.const 28 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - call $~lib/rt/pure/__release - local.get $0 - i32.const 1496 - i32.ge_u - if - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - local.get $0 - i32.const 4 - i32.sub - local.set $1 - local.get $0 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $0 - select - if (result i32) - local.get $1 - i32.load - i32.const 1 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 1232 - i32.const 563 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/tlsf/freeBlock - end - ) (func $object-literal/testOmittedTypes (param $0 i32) local.get $0 call $~lib/rt/pure/__retain @@ -1916,7 +1835,75 @@ end i32.store offset=4 local.get $0 - call $object-literal/testUnmanaged + i32.load + i32.const 123 + i32.ne + if + i32.const 0 + i32.const 1296 + i32.const 27 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 1392 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1296 + i32.const 28 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + call $~lib/rt/pure/__release + local.get $0 + i32.const 1496 + i32.ge_u + if + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.get $0 + i32.const 4 + i32.sub + local.set $1 + local.get $0 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $0 + select + if (result i32) + local.get $1 + i32.load + i32.const 1 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 1232 + i32.const 563 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/tlsf/freeBlock + end i32.const 65 i32.const 4 call $~lib/rt/pure/__new @@ -2162,10 +2149,95 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 20 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $switch$1$default + block $switch$1$case$8 + block $switch$1$case$5 + block $switch$1$case$4 + local.get $0 + i32.const 12 + i32.add + i32.load + br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $switch$1$case$5 $__inlined_func$~lib/rt/__visit_members $switch$1$case$5 $switch$1$case$8 $switch$1$default + end + local.get $0 + i32.load offset=20 + local.tee $1 + if + local.get $1 + call $~lib/rt/pure/__visit + end + br $__inlined_func$~lib/rt/__visit_members + end + local.get $0 + i32.load offset=24 + local.tee $1 + if + local.get $1 + call $~lib/rt/pure/__visit + end + br $__inlined_func$~lib/rt/__visit_members + end + local.get $0 + i32.load offset=20 + local.tee $1 + if + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $0 + i32.load offset=24 + local.tee $1 + if + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $0 + i32.load offset=28 + local.tee $1 + if + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $0 + i32.load offset=32 + local.tee $1 + if + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $0 + i32.load offset=36 + local.tee $1 + if + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $0 + i32.load offset=40 + local.tee $1 + if + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $0 + i32.load offset=44 + local.tee $1 + if + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $0 + i32.load offset=48 + local.tee $1 + if + local.get $1 + call $~lib/rt/pure/__visit + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end local.get $2 i32.const -2147483648 i32.and @@ -2182,8 +2254,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1168 @@ -2215,97 +2286,4 @@ i32.sub call $~lib/rt/pure/decrement ) - (func $~lib/rt/__visit_members (param $0 i32) - (local $1 i32) - block $switch$1$default - block $switch$1$case$8 - block $switch$1$case$5 - block $switch$1$case$4 - block $switch$1$case$2 - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $switch$1$case$2 $switch$1$case$2 $switch$1$case$4 $switch$1$case$5 $switch$1$case$2 $switch$1$case$5 $switch$1$case$8 $switch$1$default - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $~lib/rt/pure/__visit - end - return - end - local.get $0 - i32.load offset=4 - local.tee $0 - if - local.get $0 - call $~lib/rt/pure/__visit - end - return - end - local.get $0 - i32.load - local.tee $1 - if - local.get $1 - call $~lib/rt/pure/__visit - end - local.get $0 - i32.load offset=4 - local.tee $1 - if - local.get $1 - call $~lib/rt/pure/__visit - end - local.get $0 - i32.load offset=8 - local.tee $1 - if - local.get $1 - call $~lib/rt/pure/__visit - end - local.get $0 - i32.load offset=12 - local.tee $1 - if - local.get $1 - call $~lib/rt/pure/__visit - end - local.get $0 - i32.load offset=16 - local.tee $1 - if - local.get $1 - call $~lib/rt/pure/__visit - end - local.get $0 - i32.load offset=20 - local.tee $1 - if - local.get $1 - call $~lib/rt/pure/__visit - end - local.get $0 - i32.load offset=24 - local.tee $1 - if - local.get $1 - call $~lib/rt/pure/__visit - end - local.get $0 - i32.load offset=28 - local.tee $0 - if - local.get $0 - call $~lib/rt/pure/__visit - end - return - end - unreachable - ) ) diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index 5e5f9eae39..31270e5fa5 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -1,10 +1,11 @@ (module - (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1040) "\01\00\00\00\00\00\00\00\01") @@ -561,85 +562,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - memory.size - local.tee $0 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1248 - i32.const 0 - i32.store - i32.const 2816 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1248 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1248 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1248 - i32.const 2820 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1248 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -839,14 +761,87 @@ end local.get $1 ) - (func $start:rc/local-init + (func $~lib/rt/pure/__new (result i32) (local $0 i32) (local $1 i32) - (local $2 i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if - call $~lib/rt/tlsf/initialize + memory.size + local.tee $1 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1248 + i32.const 0 + i32.store + i32.const 2816 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 1248 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $1 + local.get $0 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1248 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 1248 + i32.const 2820 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1248 + global.set $~lib/rt/tlsf/ROOT end global.get $~lib/rt/tlsf/ROOT call $~lib/rt/tlsf/allocateBlock @@ -870,6 +865,12 @@ local.get $1 i32.const 16 i32.add + ) + (func $~start + (local $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/rt/pure/__new local.tee $0 i32.const 1248 i32.gt_u @@ -924,9 +925,6 @@ call $~lib/rt/pure/decrement end ) - (func $~start - call $start:rc/local-init - ) (func $~lib/rt/pure/decrement (param $0 i32) (local $1 i32) (local $2 i32) @@ -1001,8 +999,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1152 diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index c00e0e75d0..1d6b988c9a 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -562,85 +562,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - memory.size - local.tee $0 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1216 - i32.const 0 - i32.store - i32.const 2784 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1216 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1216 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1216 - i32.const 2788 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1216 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -840,6 +761,111 @@ end local.get $1 ) + (func $~lib/rt/pure/__new (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + memory.size + local.tee $1 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1216 + i32.const 0 + i32.store + i32.const 2784 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 1216 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $1 + local.get $0 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1216 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 1216 + i32.const 2788 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1216 + global.set $~lib/rt/tlsf/ROOT + end + global.get $~lib/rt/tlsf/ROOT + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $1 + i32.const 4 + i32.sub + local.tee $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 3 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 16 + i32.add + ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -889,38 +915,6 @@ end local.get $0 ) - (func $rc/logical-and-mismatch/Ref#constructor (result i32) - (local $0 i32) - (local $1 i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $1 - i32.const 4 - i32.sub - local.tee $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 3 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - ) (func $~lib/rt/pure/__release (param $0 i32) local.get $0 i32.const 1216 @@ -934,9 +928,11 @@ ) (func $~start (local $0 i32) - call $rc/logical-and-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain global.set $rc/logical-and-mismatch/gloRef - call $rc/logical-and-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.tee $0 if (result i32) local.get $0 @@ -950,31 +946,26 @@ global.get $rc/logical-and-mismatch/gloRef local.tee $0 if (result i32) - call $rc/logical-and-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain else local.get $0 call $~lib/rt/pure/__retain end call $~lib/rt/pure/__release - call $rc/logical-and-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.tee $0 if (result i32) local.get $0 call $~lib/rt/pure/__release - call $rc/logical-and-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain else local.get $0 end call $~lib/rt/pure/__release global.get $rc/logical-and-mismatch/gloRef - local.tee $0 - if (result i32) - global.get $rc/logical-and-mismatch/gloRef - else - local.get $0 - end - drop - global.get $rc/logical-and-mismatch/gloRef call $~lib/rt/pure/__release ) (func $~lib/rt/pure/decrement (param $0 i32) @@ -1051,8 +1042,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index cd04b79677..c236ff0479 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -562,85 +562,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - memory.size - local.tee $0 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1216 - i32.const 0 - i32.store - i32.const 2784 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1216 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1216 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1216 - i32.const 2788 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1216 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -840,6 +761,111 @@ end local.get $1 ) + (func $~lib/rt/pure/__new (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + memory.size + local.tee $1 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1216 + i32.const 0 + i32.store + i32.const 2784 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 1216 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $1 + local.get $0 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1216 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 1216 + i32.const 2788 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1216 + global.set $~lib/rt/tlsf/ROOT + end + global.get $~lib/rt/tlsf/ROOT + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $1 + i32.const 4 + i32.sub + local.tee $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 3 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 16 + i32.add + ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -889,38 +915,6 @@ end local.get $0 ) - (func $rc/logical-or-mismatch/Ref#constructor (result i32) - (local $0 i32) - (local $1 i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $1 - i32.const 4 - i32.sub - local.tee $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 3 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - ) (func $~lib/rt/pure/__release (param $0 i32) local.get $0 i32.const 1216 @@ -934,9 +928,11 @@ ) (func $~start (local $0 i32) - call $rc/logical-or-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain global.set $rc/logical-or-mismatch/gloRef - call $rc/logical-or-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.tee $0 if (result i32) local.get $0 @@ -953,28 +949,23 @@ local.get $0 call $~lib/rt/pure/__retain else - call $rc/logical-or-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain end call $~lib/rt/pure/__release - call $rc/logical-or-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.tee $0 if (result i32) local.get $0 else local.get $0 call $~lib/rt/pure/__release - call $rc/logical-or-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain end call $~lib/rt/pure/__release global.get $rc/logical-or-mismatch/gloRef - local.tee $0 - if (result i32) - local.get $0 - else - global.get $rc/logical-or-mismatch/gloRef - end - drop - global.get $rc/logical-or-mismatch/gloRef call $~lib/rt/pure/__release ) (func $~lib/rt/pure/decrement (param $0 i32) @@ -1051,8 +1042,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 7c5c968827..d9c19f186b 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -650,85 +650,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - memory.size - local.tee $0 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1264 - i32.const 0 - i32.store - i32.const 2832 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1264 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1264 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1264 - i32.const 2836 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1264 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 @@ -858,86 +779,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load - local.set $3 - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1184 - i32.const 360 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const -4 - i32.and - local.get $2 - i32.sub - local.tee $4 - i32.const 16 - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 4 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - i32.load - i32.const -3 - i32.and - i32.store - end - ) (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $1 i32.const 1073741820 i32.ge_u @@ -1058,10 +903,79 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 + i32.load + local.set $3 local.get $2 - call $~lib/rt/tlsf/prepareBlock + i32.const 4 + i32.add + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1184 + i32.const 360 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $4 + i32.const 16 + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $2 + local.get $1 + i32.const 4 + i32.add + i32.add + local.tee $2 + local.get $4 + i32.const 4 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $~lib/rt/tlsf/insertBlock + else + local.get $1 + local.get $3 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 4 + i32.add + local.tee $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + i32.load + i32.const -3 + i32.and + i32.store + end local.get $1 ) (func $~lib/rt/pure/__new (param $0 i32) (param $1 i32) (result i32) @@ -1078,17 +992,89 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 16 - i32.add - local.set $2 global.get $~lib/rt/tlsf/ROOT i32.eqz if - call $~lib/rt/tlsf/initialize + memory.size + local.tee $3 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $3 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1264 + i32.const 0 + i32.store + i32.const 2832 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $2 + i32.const 23 + i32.lt_u + if + local.get $2 + i32.const 2 + i32.shl + i32.const 1264 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $3 + loop $for-loop|1 + local.get $3 + i32.const 16 + i32.lt_u + if + local.get $3 + local.get $2 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1264 + i32.add + i32.const 0 + i32.store offset=96 + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 + end + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1264 + i32.const 2836 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1264 + global.set $~lib/rt/tlsf/ROOT end global.get $~lib/rt/tlsf/ROOT - local.get $2 + local.get $0 + i32.const 16 + i32.add call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -1347,8 +1333,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1056 diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index 084fb51c7c..ce740b6d1e 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -1534,8 +1534,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index 0fddb93e16..3baa70507c 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) - (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -564,85 +564,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - memory.size - local.tee $0 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1216 - i32.const 0 - i32.store - i32.const 2784 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1216 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1216 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1216 - i32.const 2788 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1216 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -842,6 +763,111 @@ end local.get $1 ) + (func $~lib/rt/pure/__new (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + memory.size + local.tee $1 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1216 + i32.const 0 + i32.store + i32.const 2784 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 1216 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $1 + local.get $0 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1216 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 1216 + i32.const 2788 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1216 + global.set $~lib/rt/tlsf/ROOT + end + global.get $~lib/rt/tlsf/ROOT + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $1 + i32.const 4 + i32.sub + local.tee $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 3 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 16 + i32.add + ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -891,76 +917,45 @@ end local.get $0 ) - (func $rc/ternary-mismatch/Ref#constructor (result i32) - (local $0 i32) - (local $1 i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $1 - i32.const 4 - i32.sub - local.tee $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 3 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - ) (func $rc/ternary-mismatch/test1 (param $0 i32) (result i32) local.get $0 if (result i32) - call $rc/ternary-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain else global.get $rc/ternary-mismatch/gloRef call $~lib/rt/pure/__retain end ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 1216 - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - end - ) (func $rc/ternary-mismatch/test2 (param $0 i32) (result i32) local.get $0 if (result i32) global.get $rc/ternary-mismatch/gloRef call $~lib/rt/pure/__retain else - call $rc/ternary-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain end ) (func $~start - call $rc/ternary-mismatch/Ref#constructor + (local $0 i32) + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain global.set $rc/ternary-mismatch/gloRef - call $rc/ternary-mismatch/Ref#constructor - call $~lib/rt/pure/__release - call $rc/ternary-mismatch/Ref#constructor - call $~lib/rt/pure/__release + call $~lib/rt/pure/__new + drop + call $~lib/rt/pure/__new + drop global.get $rc/ternary-mismatch/gloRef - call $~lib/rt/pure/__release + local.tee $0 + i32.const 1216 + i32.gt_u + if + local.get $0 + i32.const 20 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/rt/pure/decrement (param $0 i32) (local $1 i32) @@ -1036,8 +1031,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index f954721b09..cf7babed95 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -336,16 +336,7 @@ select ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i32.const 10 - i32.rem_u - local.set $3 - local.get $1 - i32.const 10 - i32.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -354,11 +345,16 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end ) @@ -366,7 +362,6 @@ (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 i64.eqz if @@ -443,15 +438,6 @@ local.tee $3 local.set $2 loop $do-continue|0 - local.get $0 - i64.const 10 - i64.rem_u - i32.wrap_i64 - local.set $4 - local.get $0 - i64.const 10 - i64.div_u - local.set $0 local.get $2 local.get $1 i32.const 1 @@ -460,11 +446,17 @@ i32.const 1 i32.shl i32.add - local.get $4 + local.get $0 + i64.const 10 + i64.rem_u + i32.wrap_i64 i32.const 48 i32.add i32.store16 local.get $0 + i64.const 10 + i64.div_u + local.tee $0 i64.const 0 i64.ne br_if $do-continue|0 @@ -498,8 +490,7 @@ i32.store offset=12 local.get $0 i32.load offset=12 - i32.const 0 - i32.le_u + i32.eqz if i32.const 1088 i32.const 1152 diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index ba76748c8b..6d80118c04 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -5,7 +5,6 @@ (type $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i64_i32_i64_i32_i64_=>_i32 (func (param i64 i32 i64 i32 i64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -51,84 +50,10 @@ (global $resolve-binary/bar2 (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.eq @@ -158,10 +83,82 @@ i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $0 + local.tee $3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if + local.get $3 + i32.load16_u + local.tee $2 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $2 + local.get $4 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz return end @@ -309,16 +306,7 @@ i32.add ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i32.const 10 - i32.rem_u - local.set $3 - local.get $1 - i32.const 10 - i32.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -327,11 +315,16 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end ) diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index f0ba58a4e8..76609a45a1 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -3,10 +3,10 @@ (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i64_i32_i64_i32_i64_i32_=>_i32 (func (param i64 i32 i64 i32 i64 i32) (result i32))) (type $f32_=>_i32 (func (param f32) (result i32))) (type $f64_=>_i32 (func (param f64) (result i32))) @@ -1001,16 +1001,7 @@ end ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i32.const 10 - i32.rem_u - local.set $3 - local.get $1 - i32.const 10 - i32.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -1019,11 +1010,16 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end ) @@ -1604,84 +1600,10 @@ end local.get $2 ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.eq @@ -1711,10 +1633,82 @@ i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $0 + local.tee $3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if + local.get $3 + i32.load16_u + local.tee $2 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $2 + local.get $4 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz return end diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index 2dca9dc39f..adce664687 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -2,7 +2,6 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "\08\00\00\00\01\00\00\00\00\00\00\00\03\00\00\00\08\00\00\00\01") @@ -57,7 +56,7 @@ local.get $0 i32.const 31 i32.shr_u - local.tee $5 + local.tee $4 select local.tee $0 i32.const 10 @@ -99,9 +98,9 @@ i32.const 100000 i32.lt_u select - local.get $5 + local.get $4 i32.add - local.tee $6 + local.tee $5 i32.const 1 i32.shl local.tee $2 @@ -123,7 +122,7 @@ global.get $~lib/rt/stub/offset i32.const 4 i32.add - local.tee $3 + local.tee $6 local.get $1 i32.const 19 i32.add @@ -142,12 +141,12 @@ i32.add i32.const -16 i32.and - local.tee $4 + local.tee $3 i32.gt_u if local.get $7 local.get $1 - local.get $4 + local.get $3 i32.sub i32.const 65535 i32.add @@ -155,8 +154,8 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 local.get $7 i32.lt_s select @@ -164,7 +163,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -177,7 +176,7 @@ global.set $~lib/rt/stub/offset local.get $9 i32.store - local.get $3 + local.get $6 i32.const 4 i32.sub local.tee $1 @@ -192,36 +191,33 @@ local.get $1 local.get $2 i32.store offset=16 - local.get $3 + local.get $6 i32.const 16 i32.add local.tee $1 local.set $2 loop $do-continue|0 - local.get $0 - i32.const 10 - i32.rem_u - local.set $3 - local.get $0 - i32.const 10 - i32.div_u - local.set $0 local.get $2 - local.get $6 + local.get $5 i32.const 1 i32.sub - local.tee $6 + local.tee $5 i32.const 1 i32.shl i32.add - local.get $3 + local.get $0 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $0 + i32.const 10 + i32.div_u + local.tee $0 br_if $do-continue|0 end - local.get $5 + local.get $4 if local.get $1 i32.const 45 @@ -229,84 +225,115 @@ end local.get $1 ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - i32.const 1552 - local.set $3 local.get $0 - i32.const 7 - i32.and - i32.eqz - i32.const 0 - local.get $1 - i32.const 4 - i32.ge_u - select + i32.const 1552 + i32.eq if - loop $do-continue|0 - local.get $0 - i64.load - local.get $3 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $3 - i32.const 8 - i32.add - local.set $3 - local.get $1 - i32.const 4 - i32.sub - local.tee $1 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $1 - local.tee $2 i32.const 1 + return + end + block $folding-inner0 + local.get $0 + i32.eqz + br_if $folding-inner0 + local.get $0 + i32.const 20 i32.sub - local.set $1 - local.get $2 - if - local.get $3 - i32.load16_u - local.tee $2 + i32.load offset=16 + i32.const 1 + i32.shr_u + local.tee $1 + i32.const 1548 + i32.load + i32.const 1 + i32.shr_u + i32.ne + br_if $folding-inner0 + block $__inlined_func$~lib/util/string/compareImpl (result i32) + i32.const 1552 + local.set $3 local.get $0 - i32.load16_u - local.tee $4 - i32.ne + local.tee $2 + i32.const 7 + i32.and + i32.eqz + i32.const 0 + local.get $1 + local.tee $0 + i32.const 4 + i32.ge_u + select if - local.get $4 - local.get $2 + loop $do-continue|0 + local.get $2 + i64.load + local.get $3 + i64.load + i64.eq + if + local.get $2 + i32.const 8 + i32.add + local.set $2 + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $1 + i32.const 1 i32.sub - return + local.set $0 + local.get $1 + if + local.get $3 + i32.load16_u + local.tee $1 + local.get $2 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $4 + local.get $1 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $2 + i32.const 2 + i32.add + local.set $2 + local.get $3 + i32.const 2 + i32.add + local.set $3 + br $while-continue|1 + end end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $3 - i32.const 2 - i32.add - local.set $3 - br $while-continue|1 + i32.const 0 end + i32.eqz + return end i32.const 0 ) (func $~start - (local $0 i32) - (local $1 i32) i32.const 2 i32.const 1056 i32.load @@ -337,43 +364,12 @@ end i32.const 1564 global.set $~lib/rt/stub/offset - block $__inlined_func$~lib/string/String.__eq (result i32) - i32.const 1 - i32.const 0 - i32.const 1200 - i32.load - call_indirect (type $i32_=>_i32) - call $~lib/util/number/itoa32 - local.tee $0 - i32.const 1552 - i32.eq - br_if $__inlined_func$~lib/string/String.__eq - drop - block $folding-inner0 - local.get $0 - i32.eqz - br_if $folding-inner0 - local.get $0 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - local.tee $1 - i32.const 1548 - i32.load - i32.const 1 - i32.shr_u - i32.ne - br_if $folding-inner0 - local.get $0 - local.get $1 - call $~lib/util/string/compareImpl - i32.eqz - br $__inlined_func$~lib/string/String.__eq - end - i32.const 0 - end + i32.const 0 + i32.const 1200 + i32.load + call_indirect (type $i32_=>_i32) + call $~lib/util/number/itoa32 + call $~lib/string/String.__eq i32.eqz if i32.const 0 diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index 8637f34713..6b52f8db64 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -3,7 +3,6 @@ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "d\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") @@ -130,7 +129,6 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 i32.eqz if @@ -196,14 +194,6 @@ local.tee $3 local.set $4 loop $do-continue|0 - local.get $0 - i32.const 10 - i32.rem_u - local.set $5 - local.get $0 - i32.const 10 - i32.div_u - local.set $0 local.get $4 local.get $1 i32.const 1 @@ -212,11 +202,16 @@ i32.const 1 i32.shl i32.add - local.get $5 + local.get $0 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $0 + i32.const 10 + i32.div_u + local.tee $0 br_if $do-continue|0 end local.get $2 @@ -227,84 +222,10 @@ end local.get $3 ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.eq @@ -334,10 +255,82 @@ i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $0 + local.tee $3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if + local.get $3 + i32.load16_u + local.tee $2 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $2 + local.get $4 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz return end diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 6d7b084970..e6831492bd 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -1528,16 +1528,7 @@ select ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i32.const 10 - i32.rem_u - local.set $3 - local.get $1 - i32.const 10 - i32.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -1546,11 +1537,16 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end ) @@ -2634,8 +2630,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index cbb269ac5f..8f05045e6c 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -3,7 +3,6 @@ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "d\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") @@ -135,7 +134,6 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 i32.eqz if @@ -201,14 +199,6 @@ local.tee $3 local.set $4 loop $do-continue|0 - local.get $0 - i32.const 10 - i32.rem_u - local.set $5 - local.get $0 - i32.const 10 - i32.div_u - local.set $0 local.get $4 local.get $1 i32.const 1 @@ -217,11 +207,16 @@ i32.const 1 i32.shl i32.add - local.get $5 + local.get $0 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $0 + i32.const 10 + i32.div_u + local.tee $0 br_if $do-continue|0 end local.get $2 @@ -232,84 +227,10 @@ end local.get $3 ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.eq @@ -339,10 +260,82 @@ i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $0 + local.tee $3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if + local.get $3 + i32.load16_u + local.tee $2 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $2 + local.get $4 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz return end diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index 09de344bba..c733742554 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -1757,8 +1757,6 @@ local.tee $0 i32.eqz if - local.get $1 - call $~lib/rt/pure/__release i32.const 1392 local.set $0 br $__inlined_func$~lib/string/String#concat @@ -1777,9 +1775,9 @@ local.get $1 local.get $6 call $~lib/memory/memory.copy - local.get $1 - call $~lib/rt/pure/__release end + local.get $1 + call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release local.get $5 @@ -1797,57 +1795,57 @@ i32.const 3 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain - local.tee $0 + local.tee $2 i32.const 0 i32.store - local.get $0 + local.get $2 i32.const 0 i32.store offset=4 - local.get $0 + local.get $2 i32.const 0 i32.store offset=8 - local.get $0 + local.get $2 i32.const 0 i32.store offset=12 i32.const 12 i32.const 0 call $~lib/rt/pure/__new - local.tee $2 + local.tee $1 i32.const 12 call $~lib/memory/memory.fill + local.get $1 + local.set $0 + local.get $1 local.get $2 - local.set $1 - local.get $2 - local.get $0 i32.load local.tee $4 i32.ne if - local.get $1 + local.get $0 call $~lib/rt/pure/__retain - local.set $1 + local.set $0 local.get $4 call $~lib/rt/pure/__release end + local.get $2 local.get $0 - local.get $1 i32.store - local.get $0 local.get $2 + local.get $1 i32.store offset=4 - local.get $0 + local.get $2 i32.const 12 i32.store offset=8 - local.get $0 + local.get $2 i32.const 3 i32.store offset=12 - local.get $0 + local.get $2 call $~lib/array/Array#push - local.get $0 + local.get $2 call $~lib/array/Array#push - local.get $0 + local.get $2 i32.load offset=12 - local.tee $2 + local.tee $1 i32.const 1 i32.lt_s if @@ -1858,71 +1856,71 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 local.get $2 + i32.load offset=4 + local.get $1 i32.const 1 i32.sub - local.tee $2 + local.tee $1 i32.const 2 i32.shl i32.add i32.load drop - local.get $0 local.get $2 + local.get $1 i32.store offset=12 - local.get $0 + local.get $2 call $~lib/rt/pure/__release i32.const 16 i32.const 5 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain - local.tee $0 + local.tee $2 i32.const 0 i32.store - local.get $0 + local.get $2 i32.const 0 i32.store offset=4 - local.get $0 + local.get $2 i32.const 0 i32.store offset=8 - local.get $0 + local.get $2 i32.const 0 i32.store offset=12 i32.const 0 i32.const 0 call $~lib/rt/pure/__new - local.tee $2 + local.tee $1 i32.const 0 call $~lib/memory/memory.fill + local.get $1 + local.set $0 + local.get $1 local.get $2 - local.set $1 - local.get $2 - local.get $0 i32.load local.tee $4 i32.ne if - local.get $1 + local.get $0 call $~lib/rt/pure/__retain - local.set $1 + local.set $0 local.get $4 call $~lib/rt/pure/__release end + local.get $2 local.get $0 - local.get $1 i32.store - local.get $0 local.get $2 + local.get $1 i32.store offset=4 - local.get $0 + local.get $2 i32.const 0 i32.store offset=8 - local.get $0 + local.get $2 i32.const 0 i32.store offset=12 - local.get $0 + local.get $2 loop $for-loop|0 local.get $3 i32.const 10 @@ -1947,28 +1945,28 @@ i32.const 0 i32.const 0 call $~lib/rt/pure/__new - local.tee $0 + local.tee $1 i32.const 0 call $~lib/memory/memory.fill - local.get $0 - local.set $1 - local.get $0 + local.get $1 + local.set $0 + local.get $1 local.get $2 i32.load local.tee $5 i32.ne if - local.get $1 + local.get $0 call $~lib/rt/pure/__retain - local.set $1 + local.set $0 local.get $5 call $~lib/rt/pure/__release end local.get $2 - local.get $1 + local.get $0 i32.store local.get $2 - local.get $0 + local.get $1 i32.store offset=4 local.get $2 i32.const 0 @@ -1986,14 +1984,14 @@ local.get $2 local.get $2 i32.load offset=12 - local.tee $1 + local.tee $5 i32.const 1 i32.add - local.tee $5 + local.tee $1 call $~lib/array/ensureSize local.get $2 i32.load offset=4 - local.get $1 + local.get $5 i32.const 2 i32.shl i32.add @@ -2001,7 +1999,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $1 i32.store offset=12 i32.const 1392 call $~lib/rt/pure/__release @@ -2025,15 +2023,15 @@ i32.const 1424 i32.const 1456 call $~lib/string/String.__concat - local.tee $0 - call $~lib/rt/pure/__retain local.tee $2 + call $~lib/rt/pure/__retain + local.tee $1 i32.const 1520 call $~lib/string/String.__concat - local.get $0 - call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release call $~lib/rt/pure/__release i32.const 4 i32.const 6 @@ -2050,7 +2048,8 @@ i32.const 0 i32.store local.get $1 - local.tee $0 + local.set $0 + local.get $1 local.get $2 i32.load local.tee $3 @@ -2065,11 +2064,12 @@ local.get $2 local.get $0 i32.store + local.get $2 + local.set $0 local.get $1 local.set $3 local.get $1 local.get $2 - local.tee $0 i32.load local.tee $4 i32.ne @@ -2099,7 +2099,8 @@ local.get $0 i32.store local.get $2 - local.tee $0 + local.set $0 + local.get $2 local.get $1 i32.load local.tee $3 @@ -2115,7 +2116,8 @@ local.get $0 i32.store local.get $1 - local.tee $0 + local.set $0 + local.get $1 local.get $2 i32.load local.tee $3 @@ -2202,8 +2204,7 @@ end else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1216 @@ -2372,8 +2373,6 @@ local.get $1 i32.const 268435455 i32.and - i32.const 0 - i32.gt_u if local.get $0 call $~lib/rt/pure/scanBlack @@ -2450,8 +2449,6 @@ i32.const 268435455 i32.and i32.const 0 - i32.gt_u - i32.const 0 local.get $2 i32.const 1879048192 i32.and @@ -2574,8 +2571,7 @@ i32.load offset=4 i32.const 268435455 i32.and - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1216 @@ -2679,35 +2675,36 @@ unreachable end local.get $0 - i32.load offset=4 local.tee $2 + i32.load offset=4 + local.tee $3 local.get $0 i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $4 loop $while-continue|0 - local.get $2 local.get $3 + local.get $4 i32.lt_u if - local.get $2 + local.get $3 i32.load - local.tee $4 + local.tee $0 if - local.get $4 + local.get $0 local.get $1 call $~lib/rt/pure/__visit end - local.get $2 + local.get $3 i32.const 4 i32.add - local.set $2 + local.set $3 br $while-continue|0 end end - local.get $0 + local.get $2 i32.load local.get $1 call $~lib/rt/pure/__visit diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index 4930d5f70a..9d06a5a8d0 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -1,9 +1,9 @@ (module (type $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -571,85 +571,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - memory.size - local.tee $0 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1424 - i32.const 0 - i32.store - i32.const 2992 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1424 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1424 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1424 - i32.const 2996 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1424 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -849,6 +770,111 @@ end local.get $1 ) + (func $~lib/rt/pure/__new (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + memory.size + local.tee $1 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1424 + i32.const 0 + i32.store + i32.const 2992 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 1424 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $1 + local.get $0 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1424 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 1424 + i32.const 2996 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1424 + global.set $~lib/rt/tlsf/ROOT + end + global.get $~lib/rt/tlsf/ROOT + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $1 + i32.const 4 + i32.sub + local.tee $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 3 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 16 + i32.add + ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -898,40 +924,9 @@ end local.get $0 ) - (func $retain-return/Ref#constructor (result i32) - (local $0 i32) - (local $1 i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $1 - i32.const 4 - i32.sub - local.tee $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 3 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - ) (func $retain-return/returnNew (result i32) - call $retain-return/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain ) (func $~lib/rt/pure/__release (param $0 i32) local.get $0 @@ -952,17 +947,25 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $start:retain-return + (func $~start (local $0 i32) - call $retain-return/Ref#constructor - call $~lib/rt/pure/__release - call $retain-return/Ref#constructor - call $~lib/rt/pure/__release - call $retain-return/Ref#constructor - call $~lib/rt/pure/__release - call $retain-return/Ref#constructor - call $~lib/rt/pure/__release - call $retain-return/Ref#constructor + global.get $~started + if + return + else + i32.const 1 + global.set $~started + end + call $~lib/rt/pure/__new + drop + call $~lib/rt/pure/__new + drop + call $~lib/rt/pure/__new + drop + call $~lib/rt/pure/__new + drop + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain global.set $retain-return/ref i32.const 1248 i32.load @@ -1023,16 +1026,6 @@ i32.const 0 global.set $retain-return/ref ) - (func $~start - global.get $~started - if - return - else - i32.const 1 - global.set $~started - end - call $start:retain-return - ) (func $~lib/rt/pure/decrement (param $0 i32) (local $1 i32) (local $2 i32) @@ -1105,8 +1098,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/rt/finalize.optimized.wat b/tests/compiler/rt/finalize.optimized.wat index 0d60f39abf..eb656bc37a 100644 --- a/tests/compiler/rt/finalize.optimized.wat +++ b/tests/compiler/rt/finalize.optimized.wat @@ -2,8 +2,8 @@ (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_f64_f64_f64_f64_f64_=>_none (func (param i32 i32 f64 f64 f64 f64 f64))) @@ -797,86 +797,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load - local.set $3 - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1296 - i32.const 360 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const -4 - i32.and - local.get $2 - i32.sub - local.tee $4 - i32.const 16 - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 4 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - i32.load - i32.const -3 - i32.and - i32.store - end - ) (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $1 i32.const 1073741820 i32.ge_u @@ -997,10 +921,79 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 + i32.load + local.set $3 local.get $2 - call $~lib/rt/tlsf/prepareBlock + i32.const 4 + i32.add + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1296 + i32.const 360 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $4 + i32.const 16 + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $2 + local.get $1 + i32.const 4 + i32.add + i32.add + local.tee $2 + local.get $4 + i32.const 4 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $~lib/rt/tlsf/insertBlock + else + local.get $1 + local.get $3 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 4 + i32.add + local.tee $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + i32.load + i32.const -3 + i32.and + i32.store + end local.get $1 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) @@ -1744,92 +1737,13 @@ end end ) - (func $~lib/rt/pure/growRoots - (local $0 i32) + (func $~lib/rt/pure/decrement (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - global.get $~lib/rt/pure/CUR - global.get $~lib/rt/pure/ROOTS - local.tee $0 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - local.tee $1 - i32.const 256 - local.get $1 - i32.const 256 - i32.gt_u - select - local.tee $4 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - local.get $2 - call $~lib/memory/memory.copy - local.get $0 - if - local.get $0 - i32.const 1660 - i32.ge_u - if - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - local.get $0 - i32.const 4 - i32.sub - local.set $3 - local.get $0 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $0 - select - if (result i32) - local.get $3 - i32.load - i32.const 1 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 1296 - i32.const 563 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $3 - call $~lib/rt/tlsf/freeBlock - end - end - local.get $1 - global.set $~lib/rt/pure/ROOTS - local.get $1 - local.get $2 - i32.add - global.set $~lib/rt/pure/CUR - local.get $1 - local.get $4 - i32.add - global.set $~lib/rt/pure/END - ) - (func $~lib/rt/pure/decrement (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (local $6 i32) local.get $0 i32.load offset=4 local.tee $2 @@ -1870,8 +1784,7 @@ end else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1232 @@ -1902,8 +1815,17 @@ i32.load i32.const 32 i32.and - i32.eqz if + local.get $0 + local.get $1 + i32.const 1 + i32.sub + local.get $2 + i32.const -268435456 + i32.and + i32.or + i32.store offset=4 + else local.get $0 local.get $1 i32.const 1 @@ -1921,7 +1843,80 @@ global.get $~lib/rt/pure/END i32.ge_u if - call $~lib/rt/pure/growRoots + global.get $~lib/rt/pure/CUR + global.get $~lib/rt/pure/ROOTS + local.tee $1 + i32.sub + local.tee $3 + i32.const 1 + i32.shl + local.tee $2 + i32.const 256 + local.get $2 + i32.const 256 + i32.gt_u + select + local.tee $5 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $1 + local.get $3 + call $~lib/memory/memory.copy + local.get $1 + if + local.get $1 + i32.const 1660 + i32.ge_u + if + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.get $1 + i32.const 4 + i32.sub + local.set $4 + local.get $1 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $1 + select + if (result i32) + local.get $4 + i32.load + i32.const 1 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 1296 + i32.const 563 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $4 + call $~lib/rt/tlsf/freeBlock + end + end + local.get $2 + global.set $~lib/rt/pure/ROOTS + local.get $2 + local.get $3 + i32.add + global.set $~lib/rt/pure/CUR + local.get $2 + local.get $5 + i32.add + global.set $~lib/rt/pure/END global.get $~lib/rt/pure/CUR local.set $1 end @@ -1933,16 +1928,6 @@ i32.add global.set $~lib/rt/pure/CUR end - else - local.get $0 - local.get $1 - i32.const 1 - i32.sub - local.get $2 - i32.const -268435456 - i32.and - i32.or - i32.store offset=4 end end ) @@ -1996,8 +1981,6 @@ local.get $1 i32.const 268435455 i32.and - i32.const 0 - i32.gt_u if local.get $0 call $~lib/rt/pure/scanBlack @@ -2073,8 +2056,6 @@ i32.const 268435455 i32.and i32.const 0 - i32.gt_u - i32.const 0 local.get $2 i32.const 1879048192 i32.and @@ -2196,8 +2177,7 @@ i32.load offset=4 i32.const 268435455 i32.and - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1232 diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index 155ed68ffe..72fd554f5d 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -1527,8 +1527,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/runtime-stub.optimized.wat b/tests/compiler/runtime-stub.optimized.wat index 0f9e024fb2..7878acae00 100644 --- a/tests/compiler/runtime-stub.optimized.wat +++ b/tests/compiler/runtime-stub.optimized.wat @@ -1,8 +1,8 @@ (module (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -304,12 +304,26 @@ end end ) - (func $~lib/rt/stub/__realloc (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/__renew (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) + local.get $1 + i32.const 1073741804 + i32.gt_u + if + unreachable + end + local.get $1 + i32.const 16 + i32.add + local.set $3 local.get $0 + i32.const 16 + i32.sub + local.tee $0 i32.const 15 i32.and i32.eqz @@ -330,22 +344,22 @@ local.get $0 i32.const 4 i32.sub - local.tee $4 + local.tee $5 i32.load - local.tee $3 + local.tee $4 i32.add i32.eq - local.set $5 - local.get $1 + local.set $6 + local.get $3 call $~lib/rt/stub/computeSize local.set $2 - local.get $1 local.get $3 + local.get $4 i32.gt_u if - local.get $5 + local.get $6 if - local.get $1 + local.get $3 i32.const 1073741820 i32.gt_u if @@ -355,56 +369,40 @@ local.get $2 i32.add call $~lib/rt/stub/maybeGrowMemory - local.get $4 + local.get $5 local.get $2 i32.store else local.get $2 - local.get $3 + local.get $4 i32.const 1 i32.shl - local.tee $1 - local.get $1 + local.tee $3 local.get $2 - i32.lt_u + local.get $3 + i32.gt_u select call $~lib/rt/stub/__alloc - local.tee $1 + local.tee $2 local.get $0 - local.get $3 + local.get $4 call $~lib/memory/memory.copy - local.get $1 + local.get $2 local.set $0 end else - local.get $5 + local.get $6 if local.get $0 local.get $2 i32.add global.set $~lib/rt/stub/offset - local.get $4 + local.get $5 local.get $2 i32.store end end local.get $0 - ) - (func $~lib/rt/stub/__renew (param $0 i32) (param $1 i32) (result i32) - local.get $1 - i32.const 1073741804 - i32.gt_u - if - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.get $1 - i32.const 16 - i32.add - call $~lib/rt/stub/__realloc - local.tee $0 i32.const 4 i32.sub local.get $1 diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index ec3e72a1f2..c1f0472c14 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -2,7 +2,6 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "$\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") @@ -49,10 +48,12 @@ local.get $0 ) (func $std/array-access/i32ArrayArrayElementAccess (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.const 0 call $~lib/array/Array<~lib/array/Array>#__get local.tee $0 + local.get $0 i32.load offset=12 i32.const 1 i32.le_u @@ -64,7 +65,6 @@ call $~lib/builtins/abort unreachable end - local.get $0 i32.load offset=4 i32.load offset=4 ) @@ -78,85 +78,6 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - i32.const 1296 - local.set $3 - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.tee $1 - i32.const 7 - i32.and - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $1 - i64.load - local.get $3 - i64.load - i64.eq - if - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $3 - i32.const 8 - i32.add - local.set $3 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $0 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - if - local.get $3 - i32.load16_u - local.tee $0 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $4 - local.get $0 - i32.sub - return - end - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $3 - i32.const 2 - i32.add - local.set $3 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String#startsWith (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -166,9 +87,9 @@ i32.load i32.const 1 i32.shr_u - local.tee $3 - local.set $4 - local.get $3 + local.tee $4 + local.set $1 + local.get $4 i32.const 0 local.get $0 i32.const 20 @@ -176,23 +97,97 @@ i32.load offset=16 i32.const 1 i32.shr_u - local.tee $1 - local.get $1 + local.tee $2 + local.get $2 i32.const 0 - i32.gt_u + i32.gt_s select - local.tee $2 + local.tee $3 i32.add - local.get $1 + local.get $2 i32.gt_s if i32.const 0 return end - local.get $0 - local.get $2 - local.get $4 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + i32.const 1296 + local.set $2 + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.tee $3 + i32.const 7 + i32.and + i32.eqz + i32.const 0 + local.get $1 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $2 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $2 + i32.const 8 + i32.add + local.set $2 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $1 + i32.const 1 + i32.sub + local.set $0 + local.get $1 + if + local.get $2 + i32.load16_u + local.tee $1 + local.get $3 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $4 + local.get $1 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $2 + i32.const 2 + i32.add + local.set $2 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz ) (func $std/array-access/stringArrayMethodCall (param $0 i32) (result i32) diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index e7a7cabde1..d85fd42a46 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -1,7 +1,7 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) + (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -618,85 +618,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - memory.size - local.tee $0 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1632 - i32.const 0 - i32.store - i32.const 3200 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1632 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1632 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1632 - i32.const 3204 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1632 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 @@ -826,86 +747,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load - local.set $3 - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1600 - i32.const 360 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const -4 - i32.and - local.get $2 - i32.sub - local.tee $4 - i32.const 16 - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 4 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - i32.load - i32.const -3 - i32.and - i32.store - end - ) (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $1 i32.const 1073741820 i32.ge_u @@ -1026,10 +871,79 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 + i32.load + local.set $3 + local.get $2 + i32.const 4 + i32.add + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1600 + i32.const 360 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const -4 + i32.and local.get $2 - call $~lib/rt/tlsf/prepareBlock + i32.sub + local.tee $4 + i32.const 16 + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $2 + local.get $1 + i32.const 4 + i32.add + i32.add + local.tee $2 + local.get $4 + i32.const 4 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $~lib/rt/tlsf/insertBlock + else + local.get $1 + local.get $3 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 4 + i32.add + local.tee $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + i32.load + i32.const -3 + i32.and + i32.store + end local.get $1 ) (func $~lib/rt/pure/__new (param $0 i32) (param $1 i32) (result i32) @@ -1046,17 +960,89 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 16 - i32.add - local.set $2 global.get $~lib/rt/tlsf/ROOT i32.eqz if - call $~lib/rt/tlsf/initialize + memory.size + local.tee $3 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $3 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1632 + i32.const 0 + i32.store + i32.const 3200 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $2 + i32.const 23 + i32.lt_u + if + local.get $2 + i32.const 2 + i32.shl + i32.const 1632 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $3 + loop $for-loop|1 + local.get $3 + i32.const 16 + i32.lt_u + if + local.get $3 + local.get $2 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1632 + i32.add + i32.const 0 + i32.store offset=96 + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 + end + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1632 + i32.const 3204 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1632 + global.set $~lib/rt/tlsf/ROOT end global.get $~lib/rt/tlsf/ROOT - local.get $2 + local.get $0 + i32.const 16 + i32.add call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -1537,9 +1523,10 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) local.get $0 i32.load offset=4 - local.tee $2 + local.tee $4 i32.const 268435455 i32.and local.set $1 @@ -1565,13 +1552,16 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - i32.const 12 + i32.const 20 i32.add + local.tee $2 + i32.const 8 + i32.sub i32.load br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $folding-inner0 $folding-inner0 $__inlined_func$~lib/rt/__visit_members $folding-inner1 $__inlined_func$~lib/rt/__visit_members $folding-inner1 $switch$1$default end - local.get $0 - i32.load offset=20 + local.get $2 + i32.load local.tee $1 if local.get $1 @@ -1581,44 +1571,45 @@ end unreachable end - local.get $0 - i32.load offset=20 + local.get $2 + i32.load call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end - local.get $0 - i32.load offset=24 + local.get $2 local.tee $1 - local.get $0 - i32.load offset=32 + i32.load offset=4 + local.tee $3 + local.get $1 + i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $2 loop $while-continue|0 - local.get $1 + local.get $2 local.get $3 - i32.lt_u + i32.gt_u if - local.get $1 + local.get $3 i32.load - local.tee $4 + local.tee $5 if - local.get $4 + local.get $5 call $~lib/rt/pure/__visit end - local.get $1 + local.get $3 i32.const 4 i32.add - local.set $1 + local.set $3 br $while-continue|0 end end - local.get $0 - i32.load offset=20 + local.get $1 + i32.load call $~lib/rt/pure/__visit end - local.get $2 + local.get $4 i32.const -2147483648 i32.and if @@ -1640,8 +1631,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1536 @@ -1654,7 +1644,7 @@ local.get $1 i32.const 1 i32.sub - local.get $2 + local.get $4 i32.const -268435456 i32.and i32.or diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 52e69e75c1..eb74f82c51 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -2,15 +2,14 @@ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_none (func (param i32))) (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (type $none_=>_none (func)) (type $none_=>_f64 (func (result f64))) - (type $none_=>_i32 (func (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_i32_i32_=>_f32 (func (param i32 i32 i32) (result f32))) @@ -3292,84 +3291,6 @@ end local.get $0 ) - (func $~lib/array/Array#splice (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 0 - local.get $0 - i32.load offset=12 - local.tee $3 - local.get $3 - i32.const 0 - i32.gt_s - select - local.set $2 - i32.const 1 - local.get $3 - local.get $2 - i32.sub - local.tee $1 - local.get $1 - i32.const 1 - i32.gt_s - select - local.tee $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - local.tee $1 - i32.const 2 - i32.const 11 - i32.const 0 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $4 - i32.load offset=4 - local.get $0 - i32.load offset=4 - local.tee $5 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.tee $6 - local.get $1 - i32.const 2 - i32.shl - call $~lib/memory/memory.copy - local.get $3 - local.get $1 - local.get $2 - i32.add - local.tee $2 - i32.ne - if - local.get $6 - local.get $5 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $3 - local.get $2 - i32.sub - i32.const 2 - i32.shl - call $~lib/memory/memory.copy - end - local.get $0 - local.get $3 - local.get $1 - i32.sub - i32.store offset=12 - local.get $4 - ) (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 @@ -4367,91 +4288,6 @@ unreachable end ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 f32) - (local $7 f32) - local.get $2 - call $~lib/rt/pure/__retain - local.set $5 - loop $for-loop|0 - local.get $1 - local.get $4 - i32.gt_s - if - local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $6 - local.get $4 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|1 - local.get $2 - i32.const 0 - i32.ge_s - if - block $while-break|1 - local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $7 - i32.const 2 - global.set $~argumentsLength - local.get $6 - local.get $7 - local.get $5 - i32.load - call_indirect (type $f32_f32_=>_i32) - i32.const 0 - i32.ge_s - br_if $while-break|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.get $3 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $7 - f32.store - br $while-continue|1 - end - end - end - local.get $0 - local.get $2 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - f32.store - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 - end - end - local.get $5 - call $~lib/rt/pure/__release - ) (func $~lib/rt/tlsf/__free (param $0 i32) local.get $0 i32.const 12680 @@ -4730,78 +4566,158 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 f32) + (local $5 i32) (local $6 f32) + (local $7 f32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $5 block $folding-inner0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 local.get $0 i32.load offset=12 - local.tee $2 + local.tee $1 i32.const 1 i32.le_s br_if $folding-inner0 local.get $0 i32.load offset=4 - local.set $1 - local.get $2 + local.set $4 + local.get $1 i32.const 2 i32.eq if - local.get $1 + local.get $4 f32.load offset=4 - local.set $5 - local.get $1 - f32.load local.set $6 + local.get $4 + f32.load + local.set $7 i32.const 2 global.set $~argumentsLength - local.get $5 local.get $6 - local.get $3 + local.get $7 + local.get $5 i32.load call_indirect (type $f32_f32_=>_i32) i32.const 0 i32.lt_s if - local.get $1 - local.get $6 + local.get $4 + local.get $7 f32.store offset=4 - local.get $1 - local.get $5 + local.get $4 + local.get $6 f32.store end br $folding-inner0 end - local.get $3 + local.get $5 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 + local.set $9 + local.get $1 i32.const 256 i32.lt_s if local.get $1 - local.get $2 - local.get $4 - call $~lib/util/sort/insertionSort + local.set $3 + local.get $9 + call $~lib/rt/pure/__retain + local.set $10 + loop $for-loop|0 + local.get $3 + local.get $8 + i32.gt_s + if + local.get $4 + local.get $8 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $6 + local.get $8 + i32.const 1 + i32.sub + local.set $2 + loop $while-continue|1 + local.get $2 + i32.const 0 + i32.ge_s + if + block $while-break|1 + local.get $4 + local.get $2 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $7 + i32.const 2 + global.set $~argumentsLength + local.get $6 + local.get $7 + local.get $10 + i32.load + call_indirect (type $f32_f32_=>_i32) + i32.const 0 + i32.ge_s + br_if $while-break|1 + local.get $2 + local.tee $1 + i32.const 1 + i32.sub + local.set $2 + local.get $4 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $7 + f32.store + br $while-continue|1 + end + end + end + local.get $4 + local.get $2 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $6 + f32.store + local.get $8 + i32.const 1 + i32.add + local.set $8 + br $for-loop|0 + end + end + local.get $10 + call $~lib/rt/pure/__release else + local.get $4 local.get $1 - local.get $2 - local.get $4 + local.get $9 call $~lib/util/sort/weakHeapSort end - local.get $4 + local.get $9 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__retain - local.get $3 + local.get $5 call $~lib/rt/pure/__release return end local.get $0 call $~lib/rt/pure/__retain - local.get $3 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f32) (param $1 f32) (result i32) @@ -4833,168 +4749,6 @@ i32.lt_s i32.sub ) - (func $std/array/isArraysEqual (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 f32) - (local $4 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - block $folding-inner1 - block $folding-inner0 - local.get $0 - i32.load offset=12 - local.tee $4 - local.get $1 - i32.load offset=12 - i32.ne - br_if $folding-inner0 - local.get $0 - local.get $1 - i32.eq - br_if $folding-inner1 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - call $~lib/array/Array#__get - local.tee $3 - local.get $3 - f32.ne - if (result i32) - local.get $1 - local.get $2 - call $~lib/array/Array#__get - local.tee $3 - local.get $3 - f32.ne - else - i32.const 0 - end - i32.eqz - if - local.get $0 - local.get $2 - call $~lib/array/Array#__get - local.get $1 - local.get $2 - call $~lib/array/Array#__get - f32.ne - br_if $folding-inner0 - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - br $folding-inner1 - end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - return - end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 1 - ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 f64) - (local $7 f64) - local.get $2 - call $~lib/rt/pure/__retain - local.set $5 - loop $for-loop|0 - local.get $1 - local.get $4 - i32.gt_s - if - local.get $0 - local.get $4 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $6 - local.get $4 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|1 - local.get $2 - i32.const 0 - i32.ge_s - if - block $while-break|1 - local.get $0 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $7 - i32.const 2 - global.set $~argumentsLength - local.get $6 - local.get $7 - local.get $5 - i32.load - call_indirect (type $f64_f64_=>_i32) - i32.const 0 - i32.ge_s - br_if $while-break|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.get $3 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - local.get $7 - f64.store - br $while-continue|1 - end - end - end - local.get $0 - local.get $2 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - local.get $6 - f64.store - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 - end - end - local.get $5 - call $~lib/rt/pure/__release - ) (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f64) @@ -5256,78 +5010,158 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 f64) + (local $5 i32) (local $6 f64) + (local $7 f64) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $5 block $folding-inner0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 local.get $0 i32.load offset=12 - local.tee $2 + local.tee $1 i32.const 1 i32.le_s br_if $folding-inner0 local.get $0 i32.load offset=4 - local.set $1 - local.get $2 + local.set $4 + local.get $1 i32.const 2 i32.eq if - local.get $1 + local.get $4 f64.load offset=8 - local.set $5 - local.get $1 - f64.load local.set $6 + local.get $4 + f64.load + local.set $7 i32.const 2 global.set $~argumentsLength - local.get $5 local.get $6 - local.get $3 + local.get $7 + local.get $5 i32.load call_indirect (type $f64_f64_=>_i32) i32.const 0 i32.lt_s if - local.get $1 - local.get $6 + local.get $4 + local.get $7 f64.store offset=8 - local.get $1 - local.get $5 + local.get $4 + local.get $6 f64.store end br $folding-inner0 end - local.get $3 + local.get $5 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 + local.set $9 + local.get $1 i32.const 256 i32.lt_s if local.get $1 - local.get $2 - local.get $4 - call $~lib/util/sort/insertionSort + local.set $3 + local.get $9 + call $~lib/rt/pure/__retain + local.set $10 + loop $for-loop|0 + local.get $3 + local.get $8 + i32.gt_s + if + local.get $4 + local.get $8 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $6 + local.get $8 + i32.const 1 + i32.sub + local.set $2 + loop $while-continue|1 + local.get $2 + i32.const 0 + i32.ge_s + if + block $while-break|1 + local.get $4 + local.get $2 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $7 + i32.const 2 + global.set $~argumentsLength + local.get $6 + local.get $7 + local.get $10 + i32.load + call_indirect (type $f64_f64_=>_i32) + i32.const 0 + i32.ge_s + br_if $while-break|1 + local.get $2 + local.tee $1 + i32.const 1 + i32.sub + local.set $2 + local.get $4 + local.get $1 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $7 + f64.store + br $while-continue|1 + end + end + end + local.get $4 + local.get $2 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $6 + f64.store + local.get $8 + i32.const 1 + i32.add + local.set $8 + br $for-loop|0 + end + end + local.get $10 + call $~lib/rt/pure/__release else - local.get $1 - local.get $2 local.get $4 + local.get $1 + local.get $9 call $~lib/util/sort/weakHeapSort end - local.get $4 + local.get $9 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__retain - local.get $3 + local.get $5 call $~lib/rt/pure/__release return end local.get $0 call $~lib/rt/pure/__retain - local.get $3 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f64) (param $1 f64) (result i32) @@ -5380,168 +5214,6 @@ i32.add f64.load ) - (func $std/array/isArraysEqual (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 f64) - (local $4 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - block $folding-inner1 - block $folding-inner0 - local.get $0 - i32.load offset=12 - local.tee $4 - local.get $1 - i32.load offset=12 - i32.ne - br_if $folding-inner0 - local.get $0 - local.get $1 - i32.eq - br_if $folding-inner1 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - call $~lib/array/Array#__get - local.tee $3 - local.get $3 - f64.ne - if (result i32) - local.get $1 - local.get $2 - call $~lib/array/Array#__get - local.tee $3 - local.get $3 - f64.ne - else - i32.const 0 - end - i32.eqz - if - local.get $0 - local.get $2 - call $~lib/array/Array#__get - local.get $1 - local.get $2 - call $~lib/array/Array#__get - f64.ne - br_if $folding-inner0 - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - br $folding-inner1 - end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - return - end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 1 - ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $2 - call $~lib/rt/pure/__retain - local.set $5 - loop $for-loop|0 - local.get $1 - local.get $4 - i32.gt_s - if - local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load - local.set $6 - local.get $4 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|1 - local.get $2 - i32.const 0 - i32.ge_s - if - block $while-break|1 - local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - local.set $7 - i32.const 2 - global.set $~argumentsLength - local.get $6 - local.get $7 - local.get $5 - i32.load - call_indirect (type $i32_i32_=>_i32) - i32.const 0 - i32.ge_s - br_if $while-break|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.get $3 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store - br $while-continue|1 - end - end - end - local.get $0 - local.get $2 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 - end - end - local.get $5 - call $~lib/rt/pure/__release - ) (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -5803,78 +5475,158 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $5 block $folding-inner0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $4 local.get $0 i32.load offset=12 - local.tee $2 + local.tee $1 i32.const 1 i32.le_s br_if $folding-inner0 local.get $0 i32.load offset=4 - local.set $1 - local.get $2 + local.set $4 + local.get $1 i32.const 2 i32.eq if - local.get $1 + local.get $4 i32.load offset=4 local.set $2 - local.get $1 + local.get $4 i32.load - local.set $3 + local.set $1 i32.const 2 global.set $~argumentsLength local.get $2 - local.get $3 - local.get $4 + local.get $1 + local.get $5 i32.load call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if + local.get $4 local.get $1 - local.get $3 i32.store offset=4 - local.get $1 + local.get $4 local.get $2 i32.store end br $folding-inner0 end - local.get $2 - local.set $3 - local.get $4 + local.get $5 call $~lib/rt/pure/__retain - local.set $2 - local.get $3 + local.set $7 + local.get $1 i32.const 256 i32.lt_s if local.get $1 - local.get $3 - local.get $2 - call $~lib/util/sort/insertionSort + local.set $3 + local.get $7 + call $~lib/rt/pure/__retain + local.set $8 + loop $for-loop|0 + local.get $3 + local.get $6 + i32.gt_s + if + local.get $4 + local.get $6 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $9 + local.get $6 + i32.const 1 + i32.sub + local.set $2 + loop $while-continue|1 + local.get $2 + i32.const 0 + i32.ge_s + if + block $while-break|1 + local.get $4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $10 + i32.const 2 + global.set $~argumentsLength + local.get $9 + local.get $10 + local.get $8 + i32.load + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.ge_s + br_if $while-break|1 + local.get $2 + local.tee $1 + i32.const 1 + i32.sub + local.set $2 + local.get $4 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $10 + i32.store + br $while-continue|1 + end + end + end + local.get $4 + local.get $2 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|0 + end + end + local.get $8 + call $~lib/rt/pure/__release else + local.get $4 local.get $1 - local.get $3 - local.get $2 + local.get $7 call $~lib/util/sort/weakHeapSort end - local.get $2 + local.get $7 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__retain - local.get $4 + local.get $5 call $~lib/rt/pure/__release return end local.get $0 call $~lib/rt/pure/__retain - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) @@ -6166,89 +5918,6 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $std/array/createReverseOrderedNestedArray (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 16 - i32.const 22 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.tee $4 - i32.const 0 - i32.store - local.get $4 - i32.const 0 - i32.store offset=4 - local.get $4 - i32.const 0 - i32.store offset=8 - local.get $4 - i32.const 0 - i32.store offset=12 - i32.const 8 - i32.const 0 - call $~lib/rt/pure/__new - local.tee $1 - i32.const 0 - i32.const 8 - call $~lib/memory/memory.fill - local.get $1 - local.set $0 - local.get $1 - local.get $4 - i32.load - local.tee $2 - i32.ne - if - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $2 - call $~lib/rt/pure/__release - end - local.get $4 - local.get $0 - i32.store - local.get $4 - local.get $1 - i32.store offset=4 - local.get $4 - i32.const 8 - i32.store offset=8 - local.get $4 - i32.const 2 - i32.store offset=12 - loop $for-loop|0 - local.get $3 - i32.const 2 - i32.lt_s - if - i32.const 1 - call $~lib/array/Array#constructor - local.tee $1 - i32.const 0 - i32.const 1 - local.get $3 - i32.sub - call $~lib/array/Array#__set - local.get $4 - local.get $3 - local.get $1 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $4 - ) (func $start:std/array~anonymous|47 (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 @@ -6533,90 +6202,6 @@ local.get $5 call $~lib/rt/pure/__release ) - (func $std/array/createReverseOrderedElementsArray (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 16 - i32.const 25 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.tee $4 - i32.const 0 - i32.store - local.get $4 - i32.const 0 - i32.store offset=4 - local.get $4 - i32.const 0 - i32.store offset=8 - local.get $4 - i32.const 0 - i32.store offset=12 - i32.const 2048 - i32.const 0 - call $~lib/rt/pure/__new - local.tee $1 - i32.const 0 - i32.const 2048 - call $~lib/memory/memory.fill - local.get $1 - local.set $0 - local.get $1 - local.get $4 - i32.load - local.tee $2 - i32.ne - if - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $2 - call $~lib/rt/pure/__release - end - local.get $4 - local.get $0 - i32.store - local.get $4 - local.get $1 - i32.store offset=4 - local.get $4 - i32.const 2048 - i32.store offset=8 - local.get $4 - i32.const 512 - i32.store offset=12 - loop $for-loop|0 - local.get $3 - i32.const 512 - i32.lt_s - if - i32.const 4 - i32.const 24 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 511 - local.get $3 - i32.sub - i32.store - local.get $4 - local.get $3 - local.get $1 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $4 - ) (func $start:std/array~anonymous|48 (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 @@ -7084,8 +6669,6 @@ local.tee $0 i32.eqz if - local.get $1 - call $~lib/rt/pure/__release i32.const 8256 local.set $0 br $__inlined_func$~lib/string/String#concat @@ -7104,89 +6687,15 @@ local.get $1 local.get $6 call $~lib/memory/memory.copy - local.get $1 - call $~lib/rt/pure/__release end + local.get $1 + call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release local.get $0 ) - (func $std/array/createRandomString (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 8256 - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.gt_s - if - local.get $1 - local.tee $2 - local.get $1 - block $__inlined_func$~lib/string/String#charAt (result i32) - i32.const 8256 - call $~lib/math/NativeMath.random - i32.const 6812 - i32.load - i32.const 1 - i32.shr_u - f64.convert_i32_s - f64.mul - f64.floor - i32.trunc_f64_s - local.tee $3 - i32.const 6812 - i32.load - i32.const 1 - i32.shr_u - i32.ge_u - br_if $__inlined_func$~lib/string/String#charAt - drop - i32.const 2 - i32.const 1 - call $~lib/rt/pure/__new - local.tee $1 - local.get $3 - i32.const 1 - i32.shl - i32.const 6816 - i32.add - i32.load16_u - i32.store16 - local.get $1 - call $~lib/rt/pure/__retain - end - local.tee $3 - call $~lib/string/String.__concat - local.tee $5 - local.tee $1 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $2 - call $~lib/rt/pure/__release - end - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 - end - end - local.get $1 - ) (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -7462,16 +6971,7 @@ select ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i32.const 10 - i32.rem_u - local.set $3 - local.get $1 - i32.const 10 - i32.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -7480,11 +6980,16 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end ) @@ -9797,17 +9302,7 @@ select ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i64.const 10 - i64.rem_u - i32.wrap_i64 - local.set $3 - local.get $1 - i64.const 10 - i64.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -9816,11 +9311,17 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i64.const 10 + i64.rem_u + i32.wrap_i64 i32.const 48 i32.add i32.store16 local.get $1 + i64.const 10 + i64.div_u + local.tee $1 i64.const 0 i64.ne br_if $do-continue|0 @@ -11449,13 +10950,13 @@ (local $23 i32) (local $24 i32) (local $25 i32) - (local $26 i32) - (local $27 i32) + (local $26 f32) + (local $27 f64) (local $28 i32) (local $29 i32) (local $30 i32) - (local $31 f32) - (local $32 f64) + (local $31 i32) + (local $32 i32) (local $33 i32) (local $34 i32) (local $35 i32) @@ -11481,6 +10982,7 @@ (local $55 i32) (local $56 i32) (local $57 i32) + (local $58 i32) i32.const 0 call $~lib/array/Array#constructor global.set $std/array/arr @@ -11500,51 +11002,52 @@ i32.const 5 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain - local.tee $0 + local.tee $2 i32.eqz if i32.const 12 i32.const 2 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain - local.set $0 + local.set $2 end - local.get $0 + local.get $2 i32.const 0 i32.store - local.get $0 + local.get $2 i32.const 0 i32.store offset=4 - local.get $0 + local.get $2 i32.const 0 i32.store offset=8 i32.const 1 i32.const 0 call $~lib/rt/pure/__new - local.tee $2 + local.tee $1 i32.const 0 i32.const 1 call $~lib/memory/memory.fill + local.get $1 + local.set $0 + local.get $1 local.get $2 - local.tee $1 - local.get $0 i32.load - local.tee $3 + local.tee $6 i32.ne if - local.get $1 + local.get $0 call $~lib/rt/pure/__retain - local.set $1 - local.get $3 + local.set $0 + local.get $6 call $~lib/rt/pure/__release end + local.get $2 local.get $0 - local.get $1 i32.store - local.get $0 local.get $2 + local.get $1 i32.store offset=4 - local.get $0 + local.get $2 i32.const 1 i32.store offset=8 global.get $std/array/arr @@ -11559,7 +11062,7 @@ unreachable end call $~lib/rt/pure/__release - local.get $0 + local.get $2 call $~lib/rt/pure/__release i32.const 5 i32.const 0 @@ -11567,20 +11070,20 @@ i32.const 1488 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $2 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 5 i32.const 0 i32.const 6 i32.const 1520 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 call $std/array/isArraysEqual i32.eqz if @@ -11591,20 +11094,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 5 i32.const 0 i32.const 6 i32.const 1616 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $5 call $std/array/isArraysEqual i32.eqz if @@ -11615,20 +11118,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 5 i32.const 0 i32.const 6 i32.const 1648 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $std/array/isArraysEqual i32.eqz if @@ -11639,20 +11142,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 5 i32.const 0 i32.const 6 i32.const 1680 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $1 call $std/array/isArraysEqual i32.eqz if @@ -11663,20 +11166,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 5 i32.const 0 i32.const 6 i32.const 1712 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $0 call $std/array/isArraysEqual i32.eqz if @@ -11687,17 +11190,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.get $0 + local.get $3 call $~lib/rt/pure/__release - local.get $2 + local.get $5 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $1 call $~lib/rt/pure/__release - local.get $4 + local.get $0 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -11705,20 +11208,20 @@ i32.const 1744 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $2 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 5 i32.const 2 i32.const 7 i32.const 1792 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11730,20 +11233,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 5 i32.const 2 i32.const 7 i32.const 1840 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $5 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11755,20 +11258,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 5 i32.const 2 i32.const 7 i32.const 1888 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11780,20 +11283,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 5 i32.const 2 i32.const 7 i32.const 1936 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $1 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11805,20 +11308,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 5 i32.const 2 i32.const 7 i32.const 1984 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $0 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11830,17 +11333,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.get $0 + local.get $3 call $~lib/rt/pure/__release - local.get $2 + local.get $5 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $1 call $~lib/rt/pure/__release - local.get $4 + local.get $0 call $~lib/rt/pure/__release global.get $std/array/arr i32.load offset=12 @@ -12132,11 +11635,11 @@ call $~lib/rt/pure/__release i32.const 0 call $~lib/array/Array#constructor - local.set $0 + local.set $5 global.get $std/array/arr - local.get $0 + local.get $5 call $~lib/array/Array#concat - local.set $2 + local.set $1 global.get $std/array/arr call $std/array/internalCapacity i32.const 3 @@ -12161,7 +11664,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.load offset=12 i32.const 3 i32.ne @@ -12173,14 +11676,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.const 0 i32.const 2 i32.const 3 i32.const 2080 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $0 call $~lib/array/Array#concat call $~lib/rt/pure/__release global.get $std/array/arr @@ -12195,7 +11698,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -12208,7 +11711,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -12221,7 +11724,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -12234,19 +11737,19 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $5 i32.const 46 call $~lib/array/Array#push drop - local.get $0 + local.get $5 i32.const 47 call $~lib/array/Array#push drop global.get $std/array/arr - local.get $0 + local.get $5 call $~lib/array/Array#concat - local.set $1 - local.get $2 + local.set $3 + local.get $1 call $~lib/rt/pure/__release global.get $std/array/arr call $std/array/internalCapacity @@ -12260,7 +11763,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $5 i32.load offset=12 i32.const 2 i32.ne @@ -12272,7 +11775,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.load offset=12 i32.const 5 i32.ne @@ -12284,7 +11787,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -12297,7 +11800,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -12310,7 +11813,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -12323,7 +11826,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 3 call $~lib/array/Array#__get i32.const 46 @@ -12336,7 +11839,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 4 call $~lib/array/Array#__get i32.const 47 @@ -12349,10 +11852,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 call $~lib/array/Array#pop drop - local.get $1 + local.get $3 i32.load offset=12 i32.const 4 i32.ne @@ -12370,7 +11873,7 @@ i32.const 2112 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $6 i32.load offset=12 if i32.const 0 @@ -12380,13 +11883,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $6 global.get $std/array/arr call $~lib/array/Array#concat - local.set $7 - local.get $1 + local.set $1 + local.get $3 call $~lib/rt/pure/__release - local.get $7 + local.get $1 i32.load offset=12 i32.const 3 i32.ne @@ -12398,7 +11901,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $6 i32.load offset=12 if i32.const 0 @@ -12408,13 +11911,13 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $5 call $~lib/rt/pure/__release - local.get $7 + local.get $1 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $6 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -12427,14 +11930,14 @@ i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $2 + local.tee $23 i32.const 5 i32.const 2 i32.const 3 i32.const 2192 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $24 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12460,14 +11963,14 @@ i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $3 + local.tee $25 i32.const 5 i32.const 2 i32.const 3 i32.const 2288 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $14 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12492,14 +11995,14 @@ i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $5 + local.tee $18 i32.const 5 i32.const 2 i32.const 3 i32.const 2384 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $19 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12524,14 +12027,14 @@ i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $8 + local.tee $20 i32.const 5 i32.const 2 i32.const 3 i32.const 2480 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $12 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12556,14 +12059,14 @@ i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $10 + local.tee $15 i32.const 5 i32.const 2 i32.const 3 i32.const 2576 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $16 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12588,14 +12091,14 @@ i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $11 + local.tee $17 i32.const 5 i32.const 2 i32.const 3 i32.const 2672 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12620,14 +12123,14 @@ i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $14 + local.tee $11 i32.const 5 i32.const 2 i32.const 3 i32.const 2768 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $24 + local.tee $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12652,14 +12155,14 @@ i32.const -2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $16 + local.tee $13 i32.const 5 i32.const 2 i32.const 3 i32.const 2864 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $17 + local.tee $7 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12684,14 +12187,14 @@ i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $18 + local.tee $8 i32.const 5 i32.const 2 i32.const 3 i32.const 2960 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $4 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12716,14 +12219,14 @@ i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - local.tee $21 + local.tee $2 i32.const 5 i32.const 2 i32.const 3 i32.const 3056 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12748,14 +12251,14 @@ i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $20 + local.tee $5 i32.const 5 i32.const 2 i32.const 3 i32.const 3152 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $6 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12773,22 +12276,22 @@ i32.const 3200 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $1 + local.set $22 local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $22 i32.const -4 i32.const -3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $0 + local.tee $1 i32.const 5 i32.const 2 i32.const 3 i32.const 3248 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $23 + local.tee $0 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12800,55 +12303,55 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $22 call $~lib/rt/pure/__release - local.get $2 + local.get $23 call $~lib/rt/pure/__release - local.get $7 + local.get $24 call $~lib/rt/pure/__release - local.get $3 + local.get $25 call $~lib/rt/pure/__release - local.get $4 + local.get $14 call $~lib/rt/pure/__release - local.get $5 + local.get $18 call $~lib/rt/pure/__release - local.get $6 + local.get $19 call $~lib/rt/pure/__release - local.get $8 + local.get $20 call $~lib/rt/pure/__release - local.get $9 + local.get $12 call $~lib/rt/pure/__release - local.get $10 + local.get $15 call $~lib/rt/pure/__release - local.get $12 + local.get $16 call $~lib/rt/pure/__release - local.get $11 + local.get $17 call $~lib/rt/pure/__release - local.get $13 + local.get $10 call $~lib/rt/pure/__release - local.get $14 + local.get $11 call $~lib/rt/pure/__release - local.get $24 + local.get $9 call $~lib/rt/pure/__release - local.get $16 + local.get $13 call $~lib/rt/pure/__release - local.get $17 + local.get $7 call $~lib/rt/pure/__release - local.get $18 + local.get $8 call $~lib/rt/pure/__release - local.get $15 + local.get $4 call $~lib/rt/pure/__release - local.get $21 + local.get $2 call $~lib/rt/pure/__release - local.get $19 + local.get $3 call $~lib/rt/pure/__release - local.get $20 + local.get $5 call $~lib/rt/pure/__release - local.get $22 + local.get $6 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.get $23 + local.get $0 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 42 @@ -13428,34 +12931,34 @@ i32.const 3296 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $0 - local.set $7 + local.tee $5 + local.set $0 i32.const 0 - local.set $1 + local.set $2 block $__inlined_func$~lib/array/Array#indexOf - local.get $0 + local.get $5 i32.load offset=12 - local.tee $2 + local.tee $1 i32.const 0 i32.le_s i32.const 1 - local.get $2 + local.get $1 select if i32.const -1 - local.set $1 + local.set $2 br $__inlined_func$~lib/array/Array#indexOf end - local.get $7 + local.get $0 i32.load offset=4 - local.set $7 + local.set $0 loop $while-continue|0 local.get $1 local.get $2 - i32.lt_s + i32.gt_s if - local.get $7 - local.get $1 + local.get $0 + local.get $2 i32.const 2 i32.shl i32.add @@ -13463,17 +12966,17 @@ f32.const nan:0x400000 f32.eq br_if $__inlined_func$~lib/array/Array#indexOf - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $while-continue|0 end end i32.const -1 - local.set $1 + local.set $2 end - local.get $1 + local.get $2 i32.const -1 i32.ne if @@ -13490,34 +12993,34 @@ i32.const 3328 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $2 - local.set $3 + local.tee $6 + local.set $0 i32.const 0 - local.set $1 + local.set $2 block $__inlined_func$~lib/array/Array#indexOf - local.get $2 + local.get $6 i32.load offset=12 - local.tee $7 + local.tee $1 i32.const 0 i32.le_s i32.const 1 - local.get $7 + local.get $1 select if i32.const -1 - local.set $1 + local.set $2 br $__inlined_func$~lib/array/Array#indexOf end - local.get $3 + local.get $0 i32.load offset=4 - local.set $3 + local.set $0 loop $while-continue|021 local.get $1 - local.get $7 - i32.lt_s + local.get $2 + i32.gt_s if - local.get $3 - local.get $1 + local.get $0 + local.get $2 i32.const 3 i32.shl i32.add @@ -13525,17 +13028,17 @@ f64.const nan:0x8000000000000 f64.eq br_if $__inlined_func$~lib/array/Array#indexOf - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $while-continue|021 end end i32.const -1 - local.set $1 + local.set $2 end - local.get $1 + local.get $2 i32.const -1 i32.ne if @@ -13546,9 +13049,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $5 call $~lib/rt/pure/__release - local.get $2 + local.get $6 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 44 @@ -13692,7 +13195,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $0 + local.set $2 i32.const 0 i32.const 1 i32.const 2 @@ -13700,45 +13203,45 @@ i32.const 3360 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $5 i32.load offset=12 - local.tee $2 + local.tee $1 i32.const 0 i32.le_s i32.const 1 - local.get $2 + local.get $1 select br_if $__inlined_func$~lib/array/Array#includes drop - local.get $7 + local.get $5 i32.load offset=4 - local.set $3 + local.set $0 loop $while-continue|031 - local.get $0 + local.get $1 local.get $2 - i32.lt_s + i32.gt_s if i32.const 1 i32.const 1 - local.get $3 local.get $0 + local.get $2 i32.const 2 i32.shl i32.add f32.load - local.tee $31 - local.get $31 + local.tee $26 + local.get $26 f32.ne - local.get $31 + local.get $26 f32.const nan:0x400000 f32.eq select br_if $__inlined_func$~lib/array/Array#includes drop - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $while-continue|031 end end @@ -13763,36 +13266,36 @@ i32.const 3392 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $6 i32.load offset=12 - local.tee $3 + local.tee $1 i32.const 0 i32.le_s i32.const 1 - local.get $3 + local.get $1 select br_if $__inlined_func$~lib/array/Array#includes drop - local.get $0 + local.get $6 i32.load offset=4 - local.set $4 + local.set $0 loop $while-continue|032 + local.get $1 local.get $2 - local.get $3 - i32.lt_s + i32.gt_s if i32.const 1 i32.const 1 - local.get $4 + local.get $0 local.get $2 i32.const 3 i32.shl i32.add f64.load - local.tee $32 - local.get $32 + local.tee $27 + local.get $27 f64.ne - local.get $32 + local.get $27 f64.const nan:0x8000000000000 f64.eq select @@ -13871,9 +13374,9 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $5 call $~lib/rt/pure/__release - local.get $0 + local.get $6 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -13885,14 +13388,14 @@ i32.const 0 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $5 + local.tee $37 i32.const 5 i32.const 2 i32.const 3 i32.const 3472 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $38 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13911,7 +13414,7 @@ i32.const 3520 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $39 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13936,14 +13439,14 @@ i32.const 0 i32.const 0 call $~lib/array/Array#splice - local.tee $9 + local.tee $40 i32.const 0 i32.const 2 i32.const 3 i32.const 3600 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $41 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13962,7 +13465,7 @@ i32.const 3632 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $42 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13986,14 +13489,14 @@ i32.const 2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $11 + local.tee $43 i32.const 3 i32.const 2 i32.const 3 i32.const 3728 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $44 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14012,7 +13515,7 @@ i32.const 3760 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $14 + local.tee $45 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14036,14 +13539,14 @@ i32.const 2 i32.const 2 call $~lib/array/Array#splice - local.tee $16 + local.tee $46 i32.const 2 i32.const 2 i32.const 3 i32.const 3840 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $17 + local.tee $47 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14062,7 +13565,7 @@ i32.const 3872 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $48 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14086,14 +13589,14 @@ i32.const 0 i32.const 1 call $~lib/array/Array#splice - local.tee $15 + local.tee $49 i32.const 1 i32.const 2 i32.const 3 i32.const 3952 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $21 + local.tee $50 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14112,7 +13615,7 @@ i32.const 3984 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $51 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14136,14 +13639,14 @@ i32.const -1 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $20 + local.tee $52 i32.const 1 i32.const 2 i32.const 3 i32.const 4080 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $53 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14162,7 +13665,7 @@ i32.const 4112 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $23 + local.tee $54 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14186,14 +13689,14 @@ i32.const -2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $25 + local.tee $55 i32.const 2 i32.const 2 i32.const 3 i32.const 4208 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $56 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14212,7 +13715,7 @@ i32.const 4240 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $57 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14236,14 +13739,14 @@ i32.const -2 i32.const 1 call $~lib/array/Array#splice - local.tee $28 + local.tee $58 i32.const 1 i32.const 2 i32.const 3 i32.const 4320 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $29 + local.tee $30 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14262,7 +13765,7 @@ i32.const 4352 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $30 + local.tee $31 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14286,14 +13789,14 @@ i32.const -7 i32.const 1 call $~lib/array/Array#splice - local.tee $33 + local.tee $32 i32.const 1 i32.const 2 i32.const 3 i32.const 4448 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $34 + local.tee $22 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14312,7 +13815,7 @@ i32.const 4480 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $35 + local.tee $23 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14336,14 +13839,14 @@ i32.const -2 i32.const -1 call $~lib/array/Array#splice - local.tee $36 + local.tee $24 i32.const 0 i32.const 2 i32.const 3 i32.const 4576 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $37 + local.tee $25 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14362,7 +13865,7 @@ i32.const 4608 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $38 + local.tee $14 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14386,14 +13889,14 @@ i32.const 1 i32.const -2 call $~lib/array/Array#splice - local.tee $39 + local.tee $18 i32.const 0 i32.const 2 i32.const 3 i32.const 4704 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $40 + local.tee $19 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14412,7 +13915,7 @@ i32.const 4736 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $41 + local.tee $20 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14436,14 +13939,14 @@ i32.const 4 i32.const 0 call $~lib/array/Array#splice - local.tee $42 + local.tee $12 i32.const 0 i32.const 2 i32.const 3 i32.const 4832 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $43 + local.tee $15 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14462,7 +13965,7 @@ i32.const 4864 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $44 + local.tee $16 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14480,20 +13983,21 @@ i32.const 4912 call $~lib/rt/__newArray call $~lib/rt/pure/__retain + local.set $0 local.get $1 call $~lib/rt/pure/__release - local.tee $1 + local.get $0 i32.const 7 i32.const 0 call $~lib/array/Array#splice - local.tee $45 + local.tee $17 i32.const 0 i32.const 2 i32.const 3 i32.const 4960 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $46 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14505,14 +14009,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 5 i32.const 2 i32.const 3 i32.const 4992 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $47 + local.tee $11 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14530,21 +14034,21 @@ i32.const 5040 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $2 - local.get $1 + local.set $35 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $35 i32.const 7 i32.const 5 call $~lib/array/Array#splice - local.tee $48 + local.tee $9 i32.const 0 i32.const 2 i32.const 3 i32.const 5088 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $49 + local.tee $13 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14556,14 +14060,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $35 i32.const 5 i32.const 2 i32.const 3 i32.const 5120 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $7 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14581,10 +14085,10 @@ i32.const 5168 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $1 i32.const 1 call $~lib/array/Array#splice - local.tee $3 + local.tee $0 i32.load offset=12 if i32.const 0 @@ -14594,7 +14098,7 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $1 i32.load offset=12 if i32.const 0 @@ -14610,37 +14114,37 @@ i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $28 i32.load offset=4 - local.tee $0 + local.tee $6 i32.const 1 call $std/array/Ref#constructor i32.store - local.get $0 + local.get $6 i32.const 2 call $std/array/Ref#constructor i32.store offset=4 - local.get $0 + local.get $6 i32.const 3 call $std/array/Ref#constructor i32.store offset=8 - local.get $0 + local.get $6 i32.const 4 call $std/array/Ref#constructor i32.store offset=12 - local.get $0 + local.get $6 i32.const 5 call $std/array/Ref#constructor i32.store offset=16 - local.get $7 - call $~lib/rt/pure/__release local.get $1 + call $~lib/rt/pure/__release + local.get $28 i32.const 2 call $~lib/array/Array#splice - local.set $0 - local.get $3 - call $~lib/rt/pure/__release + local.set $34 local.get $0 + call $~lib/rt/pure/__release + local.get $34 i32.load offset=12 i32.const 2 i32.ne @@ -14652,10 +14156,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $34 i32.const 0 call $~lib/array/Array#__get - local.tee $51 + local.tee $8 i32.load i32.const 3 i32.ne @@ -14667,10 +14171,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $34 i32.const 1 call $~lib/array/Array#__get - local.tee $52 + local.tee $2 i32.load i32.const 4 i32.ne @@ -14682,7 +14186,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $28 i32.load offset=12 i32.const 3 i32.ne @@ -14694,10 +14198,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $28 i32.const 0 call $~lib/array/Array#__get - local.tee $53 + local.tee $3 i32.load i32.const 1 i32.ne @@ -14709,10 +14213,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $28 i32.const 1 call $~lib/array/Array#__get - local.tee $54 + local.tee $5 i32.load i32.const 2 i32.ne @@ -14724,10 +14228,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $28 i32.const 2 call $~lib/array/Array#__get - local.tee $55 + local.tee $6 i32.load i32.const 5 i32.ne @@ -14745,22 +14249,90 @@ i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $0 i32.load offset=4 - local.tee $3 + local.tee $1 i32.const 1 call $std/array/Ref#constructor i32.store - local.get $3 + local.get $1 i32.const 0 i32.store offset=4 - local.get $3 + local.get $1 i32.const 2 call $std/array/Ref#constructor i32.store offset=8 - local.get $7 - call $~lib/array/Array#splice - local.tee $24 + i32.const 0 + local.get $0 + local.tee $4 + i32.load offset=12 + local.tee $33 + local.get $33 + i32.const 0 + i32.gt_s + select + local.set $21 + i32.const 1 + local.get $33 + local.get $21 + i32.sub + local.tee $0 + local.get $0 + i32.const 1 + i32.gt_s + select + local.tee $0 + i32.const 0 + local.get $0 + i32.const 0 + i32.gt_s + select + local.tee $29 + i32.const 2 + i32.const 11 + i32.const 0 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $36 + i32.load offset=4 + local.get $4 + i32.load offset=4 + local.tee $1 + local.get $21 + i32.const 2 + i32.shl + i32.add + local.tee $0 + local.get $29 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $33 + local.get $21 + local.get $29 + i32.add + local.tee $21 + i32.ne + if + local.get $0 + local.get $1 + local.get $21 + i32.const 2 + i32.shl + i32.add + local.get $33 + local.get $21 + i32.sub + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + end + local.get $4 + local.get $33 + local.get $29 + i32.sub + i32.store offset=12 + local.get $36 i32.load offset=12 i32.const 1 i32.ne @@ -14772,11 +14344,11 @@ call $~lib/builtins/abort unreachable end - local.get $24 + local.get $36 i32.const 0 call $~lib/array/Array#__get - local.tee $3 - local.get $3 + local.tee $29 + local.get $29 i32.eqz if i32.const 5328 @@ -14797,7 +14369,7 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $4 i32.load offset=12 i32.const 2 i32.ne @@ -14809,10 +14381,10 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $4 i32.const 0 call $~lib/array/Array#__get - local.tee $56 + local.tee $1 if i32.const 0 i32.const 1344 @@ -14821,11 +14393,11 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $4 i32.const 1 call $~lib/array/Array#__get - local.tee $4 - local.get $4 + local.tee $21 + local.get $21 i32.eqz if i32.const 5328 @@ -14846,107 +14418,107 @@ call $~lib/builtins/abort unreachable end - local.get $2 - call $~lib/rt/pure/__release - local.get $5 + local.get $35 call $~lib/rt/pure/__release - local.get $6 + local.get $37 call $~lib/rt/pure/__release - local.get $8 + local.get $38 call $~lib/rt/pure/__release - local.get $9 + local.get $39 call $~lib/rt/pure/__release - local.get $10 + local.get $40 call $~lib/rt/pure/__release - local.get $12 + local.get $41 call $~lib/rt/pure/__release - local.get $11 + local.get $42 call $~lib/rt/pure/__release - local.get $13 + local.get $43 call $~lib/rt/pure/__release - local.get $14 + local.get $44 call $~lib/rt/pure/__release - local.get $16 + local.get $45 call $~lib/rt/pure/__release - local.get $17 + local.get $46 call $~lib/rt/pure/__release - local.get $18 + local.get $47 call $~lib/rt/pure/__release - local.get $15 + local.get $48 call $~lib/rt/pure/__release - local.get $21 + local.get $49 call $~lib/rt/pure/__release - local.get $19 + local.get $50 call $~lib/rt/pure/__release - local.get $20 + local.get $51 call $~lib/rt/pure/__release - local.get $22 + local.get $52 call $~lib/rt/pure/__release - local.get $23 + local.get $53 call $~lib/rt/pure/__release - local.get $25 + local.get $54 call $~lib/rt/pure/__release - local.get $26 + local.get $55 call $~lib/rt/pure/__release - local.get $27 + local.get $56 call $~lib/rt/pure/__release - local.get $28 + local.get $57 call $~lib/rt/pure/__release - local.get $29 + local.get $58 call $~lib/rt/pure/__release local.get $30 call $~lib/rt/pure/__release - local.get $33 + local.get $31 call $~lib/rt/pure/__release - local.get $34 + local.get $32 call $~lib/rt/pure/__release - local.get $35 + local.get $22 call $~lib/rt/pure/__release - local.get $36 + local.get $23 call $~lib/rt/pure/__release - local.get $37 + local.get $24 call $~lib/rt/pure/__release - local.get $38 + local.get $25 call $~lib/rt/pure/__release - local.get $39 + local.get $14 call $~lib/rt/pure/__release - local.get $40 + local.get $18 call $~lib/rt/pure/__release - local.get $41 + local.get $19 call $~lib/rt/pure/__release - local.get $42 + local.get $20 call $~lib/rt/pure/__release - local.get $43 + local.get $12 call $~lib/rt/pure/__release - local.get $44 + local.get $15 call $~lib/rt/pure/__release - local.get $45 + local.get $16 call $~lib/rt/pure/__release - local.get $46 + local.get $17 call $~lib/rt/pure/__release - local.get $47 + local.get $10 call $~lib/rt/pure/__release - local.get $48 + local.get $11 call $~lib/rt/pure/__release - local.get $49 + local.get $9 call $~lib/rt/pure/__release - local.get $50 + local.get $13 call $~lib/rt/pure/__release - local.get $51 + local.get $7 call $~lib/rt/pure/__release - local.get $52 + local.get $8 call $~lib/rt/pure/__release - local.get $53 + local.get $2 call $~lib/rt/pure/__release - local.get $54 + local.get $3 call $~lib/rt/pure/__release - local.get $55 + local.get $5 call $~lib/rt/pure/__release - local.get $3 + local.get $6 call $~lib/rt/pure/__release - local.get $56 + local.get $29 call $~lib/rt/pure/__release - local.get $4 + local.get $1 + call $~lib/rt/pure/__release + local.get $21 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 0 @@ -15428,19 +15000,19 @@ unreachable end i32.const 0 - local.set $2 + local.set $7 loop $for-loop|0 - local.get $2 + local.get $7 i32.const 100 i32.lt_s if global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $2 + local.get $7 i32.const 1 i32.add - local.set $2 + local.set $7 br $for-loop|0 end end @@ -15461,62 +15033,62 @@ call $~lib/array/Array#push drop i32.const 0 - local.set $2 + local.set $5 global.get $std/array/arr - local.tee $3 + local.tee $7 i32.load offset=12 - local.tee $6 + local.tee $3 i32.const 2 i32.const 9 i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $8 i32.load offset=4 - local.set $8 + local.set $6 loop $for-loop|050 - local.get $2 - local.get $6 + local.get $5 local.get $3 + local.get $7 i32.load offset=12 - local.tee $9 - local.get $6 - local.get $9 - i32.lt_s - select + local.tee $0 + local.get $0 + local.get $3 + i32.gt_s + select i32.lt_s if - local.get $2 + local.get $5 i32.const 2 i32.shl - local.tee $9 - local.get $3 + local.tee $1 + local.get $7 i32.load offset=4 i32.add i32.load - local.set $10 + local.set $0 i32.const 3 global.set $~argumentsLength - local.get $8 - local.get $9 + local.get $1 + local.get $6 i32.add - local.get $10 - local.get $2 - local.get $3 + local.get $0 + local.get $5 + local.get $7 i32.const 6064 i32.load call_indirect (type $i32_i32_i32_=>_f32) f32.store - local.get $2 + local.get $5 i32.const 1 i32.add - local.set $2 + local.set $5 br $for-loop|050 end end i32.const 6064 call $~lib/rt/pure/__release - local.get $4 + local.get $8 i32.load offset=12 i32.const 4 i32.ne @@ -15528,7 +15100,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $8 i32.const 0 call $~lib/array/Array#__get global.get $std/array/arr @@ -15639,12 +15211,12 @@ i32.const 3 call $~lib/array/Array#push drop - local.get $4 + local.get $8 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 6192 call $~lib/array/Array#filter - local.tee $2 + local.tee $0 i32.load offset=12 i32.const 2 i32.ne @@ -15751,7 +15323,7 @@ i32.const 3 call $~lib/array/Array#push drop - local.get $2 + local.get $0 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 6320 @@ -16066,24 +15638,98 @@ i32.const 7008 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $3 + local.set $18 i32.const 0 global.set $~argumentsLength - local.get $3 + local.get $18 i32.const 7072 call $~lib/array/Array#sort i32.const 7072 call $~lib/rt/pure/__release call $~lib/rt/pure/__release - local.get $3 - i32.const 8 - i32.const 2 - i32.const 9 - i32.const 7104 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $18 - call $std/array/isArraysEqual + block $__inlined_func$std/array/isArraysEqual (result i32) + i32.const 8 + i32.const 2 + i32.const 9 + i32.const 7104 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.set $7 + i32.const 0 + local.set $3 + local.get $18 + call $~lib/rt/pure/__retain + local.set $5 + local.get $7 + call $~lib/rt/pure/__retain + local.set $6 + block $folding-inner1 + block $folding-inner0 + local.get $5 + i32.load offset=12 + local.tee $0 + local.get $6 + i32.load offset=12 + i32.ne + br_if $folding-inner0 + local.get $5 + local.get $6 + i32.eq + br_if $folding-inner1 + loop $for-loop|00 + local.get $0 + local.get $3 + i32.gt_s + if + local.get $5 + local.get $3 + call $~lib/array/Array#__get + local.tee $26 + local.get $26 + f32.ne + if (result i32) + local.get $6 + local.get $3 + call $~lib/array/Array#__get + local.tee $26 + local.get $26 + f32.ne + else + i32.const 0 + end + i32.eqz + if + local.get $5 + local.get $3 + call $~lib/array/Array#__get + local.get $6 + local.get $3 + call $~lib/array/Array#__get + f32.ne + br_if $folding-inner0 + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|00 + end + end + br $folding-inner1 + end + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + i32.const 0 + br $__inlined_func$std/array/isArraysEqual + end + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + i32.const 1 + end i32.eqz if i32.const 0 @@ -16099,24 +15745,98 @@ i32.const 7168 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $4 + local.set $19 i32.const 0 global.set $~argumentsLength - local.get $4 + local.get $19 i32.const 7264 call $~lib/array/Array#sort i32.const 7264 call $~lib/rt/pure/__release call $~lib/rt/pure/__release - local.get $4 - i32.const 8 - i32.const 3 - i32.const 10 - i32.const 7296 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $15 - call $std/array/isArraysEqual + block $__inlined_func$std/array/isArraysEqual (result i32) + i32.const 8 + i32.const 3 + i32.const 10 + i32.const 7296 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.set $8 + i32.const 0 + local.set $3 + local.get $19 + call $~lib/rt/pure/__retain + local.set $5 + local.get $8 + call $~lib/rt/pure/__retain + local.set $6 + block $folding-inner11 + block $folding-inner02 + local.get $5 + i32.load offset=12 + local.tee $0 + local.get $6 + i32.load offset=12 + i32.ne + br_if $folding-inner02 + local.get $5 + local.get $6 + i32.eq + br_if $folding-inner11 + loop $for-loop|03 + local.get $0 + local.get $3 + i32.gt_s + if + local.get $5 + local.get $3 + call $~lib/array/Array#__get + local.tee $27 + local.get $27 + f64.ne + if (result i32) + local.get $6 + local.get $3 + call $~lib/array/Array#__get + local.tee $27 + local.get $27 + f64.ne + else + i32.const 0 + end + i32.eqz + if + local.get $5 + local.get $3 + call $~lib/array/Array#__get + local.get $6 + local.get $3 + call $~lib/array/Array#__get + f64.ne + br_if $folding-inner02 + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|03 + end + end + br $folding-inner11 + end + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + i32.const 0 + br $__inlined_func$std/array/isArraysEqual + end + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + i32.const 1 + end i32.eqz if i32.const 0 @@ -16132,23 +15852,23 @@ i32.const 7392 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $5 + local.set $20 i32.const 0 global.set $~argumentsLength - local.get $5 + local.get $20 i32.const 7440 call $~lib/array/Array#sort i32.const 7440 call $~lib/rt/pure/__release call $~lib/rt/pure/__release - local.get $5 + local.get $20 i32.const 5 i32.const 2 i32.const 3 i32.const 7472 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $21 + local.tee $5 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16166,21 +15886,21 @@ i32.const 7520 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $6 + local.set $12 i32.const 0 global.set $~argumentsLength - local.get $6 + local.get $12 i32.const 0 call $~lib/array/Array#sort@varargs call $~lib/rt/pure/__release - local.get $6 + local.get $12 i32.const 5 i32.const 2 i32.const 7 i32.const 7600 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $6 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16198,62 +15918,62 @@ i32.const 7648 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $16 + local.set $2 i32.const 1 i32.const 2 i32.const 3 i32.const 7680 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $8 + local.set $15 i32.const 2 i32.const 2 i32.const 3 i32.const 7712 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $9 + local.set $16 i32.const 4 i32.const 2 i32.const 3 i32.const 7744 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $10 + local.set $17 i32.const 4 i32.const 2 i32.const 3 i32.const 7792 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $2 + local.set $14 i32.const 64 call $std/array/createReverseOrderedArray - local.set $12 + local.set $10 i32.const 128 call $std/array/createReverseOrderedArray local.set $11 i32.const 1024 call $std/array/createReverseOrderedArray - local.set $13 + local.set $9 i32.const 10000 call $std/array/createReverseOrderedArray - local.set $14 + local.set $13 i32.const 512 call $std/array/createRandomOrderedArray - local.set $17 - local.get $16 + local.set $3 + local.get $2 call $std/array/assertSortedDefault - local.get $8 + local.get $15 call $std/array/assertSortedDefault - local.get $8 + local.get $15 i32.const 1 i32.const 2 i32.const 3 i32.const 7872 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $1 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16265,16 +15985,16 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $16 call $std/array/assertSortedDefault - local.get $9 + local.get $16 i32.const 2 i32.const 2 i32.const 3 i32.const 7904 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $0 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16286,10 +16006,10 @@ call $~lib/builtins/abort unreachable end - local.get $10 + local.get $17 call $std/array/assertSortedDefault - local.get $10 - local.get $2 + local.get $17 + local.get $14 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16301,10 +16021,10 @@ call $~lib/builtins/abort unreachable end - local.get $12 + local.get $10 call $std/array/assertSortedDefault - local.get $12 - local.get $2 + local.get $10 + local.get $14 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -16319,7 +16039,7 @@ local.get $11 call $std/array/assertSortedDefault local.get $11 - local.get $2 + local.get $14 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -16331,10 +16051,10 @@ call $~lib/builtins/abort unreachable end - local.get $13 + local.get $9 call $std/array/assertSortedDefault - local.get $13 - local.get $2 + local.get $9 + local.get $14 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -16346,10 +16066,10 @@ call $~lib/builtins/abort unreachable end - local.get $14 + local.get $13 call $std/array/assertSortedDefault + local.get $13 local.get $14 - local.get $2 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -16361,81 +16081,233 @@ call $~lib/builtins/abort unreachable end - local.get $17 - call $std/array/assertSortedDefault local.get $3 - call $~lib/rt/pure/__release + call $std/array/assertSortedDefault local.get $18 call $~lib/rt/pure/__release - local.get $4 + local.get $7 call $~lib/rt/pure/__release - local.get $15 + local.get $19 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + local.get $20 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $21 + local.get $12 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $19 + local.get $2 call $~lib/rt/pure/__release - local.get $16 - call $~lib/rt/pure/__release - local.get $8 + local.get $15 call $~lib/rt/pure/__release - local.get $9 + local.get $16 call $~lib/rt/pure/__release - local.get $10 + local.get $17 call $~lib/rt/pure/__release - local.get $2 + local.get $14 call $~lib/rt/pure/__release - local.get $12 + local.get $10 call $~lib/rt/pure/__release local.get $11 call $~lib/rt/pure/__release - local.get $13 + local.get $9 call $~lib/rt/pure/__release - local.get $14 + local.get $13 call $~lib/rt/pure/__release - local.get $17 + local.get $3 call $~lib/rt/pure/__release - local.get $20 + local.get $1 call $~lib/rt/pure/__release - local.get $22 + local.get $0 call $~lib/rt/pure/__release i32.const 64 call $std/array/createRandomOrderedArray - local.set $2 + local.set $1 i32.const 257 call $std/array/createRandomOrderedArray - local.set $3 - local.get $2 + local.set $0 + local.get $1 i32.const 7936 call $std/array/assertSorted - local.get $2 + local.get $1 i32.const 7968 call $std/array/assertSorted - local.get $3 + local.get $0 i32.const 8000 call $std/array/assertSorted - local.get $3 + local.get $0 i32.const 8032 call $std/array/assertSorted - local.get $2 + local.get $1 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release - call $std/array/createReverseOrderedNestedArray - local.tee $2 + i32.const 0 + local.set $7 + i32.const 16 + i32.const 22 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.tee $5 + i32.const 0 + i32.store + local.get $5 + i32.const 0 + i32.store offset=4 + local.get $5 + i32.const 0 + i32.store offset=8 + local.get $5 + i32.const 0 + i32.store offset=12 + i32.const 8 + i32.const 0 + call $~lib/rt/pure/__new + local.tee $0 + i32.const 0 + i32.const 8 + call $~lib/memory/memory.fill + local.get $0 + local.tee $1 + local.get $5 + i32.load + local.tee $6 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $6 + call $~lib/rt/pure/__release + end + local.get $5 + local.get $1 + i32.store + local.get $5 + local.get $0 + i32.store offset=4 + local.get $5 + i32.const 8 + i32.store offset=8 + local.get $5 + i32.const 2 + i32.store offset=12 + loop $for-loop|06 + local.get $7 + i32.const 2 + i32.lt_s + if + i32.const 1 + call $~lib/array/Array#constructor + local.tee $0 + i32.const 0 + i32.const 1 + local.get $7 + i32.sub + call $~lib/array/Array#__set + local.get $5 + local.get $7 + local.get $0 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $0 + call $~lib/rt/pure/__release + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $for-loop|06 + end + end + local.get $5 i32.const 8064 call $std/array/assertSorted<~lib/array/Array> - local.get $2 + local.get $5 call $~lib/rt/pure/__release - call $std/array/createReverseOrderedElementsArray - local.tee $2 + i32.const 0 + local.set $5 + i32.const 16 + i32.const 25 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.tee $3 + i32.const 0 + i32.store + local.get $3 + i32.const 0 + i32.store offset=4 + local.get $3 + i32.const 0 + i32.store offset=8 + local.get $3 + i32.const 0 + i32.store offset=12 + i32.const 2048 + i32.const 0 + call $~lib/rt/pure/__new + local.tee $1 + i32.const 0 + i32.const 2048 + call $~lib/memory/memory.fill + local.get $1 + local.set $0 + local.get $1 + local.get $3 + i32.load + local.tee $6 + i32.ne + if + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $6 + call $~lib/rt/pure/__release + end + local.get $3 + local.get $0 + i32.store + local.get $3 + local.get $1 + i32.store offset=4 + local.get $3 + i32.const 2048 + i32.store offset=8 + local.get $3 + i32.const 512 + i32.store offset=12 + loop $for-loop|04 + local.get $5 + i32.const 512 + i32.lt_s + if + i32.const 4 + i32.const 24 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 511 + local.get $5 + i32.sub + i32.store + local.get $3 + local.get $5 + local.get $0 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|04 + end + end + local.get $3 i32.const 8096 call $std/array/assertSorted<~lib/array/Array> - local.get $2 + local.get $3 call $~lib/rt/pure/__release i32.const 7 i32.const 2 @@ -16443,85 +16315,85 @@ i32.const 8288 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $5 + local.set $11 i32.const 7 i32.const 2 i32.const 27 i32.const 8336 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $10 + local.set $13 i32.const 1 global.set $~argumentsLength block $__inlined_func$std/array/isSorted<~lib/string/String|null> (result i32) - local.get $5 + local.get $11 call $~lib/rt/pure/__retain - local.tee $11 + local.tee $3 i32.const 8384 call $~lib/rt/pure/__retain - local.tee $12 + local.tee $5 call $~lib/array/Array<~lib/array/Array>#sort - local.tee $13 + local.tee $6 call $~lib/rt/pure/__retain - local.set $3 - local.get $12 + local.set $10 + local.get $5 call $~lib/rt/pure/__retain - local.set $6 + local.set $7 i32.const 1 - local.set $4 - local.get $3 + local.set $9 + local.get $10 i32.load offset=12 - local.set $14 - loop $for-loop|00 - local.get $4 - local.get $14 - i32.lt_s + local.set $0 + loop $for-loop|05 + local.get $0 + local.get $9 + i32.gt_s if - local.get $3 - local.get $4 + local.get $10 + local.get $9 i32.const 1 i32.sub call $~lib/array/Array#__get local.set $8 - local.get $3 - local.get $4 + local.get $10 + local.get $9 call $~lib/array/Array#__get - local.set $9 + local.set $2 i32.const 2 global.set $~argumentsLength local.get $8 - local.get $9 - local.get $6 + local.get $2 + local.get $7 i32.load call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $3 + local.get $10 call $~lib/rt/pure/__release - local.get $6 + local.get $7 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release - local.get $9 + local.get $2 call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isSorted<~lib/string/String|null> end local.get $8 call $~lib/rt/pure/__release - local.get $9 + local.get $2 call $~lib/rt/pure/__release - local.get $4 + local.get $9 i32.const 1 i32.add - local.set $4 - br $for-loop|00 + local.set $9 + br $for-loop|05 end end - local.get $3 + local.get $10 call $~lib/rt/pure/__release - local.get $6 + local.get $7 call $~lib/rt/pure/__release i32.const 1 end @@ -16534,16 +16406,16 @@ call $~lib/builtins/abort unreachable end - local.get $13 + local.get $6 call $~lib/rt/pure/__release - local.get $11 + local.get $3 call $~lib/rt/pure/__release - local.get $12 + local.get $5 call $~lib/rt/pure/__release i32.const 8384 call $~lib/rt/pure/__release - local.get $5 - local.get $10 + local.get $11 + local.get $13 call $std/array/isArraysEqual<~lib/string/String|null> i32.eqz if @@ -16555,46 +16427,115 @@ unreachable end i32.const 0 - local.set $2 + local.set $5 i32.const 0 i32.const 400 call $~lib/array/Array<~lib/string/String>#constructor - local.set $3 - loop $for-loop|06 - local.get $2 + local.set $2 + loop $for-loop|07 + local.get $5 i32.const 400 i32.lt_s if - local.get $3 - local.get $2 call $~lib/math/NativeMath.random f64.const 32 f64.mul i32.trunc_f64_s - call $std/array/createRandomString - local.tee $4 + local.set $7 + i32.const 0 + local.set $9 + i32.const 8256 + local.set $3 + loop $for-loop|08 + local.get $7 + local.get $9 + i32.gt_s + if + local.get $3 + local.tee $1 + local.tee $0 + block $__inlined_func$~lib/string/String#charAt (result i32) + i32.const 8256 + call $~lib/math/NativeMath.random + i32.const 6812 + i32.load + i32.const 1 + i32.shr_u + f64.convert_i32_s + f64.mul + f64.floor + i32.trunc_f64_s + local.tee $8 + i32.const 6812 + i32.load + i32.const 1 + i32.shr_u + i32.ge_u + br_if $__inlined_func$~lib/string/String#charAt + drop + i32.const 2 + i32.const 1 + call $~lib/rt/pure/__new + local.tee $3 + local.get $8 + i32.const 1 + i32.shl + i32.const 6816 + i32.add + i32.load16_u + i32.store16 + local.get $3 + call $~lib/rt/pure/__retain + end + local.tee $6 + call $~lib/string/String.__concat + local.tee $8 + local.tee $3 + local.get $0 + i32.ne + if + local.get $3 + call $~lib/rt/pure/__retain + local.set $3 + local.get $1 + call $~lib/rt/pure/__release + end + local.get $6 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + local.get $9 + i32.const 1 + i32.add + local.set $9 + br $for-loop|08 + end + end + local.get $2 + local.get $5 + local.get $3 call $~lib/array/Array<~lib/array/Array>#__set - local.get $4 + local.get $3 call $~lib/rt/pure/__release - local.get $2 + local.get $5 i32.const 1 i32.add - local.set $2 - br $for-loop|06 + local.set $5 + br $for-loop|07 end end i32.const 1 global.set $~argumentsLength - local.get $3 + local.get $2 i32.const 8448 call $std/array/assertSorted<~lib/array/Array> i32.const 8448 call $~lib/rt/pure/__release - local.get $5 + local.get $11 call $~lib/rt/pure/__release - local.get $10 + local.get $13 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release i32.const 2 i32.const 0 @@ -16602,15 +16543,15 @@ i32.const 8480 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $12 i32.load offset=4 - local.get $2 + local.get $12 i32.load offset=12 call $~lib/util/string/joinBooleanArray - local.set $4 + local.set $16 i32.const 8576 call $~lib/rt/pure/__release - local.get $4 + local.get $16 i32.const 8608 call $~lib/string/String.__eq i32.eqz @@ -16628,10 +16569,10 @@ i32.const 8656 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $11 i32.const 8256 call $~lib/array/Array#join - local.tee $10 + local.tee $9 i32.const 9008 call $~lib/string/String.__eq i32.eqz @@ -16649,10 +16590,10 @@ i32.const 9040 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $13 i32.const 9072 call $~lib/array/Array#join - local.tee $11 + local.tee $7 i32.const 9008 call $~lib/string/String.__eq i32.eqz @@ -16670,10 +16611,10 @@ i32.const 9104 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $8 i32.const 9136 call $~lib/array/Array#join - local.tee $14 + local.tee $2 i32.const 9168 call $~lib/string/String.__eq i32.eqz @@ -16691,15 +16632,15 @@ i32.const 9248 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $15 i32.load offset=4 - local.get $3 + local.get $15 i32.load offset=12 call $~lib/util/string/joinFloatArray - local.set $6 + local.set $0 i32.const 9328 call $~lib/rt/pure/__release - local.get $6 + local.get $0 i32.const 10480 call $~lib/string/String.__eq i32.eqz @@ -16717,10 +16658,10 @@ i32.const 10624 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $3 i32.const 8256 call $~lib/array/Array<~lib/string/String|null>#join - local.tee $17 + local.tee $5 i32.const 10592 call $~lib/string/String.__eq i32.eqz @@ -16738,22 +16679,22 @@ i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $17 i32.load offset=4 - local.tee $8 + local.tee $1 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $8 + local.get $1 i32.const 0 i32.store offset=4 - local.get $8 + local.get $1 i32.const 0 call $std/array/Ref#constructor i32.store offset=8 - local.get $5 + local.get $17 call $~lib/array/Array#join - local.tee $18 + local.tee $6 i32.const 10720 call $~lib/string/String.__eq i32.eqz @@ -16771,19 +16712,19 @@ i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $10 i32.load offset=4 - local.tee $15 + local.tee $1 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $15 + local.get $1 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $8 + local.get $10 call $~lib/array/Array#join - local.tee $15 + local.tee $1 i32.const 10816 call $~lib/string/String.__eq i32.eqz @@ -16795,37 +16736,37 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $12 call $~lib/rt/pure/__release - local.get $4 + local.get $16 + call $~lib/rt/pure/__release + local.get $11 call $~lib/rt/pure/__release local.get $9 call $~lib/rt/pure/__release - local.get $10 + local.get $13 call $~lib/rt/pure/__release - local.get $12 + local.get $7 call $~lib/rt/pure/__release - local.get $11 + local.get $8 call $~lib/rt/pure/__release - local.get $13 + local.get $2 call $~lib/rt/pure/__release - local.get $14 + local.get $15 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release - local.get $6 + local.get $3 call $~lib/rt/pure/__release - local.get $16 + local.get $5 call $~lib/rt/pure/__release local.get $17 call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $18 + local.get $6 call $~lib/rt/pure/__release - local.get $8 + local.get $10 call $~lib/rt/pure/__release - local.get $15 + local.get $1 call $~lib/rt/pure/__release i32.const 0 i32.const 2 @@ -16833,33 +16774,33 @@ i32.const 10912 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $10 + local.set $14 i32.const 1 i32.const 2 i32.const 3 i32.const 10944 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $12 + local.set $18 i32.const 2 i32.const 2 i32.const 3 i32.const 10976 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $11 + local.set $19 i32.const 4 i32.const 2 i32.const 3 i32.const 11008 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $13 - local.get $10 + local.set $20 + local.get $14 i32.const 8576 call $~lib/array/Array#join - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 8256 call $~lib/string/String.__eq i32.eqz @@ -16871,12 +16812,12 @@ call $~lib/builtins/abort unreachable end - local.get $12 + local.get $18 i32.const 8576 call $~lib/array/Array#join - local.tee $2 - local.set $23 - local.get $2 + local.tee $0 + local.set $16 + local.get $0 i32.const 10592 call $~lib/string/String.__eq i32.eqz @@ -16888,12 +16829,12 @@ call $~lib/builtins/abort unreachable end - local.get $11 + local.get $19 i32.const 8576 call $~lib/array/Array#join - local.tee $2 - local.set $25 - local.get $2 + local.tee $0 + local.set $17 + local.get $0 i32.const 11056 call $~lib/string/String.__eq i32.eqz @@ -16905,12 +16846,12 @@ call $~lib/builtins/abort unreachable end - local.get $13 + local.get $20 i32.const 8576 call $~lib/array/Array#join - local.tee $2 - local.set $26 - local.get $2 + local.tee $0 + local.set $10 + local.get $0 i32.const 11088 call $~lib/string/String.__eq i32.eqz @@ -16928,15 +16869,15 @@ i32.const 11136 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $30 i32.load offset=4 - local.get $2 + local.get $30 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.set $14 + local.set $3 i32.const 8576 call $~lib/rt/pure/__release - local.get $14 + local.get $3 i32.const 11168 call $~lib/string/String.__eq i32.eqz @@ -16954,15 +16895,15 @@ i32.const 11200 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $31 i32.load offset=4 - local.get $3 + local.get $31 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.set $16 + local.set $12 i32.const 8576 call $~lib/rt/pure/__release - local.get $16 + local.get $12 i32.const 11232 call $~lib/string/String.__eq i32.eqz @@ -16980,15 +16921,15 @@ i32.const 11280 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $32 i32.load offset=4 - local.get $4 + local.get $32 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.set $17 + local.set $5 i32.const 8576 call $~lib/rt/pure/__release - local.get $17 + local.get $5 i32.const 11328 call $~lib/string/String.__eq i32.eqz @@ -17006,15 +16947,15 @@ i32.const 11408 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $22 i32.load offset=4 - local.get $5 + local.get $22 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.set $18 + local.set $6 i32.const 8576 call $~lib/rt/pure/__release - local.get $18 + local.get $6 i32.const 11472 call $~lib/string/String.__eq i32.eqz @@ -17032,12 +16973,12 @@ i32.const 11584 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $11 i32.const 8576 call $~lib/array/Array<~lib/string/String|null>#join - local.tee $6 - local.set $28 - local.get $6 + local.tee $0 + local.set $9 + local.get $0 i32.const 11632 call $~lib/string/String.__eq i32.eqz @@ -17055,12 +16996,12 @@ i32.const 11744 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $29 + local.tee $13 i32.const 8576 call $~lib/array/Array<~lib/string/String|null>#join - local.tee $6 - local.set $30 - local.get $6 + local.tee $0 + local.set $7 + local.get $0 i32.const 11792 call $~lib/string/String.__eq i32.eqz @@ -17078,9 +17019,9 @@ i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $23 i32.load offset=4 - local.tee $8 + local.tee $0 i32.const 2 i32.const 2 i32.const 3 @@ -17088,7 +17029,7 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store - local.get $8 + local.get $0 i32.const 2 i32.const 2 i32.const 3 @@ -17096,15 +17037,15 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $6 + local.get $23 i32.load offset=4 - local.get $6 + local.get $23 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.set $15 + local.set $1 i32.const 8576 call $~lib/rt/pure/__release - local.get $15 + local.get $1 i32.const 11888 call $~lib/string/String.__eq i32.eqz @@ -17122,9 +17063,9 @@ i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $24 i32.load offset=4 - local.tee $9 + local.tee $0 i32.const 2 i32.const 0 i32.const 6 @@ -17132,7 +17073,7 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store - local.get $9 + local.get $0 i32.const 2 i32.const 0 i32.const 6 @@ -17140,15 +17081,15 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $8 + local.get $24 i32.load offset=4 - local.get $8 + local.get $24 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.set $21 + local.set $0 i32.const 8576 call $~lib/rt/pure/__release - local.get $21 + local.get $0 i32.const 11888 call $~lib/string/String.__eq i32.eqz @@ -17166,7 +17107,7 @@ i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $25 i32.load offset=4 i32.const 1 i32.const 2 @@ -17174,7 +17115,7 @@ i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $2 i32.load offset=4 i32.const 1 i32.const 2 @@ -17183,17 +17124,17 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store - local.get $20 + local.get $2 i32.store - local.get $9 + local.get $25 i32.load offset=4 - local.get $9 + local.get $25 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> - local.set $20 + local.set $2 i32.const 8576 call $~lib/rt/pure/__release - local.get $20 + local.get $2 i32.const 10592 call $~lib/string/String.__eq i32.eqz @@ -17205,50 +17146,50 @@ call $~lib/builtins/abort unreachable end - local.get $10 - call $~lib/rt/pure/__release - local.get $12 + local.get $14 call $~lib/rt/pure/__release - local.get $11 + local.get $18 call $~lib/rt/pure/__release - local.get $13 + local.get $19 call $~lib/rt/pure/__release + local.get $20 call $~lib/rt/pure/__release - local.get $23 call $~lib/rt/pure/__release - local.get $25 + local.get $16 call $~lib/rt/pure/__release - local.get $26 + local.get $17 call $~lib/rt/pure/__release - local.get $2 + local.get $10 call $~lib/rt/pure/__release - local.get $14 + local.get $30 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $16 + local.get $31 call $~lib/rt/pure/__release - local.get $4 + local.get $12 call $~lib/rt/pure/__release - local.get $17 + local.get $32 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $18 + local.get $22 call $~lib/rt/pure/__release - local.get $27 + local.get $6 call $~lib/rt/pure/__release - local.get $28 + local.get $11 call $~lib/rt/pure/__release - local.get $29 + local.get $9 call $~lib/rt/pure/__release - local.get $30 + local.get $13 call $~lib/rt/pure/__release - local.get $15 + local.get $7 call $~lib/rt/pure/__release - local.get $21 + local.get $1 call $~lib/rt/pure/__release - local.get $20 + local.get $0 + call $~lib/rt/pure/__release + local.get $2 call $~lib/rt/pure/__release global.get $std/array/arr call $~lib/rt/pure/__release @@ -17258,9 +17199,9 @@ i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $0 i32.load offset=4 - local.tee $2 + local.tee $1 i32.const 1 i32.const 2 i32.const 3 @@ -17268,7 +17209,7 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store - local.get $2 + local.get $1 i32.const 3 i32.const 2 i32.const 3 @@ -17276,7 +17217,7 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $2 + local.get $1 i32.const 3 i32.const 2 i32.const 3 @@ -17284,7 +17225,7 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store offset=8 - local.get $2 + local.get $1 i32.const 3 i32.const 2 i32.const 3 @@ -17292,9 +17233,9 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store offset=12 - local.get $5 + local.get $0 call $~lib/array/Array<~lib/array/Array>#flat - local.tee $10 + local.tee $3 i32.load offset=12 i32.const 10 i32.ne @@ -17307,16 +17248,16 @@ unreachable end i32.const 0 - local.set $2 + local.set $7 loop $for-loop|1 - local.get $2 + local.get $7 i32.const 10 i32.lt_s if - local.get $10 - local.get $2 + local.get $3 + local.get $7 call $~lib/array/Array#__get - local.get $2 + local.get $7 i32.ne if i32.const 0 @@ -17326,10 +17267,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $7 i32.const 1 i32.add - local.set $2 + local.set $7 br $for-loop|1 end end @@ -17339,9 +17280,9 @@ i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $5 i32.load offset=4 - local.tee $2 + local.tee $1 i32.const 1 i32.const 2 i32.const 27 @@ -17349,7 +17290,7 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store - local.get $2 + local.get $1 i32.const 3 i32.const 2 i32.const 27 @@ -17357,7 +17298,7 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $2 + local.get $1 i32.const 3 i32.const 2 i32.const 27 @@ -17365,7 +17306,7 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store offset=8 - local.get $2 + local.get $1 i32.const 1 i32.const 2 i32.const 27 @@ -17373,17 +17314,17 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store offset=12 - local.get $12 + local.get $5 call $~lib/array/Array<~lib/array/Array<~lib/string/String|null>>#flat - local.set $3 + local.set $8 i32.const 8 i32.const 2 i32.const 27 i32.const 12512 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $4 - local.get $3 + local.set $2 + local.get $8 i32.load offset=12 i32.const 8 i32.ne @@ -17396,21 +17337,21 @@ unreachable end i32.const 0 - local.set $2 + local.set $7 loop $for-loop|2 + local.get $7 local.get $2 - local.get $4 i32.load offset=12 i32.lt_s if - local.get $3 - local.get $2 + local.get $8 + local.get $7 call $~lib/array/Array#__get - local.tee $11 - local.get $4 + local.tee $6 local.get $2 + local.get $7 call $~lib/array/Array#__get - local.tee $13 + local.tee $1 call $~lib/string/String.__eq i32.eqz if @@ -17421,14 +17362,14 @@ call $~lib/builtins/abort unreachable end - local.get $11 + local.get $6 call $~lib/rt/pure/__release - local.get $13 + local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $7 i32.const 1 i32.add - local.set $2 + local.set $7 br $for-loop|2 end end @@ -17438,9 +17379,9 @@ i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $6 i32.load offset=4 - local.tee $11 + local.tee $1 i32.const 0 i32.const 2 i32.const 3 @@ -17448,7 +17389,7 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store - local.get $11 + local.get $1 i32.const 0 i32.const 2 i32.const 3 @@ -17456,9 +17397,9 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $2 + local.get $6 call $~lib/array/Array<~lib/array/Array>#flat - local.tee $11 + local.tee $1 i32.load offset=12 if i32.const 0 @@ -17468,109 +17409,34 @@ call $~lib/builtins/abort unreachable end - local.get $2 - call $~lib/rt/pure/__release - local.get $11 + local.get $6 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $7 + local.get $28 call $~lib/rt/pure/__release - local.get $24 + local.get $34 call $~lib/rt/pure/__release - local.get $6 + local.get $4 call $~lib/rt/pure/__release - local.get $8 + local.get $36 call $~lib/rt/pure/__release - local.get $9 + local.get $23 call $~lib/rt/pure/__release - local.get $5 + local.get $24 call $~lib/rt/pure/__release - local.get $10 + local.get $25 call $~lib/rt/pure/__release - local.get $12 + local.get $0 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $4 + local.get $5 + call $~lib/rt/pure/__release + local.get $8 call $~lib/rt/pure/__release - ) - (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.eqz - if - i32.const 16 - i32.const 7 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 268435455 - i32.gt_u - if - i32.const 1056 - i32.const 1104 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.tee $4 - i32.const 0 - call $~lib/rt/pure/__new - local.tee $2 - i32.const 0 - local.get $4 - call $~lib/memory/memory.fill - local.get $2 - local.set $3 - local.get $2 - local.get $0 - i32.load - local.tee $5 - i32.ne - if - local.get $3 - call $~lib/rt/pure/__retain - local.set $3 - local.get $5 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $3 - i32.store - local.get $0 local.get $2 - i32.store offset=4 - local.get $0 - local.get $4 - i32.store offset=8 - local.get $0 - local.get $1 - i32.store offset=12 - local.get $0 + call $~lib/rt/pure/__release ) (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) local.get $0 @@ -17705,82 +17571,6 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/array/Array#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - i32.load offset=12 - local.set $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $3 - i32.add - local.tee $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $3 - local.get $1 - local.get $3 - i32.lt_s - select - end - local.set $1 - local.get $2 - i32.const 0 - i32.lt_s - if (result i32) - local.get $2 - local.get $3 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - else - local.get $2 - local.get $3 - local.get $2 - local.get $3 - i32.lt_s - select - end - local.get $1 - i32.sub - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.tee $2 - i32.const 2 - i32.const 7 - i32.const 0 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $3 - i32.load offset=4 - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.const 2 - i32.shl - call $~lib/memory/memory.copy - local.get $3 - ) (func $~lib/array/Array#splice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -17847,108 +17637,37 @@ local.get $3 local.get $1 local.get $2 - i32.add - local.tee $1 - i32.ne - if - local.get $6 - local.get $5 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $3 - local.get $1 - i32.sub - i32.const 2 - i32.shl - call $~lib/memory/memory.copy - end - local.get $0 - local.get $3 - local.get $2 - i32.sub - i32.store offset=12 - local.get $4 - ) - (func $~lib/array/Array#flat (param $0 i32) (result i32) - i32.const 12640 - i32.const 1104 - i32.const 504 - i32.const 7 - call $~lib/builtins/abort - unreachable - ) - (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.eqz - if - i32.const 16 - i32.const 6 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 1073741820 - i32.gt_u - if - i32.const 1056 - i32.const 1104 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - call $~lib/rt/pure/__new - local.tee $2 - i32.const 0 - local.get $1 - call $~lib/memory/memory.fill - local.get $2 - local.set $3 - local.get $2 - local.get $0 - i32.load - local.tee $4 + i32.add + local.tee $1 i32.ne if + local.get $6 + local.get $5 + local.get $1 + i32.const 2 + i32.shl + i32.add local.get $3 - call $~lib/rt/pure/__retain - local.set $3 - local.get $4 - call $~lib/rt/pure/__release + local.get $1 + i32.sub + i32.const 2 + i32.shl + call $~lib/memory/memory.copy end local.get $0 local.get $3 - i32.store - local.get $0 local.get $2 - i32.store offset=4 - local.get $0 - local.get $1 - i32.store offset=8 - local.get $0 - local.get $1 + i32.sub i32.store offset=12 - local.get $0 + local.get $4 + ) + (func $~lib/array/Array#flat (param $0 i32) (result i32) + i32.const 12640 + i32.const 1104 + i32.const 504 + i32.const 7 + call $~lib/builtins/abort + unreachable ) (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) local.get $0 @@ -18549,160 +18268,6 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - i32.load offset=12 - local.set $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $3 - i32.add - local.tee $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $3 - local.get $1 - local.get $3 - i32.lt_s - select - end - local.set $1 - local.get $2 - i32.const 0 - i32.lt_s - if (result i32) - local.get $2 - local.get $3 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - else - local.get $2 - local.get $3 - local.get $2 - local.get $3 - i32.lt_s - select - end - local.get $1 - i32.sub - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.tee $2 - i32.const 0 - i32.const 6 - i32.const 0 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $3 - i32.load offset=4 - local.get $0 - i32.load offset=4 - local.get $1 - i32.add - local.get $2 - call $~lib/memory/memory.copy - local.get $3 - ) - (func $~lib/array/Array#splice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $2 - local.get $0 - i32.load offset=12 - local.tee $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $3 - i32.add - local.tee $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $3 - local.get $1 - local.get $3 - i32.lt_s - select - end - local.tee $1 - i32.sub - local.tee $4 - local.get $2 - local.get $4 - i32.lt_s - select - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.tee $2 - i32.const 0 - i32.const 6 - i32.const 0 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $4 - i32.load offset=4 - local.get $0 - i32.load offset=4 - local.tee $5 - local.get $1 - i32.add - local.tee $6 - local.get $2 - call $~lib/memory/memory.copy - local.get $3 - local.get $1 - local.get $2 - i32.add - local.tee $1 - i32.ne - if - local.get $6 - local.get $1 - local.get $5 - i32.add - local.get $3 - local.get $1 - i32.sub - call $~lib/memory/memory.copy - end - local.get $0 - local.get $3 - local.get $2 - i32.sub - i32.store offset=12 - local.get $4 - ) (func $~lib/array/Array#reverse (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -18748,85 +18313,8 @@ end end end - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $2 - call $~lib/rt/pure/__retain - local.set $5 - loop $for-loop|0 - local.get $1 - local.get $4 - i32.gt_s - if - local.get $0 - local.get $4 - i32.add - i32.load8_u - local.set $6 - local.get $4 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|1 - local.get $2 - i32.const 0 - i32.ge_s - if - block $while-break|1 - local.get $0 - local.get $2 - i32.add - i32.load8_u - local.set $7 - i32.const 2 - global.set $~argumentsLength - local.get $6 - local.get $7 - local.get $5 - i32.load - call_indirect (type $i32_i32_=>_i32) - i32.const 0 - i32.ge_s - br_if $while-break|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.get $3 - i32.const 1 - i32.add - i32.add - local.get $7 - i32.store8 - br $while-continue|1 - end - end - end - local.get $0 - local.get $2 - i32.const 1 - i32.add - i32.add - local.get $6 - i32.store8 - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 - end - end - local.get $5 - call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__retain ) (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -19075,78 +18563,150 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $5 block $folding-inner0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $4 local.get $0 i32.load offset=12 - local.tee $2 + local.tee $1 i32.const 1 i32.le_s br_if $folding-inner0 local.get $0 i32.load offset=4 - local.set $1 - local.get $2 + local.set $4 + local.get $1 i32.const 2 i32.eq if - local.get $1 + local.get $4 i32.load8_u offset=1 local.set $2 - local.get $1 + local.get $4 i32.load8_u - local.set $3 + local.set $1 i32.const 2 global.set $~argumentsLength local.get $2 - local.get $3 - local.get $4 + local.get $1 + local.get $5 i32.load call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if + local.get $4 local.get $1 - local.get $3 i32.store8 offset=1 - local.get $1 + local.get $4 local.get $2 i32.store8 end br $folding-inner0 end - local.get $2 - local.set $3 - local.get $4 + local.get $5 call $~lib/rt/pure/__retain - local.set $2 - local.get $3 + local.set $7 + local.get $1 i32.const 256 i32.lt_s if local.get $1 - local.get $3 - local.get $2 - call $~lib/util/sort/insertionSort + local.set $3 + local.get $7 + call $~lib/rt/pure/__retain + local.set $8 + loop $for-loop|0 + local.get $3 + local.get $6 + i32.gt_s + if + local.get $4 + local.get $6 + i32.add + i32.load8_u + local.set $9 + local.get $6 + i32.const 1 + i32.sub + local.set $2 + loop $while-continue|1 + local.get $2 + i32.const 0 + i32.ge_s + if + block $while-break|1 + local.get $2 + local.get $4 + i32.add + i32.load8_u + local.set $10 + i32.const 2 + global.set $~argumentsLength + local.get $9 + local.get $10 + local.get $8 + i32.load + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.ge_s + br_if $while-break|1 + local.get $2 + local.tee $1 + i32.const 1 + i32.sub + local.set $2 + local.get $4 + local.get $1 + i32.const 1 + i32.add + i32.add + local.get $10 + i32.store8 + br $while-continue|1 + end + end + end + local.get $4 + local.get $2 + i32.const 1 + i32.add + i32.add + local.get $9 + i32.store8 + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|0 + end + end + local.get $8 + call $~lib/rt/pure/__release else + local.get $4 local.get $1 - local.get $3 - local.get $2 + local.get $7 call $~lib/util/sort/weakHeapSort end - local.get $2 + local.get $7 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__retain - local.get $4 + local.get $5 call $~lib/rt/pure/__release return end local.get $0 call $~lib/rt/pure/__retain - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/array/Array<~lib/string/String>#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) @@ -20187,8 +19747,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1216 @@ -20221,6 +19780,10 @@ call $~lib/rt/pure/decrement ) (func $~lib/array/Array#constructor@varargs (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) block $1of1 block $0of1 block $outOfRange @@ -20233,8 +19796,74 @@ local.set $1 end local.get $0 + i32.eqz + if + i32.const 16 + i32.const 7 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 268435455 + i32.gt_u + if + i32.const 1056 + i32.const 1104 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.tee $4 + i32.const 0 + call $~lib/rt/pure/__new + local.tee $2 + i32.const 0 + local.get $4 + call $~lib/memory/memory.fill + local.get $2 + local.set $3 + local.get $2 + local.get $0 + i32.load + local.tee $5 + i32.ne + if + local.get $3 + call $~lib/rt/pure/__retain + local.set $3 + local.get $5 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $3 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 + local.get $4 + i32.store offset=8 + local.get $0 local.get $1 - call $~lib/array/Array#constructor + i32.store offset=12 + local.get $0 ) (func $~lib/array/Array#fill@varargs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $2of2 @@ -20386,32 +20015,102 @@ i32.const 2147483647 local.set $3 end - local.get $0 + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/array/Array#copyWithin + ) + (func $~lib/array/Array#slice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + block $2of2 + block $1of2 + block $0of2 + block $outOfRange + global.get $~argumentsLength + br_table $0of2 $1of2 $2of2 $outOfRange + end + unreachable + end + i32.const 0 + local.set $1 + end + i32.const 2147483647 + local.set $2 + end + local.get $0 + i32.load offset=12 + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $3 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.lt_s + select + end + local.set $1 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + else + local.get $2 + local.get $3 + local.get $2 + local.get $3 + i32.lt_s + select + end local.get $1 + i32.sub + local.tee $2 + i32.const 0 local.get $2 - local.get $3 - call $~lib/array/Array#copyWithin - ) - (func $~lib/array/Array#slice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~argumentsLength - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $1 - end - i32.const 2147483647 - local.set $2 - end + i32.const 0 + i32.gt_s + select + local.tee $3 + i32.const 2 + i32.const 7 + i32.const 0 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=4 local.get $0 + i32.load offset=4 local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy local.get $2 - call $~lib/array/Array#slice ) (func $~lib/array/Array#splice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $1of1 @@ -20449,6 +20148,9 @@ call $~lib/array/Array#join ) (func $~lib/array/Array#constructor@varargs (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) block $1of1 block $0of1 block $outOfRange @@ -20461,8 +20163,72 @@ local.set $1 end local.get $0 + i32.eqz + if + i32.const 16 + i32.const 6 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 1073741820 + i32.gt_u + if + i32.const 1056 + i32.const 1104 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.tee $2 + i32.const 0 + call $~lib/rt/pure/__new + local.tee $1 + i32.const 0 + local.get $2 + call $~lib/memory/memory.fill + local.get $1 + local.set $3 + local.get $1 + local.get $0 + i32.load + local.tee $4 + i32.ne + if + local.get $3 + call $~lib/rt/pure/__retain + local.set $3 + local.get $4 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $3 + i32.store + local.get $0 local.get $1 - call $~lib/array/Array#constructor + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $2 + i32.store offset=12 + local.get $0 ) (func $~lib/array/Array#fill@varargs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $2of2 @@ -20621,6 +20387,7 @@ call $~lib/array/Array#copyWithin ) (func $~lib/array/Array#slice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) block $2of2 block $1of2 block $0of2 @@ -20637,11 +20404,80 @@ local.set $2 end local.get $0 + i32.load offset=12 + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $3 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.lt_s + select + end + local.set $1 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + else + local.get $2 + local.get $3 + local.get $2 + local.get $3 + i32.lt_s + select + end + local.get $1 + i32.sub + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.tee $3 + i32.const 0 + i32.const 6 + i32.const 0 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=4 local.get $1 + local.get $0 + i32.load offset=4 + i32.add + local.get $3 + call $~lib/memory/memory.copy local.get $2 - call $~lib/array/Array#slice ) (func $~lib/array/Array#splice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) block $1of1 block $0of1 block $outOfRange @@ -20655,10 +20491,82 @@ i32.const 2147483647 local.set $2 end + local.get $2 + local.get $0 + i32.load offset=12 + local.tee $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $3 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.lt_s + select + end + local.tee $1 + i32.sub + local.tee $4 + local.get $2 + local.get $4 + i32.lt_s + select + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.tee $2 + i32.const 0 + i32.const 6 + i32.const 0 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $4 + i32.load offset=4 + local.get $1 local.get $0 + i32.load offset=4 + local.tee $5 + i32.add + local.tee $6 + local.get $2 + call $~lib/memory/memory.copy + local.get $3 local.get $1 local.get $2 - call $~lib/array/Array#splice + i32.add + local.tee $1 + i32.ne + if + local.get $6 + local.get $1 + local.get $5 + i32.add + local.get $3 + local.get $1 + i32.sub + call $~lib/memory/memory.copy + end + local.get $0 + local.get $3 + local.get $2 + i32.sub + i32.store offset=12 + local.get $4 ) (func $~lib/array/Array#sort@varargs (param $0 i32) (param $1 i32) (result i32) (local $2 i32) diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index a525a51917..f3d2afb377 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) @@ -579,85 +579,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - memory.size - local.tee $0 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1488 - i32.const 0 - i32.store - i32.const 3056 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1488 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1488 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1488 - i32.const 3060 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1488 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 @@ -787,86 +708,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load - local.set $3 - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1296 - i32.const 360 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const -4 - i32.and - local.get $2 - i32.sub - local.tee $4 - i32.const 16 - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 4 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - i32.load - i32.const -3 - i32.and - i32.store - end - ) (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $1 i32.const 1073741820 i32.ge_u @@ -987,10 +832,79 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 + i32.load + local.set $3 local.get $2 - call $~lib/rt/tlsf/prepareBlock + i32.const 4 + i32.add + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1296 + i32.const 360 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $4 + i32.const 16 + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $2 + local.get $1 + i32.const 4 + i32.add + i32.add + local.tee $2 + local.get $4 + i32.const 4 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $~lib/rt/tlsf/insertBlock + else + local.get $1 + local.get $3 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 4 + i32.add + local.tee $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + i32.load + i32.const -3 + i32.and + i32.store + end local.get $1 ) (func $~lib/rt/pure/__new (param $0 i32) (param $1 i32) (result i32) @@ -1007,17 +921,89 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 16 - i32.add - local.set $2 global.get $~lib/rt/tlsf/ROOT i32.eqz if - call $~lib/rt/tlsf/initialize + memory.size + local.tee $3 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $3 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1488 + i32.const 0 + i32.store + i32.const 3056 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $2 + i32.const 23 + i32.lt_u + if + local.get $2 + i32.const 2 + i32.shl + i32.const 1488 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $3 + loop $for-loop|1 + local.get $3 + i32.const 16 + i32.lt_u + if + local.get $3 + local.get $2 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1488 + i32.add + i32.const 0 + i32.store offset=96 + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 + end + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1488 + i32.const 3060 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1488 + global.set $~lib/rt/tlsf/ROOT end global.get $~lib/rt/tlsf/ROOT - local.get $2 + local.get $0 + i32.const 16 + i32.add call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -1998,8 +1984,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1232 diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index d06543a9cb..e0febb5ef3 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) @@ -586,85 +586,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - memory.size - local.tee $0 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1584 - i32.const 0 - i32.store - i32.const 3152 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1584 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1584 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1584 - i32.const 3156 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1584 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 @@ -794,86 +715,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load - local.set $3 - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1296 - i32.const 360 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const -4 - i32.and - local.get $2 - i32.sub - local.tee $4 - i32.const 16 - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 4 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - i32.load - i32.const -3 - i32.and - i32.store - end - ) (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $1 i32.const 1073741820 i32.ge_u @@ -994,10 +839,79 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 + i32.load + local.set $3 + local.get $2 + i32.const 4 + i32.add + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1296 + i32.const 360 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const -4 + i32.and local.get $2 - call $~lib/rt/tlsf/prepareBlock + i32.sub + local.tee $4 + i32.const 16 + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $2 + local.get $1 + i32.const 4 + i32.add + i32.add + local.tee $2 + local.get $4 + i32.const 4 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $~lib/rt/tlsf/insertBlock + else + local.get $1 + local.get $3 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 4 + i32.add + local.tee $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + i32.load + i32.const -3 + i32.and + i32.store + end local.get $1 ) (func $~lib/rt/pure/__new (param $0 i32) (param $1 i32) (result i32) @@ -1014,17 +928,89 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 16 - i32.add - local.set $2 global.get $~lib/rt/tlsf/ROOT i32.eqz if - call $~lib/rt/tlsf/initialize + memory.size + local.tee $3 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $3 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1584 + i32.const 0 + i32.store + i32.const 3152 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $2 + i32.const 23 + i32.lt_u + if + local.get $2 + i32.const 2 + i32.shl + i32.const 1584 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $3 + loop $for-loop|1 + local.get $3 + i32.const 16 + i32.lt_u + if + local.get $3 + local.get $2 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1584 + i32.add + i32.const 0 + i32.store offset=96 + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 + end + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1584 + i32.const 3156 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1584 + global.set $~lib/rt/tlsf/ROOT end global.get $~lib/rt/tlsf/ROOT - local.get $2 + local.get $0 + i32.const 16 + i32.add call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -1096,81 +1082,6 @@ end local.get $0 ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.eqz - if - i32.const 12 - i32.const 2 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - i32.const 8 - i32.const 0 - call $~lib/rt/pure/__new - local.tee $1 - i32.const 0 - i32.store8 - local.get $1 - local.tee $2 - i32.const 4 - i32.add - i32.const 0 - i32.store8 offset=3 - local.get $2 - i32.const 0 - i32.store8 offset=1 - local.get $2 - i32.const 0 - i32.store8 offset=2 - local.get $2 - i32.const 0 - i32.store8 offset=6 - local.get $2 - i32.const 0 - i32.store8 offset=5 - local.get $2 - i32.const 0 - i32.store8 offset=3 - local.get $2 - i32.const 0 - i32.store8 offset=4 - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.ne - if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $2 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 - i32.const 8 - i32.store offset=8 - local.get $0 - ) (func $~lib/typedarray/Uint8Array#__set (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 @@ -1815,50 +1726,118 @@ i32.const 3 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain - call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + i32.eqz + if + i32.const 12 + i32.const 2 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + i32.const 8 + i32.const 0 + call $~lib/rt/pure/__new + local.tee $2 + i32.const 0 + i32.store8 + local.get $2 local.tee $1 + i32.const 4 + i32.add + i32.const 0 + i32.store8 offset=3 + local.get $2 + i32.const 0 + i32.store8 offset=1 + local.get $2 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=6 + local.get $2 + i32.const 0 + i32.store8 offset=5 + local.get $2 + i32.const 0 + i32.store8 offset=3 + local.get $2 + i32.const 0 + i32.store8 offset=4 + local.get $2 + local.get $0 + i32.load + local.tee $3 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 + i32.const 8 + i32.store offset=8 + local.get $0 i32.const 0 i32.const 246 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $0 i32.const 1 i32.const 224 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $0 i32.const 2 i32.const 88 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $0 i32.const 3 i32.const 159 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $0 i32.const 4 i32.const 130 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $0 i32.const 5 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $0 i32.const 6 i32.const 67 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $0 i32.const 7 i32.const 95 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $0 i32.load - local.get $1 + local.get $0 i32.load offset=4 - local.get $1 + local.get $0 i32.load i32.sub - local.get $1 + local.get $0 i32.load offset=8 call $~lib/dataview/DataView#constructor - local.tee $0 + local.tee $2 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -1872,7 +1851,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -1886,7 +1865,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -1900,7 +1879,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -1914,7 +1893,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -1928,7 +1907,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -1942,7 +1921,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -1956,7 +1935,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -1970,7 +1949,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -1984,7 +1963,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -1998,7 +1977,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 call $~lib/dataview/DataView#getFloat64 f64.const 7936550095674706383278551e126 @@ -2011,7 +1990,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 call $~lib/dataview/DataView#getFloat64 f64.const -411777475818852546741639e241 @@ -2024,7 +2003,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 call $~lib/dataview/DataView#getInt8 i32.const -10 @@ -2037,7 +2016,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 call $~lib/dataview/DataView#getInt8 i32.const -32 @@ -2050,7 +2029,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 call $~lib/dataview/DataView#getInt8 i32.const 88 @@ -2063,7 +2042,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 call $~lib/dataview/DataView#getInt8 i32.const -97 @@ -2076,7 +2055,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 call $~lib/dataview/DataView#getInt8 i32.const -126 @@ -2089,7 +2068,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 5 call $~lib/dataview/DataView#getInt8 i32.const 101 @@ -2102,7 +2081,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 6 call $~lib/dataview/DataView#getInt8 i32.const 67 @@ -2115,7 +2094,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 7 call $~lib/dataview/DataView#getInt8 i32.const 95 @@ -2128,7 +2107,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2144,7 +2123,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2160,7 +2139,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2176,7 +2155,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2192,7 +2171,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2208,7 +2187,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 5 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2224,7 +2203,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 6 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2240,7 +2219,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2256,7 +2235,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2272,7 +2251,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2288,7 +2267,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2304,7 +2283,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2320,7 +2299,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 5 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2336,7 +2315,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 6 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2352,7 +2331,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -2366,7 +2345,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -2380,7 +2359,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -2394,7 +2373,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -2408,7 +2387,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -2422,7 +2401,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -2436,7 +2415,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -2450,7 +2429,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -2464,7 +2443,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -2478,7 +2457,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -2492,7 +2471,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 call $~lib/dataview/DataView#getInt64 i64.const 6864441868736323830 @@ -2505,7 +2484,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 call $~lib/dataview/DataView#getInt64 i64.const -657428103485373601 @@ -2518,7 +2497,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 call $~lib/dataview/DataView#getUint8 i32.const 246 @@ -2531,7 +2510,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 call $~lib/dataview/DataView#getUint8 i32.const 224 @@ -2544,7 +2523,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 call $~lib/dataview/DataView#getUint8 i32.const 88 @@ -2557,7 +2536,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 call $~lib/dataview/DataView#getUint8 i32.const 159 @@ -2570,7 +2549,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 call $~lib/dataview/DataView#getUint8 i32.const 130 @@ -2583,7 +2562,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 5 call $~lib/dataview/DataView#getUint8 i32.const 101 @@ -2596,7 +2575,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 6 call $~lib/dataview/DataView#getUint8 i32.const 67 @@ -2609,7 +2588,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 7 call $~lib/dataview/DataView#getUint8 i32.const 95 @@ -2622,7 +2601,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2638,7 +2617,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2654,7 +2633,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2670,7 +2649,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2686,7 +2665,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2702,7 +2681,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 5 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2718,7 +2697,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 6 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2734,7 +2713,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2750,7 +2729,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2766,7 +2745,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2782,7 +2761,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2798,7 +2777,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2814,7 +2793,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 5 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2830,7 +2809,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 6 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2846,7 +2825,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -2860,7 +2839,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -2874,7 +2853,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -2888,7 +2867,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -2902,7 +2881,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -2916,7 +2895,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -2930,7 +2909,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -2944,7 +2923,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -2958,7 +2937,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -2972,7 +2951,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -2986,7 +2965,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 call $~lib/dataview/DataView#getUint64 i64.const 6864441868736323830 @@ -2999,7 +2978,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 call $~lib/dataview/DataView#getUint64 i64.const -657428103485373601 @@ -3012,11 +2991,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 f32.const 1.5976661625240943e-18 i32.const 1 call $~lib/dataview/DataView#setFloat32 - local.get $0 + local.get $2 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -3030,11 +3009,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 f32.const 1976281973381696323584 i32.const 0 call $~lib/dataview/DataView#setFloat32 - local.get $0 + local.get $2 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -3048,11 +3027,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 f64.const -1094252199637739024055454e124 i32.const 1 call $~lib/dataview/DataView#setFloat64 - local.get $0 + local.get $2 i32.const 1 call $~lib/dataview/DataView#getFloat64 f64.const -1094252199637739024055454e124 @@ -3065,11 +3044,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 f64.const 6.022586634778589e-103 i32.const 0 call $~lib/dataview/DataView#setFloat64 - local.get $0 + local.get $2 i32.const 0 call $~lib/dataview/DataView#getFloat64 f64.const 6.022586634778589e-103 @@ -3082,10 +3061,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.load offset=8 - i32.const 0 - i32.le_u + i32.eqz if i32.const 1360 i32.const 1488 @@ -3094,11 +3072,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.load offset=4 i32.const 108 i32.store8 - local.get $0 + local.get $2 i32.const 0 call $~lib/dataview/DataView#getInt8 i32.const 108 @@ -3111,11 +3089,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const -13360 i32.const 1 call $~lib/dataview/DataView#setInt16 - local.get $0 + local.get $2 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -3131,11 +3109,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 14689 i32.const 0 call $~lib/dataview/DataView#setInt16 - local.get $0 + local.get $2 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -3151,11 +3129,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1204680201 i32.const 1 call $~lib/dataview/DataView#setInt32 - local.get $0 + local.get $2 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -3169,11 +3147,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 660673230 i32.const 0 call $~lib/dataview/DataView#setInt32 - local.get $0 + local.get $2 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -3187,11 +3165,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i64.const -3290739641816099749 i32.const 1 call $~lib/dataview/DataView#setInt64 - local.get $0 + local.get $2 i32.const 1 call $~lib/dataview/DataView#getInt64 i64.const -3290739641816099749 @@ -3204,11 +3182,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i64.const 8178932412950708047 i32.const 0 call $~lib/dataview/DataView#setInt64 - local.get $0 + local.get $2 i32.const 0 call $~lib/dataview/DataView#getInt64 i64.const 8178932412950708047 @@ -3221,10 +3199,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.load offset=8 - i32.const 0 - i32.le_u + i32.eqz if i32.const 1360 i32.const 1488 @@ -3233,11 +3210,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.load offset=4 i32.const 238 i32.store8 - local.get $0 + local.get $2 i32.const 0 call $~lib/dataview/DataView#getUint8 i32.const 238 @@ -3250,11 +3227,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 58856 i32.const 1 call $~lib/dataview/DataView#setUint16 - local.get $0 + local.get $2 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -3270,11 +3247,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 60400 i32.const 0 call $~lib/dataview/DataView#setUint16 - local.get $0 + local.get $2 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -3290,11 +3267,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const -846805744 i32.const 1 call $~lib/dataview/DataView#setUint32 - local.get $0 + local.get $2 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -3308,11 +3285,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const -1510791631 i32.const 0 call $~lib/dataview/DataView#setUint32 - local.get $0 + local.get $2 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -3326,11 +3303,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i64.const 2334704782995986958 i32.const 1 call $~lib/dataview/DataView#setUint64 - local.get $0 + local.get $2 i32.const 1 call $~lib/dataview/DataView#getUint64 i64.const 2334704782995986958 @@ -3343,11 +3320,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i64.const -7123186897289856329 i32.const 0 call $~lib/dataview/DataView#setUint64 - local.get $0 + local.get $2 i32.const 0 call $~lib/dataview/DataView#getUint64 i64.const -7123186897289856329 @@ -3360,23 +3337,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load - local.tee $3 + local.tee $1 i32.const 20 i32.sub i32.load offset=16 - local.set $2 - local.get $3 + local.set $3 + local.get $1 i32.const 0 - local.get $2 + local.get $3 call $~lib/dataview/DataView#constructor - local.set $2 - local.get $0 - call $~lib/rt/pure/__release + local.set $1 local.get $2 + call $~lib/rt/pure/__release + local.get $1 i32.load offset=4 - local.get $2 + local.get $1 i32.load i32.sub if @@ -3387,7 +3364,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.load offset=8 i32.const 8 i32.ne @@ -3399,9 +3376,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $1 call $~lib/rt/pure/__release ) (func $~start @@ -3481,8 +3458,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1232 diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index c40bc41662..dc073f4a5e 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -5884,24 +5884,24 @@ i32.const 13 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain - local.tee $3 + local.tee $1 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store - local.get $3 + local.get $1 i32.const 3 i32.store offset=4 - local.get $3 + local.get $1 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 - local.get $3 + local.get $1 i32.const 4 i32.store offset=12 - local.get $3 + local.get $1 i32.const 0 i32.store offset=16 - local.get $3 + local.get $1 i32.const 0 i32.store offset=20 call $~lib/map/Map#constructor @@ -5931,13 +5931,13 @@ i32.shl i32.add i32.load16_s - local.set $1 + local.set $3 local.get $6 local.get $2 call $~lib/array/Array#__get local.set $7 local.get $0 - local.get $1 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -5962,17 +5962,17 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $1 local.get $1 + local.get $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $2 @@ -5982,7 +5982,7 @@ br $for-loop|4 end end - local.get $3 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -6175,7 +6175,7 @@ call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $1 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release @@ -7100,24 +7100,24 @@ i32.const 16 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain - local.tee $3 + local.tee $1 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store - local.get $3 + local.get $1 i32.const 3 i32.store offset=4 - local.get $3 + local.get $1 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 - local.get $3 + local.get $1 i32.const 4 i32.store offset=12 - local.get $3 + local.get $1 i32.const 0 i32.store offset=16 - local.get $3 + local.get $1 i32.const 0 i32.store offset=20 call $~lib/map/Map#constructor @@ -7147,13 +7147,13 @@ i32.shl i32.add i32.load16_u - local.set $1 + local.set $3 local.get $6 local.get $2 call $~lib/array/Array#__get local.set $7 local.get $0 - local.get $1 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -7178,17 +7178,17 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $1 local.get $1 + local.get $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $2 @@ -7198,7 +7198,7 @@ br $for-loop|4 end end - local.get $3 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -7383,7 +7383,7 @@ call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $1 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release @@ -13119,8 +13119,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 082fed9474..0cfcfc1708 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -23,7 +23,6 @@ (type $f32_i32_=>_f32 (func (param f32 i32) (result f32))) (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) (type $f64_f64_i32_=>_f64 (func (param f64 f64 i32) (result f64))) - (type $f64_f64_f64_=>_f64 (func (param f64 f64 f64) (result f64))) (import "Math" "E" (global $~lib/bindings/Math/E f64)) (import "Math" "LN2" (global $~lib/bindings/Math/LN2 f64)) (import "Math" "LN10" (global $~lib/bindings/Math/LN10 f64)) @@ -161,82 +160,8 @@ f64.reinterpret_i64 f64.mul ) - (func $std/math/ulperr (param $0 f64) (param $1 f64) (param $2 f64) (result f64) - (local $3 i32) - local.get $1 - local.get $1 - f64.ne - i32.const 0 - local.get $0 - local.get $0 - f64.ne - select - if - f64.const 0 - return - end - local.get $0 - local.get $1 - f64.eq - if - local.get $0 - i64.reinterpret_f64 - i64.const 63 - i64.shr_u - i32.wrap_i64 - local.get $1 - i64.reinterpret_f64 - i64.const 63 - i64.shr_u - i32.wrap_i64 - i32.eq - if - local.get $2 - return - end - f64.const inf - return - end - local.get $0 - local.get $0 - f64.sub - f64.const 0 - f64.ne - if (result f64) - local.get $1 - f64.const 0.5 - f64.mul - local.set $1 - f64.const 8988465674311579538646525e283 - local.get $0 - f64.copysign - else - local.get $0 - end - local.get $1 - f64.sub - i32.const 1075 - local.get $1 - i64.reinterpret_f64 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - i32.wrap_i64 - local.tee $3 - if (result i32) - local.get $3 - else - local.get $3 - i32.const 1 - i32.add - end - i32.sub - call $~lib/math/NativeMath.scalbn - local.get $2 - f64.add - ) (func $std/math/check (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (local $3 i32) local.get $0 local.get $1 f64.eq @@ -253,10 +178,81 @@ f64.ne return end - local.get $0 - local.get $1 + block $__inlined_func$std/math/ulperr + local.get $1 + local.get $1 + f64.ne + i32.const 0 + local.get $0 + local.get $0 + f64.ne + select + if + f64.const 0 + local.set $2 + br $__inlined_func$std/math/ulperr + end + local.get $0 + local.get $1 + f64.eq + if + local.get $0 + i64.reinterpret_f64 + i64.const 63 + i64.shr_u + i32.wrap_i64 + local.get $1 + i64.reinterpret_f64 + i64.const 63 + i64.shr_u + i32.wrap_i64 + i32.eq + br_if $__inlined_func$std/math/ulperr + f64.const inf + local.set $2 + br $__inlined_func$std/math/ulperr + end + local.get $0 + local.get $0 + f64.sub + f64.const 0 + f64.ne + if (result f64) + local.get $1 + f64.const 0.5 + f64.mul + local.set $1 + f64.const 8988465674311579538646525e283 + local.get $0 + f64.copysign + else + local.get $0 + end + local.get $1 + f64.sub + i32.const 1075 + local.get $1 + i64.reinterpret_f64 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + i32.wrap_i64 + local.tee $3 + if (result i32) + local.get $3 + else + local.get $3 + i32.const 1 + i32.add + end + i32.sub + call $~lib/math/NativeMath.scalbn + local.get $2 + f64.add + local.set $2 + end local.get $2 - call $std/math/ulperr f64.abs f64.const 1.5 f64.ge @@ -1723,86 +1719,93 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.asin (param $0 f32) (result f32) - (local $1 i32) - (local $2 f64) - (local $3 f32) - local.get $0 - i32.reinterpret_f32 - i32.const 2147483647 - i32.and - local.tee $1 - i32.const 1065353216 - i32.ge_u - if - local.get $1 + (func $std/math/test_asinf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (local $3 i32) + (local $4 f64) + (local $5 f32) + block $__inlined_func$~lib/math/NativeMathf.asin + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $3 i32.const 1065353216 - i32.eq + i32.ge_u if + local.get $3 + i32.const 1065353216 + i32.eq + if + local.get $0 + f32.const 1.5707963705062866 + f32.mul + f32.const 7.52316384526264e-37 + f32.add + local.set $0 + br $__inlined_func$~lib/math/NativeMathf.asin + end + f32.const 0 local.get $0 - f32.const 1.5707963705062866 - f32.mul - f32.const 7.52316384526264e-37 - f32.add - return + local.get $0 + f32.sub + f32.div + local.set $0 + br $__inlined_func$~lib/math/NativeMathf.asin end - f32.const 0 - local.get $0 - local.get $0 - f32.sub - f32.div - return - end - local.get $1 - i32.const 1056964608 - i32.lt_u - if - local.get $1 - i32.const 8388608 - i32.ge_u - i32.const 0 - local.get $1 - i32.const 964689920 + local.get $3 + i32.const 1056964608 i32.lt_u - select if + local.get $3 + i32.const 8388608 + i32.ge_u + i32.const 0 + local.get $3 + i32.const 964689920 + i32.lt_u + select + br_if $__inlined_func$~lib/math/NativeMathf.asin local.get $0 - return + local.get $0 + local.get $0 + local.get $0 + f32.mul + call $~lib/math/Rf + f32.mul + f32.add + local.set $0 + br $__inlined_func$~lib/math/NativeMathf.asin end + f64.const 1.5707963705062866 + f32.const 0.5 local.get $0 - local.get $0 - local.get $0 - local.get $0 + f32.abs + f32.const 0.5 f32.mul + f32.sub + local.tee $5 + f64.promote_f32 + f64.sqrt + local.tee $4 + local.get $4 + local.get $5 call $~lib/math/Rf - f32.mul - f32.add - return + f64.promote_f32 + f64.mul + f64.add + local.tee $4 + local.get $4 + f64.add + f64.sub + f32.demote_f64 + local.get $0 + f32.copysign + local.set $0 end - f64.const 1.5707963705062866 - f32.const 0.5 local.get $0 - f32.abs - f32.const 0.5 - f32.mul - f32.sub - local.tee $3 - f64.promote_f32 - f64.sqrt - local.tee $2 - local.get $2 - local.get $3 - call $~lib/math/Rf - f64.promote_f32 - f64.mul - f64.add - local.tee $2 + local.get $1 local.get $2 - f64.add - f64.sub - f32.demote_f64 - local.get $0 - f32.copysign + call $std/math/check ) (func $std/math/test_asinh (param $0 f64) (param $1 f64) (param $2 f64) (result i32) (local $3 f64) @@ -9353,86 +9356,88 @@ i32.and select ) - (func $~lib/math/NativeMath.sinh (param $0 f64) (result f64) - (local $1 f64) - (local $2 f64) - (local $3 i32) - (local $4 i64) + (func $std/math/test_sinh (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 i32) + (local $7 i64) + local.get $0 + local.set $3 local.get $0 i64.reinterpret_f64 i64.const 9223372036854775807 i64.and - local.tee $4 + local.tee $7 f64.reinterpret_i64 - local.set $1 + local.set $4 f64.const 0.5 local.get $0 f64.copysign - local.set $2 - local.get $4 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.tee $3 - i32.const 1082535490 - i32.lt_u - if - local.get $1 - call $~lib/math/NativeMath.expm1 - local.set $1 - local.get $3 - i32.const 1072693248 + local.set $5 + block $__inlined_func$~lib/math/NativeMath.sinh + local.get $7 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $6 + i32.const 1082535490 i32.lt_u if - local.get $3 - i32.const 1045430272 + local.get $4 + call $~lib/math/NativeMath.expm1 + local.set $4 + local.get $6 + i32.const 1072693248 i32.lt_u if - local.get $0 - return + local.get $6 + i32.const 1045430272 + i32.lt_u + br_if $__inlined_func$~lib/math/NativeMath.sinh + local.get $5 + local.get $4 + local.get $4 + f64.add + local.get $4 + local.get $4 + f64.mul + local.get $4 + f64.const 1 + f64.add + f64.div + f64.sub + f64.mul + local.set $3 + br $__inlined_func$~lib/math/NativeMath.sinh end - local.get $2 - local.get $1 - local.get $1 - f64.add - local.get $1 - local.get $1 - f64.mul - local.get $1 + local.get $5 + local.get $4 + local.get $4 + local.get $4 f64.const 1 f64.add f64.div - f64.sub + f64.add f64.mul - return + local.set $3 + br $__inlined_func$~lib/math/NativeMath.sinh end - local.get $2 - local.get $1 - local.get $1 - local.get $1 - f64.const 1 - f64.add - f64.div + local.get $4 + f64.const 1416.0996898839683 + f64.sub + call $~lib/math/NativeMath.exp + local.get $5 + local.get $5 f64.add + f64.const 2247116418577894884661631e283 f64.mul - return + f64.mul + f64.const 2247116418577894884661631e283 + f64.mul + local.set $3 end - local.get $1 - f64.const 1416.0996898839683 - f64.sub - call $~lib/math/NativeMath.exp - local.get $2 - local.get $2 - f64.add - f64.const 2247116418577894884661631e283 - f64.mul - f64.mul - f64.const 2247116418577894884661631e283 - f64.mul - ) - (func $std/math/test_sinh (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.sinh + local.get $3 local.get $1 local.get $2 call $std/math/check @@ -9446,77 +9451,83 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.sinh (param $0 f32) (result f32) - (local $1 f32) - (local $2 f32) - (local $3 i32) + (func $std/math/test_sinhf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (local $3 f32) + (local $4 f32) + (local $5 i32) local.get $0 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $3 + local.tee $5 f32.reinterpret_i32 - local.set $1 + local.set $3 f32.const 0.5 local.get $0 f32.copysign - local.set $2 - local.get $3 - i32.const 1118925335 - i32.lt_u - if - local.get $1 - call $~lib/math/NativeMathf.expm1 - local.set $1 - local.get $3 - i32.const 1065353216 + local.set $4 + block $__inlined_func$~lib/math/NativeMathf.sinh + local.get $5 + i32.const 1118925335 i32.lt_u if local.get $3 - i32.const 964689920 + call $~lib/math/NativeMathf.expm1 + local.set $3 + local.get $5 + i32.const 1065353216 i32.lt_u if - local.get $0 - return + local.get $5 + i32.const 964689920 + i32.lt_u + br_if $__inlined_func$~lib/math/NativeMathf.sinh + local.get $4 + local.get $3 + local.get $3 + f32.add + local.get $3 + local.get $3 + f32.mul + local.get $3 + f32.const 1 + f32.add + f32.div + f32.sub + f32.mul + local.set $0 + br $__inlined_func$~lib/math/NativeMathf.sinh end - local.get $2 - local.get $1 - local.get $1 - f32.add - local.get $1 - local.get $1 - f32.mul - local.get $1 + local.get $4 + local.get $3 + local.get $3 + local.get $3 f32.const 1 f32.add f32.div - f32.sub + f32.add f32.mul - return + local.set $0 + br $__inlined_func$~lib/math/NativeMathf.sinh end - local.get $2 - local.get $1 - local.get $1 - local.get $1 - f32.const 1 - f32.add - f32.div + local.get $3 + f32.const 162.88958740234375 + f32.sub + call $~lib/math/NativeMathf.exp + local.get $4 + local.get $4 f32.add + f32.const 1661534994731144841129758e11 f32.mul - return + f32.mul + f32.const 1661534994731144841129758e11 + f32.mul + local.set $0 end + local.get $0 local.get $1 - f32.const 162.88958740234375 - f32.sub - call $~lib/math/NativeMathf.exp local.get $2 - local.get $2 - f32.add - f32.const 1661534994731144841129758e11 - f32.mul - f32.mul - f32.const 1661534994731144841129758e11 - f32.mul + call $std/math/check ) (func $std/math/test_sqrt (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 @@ -10162,39 +10173,39 @@ select f32.demote_f64 ) - (func $~lib/math/NativeMath.tanh (param $0 f64) (result f64) - (local $1 f64) - (local $2 i32) - (local $3 i64) + (func $std/math/test_tanh (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (local $3 f64) + (local $4 i32) + (local $5 i64) local.get $0 i64.reinterpret_f64 i64.const 9223372036854775807 i64.and - local.tee $3 + local.tee $5 f64.reinterpret_i64 - local.set $1 - local.get $3 + local.set $3 + local.get $5 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $2 + local.tee $4 i32.const 1071748074 i32.gt_u if (result f64) - local.get $2 + local.get $4 i32.const 1077149696 i32.gt_u if (result f64) f64.const 1 f64.const 0 - local.get $1 + local.get $3 f64.div f64.sub else f64.const 1 f64.const 2 - local.get $1 - local.get $1 + local.get $3 + local.get $3 f64.add call $~lib/math/NativeMath.expm1 f64.const 2 @@ -10203,45 +10214,41 @@ f64.sub end else - local.get $2 + local.get $4 i32.const 1070618798 i32.gt_u if (result f64) - local.get $1 - local.get $1 + local.get $3 + local.get $3 f64.add call $~lib/math/NativeMath.expm1 - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 f64.const 2 f64.add f64.div else - local.get $2 + local.get $4 i32.const 1048576 i32.ge_u if (result f64) - local.get $1 + local.get $3 f64.const -2 f64.mul call $~lib/math/NativeMath.expm1 - local.tee $1 + local.tee $3 f64.neg - local.get $1 + local.get $3 f64.const 2 f64.add f64.div else - local.get $1 + local.get $3 end end end local.get $0 f64.copysign - ) - (func $std/math/test_tanh (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.tanh local.get $1 local.get $2 call $std/math/check @@ -13660,10 +13667,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13674,10 +13680,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13688,10 +13693,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13702,10 +13706,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13716,10 +13719,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13730,10 +13732,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.asin f32.const 0.7234652042388916 f32.const -0.1307632476091385 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13744,10 +13745,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.asin f32.const -0.41873374581336975 f32.const 0.3161141574382782 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13758,10 +13758,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.asin f32.const 0.5965113639831543 f32.const -0.4510819613933563 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13772,10 +13771,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.asin f32.const 0.8853747844696045 f32.const 0.02493886835873127 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13786,10 +13784,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.asin f32.const -0.7460777759552002 f32.const 0.2515012323856354 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13800,10 +13797,9 @@ unreachable end f32.const 1 - call $~lib/math/NativeMathf.asin f32.const 1.5707963705062866 f32.const 0.3666777014732361 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13814,10 +13810,9 @@ unreachable end f32.const -1 - call $~lib/math/NativeMathf.asin f32.const -1.5707963705062866 f32.const -0.3666777014732361 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13828,10 +13823,9 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.asin f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13842,10 +13836,9 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.asin f32.const -0 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13856,10 +13849,9 @@ unreachable end f32.const 1.0000001192092896 - call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13870,10 +13862,9 @@ unreachable end f32.const -1.0000001192092896 - call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13884,10 +13875,9 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13898,10 +13888,9 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13912,10 +13901,9 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13926,10 +13914,9 @@ unreachable end f32.const 0.5004770159721375 - call $~lib/math/NativeMathf.asin f32.const 0.5241496562957764 f32.const -0.29427099227905273 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -44296,10 +44283,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.sinh f32.const -1593.521240234375 f32.const 0.1671663224697113 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44310,10 +44296,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.sinh f32.const 38.548770904541016 f32.const -0.49340328574180603 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44324,10 +44309,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.sinh f32.const -2182.630859375 f32.const 0.0849970355629921 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44338,10 +44322,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.sinh f32.const -343.2723388671875 f32.const 0.0704190656542778 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44352,10 +44335,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.sinh f32.const 5291.78125 f32.const -0.44362515211105347 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44366,10 +44348,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.sinh f32.const 0.7114062309265137 f32.const 0.058103885501623154 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44380,10 +44361,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.sinh f32.const -0.4179006516933441 f32.const 0.39349499344825745 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44394,10 +44374,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.sinh f32.const 0.5917755961418152 f32.const -0.4183797240257263 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44408,10 +44387,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.sinh f32.const 0.8538292050361633 f32.const 0.45992106199264526 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44422,10 +44400,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.sinh f32.const -0.7320976257324219 f32.const -0.48159059882164 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44436,10 +44413,9 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.sinh f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44450,10 +44426,9 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.sinh f32.const -0 f32.const 0 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44464,10 +44439,9 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.sinh f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44478,10 +44452,9 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.sinh f32.const -inf f32.const 0 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44492,10 +44465,9 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.sinh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 diff --git a/tests/compiler/std/object.optimized.wat b/tests/compiler/std/object.optimized.wat index 2ae13966cf..50a2f1940a 100644 --- a/tests/compiler/std/object.optimized.wat +++ b/tests/compiler/std/object.optimized.wat @@ -2,7 +2,6 @@ (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -63,84 +62,10 @@ i32.ne i32.eq ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.eq @@ -170,10 +95,82 @@ i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $0 + local.tee $3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if + local.get $3 + i32.load16_u + local.tee $2 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $2 + local.get $4 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz return end diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 53daead8c4..91d38c8944 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -9456,8 +9456,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 9b24262cb8..2d2ec3bf4d 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -723,8 +723,7 @@ global.set $~lib/rt/stub/offset i32.const 1100 i32.load - i32.const 0 - i32.le_u + i32.eqz if i32.const 1088 i32.const 2 @@ -787,8 +786,7 @@ end i32.const 1196 i32.load - i32.const 0 - i32.le_u + i32.eqz if i32.const 1184 i32.const 3 @@ -851,8 +849,7 @@ end i32.const 1276 i32.load - i32.const 0 - i32.le_u + i32.eqz if i32.const 1264 i32.const 2 @@ -915,8 +912,7 @@ end i32.const 1372 i32.load - i32.const 0 - i32.le_u + i32.eqz if i32.const 1360 i32.const 3 diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index 51594aec18..32fa08e058 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) @@ -615,85 +615,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - memory.size - local.tee $0 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1504 - i32.const 0 - i32.store - i32.const 3072 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1504 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1504 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1504 - i32.const 3076 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1504 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 @@ -823,86 +744,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load - local.set $3 - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1472 - i32.const 360 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const -4 - i32.and - local.get $2 - i32.sub - local.tee $4 - i32.const 16 - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 4 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - i32.load - i32.const -3 - i32.and - i32.store - end - ) (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $1 i32.const 1073741820 i32.ge_u @@ -1023,10 +868,79 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 + i32.load + local.set $3 local.get $2 - call $~lib/rt/tlsf/prepareBlock + i32.const 4 + i32.add + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1472 + i32.const 360 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $4 + i32.const 16 + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $2 + local.get $1 + i32.const 4 + i32.add + i32.add + local.tee $2 + local.get $4 + i32.const 4 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $~lib/rt/tlsf/insertBlock + else + local.get $1 + local.get $3 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 4 + i32.add + local.tee $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + i32.load + i32.const -3 + i32.and + i32.store + end local.get $1 ) (func $~lib/rt/pure/__new (param $0 i32) (param $1 i32) (result i32) @@ -1043,17 +957,89 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 16 - i32.add - local.set $2 global.get $~lib/rt/tlsf/ROOT i32.eqz if - call $~lib/rt/tlsf/initialize + memory.size + local.tee $3 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $3 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1504 + i32.const 0 + i32.store + i32.const 3072 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $2 + i32.const 23 + i32.lt_u + if + local.get $2 + i32.const 2 + i32.shl + i32.const 1504 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $3 + loop $for-loop|1 + local.get $3 + i32.const 16 + i32.lt_u + if + local.get $3 + local.get $2 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1504 + i32.add + i32.const 0 + i32.store offset=96 + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 + end + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1504 + i32.const 3076 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1504 + global.set $~lib/rt/tlsf/ROOT end global.get $~lib/rt/tlsf/ROOT - local.get $2 + local.get $0 + i32.const 16 + i32.add call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -1662,8 +1648,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1408 diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 5cda75908e..b596a29284 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -2953,7 +2953,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 i64.eqz if @@ -3025,14 +3024,6 @@ local.tee $4 local.set $5 loop $do-continue|0 - local.get $1 - i32.const 10 - i32.rem_u - local.set $6 - local.get $1 - i32.const 10 - i32.div_u - local.set $1 local.get $5 local.get $2 i32.const 1 @@ -3041,11 +3032,16 @@ i32.const 1 i32.shl i32.add - local.get $6 + local.get $1 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end else @@ -3102,15 +3098,6 @@ local.tee $4 local.set $2 loop $do-continue|00 - local.get $0 - i64.const 10 - i64.rem_u - i32.wrap_i64 - local.set $5 - local.get $0 - i64.const 10 - i64.div_u - local.set $0 local.get $2 local.get $1 i32.const 1 @@ -3119,11 +3106,17 @@ i32.const 1 i32.shl i32.add - local.get $5 + local.get $0 + i64.const 10 + i64.rem_u + i32.wrap_i64 i32.const 48 i32.add i32.store16 local.get $0 + i64.const 10 + i64.div_u + local.tee $0 i64.const 0 i64.ne br_if $do-continue|00 @@ -3191,8 +3184,6 @@ local.tee $0 i32.eqz if - local.get $1 - call $~lib/rt/pure/__release i32.const 1056 local.set $0 br $__inlined_func$~lib/string/String#concat @@ -3210,9 +3201,9 @@ local.get $1 local.get $6 call $~lib/memory/memory.copy - local.get $1 - call $~lib/rt/pure/__release end + local.get $1 + call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release local.get $5 @@ -4969,8 +4960,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1088 diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index fb61989356..a317f3e795 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -3310,8 +3310,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1088 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 59120f2e50..ec1418b24c 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -4307,8 +4307,6 @@ local.tee $0 i32.eqz if - local.get $1 - call $~lib/rt/pure/__release i32.const 1328 local.set $0 br $__inlined_func$~lib/string/String#concat @@ -4327,9 +4325,9 @@ local.get $1 local.get $6 call $~lib/memory/memory.copy - local.get $1 - call $~lib/rt/pure/__release end + local.get $1 + call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release local.get $5 @@ -6022,16 +6020,7 @@ select ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i32.const 10 - i32.rem_u - local.set $3 - local.get $1 - i32.const 10 - i32.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -6040,11 +6029,16 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end ) @@ -6465,17 +6459,7 @@ select ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i64.const 10 - i64.rem_u - i32.wrap_i64 - local.set $3 - local.get $1 - i64.const 10 - i64.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -6484,11 +6468,17 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i64.const 10 + i64.rem_u + i32.wrap_i64 i32.const 48 i32.add i32.store16 local.get $1 + i64.const 10 + i64.div_u + local.tee $1 i64.const 0 i64.ne br_if $do-continue|0 @@ -8080,8 +8070,7 @@ i32.load offset=16 i32.const 1 i32.shr_u - i32.const 0 - i32.le_u + i32.eqz br_if $__inlined_func$~lib/string/String#charCodeAt drop local.get $0 @@ -8261,8 +8250,6 @@ i32.shr_u local.tee $0 local.get $0 - i32.const 0 - i32.gt_u select local.tee $4 i32.add @@ -17266,9 +17253,10 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) local.get $0 i32.load offset=4 - local.tee $2 + local.tee $4 i32.const 268435455 i32.and local.set $1 @@ -17294,13 +17282,16 @@ block $switch$1$case$5 block $switch$1$case$4 local.get $0 - i32.const 12 + i32.const 20 i32.add + local.tee $2 + i32.const 8 + i32.sub i32.load br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $switch$1$case$5 $switch$1$case$6 $switch$1$default end - local.get $0 - i32.load offset=20 + local.get $2 + i32.load local.tee $1 if local.get $1 @@ -17308,47 +17299,48 @@ end br $__inlined_func$~lib/rt/__visit_members end - local.get $0 - i32.load offset=24 + local.get $2 local.tee $1 - local.get $0 - i32.load offset=32 + i32.load offset=4 + local.tee $3 + local.get $1 + i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $2 loop $while-continue|0 - local.get $1 + local.get $2 local.get $3 - i32.lt_u + i32.gt_u if - local.get $1 + local.get $3 i32.load - local.tee $4 + local.tee $5 if - local.get $4 + local.get $5 call $~lib/rt/pure/__visit end - local.get $1 + local.get $3 i32.const 4 i32.add - local.set $1 + local.set $3 br $while-continue|0 end end - local.get $0 - i32.load offset=20 + local.get $1 + i32.load call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end - local.get $0 - i32.load offset=20 + local.get $2 + i32.load call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end unreachable end - local.get $2 + local.get $4 i32.const -2147483648 i32.and if @@ -17364,8 +17356,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1200 @@ -17378,7 +17369,7 @@ local.get $1 i32.const 1 i32.sub - local.get $2 + local.get $4 i32.const -268435456 i32.and i32.or diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 45f11fa014..f9727bd33a 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -1,12 +1,12 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "\06\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\06\00\00\001\002\003") @@ -384,84 +384,10 @@ end local.get $1 ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.eq @@ -491,10 +417,82 @@ i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $0 + local.tee $3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if + local.get $3 + i32.load16_u + local.tee $2 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $2 + local.get $4 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz return end @@ -654,93 +652,6 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map<~lib/string/String,usize>#set (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1056 - call $~lib/util/hash/hashStr - local.tee $3 - call $~lib/map/Map<~lib/string/String,usize>#find - local.tee $2 - if - local.get $2 - local.get $1 - i32.store offset=4 - else - local.get $0 - i32.load offset=16 - local.get $0 - i32.load offset=12 - i32.eq - if - local.get $0 - local.get $0 - i32.load offset=20 - local.get $0 - i32.load offset=12 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i32) - local.get $0 - i32.load offset=4 - else - local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or - end - call $~lib/map/Map<~lib/string/String,usize>#rehash - end - local.get $0 - i32.load offset=8 - local.get $0 - local.get $0 - i32.load offset=16 - local.tee $4 - i32.const 1 - i32.add - i32.store offset=16 - local.get $4 - i32.const 12 - i32.mul - i32.add - local.tee $2 - i32.const 1056 - i32.store - local.get $2 - local.get $1 - i32.store offset=4 - local.get $0 - local.get $0 - i32.load offset=20 - i32.const 1 - i32.add - i32.store offset=20 - local.get $2 - local.get $0 - i32.load - local.get $3 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - local.tee $0 - i32.load - i32.store offset=8 - local.get $0 - local.get $2 - i32.store - end - ) (func $~lib/util/hash/hash32 (param $0 i32) (result i32) local.get $0 i32.const 255 @@ -1022,6 +933,10 @@ ) (func $~lib/symbol/_Symbol.for (result i32) (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) global.get $~lib/symbol/stringToId if global.get $~lib/symbol/stringToId @@ -1110,8 +1025,88 @@ unreachable end global.get $~lib/symbol/stringToId - local.get $0 - call $~lib/map/Map<~lib/string/String,usize>#set + local.tee $1 + i32.const 1056 + call $~lib/util/hash/hashStr + local.tee $3 + call $~lib/map/Map<~lib/string/String,usize>#find + local.tee $2 + if + local.get $2 + local.get $0 + i32.store offset=4 + else + local.get $1 + i32.load offset=16 + local.get $1 + i32.load offset=12 + i32.eq + if + local.get $1 + local.get $1 + i32.load offset=20 + local.get $1 + i32.load offset=12 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + if (result i32) + local.get $1 + i32.load offset=4 + else + local.get $1 + i32.load offset=4 + i32.const 1 + i32.shl + i32.const 1 + i32.or + end + call $~lib/map/Map<~lib/string/String,usize>#rehash + end + local.get $1 + i32.load offset=8 + local.get $1 + local.get $1 + i32.load offset=16 + local.tee $2 + i32.const 1 + i32.add + i32.store offset=16 + local.get $2 + i32.const 12 + i32.mul + i32.add + local.tee $2 + i32.const 1056 + i32.store + local.get $2 + local.get $0 + i32.store offset=4 + local.get $1 + local.get $1 + i32.load offset=20 + i32.const 1 + i32.add + i32.store offset=20 + local.get $2 + local.get $1 + i32.load + local.get $3 + local.get $1 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + local.tee $1 + i32.load + i32.store offset=8 + local.get $1 + local.get $2 + i32.store + end global.get $~lib/symbol/idToString local.get $0 call $~lib/map/Map#set diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 03aebf13dc..2bcb6d54c4 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -1,12 +1,12 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) (type $i64_i32_i32_=>_i32 (func (param i64 i32 i32) (result i32))) (type $f32_i32_i32_=>_i32 (func (param f32 i32 i32) (result i32))) (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) @@ -397,7 +397,7 @@ (data (i32.const 12972) "\n\00\00\00\01") (data (i32.const 12988) "\n\00\00\00\01\ffd\ff\00\00d\n\ff") (table $0 123 funcref) - (elem (i32.const 1) $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) + (elem (i32.const 1) $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $std/typedarray/forEachCallCount (mut i32) (i32.const 0)) @@ -2566,91 +2566,6 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 f64) - (local $7 f64) - local.get $2 - call $~lib/rt/pure/__retain - local.set $5 - loop $for-loop|0 - local.get $1 - local.get $4 - i32.gt_s - if - local.get $0 - local.get $4 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $6 - local.get $4 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|1 - local.get $2 - i32.const 0 - i32.ge_s - if - block $while-break|1 - local.get $0 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $7 - i32.const 2 - global.set $~argumentsLength - local.get $6 - local.get $7 - local.get $5 - i32.load - call_indirect (type $f64_f64_=>_i32) - i32.const 0 - i32.ge_s - br_if $while-break|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.get $3 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - local.get $7 - f64.store - br $while-continue|1 - end - end - end - local.get $0 - local.get $2 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - local.get $6 - f64.store - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 - end - end - local.get $5 - call $~lib/rt/pure/__release - ) (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) (local $1 i32) local.get $0 @@ -2968,21 +2883,25 @@ (func $~lib/typedarray/Float64Array#sort (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 f64) - (local $7 f64) + (local $4 f64) + (local $5 f64) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) local.get $1 call $~lib/rt/pure/__retain - local.set $5 + local.set $10 local.get $0 call $~lib/rt/pure/__retain - local.set $2 - local.get $5 + local.set $7 + local.get $10 call $~lib/rt/pure/__retain - local.set $3 + local.set $8 block $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $2 + local.get $7 i32.load offset=8 i32.const 3 i32.shr_u @@ -2990,7 +2909,7 @@ i32.const 1 i32.le_u br_if $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $2 + local.get $7 i32.load offset=4 local.set $1 local.get $0 @@ -2999,54 +2918,132 @@ if local.get $1 f64.load offset=8 - local.set $6 + local.set $4 local.get $1 f64.load - local.set $7 + local.set $5 i32.const 2 global.set $~argumentsLength - local.get $6 - local.get $7 - local.get $3 + local.get $4 + local.get $5 + local.get $8 i32.load call_indirect (type $f64_f64_=>_i32) i32.const 0 i32.lt_s if local.get $1 - local.get $7 + local.get $5 f64.store offset=8 local.get $1 - local.get $6 + local.get $4 f64.store end br $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 end - local.get $3 + local.get $8 call $~lib/rt/pure/__retain - local.set $4 + local.set $9 local.get $0 i32.const 256 i32.lt_s if local.get $1 + local.set $2 local.get $0 - local.get $4 - call $~lib/util/sort/insertionSort + local.set $3 + local.get $9 + call $~lib/rt/pure/__retain + local.set $11 + loop $for-loop|0 + local.get $3 + local.get $6 + i32.gt_s + if + local.get $2 + local.get $6 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $4 + local.get $6 + i32.const 1 + i32.sub + local.set $0 + loop $while-continue|1 + local.get $0 + i32.const 0 + i32.ge_s + if + block $while-break|1 + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $5 + i32.const 2 + global.set $~argumentsLength + local.get $4 + local.get $5 + local.get $11 + i32.load + call_indirect (type $f64_f64_=>_i32) + i32.const 0 + i32.ge_s + br_if $while-break|1 + local.get $0 + local.tee $1 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + local.get $1 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $5 + f64.store + br $while-continue|1 + end + end + end + local.get $2 + local.get $0 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $4 + f64.store + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|0 + end + end + local.get $11 + call $~lib/rt/pure/__release else local.get $1 local.get $0 - local.get $4 + local.get $9 call $~lib/util/sort/weakHeapSort end - local.get $4 + local.get $9 call $~lib/rt/pure/__release end - local.get $3 + local.get $8 call $~lib/rt/pure/__release - local.get $5 + local.get $10 call $~lib/rt/pure/__release - local.get $2 + local.get $7 ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f64) (param $1 f64) (result i32) (local $2 i64) @@ -4521,158 +4518,6 @@ local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 3456 - call $~lib/rt/pure/__retain - local.set $5 - local.get $2 - i32.load offset=8 - local.set $0 - local.get $2 - i32.load offset=4 - local.set $6 - i32.const 12 - i32.const 3 - call $~lib/rt/pure/__new - local.set $3 - local.get $0 - i32.const 0 - call $~lib/rt/pure/__new - local.set $4 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.gt_s - if - local.get $1 - local.get $6 - i32.add - i32.load8_s - local.set $7 - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $4 - i32.add - local.get $7 - local.get $1 - local.get $2 - local.get $5 - i32.load - call_indirect (type $i32_i32_i32_=>_i32) - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $3 - local.get $4 - call $~lib/rt/pure/__retain - i32.store - local.get $3 - local.get $4 - i32.store offset=4 - local.get $3 - local.get $0 - i32.store offset=8 - local.get $3 - call $~lib/rt/pure/__retain - local.get $5 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 3456 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint8Array#map (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 3488 - call $~lib/rt/pure/__retain - local.set $5 - local.get $2 - i32.load offset=8 - local.set $0 - local.get $2 - i32.load offset=4 - local.set $6 - i32.const 12 - i32.const 4 - call $~lib/rt/pure/__new - local.set $3 - local.get $0 - i32.const 0 - call $~lib/rt/pure/__new - local.set $4 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.gt_s - if - local.get $1 - local.get $6 - i32.add - i32.load8_u - local.set $7 - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $4 - i32.add - local.get $7 - local.get $1 - local.get $2 - local.get $5 - i32.load - call_indirect (type $i32_i32_i32_=>_i32) - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $3 - local.get $4 - call $~lib/rt/pure/__retain - i32.store - local.get $3 - local.get $4 - i32.store offset=4 - local.get $3 - local.get $0 - i32.store offset=8 - local.get $3 - call $~lib/rt/pure/__retain - local.get $5 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 3488 - call $~lib/rt/pure/__release - ) (func $~lib/typedarray/Uint8Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 @@ -4692,168 +4537,6 @@ i32.add i32.load8_u ) - (func $~lib/typedarray/Uint8ClampedArray#map (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 3520 - call $~lib/rt/pure/__retain - local.set $5 - local.get $2 - i32.load offset=8 - local.set $0 - local.get $2 - i32.load offset=4 - local.set $6 - i32.const 12 - i32.const 5 - call $~lib/rt/pure/__new - local.set $3 - local.get $0 - i32.const 0 - call $~lib/rt/pure/__new - local.set $4 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.gt_s - if - local.get $1 - local.get $6 - i32.add - i32.load8_u - local.set $7 - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $4 - i32.add - local.get $7 - local.get $1 - local.get $2 - local.get $5 - i32.load - call_indirect (type $i32_i32_i32_=>_i32) - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $3 - local.get $4 - call $~lib/rt/pure/__retain - i32.store - local.get $3 - local.get $4 - i32.store offset=4 - local.get $3 - local.get $0 - i32.store offset=8 - local.get $3 - call $~lib/rt/pure/__retain - local.get $5 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 3520 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int16Array#map (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $1 - i32.const 3552 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $0 - local.get $1 - i32.load offset=4 - local.set $6 - i32.const 12 - i32.const 6 - call $~lib/rt/pure/__new - local.set $2 - local.get $0 - i32.const 1 - i32.shl - local.tee $7 - i32.const 0 - call $~lib/rt/pure/__new - local.set $4 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.gt_s - if - local.get $6 - local.get $3 - i32.const 1 - i32.shl - local.tee $8 - i32.add - i32.load16_s - local.set $9 - i32.const 3 - global.set $~argumentsLength - local.get $4 - local.get $8 - i32.add - local.get $9 - local.get $3 - local.get $1 - local.get $5 - i32.load - call_indirect (type $i32_i32_i32_=>_i32) - i32.store16 - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - local.get $4 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $4 - i32.store offset=4 - local.get $2 - local.get $7 - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3552 - call $~lib/rt/pure/__release - ) (func $~lib/typedarray/Int16Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 @@ -4877,92 +4560,6 @@ i32.add i32.load16_s ) - (func $~lib/typedarray/Uint16Array#map (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $1 - i32.const 3584 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $0 - local.get $1 - i32.load offset=4 - local.set $6 - i32.const 12 - i32.const 7 - call $~lib/rt/pure/__new - local.set $2 - local.get $0 - i32.const 1 - i32.shl - local.tee $7 - i32.const 0 - call $~lib/rt/pure/__new - local.set $4 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.gt_s - if - local.get $6 - local.get $3 - i32.const 1 - i32.shl - local.tee $8 - i32.add - i32.load16_u - local.set $9 - i32.const 3 - global.set $~argumentsLength - local.get $4 - local.get $8 - i32.add - local.get $9 - local.get $3 - local.get $1 - local.get $5 - i32.load - call_indirect (type $i32_i32_i32_=>_i32) - i32.store16 - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - local.get $4 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $4 - i32.store offset=4 - local.get $2 - local.get $7 - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3584 - call $~lib/rt/pure/__release - ) (func $~lib/typedarray/Uint16Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 @@ -4986,178 +4583,6 @@ i32.add i32.load16_u ) - (func $~lib/typedarray/Int32Array#map (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $1 - i32.const 3616 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $0 - local.get $1 - i32.load offset=4 - local.set $6 - i32.const 12 - i32.const 8 - call $~lib/rt/pure/__new - local.set $2 - local.get $0 - i32.const 2 - i32.shl - local.tee $7 - i32.const 0 - call $~lib/rt/pure/__new - local.set $4 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.gt_s - if - local.get $6 - local.get $3 - i32.const 2 - i32.shl - local.tee $8 - i32.add - i32.load - local.set $9 - i32.const 3 - global.set $~argumentsLength - local.get $4 - local.get $8 - i32.add - local.get $9 - local.get $3 - local.get $1 - local.get $5 - i32.load - call_indirect (type $i32_i32_i32_=>_i32) - i32.store - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - local.get $4 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $4 - i32.store offset=4 - local.get $2 - local.get $7 - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3616 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint32Array#map (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $1 - i32.const 3648 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $0 - local.get $1 - i32.load offset=4 - local.set $6 - i32.const 12 - i32.const 9 - call $~lib/rt/pure/__new - local.set $2 - local.get $0 - i32.const 2 - i32.shl - local.tee $7 - i32.const 0 - call $~lib/rt/pure/__new - local.set $4 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.gt_s - if - local.get $6 - local.get $3 - i32.const 2 - i32.shl - local.tee $8 - i32.add - i32.load - local.set $9 - i32.const 3 - global.set $~argumentsLength - local.get $4 - local.get $8 - i32.add - local.get $9 - local.get $3 - local.get $1 - local.get $5 - i32.load - call_indirect (type $i32_i32_i32_=>_i32) - i32.store - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - local.get $4 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $4 - i32.store offset=4 - local.get $2 - local.get $7 - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3648 - call $~lib/rt/pure/__release - ) (func $~lib/typedarray/Uint32Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 @@ -5186,92 +4611,6 @@ local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - local.get $0 - call $~lib/rt/pure/__retain - local.set $1 - i32.const 3680 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $0 - local.get $1 - i32.load offset=4 - local.set $6 - i32.const 12 - i32.const 10 - call $~lib/rt/pure/__new - local.set $2 - local.get $0 - i32.const 3 - i32.shl - local.tee $7 - i32.const 0 - call $~lib/rt/pure/__new - local.set $4 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.gt_s - if - local.get $6 - local.get $3 - i32.const 3 - i32.shl - local.tee $8 - i32.add - i64.load - local.set $9 - i32.const 3 - global.set $~argumentsLength - local.get $4 - local.get $8 - i32.add - local.get $9 - local.get $3 - local.get $1 - local.get $5 - i32.load - call_indirect (type $i64_i32_i32_=>_i64) - i64.store - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - local.get $4 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $4 - i32.store offset=4 - local.get $2 - local.get $7 - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3680 - call $~lib/rt/pure/__release - ) (func $~lib/typedarray/Int64Array#__get (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 @@ -5295,92 +4634,6 @@ i32.add i64.load ) - (func $~lib/typedarray/Uint64Array#map (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - local.get $0 - call $~lib/rt/pure/__retain - local.set $1 - i32.const 3712 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $0 - local.get $1 - i32.load offset=4 - local.set $6 - i32.const 12 - i32.const 11 - call $~lib/rt/pure/__new - local.set $2 - local.get $0 - i32.const 3 - i32.shl - local.tee $7 - i32.const 0 - call $~lib/rt/pure/__new - local.set $4 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.gt_s - if - local.get $6 - local.get $3 - i32.const 3 - i32.shl - local.tee $8 - i32.add - i64.load - local.set $9 - i32.const 3 - global.set $~argumentsLength - local.get $4 - local.get $8 - i32.add - local.get $9 - local.get $3 - local.get $1 - local.get $5 - i32.load - call_indirect (type $i64_i32_i32_=>_i64) - i64.store - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - local.get $4 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $4 - i32.store offset=4 - local.get $2 - local.get $7 - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3712 - call $~lib/rt/pure/__release - ) (func $~lib/typedarray/Uint64Array#__get (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 @@ -5409,92 +4662,6 @@ local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 f32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $1 - i32.const 3744 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $0 - local.get $1 - i32.load offset=4 - local.set $6 - i32.const 12 - i32.const 12 - call $~lib/rt/pure/__new - local.set $2 - local.get $0 - i32.const 2 - i32.shl - local.tee $7 - i32.const 0 - call $~lib/rt/pure/__new - local.set $4 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.gt_s - if - local.get $6 - local.get $3 - i32.const 2 - i32.shl - local.tee $8 - i32.add - f32.load - local.set $9 - i32.const 3 - global.set $~argumentsLength - local.get $4 - local.get $8 - i32.add - local.get $9 - local.get $3 - local.get $1 - local.get $5 - i32.load - call_indirect (type $f32_i32_i32_=>_f32) - f32.store - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - local.get $4 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $4 - i32.store offset=4 - local.get $2 - local.get $7 - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3744 - call $~lib/rt/pure/__release - ) (func $~lib/typedarray/Float32Array#__get (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 @@ -5523,93 +4690,7 @@ local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 f64) - local.get $0 - call $~lib/rt/pure/__retain - local.set $1 - i32.const 3776 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $0 - local.get $1 - i32.load offset=4 - local.set $6 - i32.const 12 - i32.const 13 - call $~lib/rt/pure/__new - local.set $2 - local.get $0 - i32.const 3 - i32.shl - local.tee $7 - i32.const 0 - call $~lib/rt/pure/__new - local.set $4 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.gt_s - if - local.get $6 - local.get $3 - i32.const 3 - i32.shl - local.tee $8 - i32.add - f64.load - local.set $9 - i32.const 3 - global.set $~argumentsLength - local.get $4 - local.get $8 - i32.add - local.get $9 - local.get $3 - local.get $1 - local.get $5 - i32.load - call_indirect (type $f64_i32_i32_=>_f64) - f64.store - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - local.get $4 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $4 - i32.store offset=4 - local.get $2 - local.get $7 - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3776 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -5767,7 +4848,8 @@ i32.const 16 i32.add ) - (func $~lib/typedarray/Int8Array#filter (param $0 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5776,117 +4858,118 @@ (local $6 i32) (local $7 i32) (local $8 i32) - local.get $0 + (local $9 i32) + (local $10 i32) + i32.const 6 + call $~lib/typedarray/Int8Array#constructor + local.tee $3 call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 5 + i32.const 5 + call $~lib/typedarray/Int8Array#__set + local.get $1 local.set $2 + i32.const 0 + local.set $0 + i32.const 0 + local.set $6 + local.get $2 + call $~lib/rt/pure/__retain + local.set $4 i32.const 3808 call $~lib/rt/pure/__retain - local.set $5 - local.get $2 + local.set $7 + local.get $4 i32.load offset=8 - local.set $0 + local.set $2 i32.const 12 i32.const 3 call $~lib/rt/pure/__new - local.set $3 - local.get $0 + local.set $5 + local.get $2 i32.const 0 call $~lib/rt/pure/__new - local.set $6 - local.get $2 - i32.load offset=4 local.set $8 + local.get $4 + i32.load offset=4 + local.set $10 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $2 + local.get $6 i32.gt_s if - local.get $4 - local.get $8 + local.get $6 + local.get $10 i32.add i32.load8_s - local.set $7 + local.set $9 i32.const 3 global.set $~argumentsLength - local.get $7 + local.get $9 + local.get $6 local.get $4 - local.get $2 - local.get $5 + local.get $7 i32.load call_indirect (type $i32_i32_i32_=>_i32) if - local.get $1 - local.get $6 + local.get $0 + local.get $8 i32.add - local.get $7 + local.get $9 i32.store8 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 end - local.get $4 + local.get $6 i32.const 1 i32.add - local.set $4 + local.set $6 br $for-loop|0 end end - local.get $3 - local.get $6 - local.get $1 + local.get $5 + local.get $8 + local.get $0 call $~lib/rt/pure/__renew - local.tee $0 + local.tee $2 call $~lib/rt/pure/__retain i32.store - local.get $3 - local.get $1 - i32.store offset=8 - local.get $3 + local.get $5 local.get $0 + i32.store offset=8 + local.get $5 + local.get $2 i32.store offset=4 - local.get $3 - call $~lib/rt/pure/__retain local.get $5 + call $~lib/rt/pure/__retain + local.get $7 call $~lib/rt/pure/__release - local.get $2 + local.get $4 call $~lib/rt/pure/__release i32.const 3808 call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> - (local $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 6 - call $~lib/typedarray/Int8Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 5 - i32.const 5 - call $~lib/typedarray/Int8Array#__set - local.get $0 - call $~lib/typedarray/Int8Array#filter - local.tee $1 i32.load offset=4 - local.get $1 + local.get $0 i32.load i32.sub if @@ -5897,7 +4980,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=8 i32.const 3 i32.ne @@ -5909,7 +4992,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 call $~lib/typedarray/Int8Array#__get i32.const 3 @@ -5922,7 +5005,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/typedarray/Int8Array#__get i32.const 4 @@ -5935,7 +5018,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 call $~lib/typedarray/Int8Array#__get i32.const 5 @@ -5948,12 +5031,12 @@ call $~lib/builtins/abort unreachable end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 + local.get $3 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -5962,7 +5045,8 @@ i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint8Array#filter (param $0 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5971,117 +5055,118 @@ (local $6 i32) (local $7 i32) (local $8 i32) - local.get $0 + (local $9 i32) + (local $10 i32) + i32.const 6 + call $~lib/typedarray/Uint8Array#constructor + local.tee $3 call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 5 + i32.const 5 + call $~lib/typedarray/Uint8Array#__set + local.get $1 local.set $2 + i32.const 0 + local.set $0 + i32.const 0 + local.set $6 + local.get $2 + call $~lib/rt/pure/__retain + local.set $4 i32.const 3840 call $~lib/rt/pure/__retain - local.set $5 - local.get $2 + local.set $7 + local.get $4 i32.load offset=8 - local.set $0 + local.set $2 i32.const 12 i32.const 4 call $~lib/rt/pure/__new - local.set $3 - local.get $0 + local.set $5 + local.get $2 i32.const 0 call $~lib/rt/pure/__new - local.set $6 - local.get $2 - i32.load offset=4 local.set $8 + local.get $4 + i32.load offset=4 + local.set $10 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $2 + local.get $6 i32.gt_s if - local.get $4 - local.get $8 + local.get $6 + local.get $10 i32.add i32.load8_u - local.set $7 + local.set $9 i32.const 3 global.set $~argumentsLength - local.get $7 + local.get $9 + local.get $6 local.get $4 - local.get $2 - local.get $5 + local.get $7 i32.load call_indirect (type $i32_i32_i32_=>_i32) if - local.get $1 - local.get $6 + local.get $0 + local.get $8 i32.add - local.get $7 + local.get $9 i32.store8 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 end - local.get $4 + local.get $6 i32.const 1 i32.add - local.set $4 + local.set $6 br $for-loop|0 end end - local.get $3 - local.get $6 - local.get $1 + local.get $5 + local.get $8 + local.get $0 call $~lib/rt/pure/__renew - local.tee $0 + local.tee $2 call $~lib/rt/pure/__retain i32.store - local.get $3 - local.get $1 - i32.store offset=8 - local.get $3 + local.get $5 local.get $0 + i32.store offset=8 + local.get $5 + local.get $2 i32.store offset=4 - local.get $3 - call $~lib/rt/pure/__retain local.get $5 + call $~lib/rt/pure/__retain + local.get $7 call $~lib/rt/pure/__release - local.get $2 + local.get $4 call $~lib/rt/pure/__release i32.const 3840 call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> - (local $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 6 - call $~lib/typedarray/Uint8Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 5 - i32.const 5 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - call $~lib/typedarray/Uint8Array#filter - local.tee $1 i32.load offset=4 - local.get $1 + local.get $0 i32.load i32.sub if @@ -6092,7 +5177,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=8 i32.const 3 i32.ne @@ -6104,7 +5189,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 call $~lib/typedarray/Uint8Array#__get i32.const 3 @@ -6117,7 +5202,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/typedarray/Uint8Array#__get i32.const 4 @@ -6130,7 +5215,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 call $~lib/typedarray/Uint8Array#__get i32.const 5 @@ -6143,14 +5228,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 + local.get $3 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#filter (param $0 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6159,117 +5245,118 @@ (local $6 i32) (local $7 i32) (local $8 i32) - local.get $0 + (local $9 i32) + (local $10 i32) + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $3 call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 5 + i32.const 5 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 local.set $2 + i32.const 0 + local.set $0 + i32.const 0 + local.set $6 + local.get $2 + call $~lib/rt/pure/__retain + local.set $4 i32.const 3872 call $~lib/rt/pure/__retain - local.set $5 - local.get $2 + local.set $7 + local.get $4 i32.load offset=8 - local.set $0 + local.set $2 i32.const 12 i32.const 5 call $~lib/rt/pure/__new - local.set $3 - local.get $0 + local.set $5 + local.get $2 i32.const 0 call $~lib/rt/pure/__new - local.set $6 - local.get $2 - i32.load offset=4 local.set $8 + local.get $4 + i32.load offset=4 + local.set $10 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $2 + local.get $6 i32.gt_s if - local.get $4 - local.get $8 + local.get $6 + local.get $10 i32.add i32.load8_u - local.set $7 + local.set $9 i32.const 3 global.set $~argumentsLength - local.get $7 + local.get $9 + local.get $6 local.get $4 - local.get $2 - local.get $5 + local.get $7 i32.load call_indirect (type $i32_i32_i32_=>_i32) if - local.get $1 - local.get $6 + local.get $0 + local.get $8 i32.add - local.get $7 + local.get $9 i32.store8 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 end - local.get $4 + local.get $6 i32.const 1 i32.add - local.set $4 + local.set $6 br $for-loop|0 end end - local.get $3 - local.get $6 - local.get $1 + local.get $5 + local.get $8 + local.get $0 call $~lib/rt/pure/__renew - local.tee $0 + local.tee $2 call $~lib/rt/pure/__retain i32.store - local.get $3 - local.get $1 - i32.store offset=8 - local.get $3 + local.get $5 local.get $0 + i32.store offset=8 + local.get $5 + local.get $2 i32.store offset=4 - local.get $3 - call $~lib/rt/pure/__retain local.get $5 + call $~lib/rt/pure/__retain + local.get $7 call $~lib/rt/pure/__release - local.get $2 + local.get $4 call $~lib/rt/pure/__release i32.const 3872 call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> - (local $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $2 - call $~lib/rt/pure/__retain local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 5 - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - call $~lib/typedarray/Uint8ClampedArray#filter - local.tee $1 i32.load offset=4 - local.get $1 + local.get $0 i32.load i32.sub if @@ -6280,7 +5367,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=8 i32.const 3 i32.ne @@ -6292,7 +5379,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 3 @@ -6305,7 +5392,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 4 @@ -6318,7 +5405,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 5 @@ -6331,12 +5418,12 @@ call $~lib/builtins/abort unreachable end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 + local.get $3 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -9139,9 +8226,6 @@ f64.eq ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 - call $~lib/rt/pure/__retain - call $~lib/rt/pure/__release local.get $0 i32.const 24 i32.shl @@ -9284,9 +8368,6 @@ call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 - call $~lib/rt/pure/__retain - call $~lib/rt/pure/__release local.get $0 i32.const 16 i32.shl @@ -9430,15 +8511,6 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 - call $~lib/rt/pure/__retain - call $~lib/rt/pure/__release - local.get $0 - i32.const 1 - i32.and - i32.eqz - ) (func $~lib/typedarray/Int32Array#every (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -9507,9 +8579,6 @@ call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $2 - call $~lib/rt/pure/__retain - call $~lib/rt/pure/__release local.get $0 i64.const 1 i64.and @@ -9582,12 +8651,6 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i64.const 1 - i64.and - i64.eqz - ) (func $~lib/math/NativeMathf.mod (param $0 f32) (result f32) (local $1 i32) (local $2 i32) @@ -18867,16 +17930,7 @@ select ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i32.const 10 - i32.rem_u - local.set $3 - local.get $1 - i32.const 10 - i32.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -18885,11 +17939,16 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end ) @@ -20292,17 +19351,7 @@ select ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i64.const 10 - i64.rem_u - i32.wrap_i64 - local.set $3 - local.get $1 - i64.const 10 - i64.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -20311,11 +19360,17 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i64.const 10 + i64.rem_u + i32.wrap_i64 i32.const 48 i32.add i32.store16 local.get $1 + i64.const 10 + i64.div_u + local.tee $1 i64.const 0 i64.ne br_if $do-continue|0 @@ -22123,20 +21178,38 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint8Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array.wrap@varargs (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) (local $3 i32) (local $4 i32) + block $2of2 + block $1of2 + block $0of2 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of2 $1of2 $2of2 $outOfRange + end + unreachable + end + i32.const 0 + local.set $1 + end + i32.const -1 + local.set $3 + end + local.get $1 local.get $0 call $~lib/rt/pure/__retain local.tee $4 call $~lib/rt/pure/__retain - local.tee $3 + local.tee $0 i32.const 20 i32.sub i32.load offset=16 - local.tee $0 - local.get $1 - i32.lt_u + local.tee $2 + i32.gt_u if i32.const 1424 i32.const 1488 @@ -22145,15 +21218,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 0 i32.lt_s if - local.get $2 + local.get $3 i32.const -1 i32.eq if (result i32) - local.get $0 + local.get $2 local.get $1 i32.sub else @@ -22164,12 +21237,11 @@ call $~lib/builtins/abort unreachable end - local.set $0 + local.set $3 else - local.get $0 local.get $2 - local.tee $0 local.get $1 + local.get $3 i32.add i32.lt_s if @@ -22185,48 +21257,24 @@ i32.const 4 call $~lib/rt/pure/__new local.tee $2 - local.get $3 + local.get $0 call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $0 + local.get $3 i32.store offset=8 local.get $2 + local.get $0 local.get $1 - local.get $3 i32.add i32.store offset=4 local.get $2 call $~lib/rt/pure/__retain - local.get $3 + local.get $0 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array.wrap@varargs (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $1 - end - i32.const -1 - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/typedarray/Uint8Array.wrap - ) (func $~lib/arraybuffer/ArrayBuffer#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 @@ -23864,84 +22912,6 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8768 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 3 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $1 - local.get $4 - i32.add - local.get $5 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $3 - local.get $3 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $3 - i32.trunc_f32_s - else - i32.const 0 - end - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8768 - call $~lib/rt/pure/__release - ) (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -24015,84 +22985,6 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8864 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 2 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $1 - local.get $4 - i32.add - local.get $5 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $3 - local.get $3 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $3 - i32.trunc_f64_s - else - i32.const 0 - end - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8864 - call $~lib/rt/pure/__release - ) (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 @@ -24251,138 +23143,278 @@ (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) + (local $10 f32) + (local $11 f64) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $2 + local.tee $5 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $4 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $6 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Int8Array#constructor - local.tee $5 + local.tee $12 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 call $~lib/typedarray/Int8Array#set<~lib/array/Array> - local.get $0 + local.get $1 i32.const 10 i32.const 0 i32.const 15 i32.const 8992 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $0 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 15 - i32.const 9072 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $0 - local.get $2 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 15 - i32.const 9104 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $8 - call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $0 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 15 - i32.const 9136 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $4 + local.tee $13 call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $0 local.get $1 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> - local.get $0 - local.get $3 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 15 - i32.const 9168 - call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release + local.set $2 + block $folding-inner0 + i32.const 8768 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 3 + i32.add + local.get $2 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 3 + i32.add + local.set $7 + local.get $3 + i32.load offset=4 + local.set $8 + local.get $3 + i32.load offset=12 + local.set $9 + loop $for-loop|0 + local.get $0 + local.get $9 + i32.lt_s + if + local.get $0 + local.get $7 + i32.add + local.get $8 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $10 + local.get $10 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $10 + i32.trunc_f32_s + else + i32.const 0 + end + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8768 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 0 + i32.const 15 + i32.const 9072 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> + local.get $1 + local.get $5 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> + local.get $1 + i32.const 10 + i32.const 0 + i32.const 15 + i32.const 9104 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $8 + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 8864 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 2 + i32.add + local.get $2 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 2 + i32.add + local.set $9 + local.get $3 + i32.load offset=4 + local.set $14 + local.get $3 + i32.load offset=12 + local.set $15 + loop $for-loop|00 + local.get $0 + local.get $15 + i32.lt_s + if + local.get $0 + local.get $9 + i32.add + local.get $14 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $11 + local.get $11 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $11 + i32.trunc_f64_s + else + i32.const 0 + end + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8864 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 0 + i32.const 15 + i32.const 9136 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + local.get $4 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> + local.get $1 + local.get $6 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> + local.get $1 + call $~lib/typedarray/Int8Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 0 + i32.const 15 + i32.const 9168 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $12 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + return + end + i32.const 1424 + i32.const 1488 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable ) (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (local $2 i32) @@ -24460,162 +23492,6 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8768 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 3 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $1 - local.get $4 - i32.add - local.get $5 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $3 - local.get $3 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $3 - i32.trunc_f32_u - else - i32.const 0 - end - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8768 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8864 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 2 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $1 - local.get $4 - i32.add - local.get $5 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $3 - local.get $3 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $3 - i32.trunc_f64_u - else - i32.const 0 - end - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8864 - call $~lib/rt/pure/__release - ) (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> (local $0 i32) (local $1 i32) @@ -24626,214 +23502,278 @@ (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) + (local $10 f32) + (local $11 f64) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $2 + local.tee $5 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $4 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $6 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Uint8Array#constructor - local.tee $5 + local.tee $12 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 call $~lib/typedarray/Int8Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 63 - i32.const 9200 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $0 - call $~lib/typedarray/Uint8Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 63 - i32.const 9280 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $0 - local.get $2 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 63 - i32.const 9312 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $8 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $0 - call $~lib/typedarray/Uint8Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 63 - i32.const 9344 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $0 local.get $1 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> - local.get $0 - local.get $3 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> - local.get $0 i32.const 10 i32.const 0 i32.const 63 - i32.const 9376 + i32.const 9200 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $13 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 call $~lib/rt/pure/__retain - local.set $0 - i32.const 8688 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 + local.set $2 + block $folding-inner0 + i32.const 8768 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 3 + i32.add + local.get $2 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 3 + i32.add + local.set $7 + local.get $3 + i32.load offset=4 + local.set $8 + local.get $3 + i32.load offset=12 + local.set $9 + loop $for-loop|0 + local.get $0 + local.get $9 + i32.lt_s + if + local.get $0 + local.get $7 + i32.add + local.get $8 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $10 + local.get $10 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $10 + i32.trunc_f32_u + else + i32.const 0 + end + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8768 + call $~lib/rt/pure/__release local.get $1 - local.get $6 - i32.lt_s - if - local.get $1 - local.get $4 - i32.add - local.get $5 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $3 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $3 - i32.const 255 - local.get $3 - i32.sub - i32.const 31 - i32.shr_s - i32.or - i32.and - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 + i32.const 10 + i32.const 0 + i32.const 63 + i32.const 9280 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> + local.get $1 + local.get $5 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> + local.get $1 + i32.const 10 + i32.const 0 + i32.const 63 + i32.const 9312 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $8 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 8864 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 2 + i32.add + local.get $2 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 2 + i32.add + local.set $9 + local.get $3 + i32.load offset=4 + local.set $14 + local.get $3 + i32.load offset=12 + local.set $15 + loop $for-loop|00 + local.get $0 + local.get $15 + i32.lt_s + if + local.get $0 + local.get $9 + i32.add + local.get $14 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $11 + local.get $11 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $11 + i32.trunc_f64_u + else + i32.const 0 + end + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8864 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 0 + i32.const 63 + i32.const 9344 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + local.get $4 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> + local.get $1 + local.get $6 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> + local.get $1 + call $~lib/typedarray/Int8Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 0 + i32.const 63 + i32.const 9376 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $12 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + return end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8688 - call $~lib/rt/pure/__release + i32.const 1424 + i32.const 1488 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable ) (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (param $0 i32) (param $1 i32) (local $2 i32) @@ -24911,88 +23851,6 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8768 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 3 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $1 - local.get $4 - i32.add - local.get $5 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $3 - local.get $3 - f32.sub - f32.const 0 - f32.eq - if (result i32) - f32.const 0 - f32.const 255 - local.get $3 - f32.min - f32.max - i32.trunc_f32_u - else - i32.const 0 - end - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8768 - call $~lib/rt/pure/__release - ) (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -25095,88 +23953,6 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8864 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 2 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $1 - local.get $4 - i32.add - local.get $5 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $3 - local.get $3 - f64.sub - f64.const 0 - f64.eq - if (result i32) - f64.const 0 - f64.const 255 - local.get $3 - f64.min - f64.max - i32.trunc_f64_u - else - i32.const 0 - end - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8864 - call $~lib/rt/pure/__release - ) (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -25275,84 +24051,6 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8944 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 7 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 7 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $1 - local.get $4 - i32.add - local.get $1 - local.get $5 - i32.add - i32.load8_s - local.tee $3 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $3 - i32.const 255 - local.get $3 - i32.sub - i32.const 31 - i32.shr_s - i32.or - i32.and - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8944 - call $~lib/rt/pure/__release - ) (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> (local $0 i32) (local $1 i32) @@ -25365,171 +24063,435 @@ (local $8 i32) (local $9 i32) (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 f32) + (local $15 f64) + (local $16 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $3 + local.tee $9 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $3 + local.get $9 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $3 + local.get $9 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $2 + local.tee $4 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $2 + local.get $4 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $2 + local.get $4 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $2 + local.get $4 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $4 + local.tee $10 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $4 + local.get $10 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $4 + local.get $10 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $7 - call $~lib/rt/pure/__retain - local.tee $0 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 63 - i32.const 9408 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $8 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $0 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 63 - i32.const 9504 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $9 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $0 - local.get $3 - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 63 - i32.const 9536 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $0 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 63 - i32.const 9568 - call $~lib/rt/__newArray + local.tee $16 call $~lib/rt/pure/__retain - local.tee $1 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__retain - local.set $6 - local.get $0 + local.tee $3 call $~lib/rt/pure/__retain local.set $1 - local.get $6 - call $~lib/rt/pure/__retain - local.tee $5 - i32.load offset=8 - local.get $1 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable + block $folding-inner0 + i32.const 8688 + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=12 + local.get $1 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $1 + i32.load offset=4 + local.set $11 + local.get $2 + i32.load offset=4 + local.set $5 + local.get $2 + i32.load offset=12 + local.set $6 + loop $for-loop|0 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $0 + local.get $11 + i32.add + local.get $5 + local.get $0 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $7 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $7 + i32.const 255 + local.get $7 + i32.sub + i32.const 31 + i32.shr_s + i32.or + i32.and + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $2 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 8688 + call $~lib/rt/pure/__release + local.get $3 + i32.const 10 + i32.const 0 + i32.const 63 + i32.const 9408 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $11 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + i32.const 0 + local.set $0 + local.get $3 + call $~lib/rt/pure/__retain + local.set $1 + i32.const 8768 + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=12 + i32.const 3 + i32.add + local.get $1 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $1 + i32.load offset=4 + i32.const 3 + i32.add + local.set $5 + local.get $2 + i32.load offset=4 + local.set $6 + local.get $2 + i32.load offset=12 + local.set $8 + loop $for-loop|00 + local.get $0 + local.get $8 + i32.lt_s + if + local.get $0 + local.get $5 + i32.add + local.get $6 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $14 + local.get $14 + f32.sub + f32.const 0 + f32.eq + if (result i32) + f32.const 0 + f32.const 255 + local.get $14 + f32.min + f32.max + i32.trunc_f32_u + else + i32.const 0 + end + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $2 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 8768 + call $~lib/rt/pure/__release + local.get $3 + i32.const 10 + i32.const 0 + i32.const 63 + i32.const 9504 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + local.get $3 + local.get $9 + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> + local.get $3 + i32.const 10 + i32.const 0 + i32.const 63 + i32.const 9536 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + i32.const 0 + local.set $0 + local.get $3 + call $~lib/rt/pure/__retain + local.set $1 + i32.const 8864 + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=12 + i32.const 2 + i32.add + local.get $1 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $1 + i32.load offset=4 + i32.const 2 + i32.add + local.set $8 + local.get $2 + i32.load offset=4 + local.set $12 + local.get $2 + i32.load offset=12 + local.set $13 + loop $for-loop|01 + local.get $0 + local.get $13 + i32.lt_s + if + local.get $0 + local.get $8 + i32.add + local.get $12 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $15 + local.get $15 + f64.sub + f64.const 0 + f64.eq + if (result i32) + f64.const 0 + f64.const 255 + local.get $15 + f64.min + f64.max + i32.trunc_f64_u + else + i32.const 0 + end + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|01 + end + end + local.get $2 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 8864 + call $~lib/rt/pure/__release + local.get $3 + i32.const 10 + i32.const 0 + i32.const 63 + i32.const 9568 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__retain + local.set $2 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + call $~lib/rt/pure/__retain + local.tee $1 + i32.load offset=8 + local.get $0 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + call $~lib/memory/memory.copy + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + local.get $10 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> + i32.const 0 + local.set $0 + local.get $3 + call $~lib/rt/pure/__retain + local.set $1 + i32.const 8944 + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=12 + i32.const 7 + i32.add + local.get $1 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $1 + i32.load offset=4 + i32.const 7 + i32.add + local.set $8 + local.get $2 + i32.load offset=4 + local.set $12 + local.get $2 + i32.load offset=12 + local.set $13 + loop $for-loop|02 + local.get $0 + local.get $13 + i32.lt_s + if + local.get $0 + local.get $8 + i32.add + local.get $0 + local.get $12 + i32.add + i32.load8_s + local.tee $7 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $7 + i32.const 255 + local.get $7 + i32.sub + i32.const 31 + i32.shr_s + i32.or + i32.and + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|02 + end + end + local.get $2 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 8944 + call $~lib/rt/pure/__release + local.get $3 + i32.const 10 + i32.const 0 + i32.const 63 + i32.const 9600 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + local.get $0 + call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $16 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $11 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + return end - local.get $1 - i32.load offset=4 - local.get $5 - i32.load offset=4 - local.get $5 - i32.load offset=8 - call $~lib/memory/memory.copy - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $0 - local.get $4 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 63 - i32.const 9600 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $1 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release - local.get $9 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release + i32.const 1424 + i32.const 1488 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable ) (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) (local $1 i32) @@ -25678,21 +24640,25 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 f32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $3 local.get $0 call $~lib/rt/pure/__retain local.set $0 - i32.const 8768 + local.get $3 call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 + local.tee $1 + i32.load offset=8 i32.const 3 + i32.shr_u + i32.const 6 i32.add local.get $0 i32.load offset=8 @@ -25709,58 +24675,49 @@ end local.get $0 i32.load offset=4 - i32.const 6 + i32.const 12 i32.add local.set $4 - local.get $2 + local.get $1 i32.load offset=4 local.set $5 - local.get $2 - i32.load offset=12 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $6 loop $for-loop|0 - local.get $1 + local.get $2 local.get $6 i32.lt_s if local.get $4 - local.get $1 + local.get $2 i32.const 1 i32.shl i32.add local.get $5 - local.get $1 - i32.const 2 + local.get $2 + i32.const 3 i32.shl i32.add - f32.load - local.tee $3 - local.get $3 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $3 - i32.trunc_f32_s - else - i32.const 0 - end - i32.store16 - local.get $1 + i64.load + i64.store16 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|0 end end - local.get $2 + local.get $1 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - i32.const 8768 + local.get $3 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -25776,10 +24733,6 @@ call $~lib/rt/pure/__retain local.tee $1 i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 6 - i32.add local.get $0 i32.load offset=8 i32.const 1 @@ -25795,16 +24748,12 @@ end local.get $0 i32.load offset=4 - i32.const 12 - i32.add local.set $4 local.get $1 i32.load offset=4 local.set $5 local.get $1 i32.load offset=8 - i32.const 3 - i32.shr_u local.set $6 loop $for-loop|0 local.get $2 @@ -25816,13 +24765,11 @@ i32.const 1 i32.shl i32.add - local.get $5 local.get $2 - i32.const 3 - i32.shl + local.get $5 i32.add - i64.load - i64.store16 + i32.load8_u + i32.store16 local.get $2 i32.const 1 i32.add @@ -25837,21 +24784,65 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + call $~lib/rt/pure/__retain + local.tee $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 4 + i32.add + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s + if + i32.const 1424 + i32.const 1488 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 8 + i32.add + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + call $~lib/memory/memory.copy + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 f64) + (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 call $~lib/rt/pure/__retain local.set $0 - i32.const 8864 + i32.const 8944 call $~lib/rt/pure/__retain local.tee $2 i32.load offset=12 - i32.const 2 + i32.const 7 i32.add local.get $0 i32.load offset=8 @@ -25868,211 +24859,18 @@ end local.get $0 i32.load offset=4 - i32.const 4 + i32.const 14 i32.add - local.set $4 + local.set $3 local.get $2 i32.load offset=4 - local.set $5 + local.set $4 local.get $2 i32.load offset=12 - local.set $6 + local.set $5 loop $for-loop|0 local.get $1 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.get $5 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $3 - local.get $3 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $3 - i32.trunc_f64_s - else - i32.const 0 - end - i32.store16 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8864 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=8 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $4 - local.get $1 - i32.load offset=4 - local.set $5 - local.get $1 - i32.load offset=8 - local.set $6 - loop $for-loop|0 - local.get $2 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 1 - i32.shl - i32.add - local.get $2 - local.get $5 - i32.add - i32.load8_u - i32.store16 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $2 - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $2 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 4 - i32.add - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - call $~lib/memory/memory.copy - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8944 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 7 - i32.add - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 14 - i32.add - local.set $3 - local.get $2 - i32.load offset=4 - local.set $4 - local.get $2 - i32.load offset=12 - local.set $5 - loop $for-loop|0 - local.get $1 - local.get $5 + local.get $5 i32.lt_s if local.get $3 @@ -26109,138 +24907,286 @@ (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) + (local $10 f32) + (local $11 f64) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $2 + local.tee $5 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $4 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $6 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Int16Array#constructor - local.tee $5 + local.tee $12 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 call $~lib/typedarray/Int16Array#set<~lib/array/Array> - local.get $0 + local.get $1 i32.const 10 i32.const 1 i32.const 64 i32.const 9632 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 1 - i32.const 64 - i32.const 9728 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> - local.get $0 - local.get $2 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 1 - i32.const 64 - i32.const 9776 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $8 - call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 1 - i32.const 64 - i32.const 9824 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $4 + local.tee $13 call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $0 local.get $1 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> - local.get $0 - local.get $3 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 1 - i32.const 64 - i32.const 9872 - call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release + local.set $2 + block $folding-inner0 + i32.const 8768 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 3 + i32.add + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 6 + i32.add + local.set $7 + local.get $3 + i32.load offset=4 + local.set $8 + local.get $3 + i32.load offset=12 + local.set $9 + loop $for-loop|0 + local.get $0 + local.get $9 + i32.lt_s + if + local.get $7 + local.get $0 + i32.const 1 + i32.shl + i32.add + local.get $8 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $10 + local.get $10 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $10 + i32.trunc_f32_s + else + i32.const 0 + end + i32.store16 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8768 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 1 + i32.const 64 + i32.const 9728 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> + local.get $1 + local.get $5 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> + local.get $1 + i32.const 10 + i32.const 1 + i32.const 64 + i32.const 9776 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $8 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 8864 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 2 + i32.add + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 4 + i32.add + local.set $9 + local.get $3 + i32.load offset=4 + local.set $14 + local.get $3 + i32.load offset=12 + local.set $15 + loop $for-loop|00 + local.get $0 + local.get $15 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 1 + i32.shl + i32.add + local.get $14 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $11 + local.get $11 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $11 + i32.trunc_f64_s + else + i32.const 0 + end + i32.store16 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8864 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 1 + i32.const 64 + i32.const 9824 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + local.get $4 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> + local.get $1 + local.get $6 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> + local.get $1 + call $~lib/typedarray/Int16Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 1 + i32.const 64 + i32.const 9872 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $12 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + return + end + i32.const 1424 + i32.const 1488 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable ) (func $~lib/typedarray/Uint16Array#__uget (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -26323,312 +25269,296 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (param $0 i32) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> + (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 f32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8768 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 f32) + (local $11 f64) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 6 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.get $5 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $3 - local.get $3 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $3 - i32.trunc_f32_u - else - i32.const 0 - end - i32.store16 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8768 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8864 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 4 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.get $5 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $3 - local.get $3 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $3 - i32.trunc_f64_u - else - i32.const 0 - end - i32.store16 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8864 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $2 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set - local.get $2 + call $~lib/typedarray/Int64Array#constructor + local.tee $5 + i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $5 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $4 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $6 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Uint16Array#constructor - local.tee $5 + local.tee $12 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 call $~lib/typedarray/Int16Array#set<~lib/array/Array> - local.get $0 + local.get $1 i32.const 10 i32.const 1 i32.const 65 i32.const 9920 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> - local.get $0 - call $~lib/typedarray/Uint16Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 1 - i32.const 65 - i32.const 10016 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> - local.get $0 - local.get $2 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 1 - i32.const 65 - i32.const 10064 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $8 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> - local.get $0 - call $~lib/typedarray/Uint16Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 1 - i32.const 65 - i32.const 10112 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $4 + local.tee $13 call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $0 local.get $1 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> - local.get $0 - local.get $3 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 1 - i32.const 65 - i32.const 10160 - call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release + local.set $2 + block $folding-inner0 + i32.const 8768 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 3 + i32.add + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 6 + i32.add + local.set $7 + local.get $3 + i32.load offset=4 + local.set $8 + local.get $3 + i32.load offset=12 + local.set $9 + loop $for-loop|0 + local.get $0 + local.get $9 + i32.lt_s + if + local.get $7 + local.get $0 + i32.const 1 + i32.shl + i32.add + local.get $8 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $10 + local.get $10 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $10 + i32.trunc_f32_u + else + i32.const 0 + end + i32.store16 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8768 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 1 + i32.const 65 + i32.const 10016 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> + local.get $1 + local.get $5 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> + local.get $1 + i32.const 10 + i32.const 1 + i32.const 65 + i32.const 10064 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $8 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 8864 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 2 + i32.add + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 4 + i32.add + local.set $9 + local.get $3 + i32.load offset=4 + local.set $14 + local.get $3 + i32.load offset=12 + local.set $15 + loop $for-loop|00 + local.get $0 + local.get $15 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 1 + i32.shl + i32.add + local.get $14 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $11 + local.get $11 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $11 + i32.trunc_f64_u + else + i32.const 0 + end + i32.store16 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8864 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 1 + i32.const 65 + i32.const 10112 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + local.get $4 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> + local.get $1 + local.get $6 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> + local.get $1 + call $~lib/typedarray/Int16Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 1 + i32.const 65 + i32.const 10160 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $12 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + return + end + i32.const 1424 + i32.const 1488 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable ) (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) (local $1 i32) @@ -26738,22 +25668,25 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 f32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $3 local.get $0 call $~lib/rt/pure/__retain local.set $0 - i32.const 8768 + local.get $3 call $~lib/rt/pure/__retain local.tee $1 - i32.load offset=12 + i32.load offset=8 i32.const 3 + i32.shr_u + i32.const 6 i32.add local.get $0 i32.load offset=8 @@ -26770,14 +25703,16 @@ end local.get $0 i32.load offset=4 - i32.const 12 + i32.const 24 i32.add local.set $4 local.get $1 i32.load offset=4 local.set $5 local.get $1 - i32.load offset=12 + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $6 loop $for-loop|0 local.get $2 @@ -26788,24 +25723,14 @@ local.get $2 i32.const 2 i32.shl - local.tee $7 i32.add local.get $5 - local.get $7 + local.get $2 + i32.const 3 + i32.shl i32.add - f32.load - local.tee $3 - local.get $3 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $3 - i32.trunc_f32_s - else - i32.const 0 - end - i32.store + i64.load + i64.store32 local.get $2 i32.const 1 i32.add @@ -26817,10 +25742,10 @@ call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - i32.const 8768 + local.get $3 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -26836,10 +25761,6 @@ call $~lib/rt/pure/__retain local.tee $1 i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 6 - i32.add local.get $0 i32.load offset=8 i32.const 2 @@ -26855,16 +25776,12 @@ end local.get $0 i32.load offset=4 - i32.const 24 - i32.add local.set $4 local.get $1 i32.load offset=4 local.set $5 local.get $1 i32.load offset=8 - i32.const 3 - i32.shr_u local.set $6 loop $for-loop|0 local.get $2 @@ -26876,13 +25793,11 @@ i32.const 2 i32.shl i32.add - local.get $5 local.get $2 - i32.const 3 - i32.shl + local.get $5 i32.add - i64.load - i64.store32 + i32.load8_u + i32.store local.get $2 i32.const 1 i32.add @@ -26897,21 +25812,25 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 f64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $3 local.get $0 call $~lib/rt/pure/__retain local.set $0 - i32.const 8864 + local.get $3 call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 2 + local.tee $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 4 i32.add local.get $0 i32.load offset=8 @@ -26928,73 +25847,63 @@ end local.get $0 i32.load offset=4 - i32.const 8 + i32.const 16 i32.add local.set $4 - local.get $2 + local.get $1 i32.load offset=4 local.set $5 - local.get $2 - i32.load offset=12 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u local.set $6 loop $for-loop|0 - local.get $1 + local.get $2 local.get $6 i32.lt_s if local.get $4 - local.get $1 + local.get $2 i32.const 2 i32.shl i32.add local.get $5 - local.get $1 - i32.const 3 + local.get $2 + i32.const 1 i32.shl i32.add - f64.load - local.tee $3 - local.get $3 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $3 - i32.trunc_f64_s - else - i32.const 0 - end + i32.load16_s i32.store - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|0 end end - local.get $2 + local.get $1 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - i32.const 8864 + local.get $3 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 local.get $0 call $~lib/rt/pure/__retain local.set $0 - local.get $3 + i32.const 8944 call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=8 + local.tee $2 + i32.load offset=12 + i32.const 7 + i32.add local.get $0 i32.load offset=8 i32.const 2 @@ -27009,154 +25918,11 @@ unreachable end local.get $0 - i32.load offset=4 - local.set $4 - local.get $1 - i32.load offset=4 - local.set $5 - local.get $1 - i32.load offset=8 - local.set $6 - loop $for-loop|0 - local.get $2 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $2 - local.get $5 - i32.add - i32.load8_u - i32.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 4 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 16 - i32.add - local.set $4 - local.get $1 - i32.load offset=4 - local.set $5 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $6 - loop $for-loop|0 - local.get $2 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $5 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_s - i32.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8944 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 7 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 28 - i32.add - local.set $3 - local.get $2 + i32.load offset=4 + i32.const 28 + i32.add + local.set $3 + local.get $2 i32.load offset=4 local.set $4 local.get $2 @@ -27201,138 +25967,285 @@ (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 f32) + (local $12 f64) + (local $13 i32) + (local $14 i32) + (local $15 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $2 + local.tee $5 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $4 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $6 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Int32Array#constructor - local.tee $5 + local.tee $13 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 call $~lib/typedarray/Int32Array#set<~lib/array/Array> - local.get $0 + local.get $1 i32.const 10 i32.const 2 i32.const 16 i32.const 10208 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - local.get $0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 16 - i32.const 10320 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - local.get $0 - local.get $2 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 16 - i32.const 10384 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $8 - call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - local.get $0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 16 - i32.const 10448 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $4 + local.tee $14 call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $0 local.get $1 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> - local.get $0 - local.get $3 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 16 - i32.const 10512 - call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release + local.set $2 + block $folding-inner0 + i32.const 8768 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 3 + i32.add + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 12 + i32.add + local.set $7 + local.get $3 + i32.load offset=4 + local.set $8 + local.get $3 + i32.load offset=12 + local.set $9 + loop $for-loop|0 + local.get $0 + local.get $9 + i32.lt_s + if + local.get $7 + local.get $0 + i32.const 2 + i32.shl + local.tee $10 + i32.add + local.get $8 + local.get $10 + i32.add + f32.load + local.tee $11 + local.get $11 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $11 + i32.trunc_f32_s + else + i32.const 0 + end + i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8768 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 2 + i32.const 16 + i32.const 10320 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> + local.get $1 + local.get $5 + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> + local.get $1 + i32.const 10 + i32.const 2 + i32.const 16 + i32.const 10384 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $8 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 8864 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 2 + i32.add + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 8 + i32.add + local.set $9 + local.get $3 + i32.load offset=4 + local.set $10 + local.get $3 + i32.load offset=12 + local.set $15 + loop $for-loop|00 + local.get $0 + local.get $15 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $10 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $12 + local.get $12 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $12 + i32.trunc_f64_s + else + i32.const 0 + end + i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8864 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 2 + i32.const 16 + i32.const 10448 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + local.get $4 + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> + local.get $1 + local.get $6 + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> + local.get $1 + call $~lib/typedarray/Int32Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 2 + i32.const 16 + i32.const 10512 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $14 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + return + end + i32.const 1424 + i32.const 1488 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable ) (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (param $0 i32) (param $1 i32) (local $2 i32) @@ -27406,312 +26319,295 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (param $0 i32) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> + (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 f32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8768 + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 f32) + (local $12 f64) + (local $13 i32) + (local $14 i32) + (local $15 i32) + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $5 + i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $5 + i32.const 1 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $5 + i32.const 2 + i64.const 9 + call $~lib/typedarray/Int64Array#__set + i32.const 4 + call $~lib/typedarray/Uint8Array#constructor + local.tee $4 + i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $4 + i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $4 + i32.const 2 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $4 + i32.const 3 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $6 + i32.const 0 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $6 + i32.const 1 + i32.const 1001 + call $~lib/typedarray/Int16Array#__set + local.get $6 + i32.const 2 + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Uint32Array#constructor + local.tee $13 call $~lib/rt/pure/__retain local.tee $1 - i32.load offset=12 - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 + call $~lib/typedarray/Int32Array#set<~lib/array/Array> + local.get $1 + i32.const 10 i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 12 - i32.add - local.set $4 + i32.const 66 + i32.const 10576 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $14 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> local.get $1 - i32.load offset=4 - local.set $5 - local.get $1 - i32.load offset=12 - local.set $6 - loop $for-loop|0 + call $~lib/rt/pure/__retain + local.set $2 + block $folding-inner0 + i32.const 8768 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 3 + i32.add local.get $2 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 2 - i32.shl - local.tee $7 - i32.add - local.get $5 - local.get $7 - i32.add - f32.load - local.tee $3 - local.get $3 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $3 - i32.trunc_f32_u - else - i32.const 0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 12 + i32.add + local.set $7 + local.get $3 + i32.load offset=4 + local.set $8 + local.get $3 + i32.load offset=12 + local.set $9 + loop $for-loop|0 + local.get $0 + local.get $9 + i32.lt_s + if + local.get $7 + local.get $0 + i32.const 2 + i32.shl + local.tee $10 + i32.add + local.get $8 + local.get $10 + i32.add + f32.load + local.tee $11 + local.get $11 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $11 + i32.trunc_f32_u + else + i32.const 0 + end + i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 end - i32.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8768 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8864 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8768 + call $~lib/rt/pure/__release local.get $1 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $5 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $3 - local.get $3 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $3 - i32.trunc_f64_u - else - i32.const 0 + i32.const 10 + i32.const 2 + i32.const 66 + i32.const 10688 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + local.get $1 + local.get $5 + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> + local.get $1 + i32.const 10 + i32.const 2 + i32.const 66 + i32.const 10752 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $8 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 8864 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 2 + i32.add + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 8 + i32.add + local.set $9 + local.get $3 + i32.load offset=4 + local.set $10 + local.get $3 + i32.load offset=12 + local.set $15 + loop $for-loop|00 + local.get $0 + local.get $15 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $10 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $12 + local.get $12 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $12 + i32.trunc_f64_u + else + i32.const 0 + end + i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 end - i32.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8864 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 2 + i32.const 66 + i32.const 10816 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + local.get $4 + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> + local.get $1 + local.get $6 + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> + local.get $1 + call $~lib/typedarray/Int32Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 2 + i32.const 66 + i32.const 10880 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $14 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + return end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8864 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $2 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - i32.const 4 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $3 - i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set - local.get $3 - i32.const 1 - i32.const 1001 - call $~lib/typedarray/Int16Array#__set - local.get $3 - i32.const 2 - i32.const 1002 - call $~lib/typedarray/Int16Array#__set - i32.const 10 - call $~lib/typedarray/Uint32Array#constructor - local.tee $5 - call $~lib/rt/pure/__retain - local.tee $0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 66 - i32.const 10576 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> - local.get $0 - call $~lib/typedarray/Uint32Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 66 - i32.const 10688 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> - local.get $0 - local.get $2 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 66 - i32.const 10752 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $8 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> - local.get $0 - call $~lib/typedarray/Uint32Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 66 - i32.const 10816 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $0 - local.get $1 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> - local.get $0 - local.get $3 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 66 - i32.const 10880 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release + i32.const 1424 + i32.const 1488 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable ) (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) (local $1 i32) @@ -27860,88 +26756,6 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8768 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 24 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.get $5 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $3 - local.get $3 - f32.sub - f32.const 0 - f32.eq - if (result i64) - local.get $3 - i64.trunc_f32_s - else - i64.const 0 - end - i64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8768 - call $~lib/rt/pure/__release - ) (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 @@ -27987,23 +26801,22 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 f64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $3 local.get $0 call $~lib/rt/pure/__retain local.set $0 - i32.const 8864 + local.get $3 call $~lib/rt/pure/__retain local.tee $1 - i32.load offset=12 - i32.const 2 - i32.add + i32.load offset=8 local.get $0 i32.load offset=8 i32.const 3 @@ -28019,14 +26832,12 @@ end local.get $0 i32.load offset=4 - i32.const 16 - i32.add local.set $4 local.get $1 i32.load offset=4 local.set $5 local.get $1 - i32.load offset=12 + i32.load offset=8 local.set $6 loop $for-loop|0 local.get $2 @@ -28037,23 +26848,11 @@ local.get $2 i32.const 3 i32.shl - local.tee $7 i32.add + local.get $2 local.get $5 - local.get $7 i32.add - f64.load - local.tee $3 - local.get $3 - f64.sub - f64.const 0 - f64.eq - if (result i64) - local.get $3 - i64.trunc_f64_s - else - i64.const 0 - end + i64.load8_u i64.store local.get $2 i32.const 1 @@ -28066,74 +26865,7 @@ call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - i32.const 8864 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=8 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $4 - local.get $1 - i32.load offset=4 - local.set $5 - local.get $1 - i32.load offset=8 - local.set $6 - loop $for-loop|0 - local.get $2 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 3 - i32.shl - i32.add - local.get $2 - local.get $5 - i32.add - i64.load8_u - i64.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $3 + local.get $3 call $~lib/rt/pure/__release ) (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) @@ -28291,138 +27023,286 @@ (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) + (local $10 f32) + (local $11 f64) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $2 + local.tee $5 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $4 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $6 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Int64Array#constructor - local.tee $5 + local.tee $12 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 call $~lib/typedarray/Int64Array#set<~lib/array/Array> - local.get $0 + local.get $1 i32.const 10 i32.const 3 i32.const 67 i32.const 10944 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> - local.get $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 67 - i32.const 11104 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> - local.get $0 - local.get $2 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 67 - i32.const 11216 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $8 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> - local.get $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 67 - i32.const 11328 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $4 + local.tee $13 call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $0 local.get $1 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> - local.get $0 - local.get $3 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 67 - i32.const 11440 - call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release + local.set $2 + block $folding-inner0 + i32.const 8768 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 3 + i32.add + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 24 + i32.add + local.set $7 + local.get $3 + i32.load offset=4 + local.set $8 + local.get $3 + i32.load offset=12 + local.set $9 + loop $for-loop|0 + local.get $0 + local.get $9 + i32.lt_s + if + local.get $7 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $8 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $10 + local.get $10 + f32.sub + f32.const 0 + f32.eq + if (result i64) + local.get $10 + i64.trunc_f32_s + else + i64.const 0 + end + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8768 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 3 + i32.const 67 + i32.const 11104 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + local.get $1 + local.get $5 + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> + local.get $1 + i32.const 10 + i32.const 3 + i32.const 67 + i32.const 11216 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $8 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 8864 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 2 + i32.add + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 16 + i32.add + local.set $9 + local.get $3 + i32.load offset=4 + local.set $14 + local.get $3 + i32.load offset=12 + local.set $15 + loop $for-loop|00 + local.get $0 + local.get $15 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 3 + i32.shl + local.tee $16 + i32.add + local.get $14 + local.get $16 + i32.add + f64.load + local.tee $11 + local.get $11 + f64.sub + f64.const 0 + f64.eq + if (result i64) + local.get $11 + i64.trunc_f64_s + else + i64.const 0 + end + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8864 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 3 + i32.const 67 + i32.const 11328 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + local.get $4 + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> + local.get $1 + local.get $6 + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> + local.get $1 + call $~lib/typedarray/Int64Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 3 + i32.const 67 + i32.const 11440 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $12 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + return + end + i32.const 1424 + i32.const 1488 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable ) (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (param $0 i32) (param $1 i32) (local $2 i32) @@ -28496,170 +27376,6 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8768 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 24 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.get $5 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $3 - local.get $3 - f32.sub - f32.const 0 - f32.eq - if (result i64) - local.get $3 - i64.trunc_f32_u - else - i64.const 0 - end - i64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8768 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8864 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=12 - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 16 - i32.add - local.set $4 - local.get $1 - i32.load offset=4 - local.set $5 - local.get $1 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $2 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 3 - i32.shl - local.tee $7 - i32.add - local.get $5 - local.get $7 - i32.add - f64.load - local.tee $3 - local.get $3 - f64.sub - f64.const 0 - f64.eq - if (result i64) - local.get $3 - i64.trunc_f64_u - else - i64.const 0 - end - i64.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8864 - call $~lib/rt/pure/__release - ) (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> (local $0 i32) (local $1 i32) @@ -28670,138 +27386,286 @@ (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) + (local $10 f32) + (local $11 f64) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $2 + local.tee $5 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $4 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $6 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Uint64Array#constructor - local.tee $5 + local.tee $12 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 call $~lib/typedarray/Int64Array#set<~lib/array/Array> - local.get $0 + local.get $1 i32.const 10 i32.const 3 i32.const 68 i32.const 11552 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> - local.get $0 - call $~lib/typedarray/Uint64Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 68 - i32.const 11712 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> - local.get $0 - local.get $2 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 68 - i32.const 11824 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $8 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> - local.get $0 - call $~lib/typedarray/Uint64Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 68 - i32.const 11936 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $4 + local.tee $13 call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $0 local.get $1 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> - local.get $0 - local.get $3 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 68 - i32.const 12048 - call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release + local.set $2 + block $folding-inner0 + i32.const 8768 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 3 + i32.add + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 24 + i32.add + local.set $7 + local.get $3 + i32.load offset=4 + local.set $8 + local.get $3 + i32.load offset=12 + local.set $9 + loop $for-loop|0 + local.get $0 + local.get $9 + i32.lt_s + if + local.get $7 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $8 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $10 + local.get $10 + f32.sub + f32.const 0 + f32.eq + if (result i64) + local.get $10 + i64.trunc_f32_u + else + i64.const 0 + end + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8768 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 3 + i32.const 68 + i32.const 11712 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + local.get $1 + local.get $5 + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> + local.get $1 + i32.const 10 + i32.const 3 + i32.const 68 + i32.const 11824 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $8 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 8864 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 2 + i32.add + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 16 + i32.add + local.set $9 + local.get $3 + i32.load offset=4 + local.set $14 + local.get $3 + i32.load offset=12 + local.set $15 + loop $for-loop|00 + local.get $0 + local.get $15 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 3 + i32.shl + local.tee $16 + i32.add + local.get $14 + local.get $16 + i32.add + f64.load + local.tee $11 + local.get $11 + f64.sub + f64.const 0 + f64.eq + if (result i64) + local.get $11 + i64.trunc_f64_u + else + i64.const 0 + end + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8864 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 3 + i32.const 68 + i32.const 11936 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + local.get $4 + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> + local.get $1 + local.get $6 + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> + local.get $1 + call $~lib/typedarray/Int64Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 3 + i32.const 68 + i32.const 12048 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $12 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + return + end + i32.const 1424 + i32.const 1488 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable ) (func $~lib/typedarray/Float32Array#__uget (param $0 i32) (param $1 i32) (result f32) local.get $0 @@ -28884,162 +27748,6 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 6 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 24 - i32.add - local.set $4 - local.get $1 - i32.load offset=4 - local.set $5 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $6 - loop $for-loop|0 - local.get $2 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $5 - local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - f32.convert_i64_s - f32.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 4 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 16 - i32.add - local.set $4 - local.get $1 - i32.load offset=4 - local.set $5 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $6 - loop $for-loop|0 - local.get $2 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $5 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_s - f32.convert_i32_s - f32.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - ) (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> (local $0 i32) (local $1 i32) @@ -29058,47 +27766,47 @@ (local $14 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $7 + local.tee $10 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $7 + local.get $10 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $7 + local.get $10 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $5 + local.tee $7 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $5 + local.get $7 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $5 + local.get $7 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $5 + local.get $7 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $8 + local.tee $11 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $8 + local.get $11 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $8 + local.get $11 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set @@ -29106,7 +27814,7 @@ call $~lib/typedarray/Float32Array#constructor local.tee $14 call $~lib/rt/pure/__retain - local.tee $3 + local.tee $4 call $~lib/rt/pure/__retain local.set $1 block $folding-inner0 @@ -29122,26 +27830,26 @@ br_if $folding-inner0 local.get $1 i32.load offset=4 - local.set $9 + local.set $12 local.get $2 i32.load offset=4 - local.set $10 + local.set $13 local.get $2 i32.load offset=12 - local.set $11 + local.set $8 loop $for-loop|0 local.get $0 - local.get $11 + local.get $8 i32.lt_s if - local.get $9 + local.get $12 local.get $0 i32.const 2 i32.shl - local.tee $6 + local.tee $5 i32.add - local.get $6 - local.get $10 + local.get $5 + local.get $13 i32.add i32.load f32.convert_i32_s @@ -29159,16 +27867,16 @@ call $~lib/rt/pure/__release i32.const 8688 call $~lib/rt/pure/__release - local.get $3 + local.get $4 i32.const 10 i32.const 2 i32.const 61 i32.const 12160 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $12 call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $3 + local.get $4 call $~lib/rt/pure/__retain local.set $0 i32.const 8768 @@ -29198,39 +27906,31 @@ call $~lib/rt/pure/__release i32.const 8768 call $~lib/rt/pure/__release - local.get $3 + local.get $4 i32.const 10 i32.const 2 i32.const 61 i32.const 12272 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $3 - local.get $7 - call $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> - local.get $3 - i32.const 10 - i32.const 2 - i32.const 61 - i32.const 12336 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $11 + local.tee $13 call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> i32.const 0 local.set $0 - local.get $5 + local.get $10 call $~lib/rt/pure/__retain - local.set $4 - local.get $3 + local.set $3 + local.get $4 call $~lib/rt/pure/__retain local.set $1 - local.get $4 + local.get $3 call $~lib/rt/pure/__retain local.tee $2 i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 6 + i32.add local.get $1 i32.load offset=8 i32.const 2 @@ -29239,28 +27939,34 @@ br_if $folding-inner0 local.get $1 i32.load offset=4 - local.set $6 + i32.const 24 + i32.add + local.set $8 local.get $2 i32.load offset=4 - local.set $12 + local.set $5 local.get $2 i32.load offset=8 - local.set $13 + i32.const 3 + i32.shr_u + local.set $6 loop $for-loop|00 local.get $0 - local.get $13 + local.get $6 i32.lt_s if - local.get $6 + local.get $8 local.get $0 i32.const 2 i32.shl i32.add + local.get $5 local.get $0 - local.get $12 + i32.const 3 + i32.shl i32.add - i32.load8_u - f32.convert_i32_u + i64.load + f32.convert_i64_s f32.store local.get $0 i32.const 1 @@ -29273,22 +27979,29 @@ call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release local.get $3 - local.get $8 - call $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> + call $~lib/rt/pure/__release + local.get $4 + i32.const 10 + i32.const 2 + i32.const 61 + i32.const 12336 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $8 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> i32.const 0 local.set $0 - local.get $3 + local.get $7 + call $~lib/rt/pure/__retain + local.set $3 + local.get $4 call $~lib/rt/pure/__retain local.set $1 - i32.const 8944 + local.get $3 call $~lib/rt/pure/__retain local.tee $2 - i32.load offset=12 - i32.const 7 - i32.add + i32.load offset=8 local.get $1 i32.load offset=8 i32.const 2 @@ -29297,27 +28010,148 @@ br_if $folding-inner0 local.get $1 i32.load offset=4 - i32.const 28 - i32.add - local.set $6 + local.set $5 local.get $2 i32.load offset=4 - local.set $12 + local.set $6 local.get $2 - i32.load offset=12 - local.set $13 + i32.load offset=8 + local.set $9 loop $for-loop|01 local.get $0 - local.get $13 + local.get $9 + i32.lt_s + if + local.get $5 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $0 + local.get $6 + i32.add + i32.load8_u + f32.convert_i32_u + f32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|01 + end + end + local.get $2 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + i32.const 0 + local.set $0 + local.get $11 + call $~lib/rt/pure/__retain + local.set $3 + local.get $4 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 4 + i32.add + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $1 + i32.load offset=4 + i32.const 16 + i32.add + local.set $5 + local.get $2 + i32.load offset=4 + local.set $6 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $9 + loop $for-loop|02 + local.get $0 + local.get $9 i32.lt_s if + local.get $5 + local.get $0 + i32.const 2 + i32.shl + i32.add local.get $6 local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_s + f32.convert_i32_s + f32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|02 + end + end + local.get $2 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + i32.const 0 + local.set $0 + local.get $4 + call $~lib/rt/pure/__retain + local.set $1 + i32.const 8944 + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=12 + i32.const 7 + i32.add + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $1 + i32.load offset=4 + i32.const 28 + i32.add + local.set $5 + local.get $2 + i32.load offset=4 + local.set $6 + local.get $2 + i32.load offset=12 + local.set $9 + loop $for-loop|03 + local.get $0 + local.get $9 + i32.lt_s + if + local.get $5 + local.get $0 i32.const 2 i32.shl i32.add local.get $0 - local.get $12 + local.get $6 i32.add i32.load8_s f32.convert_i32_s @@ -29326,7 +28160,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|01 + br $for-loop|03 end end local.get $2 @@ -29335,7 +28169,7 @@ call $~lib/rt/pure/__release i32.const 8944 call $~lib/rt/pure/__release - local.get $3 + local.get $4 i32.const 10 i32.const 2 i32.const 61 @@ -29346,21 +28180,21 @@ call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $10 call $~lib/rt/pure/__release - local.get $5 + local.get $7 call $~lib/rt/pure/__release - local.get $8 + local.get $11 call $~lib/rt/pure/__release local.get $14 call $~lib/rt/pure/__release - local.get $3 + local.get $4 call $~lib/rt/pure/__release - local.get $9 + local.get $12 call $~lib/rt/pure/__release - local.get $10 + local.get $13 call $~lib/rt/pure/__release - local.get $11 + local.get $8 call $~lib/rt/pure/__release return end @@ -29450,162 +28284,6 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 6 - i32.add - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 48 - i32.add - local.set $4 - local.get $1 - i32.load offset=4 - local.set $5 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $6 - loop $for-loop|0 - local.get $2 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 3 - i32.shl - local.tee $7 - i32.add - local.get $5 - local.get $7 - i32.add - i64.load - f64.convert_i64_s - f64.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 4 - i32.add - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 32 - i32.add - local.set $4 - local.get $1 - i32.load offset=4 - local.set $5 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $6 - loop $for-loop|0 - local.get $2 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 3 - i32.shl - i32.add - local.get $5 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_s - f64.convert_i32_s - f64.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - ) (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> (local $0 i32) (local $1 i32) @@ -29624,47 +28302,47 @@ (local $14 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $6 + local.tee $11 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $6 + local.get $11 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $6 + local.get $11 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $5 + local.tee $9 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $5 + local.get $9 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $5 + local.get $9 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $5 + local.get $9 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $7 + local.tee $12 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $7 + local.get $12 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $7 + local.get $12 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set @@ -29672,79 +28350,77 @@ call $~lib/typedarray/Float64Array#constructor local.tee $14 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $4 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 block $folding-inner0 i32.const 8688 call $~lib/rt/pure/__retain - local.tee $3 + local.tee $2 i32.load offset=12 - local.get $2 + local.get $1 i32.load offset=8 i32.const 3 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $2 + local.get $1 i32.load offset=4 - local.set $8 - local.get $3 + local.set $13 + local.get $2 i32.load offset=4 - local.set $9 - local.get $3 - i32.load offset=12 local.set $10 + local.get $2 + i32.load offset=12 + local.set $6 loop $for-loop|0 - local.get $1 - local.get $10 + local.get $0 + local.get $6 i32.lt_s if - local.get $8 - local.get $1 + local.get $13 + local.get $0 i32.const 3 i32.shl i32.add - local.get $9 - local.get $1 + local.get $10 + local.get $0 i32.const 2 i32.shl i32.add i32.load f64.convert_i32_s f64.store - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end - local.get $3 - call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release i32.const 8688 call $~lib/rt/pure/__release - local.get $0 + local.get $4 i32.const 10 i32.const 3 i32.const 62 i32.const 12464 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $13 call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - local.get $0 - local.set $1 i32.const 0 - local.set $2 - local.get $1 + local.set $0 + local.get $4 call $~lib/rt/pure/__retain local.set $1 i32.const 8768 call $~lib/rt/pure/__retain - local.tee $3 + local.tee $2 i32.load offset=12 i32.const 3 i32.add @@ -29753,220 +28429,338 @@ i32.const 3 i32.shr_u i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end + br_if $folding-inner0 local.get $1 i32.load offset=4 i32.const 24 i32.add - local.set $4 - local.get $3 + local.set $10 + local.get $2 i32.load offset=4 - local.set $9 - local.get $3 + local.set $6 + local.get $2 i32.load offset=12 - local.set $10 + local.set $5 loop $for-loop|00 - local.get $2 - local.get $10 + local.get $0 + local.get $5 i32.lt_s if - local.get $4 - local.get $2 + local.get $10 + local.get $0 i32.const 3 i32.shl i32.add - local.get $9 - local.get $2 + local.get $6 + local.get $0 i32.const 2 i32.shl i32.add f32.load f64.promote_f32 f64.store - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|00 end end - local.get $3 + local.get $2 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release i32.const 8768 call $~lib/rt/pure/__release - local.get $0 + local.get $4 i32.const 10 i32.const 3 i32.const 62 i32.const 12624 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $9 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - local.get $0 - local.get $6 - call $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 62 - i32.const 12736 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain local.tee $10 call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> i32.const 0 - local.set $1 - local.get $5 - call $~lib/rt/pure/__retain - local.set $4 - local.get $0 + local.set $0 + local.get $11 call $~lib/rt/pure/__retain - local.set $2 + local.set $3 local.get $4 call $~lib/rt/pure/__retain - local.tee $3 + local.set $1 + local.get $3 + call $~lib/rt/pure/__retain + local.tee $2 i32.load offset=8 - local.get $2 + i32.const 3 + i32.shr_u + i32.const 6 + i32.add + local.get $1 i32.load offset=8 i32.const 3 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $2 + local.get $1 i32.load offset=4 - local.set $11 - local.get $3 + i32.const 48 + i32.add + local.set $6 + local.get $2 i32.load offset=4 - local.set $12 - local.get $3 + local.set $5 + local.get $2 i32.load offset=8 - local.set $13 - loop $for-loop|001 - local.get $1 - local.get $13 + i32.const 3 + i32.shr_u + local.set $7 + loop $for-loop|01 + local.get $0 + local.get $7 i32.lt_s if - local.get $11 - local.get $1 + local.get $6 + local.get $0 i32.const 3 i32.shl + local.tee $8 i32.add - local.get $1 - local.get $12 + local.get $5 + local.get $8 i32.add - i32.load8_u - f64.convert_i32_u + i64.load + f64.convert_i64_s f64.store - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 - br $for-loop|001 + local.set $0 + br $for-loop|01 end end - local.get $3 - call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $4 + local.get $1 call $~lib/rt/pure/__release - local.get $0 - local.get $7 - call $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> + local.get $3 + call $~lib/rt/pure/__release + local.get $4 + i32.const 10 + i32.const 3 + i32.const 62 + i32.const 12736 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> i32.const 0 - local.set $1 - local.get $0 + local.set $0 + local.get $9 call $~lib/rt/pure/__retain - local.set $2 - i32.const 8944 + local.set $3 + local.get $4 call $~lib/rt/pure/__retain - local.tee $3 - i32.load offset=12 - i32.const 7 - i32.add - local.get $2 + local.set $1 + local.get $3 + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=8 + local.get $1 i32.load offset=8 i32.const 3 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $2 + local.get $1 i32.load offset=4 - i32.const 56 - i32.add - local.set $11 - local.get $3 + local.set $5 + local.get $2 i32.load offset=4 - local.set $12 + local.set $7 + local.get $2 + i32.load offset=8 + local.set $8 + loop $for-loop|02 + local.get $0 + local.get $8 + i32.lt_s + if + local.get $5 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $0 + local.get $7 + i32.add + i32.load8_u + f64.convert_i32_u + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|02 + end + end + local.get $2 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release local.get $3 - i32.load offset=12 - local.set $13 - loop $for-loop|01 - local.get $1 - local.get $13 + call $~lib/rt/pure/__release + i32.const 0 + local.set $0 + local.get $12 + call $~lib/rt/pure/__retain + local.set $3 + local.get $4 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 4 + i32.add + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $1 + i32.load offset=4 + i32.const 32 + i32.add + local.set $5 + local.get $2 + i32.load offset=4 + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $8 + loop $for-loop|03 + local.get $0 + local.get $8 i32.lt_s if - local.get $11 - local.get $1 + local.get $5 + local.get $0 i32.const 3 i32.shl i32.add - local.get $1 - local.get $12 + local.get $7 + local.get $0 + i32.const 1 + i32.shl i32.add - i32.load8_s + i32.load16_s f64.convert_i32_s f64.store - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 - br $for-loop|01 + local.set $0 + br $for-loop|03 end end + local.get $2 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release + i32.const 0 + local.set $0 + local.get $4 + call $~lib/rt/pure/__retain + local.set $1 + i32.const 8944 + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=12 + i32.const 7 + i32.add + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $1 + i32.load offset=4 + i32.const 56 + i32.add + local.set $5 + local.get $2 + i32.load offset=4 + local.set $7 + local.get $2 + i32.load offset=12 + local.set $8 + loop $for-loop|04 + local.get $0 + local.get $8 + i32.lt_s + if + local.get $5 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $0 + local.get $7 + i32.add + i32.load8_s + f64.convert_i32_s + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|04 + end + end local.get $2 call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release i32.const 8944 call $~lib/rt/pure/__release - local.get $0 + local.get $4 i32.const 10 i32.const 3 i32.const 62 i32.const 12848 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $6 + local.get $11 call $~lib/rt/pure/__release - local.get $5 + local.get $9 call $~lib/rt/pure/__release - local.get $7 + local.get $12 call $~lib/rt/pure/__release local.get $14 call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $8 + local.get $4 call $~lib/rt/pure/__release - local.get $9 + local.get $13 call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release return end i32.const 1424 @@ -29976,258 +28770,6 @@ call $~lib/builtins/abort unreachable ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 f32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 1 - i32.add - local.set $5 - local.get $1 - i32.load offset=4 - local.set $6 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $7 - loop $for-loop|0 - local.get $2 - local.get $7 - i32.lt_s - if - local.get $2 - local.get $5 - i32.add - local.get $6 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $4 - local.get $4 - f32.sub - f32.const 0 - f32.eq - if (result i32) - f32.const 0 - f32.const 255 - local.get $4 - f32.min - f32.max - i32.trunc_f32_u - else - i32.const 0 - end - i32.store8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 8 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - local.set $5 - local.get $1 - i32.load offset=4 - local.set $6 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $7 - loop $for-loop|0 - local.get $2 - local.get $7 - i32.lt_s - if - local.get $2 - local.get $5 - i32.add - local.get $6 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $4 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $4 - i32.const 255 - local.get $4 - i32.sub - i32.const 31 - i32.shr_s - i32.or - i32.and - i32.store8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint32Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $4 - local.get $1 - i32.load offset=4 - local.set $5 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $6 - loop $for-loop|0 - local.get $2 - local.get $6 - i32.lt_s - if - local.get $2 - local.get $4 - i32.add - i32.const 255 - local.get $5 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $7 - local.get $7 - i32.const 255 - i32.gt_u - select - i32.store8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - ) (func $start:std/typedarray (local $0 i32) (local $1 i32) @@ -30238,17 +28780,17 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 f32) - (local $10 f64) + (local $9 i32) + (local $10 i32) (local $11 i32) (local $12 f32) (local $13 f64) (local $14 i32) (local $15 i32) (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) + (local $17 f32) + (local $18 f64) + (local $19 i64) (local $20 i32) (local $21 i32) (local $22 i32) @@ -30259,6 +28801,7 @@ (local $27 i32) (local $28 i32) (local $29 i32) + (local $30 i32) i32.const 0 call $std/typedarray/testInstantiate i32.const 5 @@ -30735,7 +29278,7 @@ i32.const 1760 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $7 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -30802,7 +29345,7 @@ i32.const 1792 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -30841,11 +29384,11 @@ call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $6 + local.get $7 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release @@ -30980,7 +29523,7 @@ i32.const 2048 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $7 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31049,7 +29592,7 @@ i32.const 2096 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31088,11 +29631,11 @@ call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $6 + local.get $7 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release @@ -31367,7 +29910,7 @@ i32.const 2224 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $7 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31389,7 +29932,7 @@ i32.const 2 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $7 + local.tee $6 i32.const 5 i32.const 2 i32.const 16 @@ -31418,14 +29961,14 @@ i32.const 2 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $11 + local.tee $9 i32.const 5 i32.const 2 i32.const 16 i32.const 2320 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $14 + local.tee $10 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31447,14 +29990,14 @@ i32.const 3 i32.const 4 call $~lib/typedarray/Int32Array#copyWithin - local.tee $15 + local.tee $11 i32.const 5 i32.const 2 i32.const 16 i32.const 2368 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $14 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31476,14 +30019,14 @@ i32.const 3 i32.const 4 call $~lib/typedarray/Int32Array#copyWithin - local.tee $17 + local.tee $15 i32.const 5 i32.const 2 i32.const 16 i32.const 2416 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $16 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31505,14 +30048,14 @@ i32.const 2 i32.const 4 call $~lib/typedarray/Int32Array#copyWithin - local.tee $19 + local.tee $20 i32.const 5 i32.const 2 i32.const 16 i32.const 2464 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $21 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31534,14 +30077,14 @@ i32.const -2 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $21 + local.tee $22 i32.const 5 i32.const 2 i32.const 16 i32.const 2512 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $23 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31563,14 +30106,14 @@ i32.const -2 i32.const -1 call $~lib/typedarray/Int32Array#copyWithin - local.tee $23 + local.tee $24 i32.const 5 i32.const 2 i32.const 16 i32.const 2560 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $24 + local.tee $25 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31592,14 +30135,14 @@ i32.const -3 i32.const -2 call $~lib/typedarray/Int32Array#copyWithin - local.tee $25 + local.tee $26 i32.const 5 i32.const 2 i32.const 16 i32.const 2608 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $27 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31621,14 +30164,14 @@ i32.const -3 i32.const -1 call $~lib/typedarray/Int32Array#copyWithin - local.tee $27 + local.tee $28 i32.const 5 i32.const 2 i32.const 16 i32.const 2656 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $28 + local.tee $29 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31658,7 +30201,7 @@ i32.const 2704 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $29 + local.tee $30 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31679,12 +30222,16 @@ call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release local.get $7 call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release local.get $11 call $~lib/rt/pure/__release local.get $14 @@ -31693,12 +30240,6 @@ call $~lib/rt/pure/__release local.get $16 call $~lib/rt/pure/__release - local.get $17 - call $~lib/rt/pure/__release - local.get $18 - call $~lib/rt/pure/__release - local.get $19 - call $~lib/rt/pure/__release local.get $20 call $~lib/rt/pure/__release local.get $21 @@ -31717,9 +30258,11 @@ call $~lib/rt/pure/__release local.get $28 call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $29 + local.get $30 call $~lib/rt/pure/__release i32.const 5 call $~lib/typedarray/Int32Array#constructor @@ -31989,7 +30532,7 @@ call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $6 + local.tee $7 call $~lib/rt/pure/__retain local.tee $1 i32.const 0 @@ -32015,7 +30558,7 @@ local.set $5 local.get $2 i32.load offset=4 - local.set $7 + local.set $6 local.get $2 i32.load offset=8 local.set $8 @@ -32025,14 +30568,14 @@ i32.lt_s if local.get $0 - local.get $7 + local.get $6 i32.add i32.load8_s - local.set $11 + local.set $9 i32.const 4 global.set $~argumentsLength local.get $3 - local.get $11 + local.get $9 local.get $0 local.get $2 local.get $5 @@ -32052,4207 +30595,5229 @@ call $~lib/rt/pure/__release i32.const 2752 call $~lib/rt/pure/__release - block $folding-inner17 - block $folding-inner16 - block $folding-inner15 - block $folding-inner14 - block $folding-inner11 - block $folding-inner10 - block $folding-inner9 - block $folding-inner8 - block $folding-inner7 - block $folding-inner6 - block $folding-inner5 - block $folding-inner4 - block $folding-inner3 - block $folding-inner2 - block $folding-inner1 - block $folding-inner0 - local.get $3 - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $6 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 2784 - call $~lib/typedarray/Uint8Array#reduce - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 2816 - call $~lib/typedarray/Uint8Array#reduce - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $6 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - i32.const 0 - local.set $0 - i32.const 0 - local.set $3 - local.get $1 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 2848 - call $~lib/rt/pure/__retain - local.set $5 - local.get $2 - i32.load offset=4 - local.set $7 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $8 - loop $for-loop|00 + block $folding-inner18 + block $folding-inner17 + block $folding-inner16 + block $folding-inner15 + block $folding-inner14 + block $folding-inner11 + block $folding-inner10 + block $folding-inner9 + block $folding-inner8 + block $folding-inner7 + block $folding-inner6 + block $folding-inner5 + block $folding-inner4 + block $folding-inner3 + block $folding-inner2 + block $folding-inner1 + block $folding-inner0 + local.get $3 + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $7 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8Array#__set local.get $0 - local.get $8 - i32.lt_s - if - local.get $7 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.set $11 - i32.const 4 - global.set $~argumentsLength - local.get $3 - local.get $11 - local.get $0 - local.get $2 - local.get $5 - i32.load - call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|00 - end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 2848 - call $~lib/rt/pure/__release - local.get $3 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $6 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $6 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - i32.const 0 - local.set $0 - i32.const 0 - local.set $3 - local.get $1 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 2880 - call $~lib/rt/pure/__retain - local.set $5 - local.get $2 - i32.load offset=4 - local.set $7 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $8 - loop $for-loop|01 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set local.get $0 - local.get $8 - i32.lt_s - if - local.get $7 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.set $11 - i32.const 4 - global.set $~argumentsLength - local.get $3 - local.get $11 - local.get $0 - local.get $2 - local.get $5 - i32.load - call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|01 - end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 2880 - call $~lib/rt/pure/__release - local.get $3 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $6 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 2912 - call $~lib/typedarray/Int32Array#reduce - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2944 - call $~lib/typedarray/Int32Array#reduce - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 2976 - call $~lib/typedarray/Int64Array#reduce - i64.const 6 - i64.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 3008 - call $~lib/typedarray/Int64Array#reduce - i64.const 6 - i64.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $5 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - f32.const 1 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 1 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 2 - f32.const 3 - call $~lib/typedarray/Float32Array#__set - i32.const 0 - local.set $0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 3040 - call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - i32.load offset=4 - local.set $6 - local.get $2 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $7 - loop $for-loop|02 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8Array#__set local.get $0 - local.get $7 - i32.lt_s - if - local.get $6 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $12 - i32.const 4 - global.set $~argumentsLength - local.get $9 - local.get $12 - local.get $0 - local.get $2 - local.get $4 - i32.load - call_indirect (type $f32_f32_i32_i32_=>_f32) - local.set $9 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|02 - end - end - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 3040 - call $~lib/rt/pure/__release - local.get $9 - f32.const 6 - f32.ne - br_if $folding-inner0 - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $5 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - f64.const 3 - call $~lib/typedarray/Float64Array#__set - i32.const 0 - local.set $0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 3072 - call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - i32.load offset=4 - local.set $6 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $7 - loop $for-loop|03 + i32.const 2784 + call $~lib/typedarray/Uint8Array#reduce + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release local.get $0 - local.get $7 - i32.lt_s - if - local.get $6 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $13 - i32.const 4 - global.set $~argumentsLength - local.get $10 - local.get $13 - local.get $0 - local.get $2 - local.get $4 - i32.load - call_indirect (type $f64_f64_i32_i32_=>_f64) - local.set $10 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|03 - end - end - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 3072 - call $~lib/rt/pure/__release - local.get $10 - f64.const 6 - f64.ne - br_if $folding-inner0 - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $6 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int8Array#__set - i32.const 0 - local.set $3 - local.get $1 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 3104 - call $~lib/rt/pure/__retain - local.set $5 - local.get $2 - i32.load offset=4 - local.set $7 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|04 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 2816 + call $~lib/typedarray/Uint8Array#reduce + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $7 + call $~lib/rt/pure/__retain + local.tee $1 i32.const 0 - i32.ge_s - if + i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $0 + i32.const 0 + local.set $3 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 2848 + call $~lib/rt/pure/__retain + local.set $5 + local.get $2 + i32.load offset=4 + local.set $6 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $8 + loop $for-loop|00 local.get $0 - local.get $7 - i32.add - i32.load8_s - local.set $8 - i32.const 4 - global.set $~argumentsLength - local.get $3 local.get $8 - local.get $0 - local.get $2 - local.get $5 - i32.load - call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|04 + i32.lt_s + if + local.get $6 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.set $9 + i32.const 4 + global.set $~argumentsLength + local.get $3 + local.get $9 + local.get $0 + local.get $2 + local.get $5 + i32.load + call_indirect (type $i32_i32_i32_i32_=>_i32) + local.set $3 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 3104 - call $~lib/rt/pure/__release - local.get $3 - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $6 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 3136 - call $~lib/typedarray/Uint8Array#reduceRight - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 3168 - call $~lib/typedarray/Uint8Array#reduceRight - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $6 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - i32.const 0 - local.set $3 - local.get $1 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 3200 - call $~lib/rt/pure/__retain - local.set $5 - local.get $2 - i32.load offset=4 - local.set $7 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|05 - local.get $0 + local.get $5 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 2848 + call $~lib/rt/pure/__release + local.get $3 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $7 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $7 + call $~lib/rt/pure/__retain + local.tee $1 i32.const 0 - i32.ge_s - if - local.get $7 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint16Array#__set + i32.const 0 + local.set $0 + i32.const 0 + local.set $3 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 2880 + call $~lib/rt/pure/__retain + local.set $5 + local.get $2 + i32.load offset=4 + local.set $6 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $8 + loop $for-loop|01 local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.set $8 - i32.const 4 - global.set $~argumentsLength - local.get $3 local.get $8 - local.get $0 - local.get $2 - local.get $5 - i32.load - call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|05 + i32.lt_s + if + local.get $6 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.set $9 + i32.const 4 + global.set $~argumentsLength + local.get $3 + local.get $9 + local.get $0 + local.get $2 + local.get $5 + i32.load + call_indirect (type $i32_i32_i32_i32_=>_i32) + local.set $3 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|01 + end end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 3200 - call $~lib/rt/pure/__release - local.get $3 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $6 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $6 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - i32.const 0 - local.set $3 - local.get $1 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 3232 - call $~lib/rt/pure/__retain - local.set $5 - local.get $2 - i32.load offset=4 - local.set $7 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|06 + local.get $5 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 2880 + call $~lib/rt/pure/__release + local.get $3 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $7 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 2912 + call $~lib/typedarray/Int32Array#reduce + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 2944 + call $~lib/typedarray/Int32Array#reduce + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 i32.const 0 - i32.ge_s - if - local.get $7 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.set $8 - i32.const 4 - global.set $~argumentsLength - local.get $3 - local.get $8 - local.get $0 - local.get $2 - local.get $5 - i32.load - call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|06 - end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 3232 - call $~lib/rt/pure/__release - local.get $3 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $6 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 3264 - call $~lib/typedarray/Int32Array#reduceRight - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 3296 - call $~lib/typedarray/Int32Array#reduceRight - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 3328 - call $~lib/typedarray/Int64Array#reduceRight - i64.const 6 - i64.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 3360 - call $~lib/typedarray/Int64Array#reduceRight - i64.const 6 - i64.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $5 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - f32.const 1 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 1 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 2 - f32.const 3 - call $~lib/typedarray/Float32Array#__set - f32.const 0 - local.set $9 - local.get $1 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 3392 - call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - i32.load offset=4 - local.set $6 - local.get $2 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|07 + i64.const 1 + call $~lib/typedarray/Int64Array#__set local.get $0 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 2976 + call $~lib/typedarray/Int64Array#reduce + i64.const 6 + i64.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 i32.const 0 - i32.ge_s - if - local.get $6 + i64.const 1 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 3008 + call $~lib/typedarray/Int64Array#reduce + i64.const 6 + i64.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $5 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + f32.const 1 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 1 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 2 + f32.const 3 + call $~lib/typedarray/Float32Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3040 + call $~lib/rt/pure/__retain + local.set $4 + local.get $2 + i32.load offset=4 + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $6 + loop $for-loop|02 local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $12 - i32.const 4 - global.set $~argumentsLength - local.get $9 - local.get $12 + local.get $6 + i32.lt_s + if + local.get $7 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $17 + i32.const 4 + global.set $~argumentsLength + local.get $12 + local.get $17 + local.get $0 + local.get $2 + local.get $4 + i32.load + call_indirect (type $f32_f32_i32_i32_=>_f32) + local.set $12 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|02 + end + end + local.get $4 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3040 + call $~lib/rt/pure/__release + local.get $12 + f32.const 6 + f32.ne + br_if $folding-inner0 + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $5 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + f64.const 3 + call $~lib/typedarray/Float64Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3072 + call $~lib/rt/pure/__retain + local.set $4 + local.get $2 + i32.load offset=4 + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $6 + loop $for-loop|03 local.get $0 - local.get $2 - local.get $4 - i32.load - call_indirect (type $f32_f32_i32_i32_=>_f32) - local.set $9 + local.get $6 + i32.lt_s + if + local.get $7 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $18 + i32.const 4 + global.set $~argumentsLength + local.get $13 + local.get $18 + local.get $0 + local.get $2 + local.get $4 + i32.load + call_indirect (type $f64_f64_i32_i32_=>_f64) + local.set $13 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|03 + end + end + local.get $4 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3072 + call $~lib/rt/pure/__release + local.get $13 + f64.const 6 + f64.ne + br_if $folding-inner0 + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $7 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int8Array#__set + i32.const 0 + local.set $3 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3104 + call $~lib/rt/pure/__retain + local.set $5 + local.get $2 + i32.load offset=4 + local.set $6 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|04 local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|07 + i32.const 0 + i32.ge_s + if + local.get $0 + local.get $6 + i32.add + i32.load8_s + local.set $8 + i32.const 4 + global.set $~argumentsLength + local.get $3 + local.get $8 + local.get $0 + local.get $2 + local.get $5 + i32.load + call_indirect (type $i32_i32_i32_i32_=>_i32) + local.set $3 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|04 + end end - end - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 3392 - call $~lib/rt/pure/__release - local.get $9 - f32.const 6 - f32.ne - br_if $folding-inner1 - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $5 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - f64.const 3 - call $~lib/typedarray/Float64Array#__set - f64.const 0 - local.set $10 - local.get $1 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 3424 - call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - i32.load offset=4 - local.set $6 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|08 + local.get $5 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3104 + call $~lib/rt/pure/__release + local.get $3 + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $7 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 3136 + call $~lib/typedarray/Uint8Array#reduceRight + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 3168 + call $~lib/typedarray/Uint8Array#reduceRight + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $7 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $3 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3200 + call $~lib/rt/pure/__retain + local.set $5 + local.get $2 + i32.load offset=4 + local.set $6 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|05 + local.get $0 + i32.const 0 + i32.ge_s + if + local.get $6 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.set $8 + i32.const 4 + global.set $~argumentsLength + local.get $3 + local.get $8 + local.get $0 + local.get $2 + local.get $5 + i32.load + call_indirect (type $i32_i32_i32_i32_=>_i32) + local.set $3 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|05 + end + end + local.get $5 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3200 + call $~lib/rt/pure/__release + local.get $3 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $7 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $7 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint16Array#__set + i32.const 0 + local.set $3 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3232 + call $~lib/rt/pure/__retain + local.set $5 + local.get $2 + i32.load offset=4 + local.set $6 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|06 + local.get $0 + i32.const 0 + i32.ge_s + if + local.get $6 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.set $8 + i32.const 4 + global.set $~argumentsLength + local.get $3 + local.get $8 + local.get $0 + local.get $2 + local.get $5 + i32.load + call_indirect (type $i32_i32_i32_i32_=>_i32) + local.set $3 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|06 + end + end + local.get $5 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3232 + call $~lib/rt/pure/__release + local.get $3 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $7 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 3264 + call $~lib/typedarray/Int32Array#reduceRight + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 3296 + call $~lib/typedarray/Int32Array#reduceRight + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i64.const 1 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 3328 + call $~lib/typedarray/Int64Array#reduceRight + i64.const 6 + i64.ne + br_if $folding-inner1 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i64.const 1 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 3360 + call $~lib/typedarray/Int64Array#reduceRight + i64.const 6 + i64.ne + br_if $folding-inner1 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $5 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + f32.const 1 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 1 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 2 + f32.const 3 + call $~lib/typedarray/Float32Array#__set + f32.const 0 + local.set $12 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3392 + call $~lib/rt/pure/__retain + local.set $4 + local.get $2 + i32.load offset=4 + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|07 + local.get $0 + i32.const 0 + i32.ge_s + if + local.get $7 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $17 + i32.const 4 + global.set $~argumentsLength + local.get $12 + local.get $17 + local.get $0 + local.get $2 + local.get $4 + i32.load + call_indirect (type $f32_f32_i32_i32_=>_f32) + local.set $12 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|07 + end + end + local.get $4 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3392 + call $~lib/rt/pure/__release + local.get $12 + f32.const 6 + f32.ne + br_if $folding-inner1 + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $5 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + f64.const 3 + call $~lib/typedarray/Float64Array#__set + f64.const 0 + local.set $13 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3424 + call $~lib/rt/pure/__retain + local.set $4 + local.get $2 + i32.load offset=4 + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|08 + local.get $0 + i32.const 0 + i32.ge_s + if + local.get $7 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $18 + i32.const 4 + global.set $~argumentsLength + local.get $13 + local.get $18 + local.get $0 + local.get $2 + local.get $4 + i32.load + call_indirect (type $f64_f64_i32_i32_=>_f64) + local.set $13 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|08 + end + end + local.get $4 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3424 + call $~lib/rt/pure/__release + local.get $13 + f64.const 6 + f64.ne + br_if $folding-inner1 + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $8 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int8Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3456 + call $~lib/rt/pure/__retain + local.set $6 + local.get $2 + i32.load offset=8 + local.set $4 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 12 + i32.const 3 + call $~lib/rt/pure/__new + local.set $3 + local.get $4 + i32.const 0 + call $~lib/rt/pure/__new + local.set $5 + loop $for-loop|09 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $0 + local.get $9 + i32.add + i32.load8_s + local.set $10 + i32.const 3 + global.set $~argumentsLength + local.get $0 + local.get $5 + i32.add + local.get $10 + local.get $0 + local.get $2 + local.get $6 + i32.load + call_indirect (type $i32_i32_i32_=>_i32) + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|09 + end + end + local.get $3 + local.get $5 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store offset=8 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $6 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3456 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Int8Array#__get + i32.const 1 + i32.ne + br_if $folding-inner2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Int8Array#__get + i32.const 4 + i32.ne + br_if $folding-inner3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Int8Array#__get + i32.const 9 + i32.ne + br_if $folding-inner4 + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $8 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3488 + call $~lib/rt/pure/__retain + local.set $6 + local.get $2 + i32.load offset=8 + local.set $4 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 12 + i32.const 4 + call $~lib/rt/pure/__new + local.set $3 + local.get $4 + i32.const 0 + call $~lib/rt/pure/__new + local.set $5 + loop $for-loop|010 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $0 + local.get $9 + i32.add + i32.load8_u + local.set $10 + i32.const 3 + global.set $~argumentsLength + local.get $0 + local.get $5 + i32.add + local.get $10 + local.get $0 + local.get $2 + local.get $6 + i32.load + call_indirect (type $i32_i32_i32_=>_i32) + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|010 + end + end + local.get $3 + local.get $5 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store offset=8 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $6 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3488 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Uint8Array#__get + i32.const 1 + i32.ne + br_if $folding-inner2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint8Array#__get + i32.const 4 + i32.ne + br_if $folding-inner3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint8Array#__get + i32.const 9 + i32.ne + br_if $folding-inner4 + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $8 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3520 + call $~lib/rt/pure/__retain + local.set $6 + local.get $2 + i32.load offset=8 + local.set $4 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 12 + i32.const 5 + call $~lib/rt/pure/__new + local.set $3 + local.get $4 + i32.const 0 + call $~lib/rt/pure/__new + local.set $5 + loop $for-loop|011 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $0 + local.get $9 + i32.add + i32.load8_u + local.set $10 + i32.const 3 + global.set $~argumentsLength + local.get $0 + local.get $5 + i32.add + local.get $10 + local.get $0 + local.get $2 + local.get $6 + i32.load + call_indirect (type $i32_i32_i32_=>_i32) + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|011 + end + end + local.get $3 + local.get $5 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store offset=8 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $6 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3520 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 1 + i32.ne + br_if $folding-inner2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 4 + i32.ne + br_if $folding-inner3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 9 + i32.ne + br_if $folding-inner4 + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $8 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3552 + call $~lib/rt/pure/__retain + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $6 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 12 + i32.const 6 + call $~lib/rt/pure/__new + local.set $3 + local.get $6 + i32.const 1 + i32.shl + local.tee $10 + i32.const 0 + call $~lib/rt/pure/__new + local.set $4 + loop $for-loop|012 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 1 + i32.shl + local.tee $11 + i32.add + i32.load16_s + local.set $14 + i32.const 3 + global.set $~argumentsLength + local.get $4 + local.get $11 + i32.add + local.get $14 + local.get $0 + local.get $2 + local.get $7 + i32.load + call_indirect (type $i32_i32_i32_=>_i32) + i32.store16 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|012 + end + end + local.get $3 + local.get $4 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $4 + i32.store offset=4 + local.get $3 + local.get $10 + i32.store offset=8 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $7 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3552 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Int16Array#__get + i32.const 1 + i32.ne + br_if $folding-inner2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Int16Array#__get + i32.const 4 + i32.ne + br_if $folding-inner3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Int16Array#__get + i32.const 9 + i32.ne + br_if $folding-inner4 + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $8 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint16Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3584 + call $~lib/rt/pure/__retain + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $6 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 12 + i32.const 7 + call $~lib/rt/pure/__new + local.set $3 + local.get $6 + i32.const 1 + i32.shl + local.tee $10 + i32.const 0 + call $~lib/rt/pure/__new + local.set $4 + loop $for-loop|013 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 1 + i32.shl + local.tee $11 + i32.add + i32.load16_u + local.set $14 + i32.const 3 + global.set $~argumentsLength + local.get $4 + local.get $11 + i32.add + local.get $14 + local.get $0 + local.get $2 + local.get $7 + i32.load + call_indirect (type $i32_i32_i32_=>_i32) + i32.store16 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|013 + end + end + local.get $3 + local.get $4 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $4 + i32.store offset=4 + local.get $3 + local.get $10 + i32.store offset=8 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $7 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3584 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Uint16Array#__get + i32.const 1 + i32.ne + br_if $folding-inner2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__get + i32.const 4 + i32.ne + br_if $folding-inner3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint16Array#__get + i32.const 9 + i32.ne + br_if $folding-inner4 + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $8 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int32Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3616 + call $~lib/rt/pure/__retain + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $6 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 12 + i32.const 8 + call $~lib/rt/pure/__new + local.set $3 + local.get $6 + i32.const 2 + i32.shl + local.tee $10 + i32.const 0 + call $~lib/rt/pure/__new + local.set $4 + loop $for-loop|014 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 2 + i32.shl + local.tee $11 + i32.add + i32.load + local.set $14 + i32.const 3 + global.set $~argumentsLength + local.get $4 + local.get $11 + i32.add + local.get $14 + local.get $0 + local.get $2 + local.get $7 + i32.load + call_indirect (type $i32_i32_i32_=>_i32) + i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|014 + end + end + local.get $3 + local.get $4 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $4 + i32.store offset=4 + local.get $3 + local.get $10 + i32.store offset=8 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $7 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3616 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Int32Array#__get + i32.const 1 + i32.ne + br_if $folding-inner2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Int32Array#__get + i32.const 4 + i32.ne + br_if $folding-inner3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Int32Array#__get + i32.const 9 + i32.ne + br_if $folding-inner4 + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $8 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint32Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3648 + call $~lib/rt/pure/__retain + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $6 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 12 + i32.const 9 + call $~lib/rt/pure/__new + local.set $3 + local.get $6 + i32.const 2 + i32.shl + local.tee $10 + i32.const 0 + call $~lib/rt/pure/__new + local.set $4 + loop $for-loop|015 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 2 + i32.shl + local.tee $11 + i32.add + i32.load + local.set $14 + i32.const 3 + global.set $~argumentsLength + local.get $4 + local.get $11 + i32.add + local.get $14 + local.get $0 + local.get $2 + local.get $7 + i32.load + call_indirect (type $i32_i32_i32_=>_i32) + i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|015 + end + end + local.get $3 + local.get $4 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $4 + i32.store offset=4 + local.get $3 + local.get $10 + i32.store offset=8 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $7 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3648 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Uint32Array#__get + i32.const 1 + i32.ne + br_if $folding-inner2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint32Array#__get + i32.const 4 + i32.ne + br_if $folding-inner3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint32Array#__get + i32.const 9 + i32.ne + br_if $folding-inner4 + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $8 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i64.const 1 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Int64Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3680 + call $~lib/rt/pure/__retain + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $6 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 12 + i32.const 10 + call $~lib/rt/pure/__new + local.set $3 + local.get $6 + i32.const 3 + i32.shl + local.tee $10 + i32.const 0 + call $~lib/rt/pure/__new + local.set $4 + loop $for-loop|016 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 3 + i32.shl + local.tee $11 + i32.add + i64.load + local.set $19 + i32.const 3 + global.set $~argumentsLength + local.get $4 + local.get $11 + i32.add + local.get $19 + local.get $0 + local.get $2 + local.get $7 + i32.load + call_indirect (type $i64_i32_i32_=>_i64) + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|016 + end + end + local.get $3 + local.get $4 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $4 + i32.store offset=4 + local.get $3 + local.get $10 + i32.store offset=8 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $7 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3680 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Int64Array#__get + i64.const 1 + i64.ne + br_if $folding-inner2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Int64Array#__get + i64.const 4 + i64.ne + br_if $folding-inner3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Int64Array#__get + i64.const 9 + i64.ne + br_if $folding-inner4 + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $8 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i64.const 1 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Uint64Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3712 + call $~lib/rt/pure/__retain + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $6 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 12 + i32.const 11 + call $~lib/rt/pure/__new + local.set $3 + local.get $6 + i32.const 3 + i32.shl + local.tee $10 + i32.const 0 + call $~lib/rt/pure/__new + local.set $4 + loop $for-loop|017 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 3 + i32.shl + local.tee $11 + i32.add + i64.load + local.set $19 + i32.const 3 + global.set $~argumentsLength + local.get $4 + local.get $11 + i32.add + local.get $19 + local.get $0 + local.get $2 + local.get $7 + i32.load + call_indirect (type $i64_i32_i32_=>_i64) + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|017 + end + end + local.get $3 + local.get $4 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $4 + i32.store offset=4 + local.get $3 + local.get $10 + i32.store offset=8 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $7 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3712 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Uint64Array#__get + i64.const 1 + i64.ne + br_if $folding-inner2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint64Array#__get + i64.const 4 + i64.ne + br_if $folding-inner3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint64Array#__get + i64.const 9 + i64.ne + br_if $folding-inner4 + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $8 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + f32.const 1 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 1 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 2 + f32.const 3 + call $~lib/typedarray/Float32Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3744 + call $~lib/rt/pure/__retain + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $6 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 12 + i32.const 12 + call $~lib/rt/pure/__new + local.set $3 + local.get $6 + i32.const 2 + i32.shl + local.tee $10 + i32.const 0 + call $~lib/rt/pure/__new + local.set $4 + loop $for-loop|018 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 2 + i32.shl + local.tee $11 + i32.add + f32.load + local.set $12 + i32.const 3 + global.set $~argumentsLength + local.get $4 + local.get $11 + i32.add + local.get $12 + local.get $0 + local.get $2 + local.get $7 + i32.load + call_indirect (type $f32_i32_i32_=>_f32) + f32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|018 + end + end + local.get $3 + local.get $4 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $4 + i32.store offset=4 + local.get $3 + local.get $10 + i32.store offset=8 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $7 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3744 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Float32Array#__get + f32.const 1 + f32.ne + br_if $folding-inner2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float32Array#__get + f32.const 4 + f32.ne + br_if $folding-inner3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float32Array#__get + f32.const 9 + f32.ne + br_if $folding-inner4 + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $8 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + f64.const 3 + call $~lib/typedarray/Float64Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3776 + call $~lib/rt/pure/__retain + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $6 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 12 + i32.const 13 + call $~lib/rt/pure/__new + local.set $3 + local.get $6 + i32.const 3 + i32.shl + local.tee $10 + i32.const 0 + call $~lib/rt/pure/__new + local.set $4 + loop $for-loop|019 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 3 + i32.shl + local.tee $11 + i32.add + f64.load + local.set $13 + i32.const 3 + global.set $~argumentsLength + local.get $4 + local.get $11 + i32.add + local.get $13 + local.get $0 + local.get $2 + local.get $7 + i32.load + call_indirect (type $f64_i32_i32_=>_f64) + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|019 + end + end + local.get $3 + local.get $4 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $4 + i32.store offset=4 + local.get $3 + local.get $10 + i32.store offset=8 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $7 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3776 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 1 + f64.ne + br_if $folding-inner2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 4 + f64.ne + br_if $folding-inner3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 9 + f64.ne + br_if $folding-inner4 + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + call $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 4160 + call $~lib/typedarray/Int8Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 4192 + call $~lib/typedarray/Int8Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 4224 + call $~lib/typedarray/Uint8Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 4256 + call $~lib/typedarray/Uint8Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 4288 + call $~lib/typedarray/Uint8Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 4320 + call $~lib/typedarray/Uint8Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 4352 + call $~lib/typedarray/Int16Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 4384 + call $~lib/typedarray/Int16Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 4416 + call $~lib/typedarray/Uint16Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 4448 + call $~lib/typedarray/Uint16Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 4480 + call $~lib/typedarray/Int32Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 4512 + call $~lib/typedarray/Int32Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 4544 + call $~lib/typedarray/Int32Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 4576 + call $~lib/typedarray/Int32Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 4608 + call $~lib/typedarray/Int64Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 4640 + call $~lib/typedarray/Int64Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 4672 + call $~lib/typedarray/Int64Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 4704 + call $~lib/typedarray/Int64Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 1 + f32.const 4 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 2 + f32.const 6 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 4736 + call $~lib/typedarray/Float32Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 4768 + call $~lib/typedarray/Float32Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4800 + call $~lib/typedarray/Float64Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 4832 + call $~lib/typedarray/Float64Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 4864 + call $~lib/typedarray/Int8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 4896 + call $~lib/typedarray/Int8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 4928 + call $~lib/typedarray/Uint8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 4960 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 4992 + call $~lib/typedarray/Uint8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 5024 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 5056 + call $~lib/typedarray/Int16Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 5088 + call $~lib/typedarray/Int16Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 5120 + call $~lib/typedarray/Uint16Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 5152 + call $~lib/typedarray/Uint16Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 5184 + call $~lib/typedarray/Int32Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 5216 + call $~lib/typedarray/Int32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 5248 + call $~lib/typedarray/Int32Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 5280 + call $~lib/typedarray/Int32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i64.const 1 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 5312 + call $~lib/typedarray/Int64Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 5344 + call $~lib/typedarray/Int64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i64.const 1 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 5376 + call $~lib/typedarray/Int64Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 5408 + call $~lib/typedarray/Int64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + f32.const 1 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 1 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 2 + f32.const 3 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 5440 + call $~lib/typedarray/Float32Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 5472 + call $~lib/typedarray/Float32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5504 + call $~lib/typedarray/Float64Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 5536 + call $~lib/typedarray/Float64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 5568 + call $~lib/typedarray/Int8Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 5600 + call $~lib/typedarray/Int8Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 5632 + call $~lib/typedarray/Uint8Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 5664 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 5696 + call $~lib/typedarray/Uint8Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 5728 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 5760 + call $~lib/typedarray/Int16Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 5792 + call $~lib/typedarray/Int16Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 5824 + call $~lib/typedarray/Uint16Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 5856 + call $~lib/typedarray/Uint16Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 5888 + call $~lib/typedarray/Int32Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 5920 + call $~lib/typedarray/Int32Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 5952 + call $~lib/typedarray/Int32Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 5984 + call $~lib/typedarray/Int32Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 6016 + call $~lib/typedarray/Int64Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 6048 + call $~lib/typedarray/Int64Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 6080 + call $~lib/typedarray/Int64Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 6112 + call $~lib/typedarray/Int64Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 1 + f32.const 4 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 2 + f32.const 6 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 6144 + call $~lib/typedarray/Float32Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 6176 + call $~lib/typedarray/Float32Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6208 + call $~lib/typedarray/Float64Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 6240 + call $~lib/typedarray/Float64Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $5 + call $~lib/rt/pure/__retain + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 6304 + i32.const 0 + call $~lib/array/Array#__get + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 1 + i32.const 6304 + i32.const 1 + call $~lib/array/Array#__get + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 2 + i32.const 6304 + i32.const 2 + call $~lib/array/Array#__get + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set + i32.const 0 + local.set $1 + local.get $0 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 6352 + call $~lib/rt/pure/__retain + local.set $4 + local.get $2 + i32.load offset=4 + local.set $7 + local.get $2 + i32.load offset=8 + local.set $6 + loop $for-loop|020 + local.get $1 + local.get $6 + i32.lt_s + if + local.get $1 + local.get $7 + i32.add + i32.load8_s + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $2 + local.get $4 + i32.load + call_indirect (type $i32_i32_i32_=>_none) + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|020 + end + end + local.get $4 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 6352 + call $~lib/rt/pure/__release + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $5 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 6304 + i32.const 0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 1 + i32.const 6304 + i32.const 1 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 2 + i32.const 6304 + i32.const 2 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 6384 + call $~lib/typedarray/Uint8Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 6304 + i32.const 0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 1 + i32.const 6304 + i32.const 1 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 2 + i32.const 6304 + i32.const 2 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 6416 + call $~lib/typedarray/Uint8Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $5 + call $~lib/rt/pure/__retain + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 6304 + i32.const 0 + call $~lib/array/Array#__get + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 1 + i32.const 6304 + i32.const 1 + call $~lib/array/Array#__get + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 2 + i32.const 6304 + i32.const 2 + call $~lib/array/Array#__get + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $1 + local.get $0 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 6448 + call $~lib/rt/pure/__retain + local.set $4 + local.get $2 + i32.load offset=4 + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $6 + loop $for-loop|021 + local.get $1 + local.get $6 + i32.lt_s + if + local.get $7 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $2 + local.get $4 + i32.load + call_indirect (type $i32_i32_i32_=>_none) + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|021 + end + end + local.get $4 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 6448 + call $~lib/rt/pure/__release + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $5 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $5 + call $~lib/rt/pure/__retain + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 6304 + i32.const 0 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 1 + i32.const 6304 + i32.const 1 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 2 + i32.const 6304 + i32.const 2 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set + i32.const 0 + local.set $1 + local.get $0 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 6480 + call $~lib/rt/pure/__retain + local.set $4 + local.get $2 + i32.load offset=4 + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $6 + loop $for-loop|022 + local.get $1 + local.get $6 + i32.lt_s + if + local.get $7 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_u + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $2 + local.get $4 + i32.load + call_indirect (type $i32_i32_i32_=>_none) + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|022 + end + end + local.get $4 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 6480 + call $~lib/rt/pure/__release + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $5 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 6304 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 1 + i32.const 6304 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 2 + i32.const 6304 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 6512 + call $~lib/typedarray/Int32Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 6304 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 1 + i32.const 6304 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 2 + i32.const 6304 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 6544 + call $~lib/typedarray/Int32Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 6304 + i32.const 0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 1 + i32.const 6304 + i32.const 1 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 2 + i32.const 6304 + i32.const 2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 6576 + call $~lib/typedarray/Int64Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 6304 + i32.const 0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 1 + i32.const 6304 + i32.const 1 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 2 + i32.const 6304 + i32.const 2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 6608 + call $~lib/typedarray/Int64Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $5 + call $~lib/rt/pure/__retain + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 6304 + i32.const 0 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 1 + i32.const 6304 + i32.const 1 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 2 + i32.const 6304 + i32.const 2 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + i32.const 0 + local.set $1 + local.get $0 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 6640 + call $~lib/rt/pure/__retain + local.set $4 + local.get $2 + i32.load offset=4 + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $6 + loop $for-loop|023 + local.get $1 + local.get $6 + i32.lt_s + if + local.get $7 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $2 + local.get $4 + i32.load + call_indirect (type $f32_i32_i32_=>_none) + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|023 + end + end + local.get $4 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 6640 + call $~lib/rt/pure/__release + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $5 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $5 + call $~lib/rt/pure/__retain + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 6304 + i32.const 0 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + i32.const 6304 + i32.const 1 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + i32.const 6304 + i32.const 2 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + i32.const 0 + local.set $1 + local.get $0 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 6672 + call $~lib/rt/pure/__retain + local.set $4 + local.get $2 + i32.load offset=4 + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $6 + loop $for-loop|024 + local.get $1 + local.get $6 + i32.lt_s + if + local.get $7 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $2 + local.get $4 + i32.load + call_indirect (type $f64_i32_i32_=>_none) + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|024 + end + end + local.get $4 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 6672 + call $~lib/rt/pure/__release + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $5 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + call $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> + call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> + i32.const 1 + call $~lib/typedarray/Float64Array#constructor + local.tee $2 + i32.const 0 + f64.const nan:0x8000000000000 + call $~lib/typedarray/Float64Array#__set + local.get $2 + f64.const nan:0x8000000000000 + i32.const 0 + call $~lib/typedarray/Float64Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1360 + i32.const 607 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $0 + block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + local.get $2 + call $~lib/rt/pure/__retain + local.tee $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $3 + i32.eqz + i32.const 1 + local.get $3 + select + if + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + br $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 + end + local.get $1 + i32.load offset=4 + local.set $4 + loop $while-continue|0 + local.get $0 + local.get $3 + i32.lt_s + if + i32.const 1 + local.get $4 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $13 + local.get $13 + f64.ne + local.get $13 + f64.const nan:0x8000000000000 + f64.eq + select + if + local.get $1 + call $~lib/rt/pure/__release + i32.const 1 + br $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $while-continue|0 + end + end + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 1360 + i32.const 608 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + call $~lib/typedarray/Float32Array#constructor + local.tee $3 + i32.const 0 + f32.const nan:0x400000 + call $~lib/typedarray/Float32Array#__set + local.get $3 + f32.const nan:0x400000 + i32.const 0 + call $~lib/typedarray/Float32Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1360 + i32.const 613 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $0 + block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) + local.get $3 + call $~lib/rt/pure/__retain + local.tee $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $4 + i32.eqz + i32.const 1 + local.get $4 + select + if + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + br $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 + end + local.get $1 + i32.load offset=4 + local.set $5 + loop $while-continue|025 + local.get $0 + local.get $4 + i32.lt_s + if + i32.const 1 + local.get $5 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $12 + local.get $12 + f32.ne + local.get $12 + f32.const nan:0x400000 + f32.eq + select + if + local.get $1 + call $~lib/rt/pure/__release + i32.const 1 + br $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $while-continue|025 + end + end + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 1360 + i32.const 614 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Int8Array#__set + local.get $0 + call $~lib/typedarray/Int8Array#join + local.tee $2 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/typedarray/Int8Array#join + local.tee $3 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + call $~lib/typedarray/Uint8Array#join + local.tee $2 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/typedarray/Uint8Array#join + local.tee $3 + local.get $3 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + local.get $2 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + call $~lib/typedarray/Uint8Array#join + local.tee $2 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/typedarray/Uint8Array#join + local.tee $3 + local.get $3 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + local.get $2 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Int16Array#__set + local.get $0 + call $~lib/typedarray/Int16Array#join + local.tee $2 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/typedarray/Int16Array#join + local.tee $3 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + call $~lib/typedarray/Uint16Array#join + local.tee $2 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/typedarray/Uint16Array#join + local.tee $3 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Int32Array#__set + local.get $0 + call $~lib/typedarray/Int32Array#join + local.tee $2 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/typedarray/Int32Array#join + local.tee $3 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + call $~lib/typedarray/Uint32Array#join + local.tee $2 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/typedarray/Uint32Array#join + local.tee $3 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i64.const 1 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 3 + i64.const 4 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 4 + i64.const 5 + call $~lib/typedarray/Int64Array#__set + local.get $0 + call $~lib/typedarray/Int64Array#join + local.tee $2 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/typedarray/Int64Array#join + local.tee $3 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i64.const 1 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 3 + i64.const 4 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 4 + i64.const 5 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + call $~lib/typedarray/Uint64Array#join + local.tee $2 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/typedarray/Uint64Array#join + local.tee $3 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + f32.const 1 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 1 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 2 + f32.const 3 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 3 + f32.const 4 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 4 + f32.const 5 + call $~lib/typedarray/Float32Array#__set + local.get $0 + call $~lib/typedarray/Float32Array#join + local.tee $2 + i32.const 8480 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner14 + local.get $0 + call $~lib/typedarray/Float32Array#join + local.tee $3 + i32.const 8480 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner15 + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + call $~lib/typedarray/Float64Array#join + local.tee $2 + i32.const 8480 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner14 + local.get $0 + call $~lib/typedarray/Float64Array#join + local.tee $3 + i32.const 8480 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner15 + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $0 + i32.const 2 + global.set $~argumentsLength local.get $0 i32.const 0 - i32.ge_s + call $~lib/typedarray/Uint8Array.wrap@varargs + local.tee $2 + i32.load offset=8 if - local.get $6 - local.get $0 + i32.const 0 + i32.const 1360 + i32.const 691 i32.const 3 - i32.shl - i32.add - f64.load - local.set $13 - i32.const 4 - global.set $~argumentsLength - local.get $10 - local.get $13 - local.get $0 - local.get $2 - local.get $4 - i32.load - call_indirect (type $f64_f64_i32_i32_=>_f64) - local.set $10 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|08 + call $~lib/builtins/abort + unreachable end - end - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 3424 - call $~lib/rt/pure/__release - local.get $10 - f64.const 6 - f64.ne - br_if $folding-inner1 - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int8Array#__set - local.get $0 - call $~lib/typedarray/Int8Array#map - local.tee $1 - i32.const 0 - call $~lib/typedarray/Int8Array#__get - i32.const 1 - i32.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int8Array#__get - i32.const 4 - i32.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int8Array#__get - i32.const 9 - i32.ne - br_if $folding-inner4 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - call $~lib/typedarray/Uint8Array#map - local.tee $1 - i32.const 0 - call $~lib/typedarray/Uint8Array#__get - i32.const 1 - i32.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint8Array#__get - i32.const 4 - i32.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__get - i32.const 9 - i32.ne - br_if $folding-inner4 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - call $~lib/typedarray/Uint8ClampedArray#map - local.tee $1 - i32.const 0 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 1 - i32.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 4 - i32.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 9 - i32.ne - br_if $folding-inner4 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - local.get $0 - call $~lib/typedarray/Int16Array#map - local.tee $1 - i32.const 0 - call $~lib/typedarray/Int16Array#__get - i32.const 1 - i32.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int16Array#__get - i32.const 4 - i32.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int16Array#__get - i32.const 9 - i32.ne - br_if $folding-inner4 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - call $~lib/typedarray/Uint16Array#map - local.tee $1 - i32.const 0 - call $~lib/typedarray/Uint16Array#__get - i32.const 1 - i32.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint16Array#__get - i32.const 4 - i32.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__get - i32.const 9 - i32.ne - br_if $folding-inner4 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int32Array#__set - local.get $0 - call $~lib/typedarray/Int32Array#map - local.tee $1 - i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 1 - i32.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int32Array#__get - i32.const 4 - i32.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int32Array#__get - i32.const 9 - i32.ne - br_if $folding-inner4 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - call $~lib/typedarray/Uint32Array#map - local.tee $1 - i32.const 0 - call $~lib/typedarray/Uint32Array#__get - i32.const 1 - i32.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint32Array#__get - i32.const 4 - i32.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint32Array#__get - i32.const 9 - i32.ne - br_if $folding-inner4 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Int64Array#__set - local.get $0 - call $~lib/typedarray/Int64Array#map - local.tee $1 - i32.const 0 - call $~lib/typedarray/Int64Array#__get - i64.const 1 - i64.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int64Array#__get - i64.const 4 - i64.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int64Array#__get - i64.const 9 - i64.ne - br_if $folding-inner4 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - call $~lib/typedarray/Uint64Array#map - local.tee $1 - i32.const 0 - call $~lib/typedarray/Uint64Array#__get - i64.const 1 - i64.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint64Array#__get - i64.const 4 - i64.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint64Array#__get - i64.const 9 - i64.ne - br_if $folding-inner4 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - f32.const 1 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 1 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 2 - f32.const 3 - call $~lib/typedarray/Float32Array#__set - local.get $0 - call $~lib/typedarray/Float32Array#map - local.tee $1 - i32.const 0 - call $~lib/typedarray/Float32Array#__get - f32.const 1 - f32.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float32Array#__get - f32.const 4 - f32.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float32Array#__get - f32.const 9 - f32.ne - br_if $folding-inner4 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 3 - call $~lib/typedarray/Float64Array#__set - local.get $0 - call $~lib/typedarray/Float64Array#map - local.tee $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 1 - f64.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 4 - f64.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 9 - f64.ne - br_if $folding-inner4 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - call $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 4160 - call $~lib/typedarray/Int8Array#some - i32.eqz - br_if $folding-inner5 - local.get $0 - i32.const 4192 - call $~lib/typedarray/Int8Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 4224 - call $~lib/typedarray/Uint8Array#some - i32.eqz - br_if $folding-inner5 - local.get $0 - i32.const 4256 - call $~lib/typedarray/Uint8Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 4288 - call $~lib/typedarray/Uint8Array#some - i32.eqz - br_if $folding-inner5 - local.get $0 - i32.const 4320 - call $~lib/typedarray/Uint8Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 4352 - call $~lib/typedarray/Int16Array#some - i32.eqz - br_if $folding-inner5 - local.get $0 - i32.const 4384 - call $~lib/typedarray/Int16Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 4416 - call $~lib/typedarray/Uint16Array#some - i32.eqz - br_if $folding-inner5 - local.get $0 - i32.const 4448 - call $~lib/typedarray/Uint16Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 4480 - call $~lib/typedarray/Int32Array#some - i32.eqz - br_if $folding-inner5 - local.get $0 - i32.const 4512 - call $~lib/typedarray/Int32Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 4544 - call $~lib/typedarray/Int32Array#some - i32.eqz - br_if $folding-inner5 - local.get $0 - i32.const 4576 - call $~lib/typedarray/Int32Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 4608 - call $~lib/typedarray/Int64Array#some - i32.eqz - br_if $folding-inner5 - local.get $0 - i32.const 4640 - call $~lib/typedarray/Int64Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 4672 - call $~lib/typedarray/Int64Array#some - i32.eqz - br_if $folding-inner5 - local.get $0 - i32.const 4704 - call $~lib/typedarray/Int64Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 1 - f32.const 4 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 2 - f32.const 6 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 4736 - call $~lib/typedarray/Float32Array#some - i32.eqz - br_if $folding-inner5 - local.get $0 - i32.const 4768 - call $~lib/typedarray/Float32Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 6 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4800 - call $~lib/typedarray/Float64Array#some - i32.eqz - br_if $folding-inner5 - local.get $0 - i32.const 4832 - call $~lib/typedarray/Float64Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 4864 - call $~lib/typedarray/Int8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $0 - i32.const 4896 - call $~lib/typedarray/Int8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 4928 - call $~lib/typedarray/Uint8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $0 - i32.const 4960 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 4992 - call $~lib/typedarray/Uint8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $0 - i32.const 5024 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 5056 - call $~lib/typedarray/Int16Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $0 - i32.const 5088 - call $~lib/typedarray/Int16Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 5120 - call $~lib/typedarray/Uint16Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $0 - i32.const 5152 - call $~lib/typedarray/Uint16Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 5184 - call $~lib/typedarray/Int32Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $0 - i32.const 5216 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 5248 - call $~lib/typedarray/Int32Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $0 - i32.const 5280 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 5312 - call $~lib/typedarray/Int64Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $0 - i32.const 5344 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 5376 - call $~lib/typedarray/Int64Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $0 - i32.const 5408 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - f32.const 1 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 1 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 2 - f32.const 3 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 5440 - call $~lib/typedarray/Float32Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $0 - i32.const 5472 - call $~lib/typedarray/Float32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 3 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5504 - call $~lib/typedarray/Float64Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $0 - i32.const 5536 - call $~lib/typedarray/Float64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 5568 - call $~lib/typedarray/Int8Array#every - i32.eqz - br_if $folding-inner9 - local.get $0 - i32.const 5600 - call $~lib/typedarray/Int8Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 5632 - call $~lib/typedarray/Uint8Array#every - i32.eqz - br_if $folding-inner9 - local.get $0 - i32.const 5664 - call $~lib/typedarray/Uint8Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 5696 - call $~lib/typedarray/Uint8Array#every - i32.eqz - br_if $folding-inner9 - local.get $0 - i32.const 5728 - call $~lib/typedarray/Uint8Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 5760 - call $~lib/typedarray/Int16Array#every - i32.eqz - br_if $folding-inner9 - local.get $0 - i32.const 5792 - call $~lib/typedarray/Int16Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 5824 - call $~lib/typedarray/Uint16Array#every - i32.eqz - br_if $folding-inner9 - local.get $0 - i32.const 5856 - call $~lib/typedarray/Uint16Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 5888 - call $~lib/typedarray/Int32Array#every - i32.eqz - br_if $folding-inner9 - local.get $0 - i32.const 5920 - call $~lib/typedarray/Int32Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 5952 - call $~lib/typedarray/Int32Array#every - i32.eqz - br_if $folding-inner9 - local.get $0 - i32.const 5984 - call $~lib/typedarray/Int32Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 6016 - call $~lib/typedarray/Int64Array#every - i32.eqz - br_if $folding-inner9 - local.get $0 - i32.const 6048 - call $~lib/typedarray/Int64Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 6080 - call $~lib/typedarray/Int64Array#every - i32.eqz - br_if $folding-inner9 - local.get $0 - i32.const 6112 - call $~lib/typedarray/Int64Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 1 - f32.const 4 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 2 - f32.const 6 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 6144 - call $~lib/typedarray/Float32Array#every - i32.eqz - br_if $folding-inner9 - local.get $0 - i32.const 6176 - call $~lib/typedarray/Float32Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 6 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6208 - call $~lib/typedarray/Float64Array#every - i32.eqz - br_if $folding-inner9 - local.get $0 - i32.const 6240 - call $~lib/typedarray/Float64Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $5 - call $~lib/rt/pure/__retain - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 6304 - i32.const 0 - call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 1 - i32.const 6304 - i32.const 1 - call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 2 - i32.const 6304 - i32.const 2 - call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/typedarray/Int8Array#__set - i32.const 0 - local.set $1 - local.get $0 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 6352 - call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - i32.load offset=4 - local.set $6 - local.get $2 - i32.load offset=8 - local.set $7 - loop $for-loop|09 + i32.const 2 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 2 + global.set $~argumentsLength local.get $1 - local.get $7 - i32.lt_s + i32.const 2 + call $~lib/typedarray/Uint8Array.wrap@varargs + local.set $0 + local.get $2 + call $~lib/rt/pure/__release + local.get $0 + i32.load offset=8 if - local.get $1 - local.get $6 - i32.add - i32.load8_s + i32.const 0 + i32.const 1360 + i32.const 695 i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $2 - local.get $4 - i32.load - call_indirect (type $i32_i32_i32_=>_none) - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|09 + call $~lib/builtins/abort + unreachable end - end - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 6352 - call $~lib/rt/pure/__release - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 6304 - i32.const 0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 1 - i32.const 6304 - i32.const 1 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 2 - i32.const 6304 - i32.const 2 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 6384 - call $~lib/typedarray/Uint8Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 6304 - i32.const 0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 1 - i32.const 6304 - i32.const 1 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 2 - i32.const 6304 - i32.const 2 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 6416 - call $~lib/typedarray/Uint8Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $5 - call $~lib/rt/pure/__retain - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 6304 - i32.const 0 - call $~lib/array/Array#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 1 - i32.const 6304 - i32.const 1 - call $~lib/array/Array#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 2 - i32.const 6304 - i32.const 2 - call $~lib/array/Array#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/typedarray/Int16Array#__set - i32.const 0 - local.set $1 - local.get $0 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 6448 - call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - i32.load offset=4 - local.set $6 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $7 - loop $for-loop|010 local.get $1 - local.get $7 - i32.lt_s - if - local.get $6 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_s - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $2 - local.get $4 - i32.load - call_indirect (type $i32_i32_i32_=>_none) - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|010 - end - end - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 6448 - call $~lib/rt/pure/__release - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $5 - call $~lib/rt/pure/__retain - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 6304 - i32.const 0 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 1 - i32.const 6304 - i32.const 1 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 2 - i32.const 6304 - i32.const 2 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set - i32.const 0 - local.set $1 - local.get $0 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 6480 - call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - i32.load offset=4 - local.set $6 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $7 - loop $for-loop|011 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + call $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> + call $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> + call $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> + call $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> + call $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> + call $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> + call $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> + call $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> + call $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> + call $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> + call $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> + call $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> + i32.const 10 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.set $0 + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $5 + i32.const 0 + f32.const 400 + call $~lib/typedarray/Float32Array#__set + local.get $5 + i32.const 1 + f32.const nan:0x400000 + call $~lib/typedarray/Float32Array#__set + local.get $5 + i32.const 2 + f32.const inf + call $~lib/typedarray/Float32Array#__set + i32.const 4 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + i32.const 0 + i64.const -10 + call $~lib/typedarray/Int64Array#__set local.get $1 - local.get $7 - i32.lt_s - if - local.get $6 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_u - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $2 - local.get $4 - i32.load - call_indirect (type $i32_i32_i32_=>_none) - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|011 - end - end - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 6480 - call $~lib/rt/pure/__release - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 6304 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 - i32.const 6304 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 2 - i32.const 6304 - i32.const 2 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 6512 - call $~lib/typedarray/Int32Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 6304 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.const 6304 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2 - i32.const 6304 - i32.const 2 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 6544 - call $~lib/typedarray/Int32Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 6304 - i32.const 0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 1 - i32.const 6304 - i32.const 1 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 2 - i32.const 6304 - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 6576 - call $~lib/typedarray/Int64Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 6304 - i32.const 0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i32.const 6304 - i32.const 1 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 2 - i32.const 6304 - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 6608 - call $~lib/typedarray/Int64Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $5 - call $~lib/rt/pure/__retain - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 6304 - i32.const 0 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 1 - i32.const 6304 - i32.const 1 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 2 - i32.const 6304 - i32.const 2 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - i32.const 0 - local.set $1 - local.get $0 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 6640 - call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - i32.load offset=4 - local.set $6 - local.get $2 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $7 - loop $for-loop|012 + i32.const 1 + i64.const 100 + call $~lib/typedarray/Int64Array#__set local.get $1 - local.get $7 - i32.lt_s - if - local.get $6 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $2 - local.get $4 - i32.load - call_indirect (type $f32_i32_i32_=>_none) - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|012 - end - end - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 6640 - call $~lib/rt/pure/__release - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $5 - call $~lib/rt/pure/__retain - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 6304 - i32.const 0 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - i32.const 6304 - i32.const 1 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - i32.const 6304 - i32.const 2 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - i32.const 0 - local.set $1 - local.get $0 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 6672 - call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - i32.load offset=4 - local.set $6 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $7 - loop $for-loop|013 + i32.const 2 + i64.const 10 + call $~lib/typedarray/Int64Array#__set local.get $1 + i32.const 3 + i64.const 300 + call $~lib/typedarray/Int64Array#__set + i32.const 2 + call $~lib/typedarray/Int32Array#constructor + local.tee $7 + i32.const 0 + i32.const 300 + call $~lib/typedarray/Int32Array#__set local.get $7 - i32.lt_s - if - local.get $6 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $2 - local.get $4 - i32.load - call_indirect (type $f64_i32_i32_=>_none) - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|013 - end - end - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 6672 - call $~lib/rt/pure/__release - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - call $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> - i32.const 1 - call $~lib/typedarray/Float64Array#constructor - local.tee $2 - i32.const 0 - f64.const nan:0x8000000000000 - call $~lib/typedarray/Float64Array#__set - local.get $2 - f64.const nan:0x8000000000000 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if + i32.const 1 + i32.const -1 + call $~lib/typedarray/Int32Array#__set i32.const 0 - i32.const 1360 - i32.const 607 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $0 - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - local.get $2 + local.set $2 + local.get $5 call $~lib/rt/pure/__retain - local.tee $1 + local.set $6 + local.get $0 + call $~lib/rt/pure/__retain + local.set $3 + local.get $6 + call $~lib/rt/pure/__retain + local.tee $4 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u - local.tee $3 - i32.const 0 - i32.le_u i32.const 1 + i32.add + local.get $3 + i32.load offset=8 + i32.gt_s + br_if $folding-inner18 local.get $3 - select - if - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - br $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - end - local.get $1 i32.load offset=4 - local.set $4 - loop $while-continue|0 - local.get $0 - local.get $3 + i32.const 1 + i32.add + local.set $9 + local.get $4 + i32.load offset=4 + local.set $10 + local.get $4 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $11 + loop $for-loop|026 + local.get $2 + local.get $11 i32.lt_s if - i32.const 1 - local.get $4 - local.get $0 - i32.const 3 - i32.shl + local.get $2 + local.get $9 i32.add - f64.load - local.tee $10 local.get $10 - f64.ne - local.get $10 - f64.const nan:0x8000000000000 - f64.eq - select - if - local.get $1 - call $~lib/rt/pure/__release - i32.const 1 - br $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $2 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $12 + local.get $12 + f32.sub + f32.const 0 + f32.eq + if (result i32) + f32.const 0 + f32.const 255 + local.get $12 + f32.min + f32.max + i32.trunc_f32_u + else + i32.const 0 end - local.get $0 + i32.store8 + local.get $2 i32.const 1 i32.add - local.set $0 - br $while-continue|0 + local.set $2 + br $for-loop|026 end end + local.get $4 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $0 local.get $1 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> + i32.const 0 + local.set $2 + local.get $7 + call $~lib/rt/pure/__retain + local.set $6 + local.get $0 + call $~lib/rt/pure/__retain + local.set $3 + local.get $6 + call $~lib/rt/pure/__retain + local.tee $4 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 8 + i32.add + local.get $3 + i32.load offset=8 + i32.gt_s + br_if $folding-inner18 + local.get $3 + i32.load offset=4 + i32.const 8 + i32.add + local.set $9 + local.get $4 + i32.load offset=4 + local.set $10 + local.get $4 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $11 + loop $for-loop|027 + local.get $2 + local.get $11 + i32.lt_s + if + local.get $2 + local.get $9 + i32.add + local.get $10 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $8 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $8 + i32.const 255 + local.get $8 + i32.sub + i32.const 31 + i32.shr_s + i32.or + i32.and + i32.store8 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|027 + end + end + local.get $4 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $0 + i32.const 10 i32.const 0 - end - i32.eqz - if + i32.const 63 + i32.const 12960 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + i32.const 4 + call $~lib/typedarray/Uint32Array#constructor + local.tee $2 i32.const 0 - i32.const 1360 - i32.const 608 + i32.const 1 + call $~lib/typedarray/Uint32Array#__set + local.get $2 + i32.const 1 + i32.const 300 + call $~lib/typedarray/Uint32Array#__set + local.get $2 + i32.const 2 + i32.const 100 + call $~lib/typedarray/Uint32Array#__set + local.get $2 i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - call $~lib/typedarray/Float32Array#constructor - local.tee $3 - i32.const 0 - f32.const nan:0x400000 - call $~lib/typedarray/Float32Array#__set - local.get $3 - f32.const nan:0x400000 - i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne - if + i32.const -1 + call $~lib/typedarray/Uint32Array#__set + i32.const 4 + call $~lib/typedarray/Int16Array#constructor + local.tee $3 i32.const 0 - i32.const 1360 - i32.const 613 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $0 - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) + i32.const -10 + call $~lib/typedarray/Int16Array#__set + local.get $3 + i32.const 1 + i32.const 100 + call $~lib/typedarray/Int16Array#__set + local.get $3 + i32.const 2 + i32.const 10 + call $~lib/typedarray/Int16Array#__set local.get $3 + i32.const 3 + i32.const 300 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $4 + local.get $2 call $~lib/rt/pure/__retain - local.tee $1 + local.set $9 + local.get $0 + call $~lib/rt/pure/__retain + local.set $6 + local.get $9 + call $~lib/rt/pure/__retain + local.tee $8 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $4 - i32.const 0 - i32.le_u - i32.const 1 - local.get $4 - select - if - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - br $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - end - local.get $1 + local.get $6 + i32.load offset=8 + i32.gt_s + br_if $folding-inner18 + local.get $6 i32.load offset=4 - local.set $5 - loop $while-continue|014 - local.get $0 + local.set $11 + local.get $8 + i32.load offset=4 + local.set $14 + local.get $8 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $15 + loop $for-loop|028 local.get $4 + local.get $15 i32.lt_s if - i32.const 1 - local.get $5 - local.get $0 + local.get $4 + local.get $11 + i32.add + i32.const 255 + local.get $14 + local.get $4 i32.const 2 i32.shl i32.add - f32.load - local.tee $9 - local.get $9 - f32.ne - local.get $9 - f32.const nan:0x400000 - f32.eq + i32.load + local.tee $16 + local.get $16 + i32.const 255 + i32.gt_u select - if - local.get $1 - call $~lib/rt/pure/__release - i32.const 1 - br $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - end - local.get $0 + i32.store8 + local.get $4 i32.const 1 i32.add - local.set $0 - br $while-continue|014 + local.set $4 + br $for-loop|028 end end - local.get $1 + local.get $8 call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release + local.get $0 + local.get $3 + i32.const 5 + call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> + local.get $0 + i32.const 10 i32.const 0 + i32.const 63 + i32.const 12992 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $4 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + return end - i32.eqz - if - i32.const 0 - i32.const 1360 - i32.const 614 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Int8Array#__set - local.get $0 - call $~lib/typedarray/Int8Array#join - local.tee $2 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/typedarray/Int8Array#join - local.tee $3 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - call $~lib/typedarray/Uint8Array#join - local.tee $2 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/typedarray/Uint8Array#join - local.tee $3 - local.get $3 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - call $~lib/typedarray/Uint8Array#join - local.tee $2 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/typedarray/Uint8Array#join - local.tee $3 - local.get $3 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Int16Array#__set - local.get $0 - call $~lib/typedarray/Int16Array#join - local.tee $2 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/typedarray/Int16Array#join - local.tee $3 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - call $~lib/typedarray/Uint16Array#join - local.tee $2 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/typedarray/Uint16Array#join - local.tee $3 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Int32Array#__set - local.get $0 - call $~lib/typedarray/Int32Array#join - local.tee $2 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/typedarray/Int32Array#join - local.tee $3 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - call $~lib/typedarray/Uint32Array#join - local.tee $2 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/typedarray/Uint32Array#join - local.tee $3 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 3 - i64.const 4 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 4 - i64.const 5 - call $~lib/typedarray/Int64Array#__set - local.get $0 - call $~lib/typedarray/Int64Array#join - local.tee $2 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/typedarray/Int64Array#join - local.tee $3 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 3 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 4 - i64.const 5 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - call $~lib/typedarray/Uint64Array#join - local.tee $2 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/typedarray/Uint64Array#join - local.tee $3 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - f32.const 1 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 1 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 2 - f32.const 3 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 3 - f32.const 4 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 4 - f32.const 5 - call $~lib/typedarray/Float32Array#__set - local.get $0 - call $~lib/typedarray/Float32Array#join - local.tee $2 - i32.const 8480 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner14 - local.get $0 - call $~lib/typedarray/Float32Array#join - local.tee $3 - i32.const 8480 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner15 - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 3 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - f64.const 5 - call $~lib/typedarray/Float64Array#__set - local.get $0 - call $~lib/typedarray/Float64Array#join - local.tee $2 - i32.const 8480 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner14 - local.get $0 - call $~lib/typedarray/Float64Array#join - local.tee $3 - i32.const 8480 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner15 - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $0 - i32.const 2 - global.set $~argumentsLength - local.get $0 - i32.const 0 - call $~lib/typedarray/Uint8Array.wrap@varargs - local.tee $2 - i32.load offset=8 - if - i32.const 0 - i32.const 1360 - i32.const 691 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 2 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $0 - call $~lib/rt/pure/__release - i32.const 2 - global.set $~argumentsLength - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint8Array.wrap@varargs - local.set $0 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - i32.load offset=8 - if - i32.const 0 - i32.const 1360 - i32.const 695 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - call $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> - call $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> - call $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> - call $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> - call $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> - call $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> - call $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> - call $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> - call $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> - call $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> - call $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> - call $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> - i32.const 10 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.set $0 - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $4 - i32.const 0 - f32.const 400 - call $~lib/typedarray/Float32Array#__set - local.get $4 - i32.const 1 - f32.const nan:0x400000 - call $~lib/typedarray/Float32Array#__set - local.get $4 - i32.const 2 - f32.const inf - call $~lib/typedarray/Float32Array#__set - i32.const 4 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - i32.const 0 - i64.const -10 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 1 - i64.const 100 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 2 - i64.const 10 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 3 - i64.const 300 - call $~lib/typedarray/Int64Array#__set - i32.const 2 - call $~lib/typedarray/Int32Array#constructor - local.tee $5 - i32.const 0 - i32.const 300 - call $~lib/typedarray/Int32Array#__set - local.get $5 - i32.const 1 - i32.const -1 - call $~lib/typedarray/Int32Array#__set - local.get $0 - local.get $4 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> - local.get $0 - local.get $1 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> - local.get $0 - local.get $5 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 63 - i32.const 12960 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - i32.const 4 - call $~lib/typedarray/Uint32Array#constructor - local.tee $2 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__set - local.get $2 - i32.const 1 - i32.const 300 - call $~lib/typedarray/Uint32Array#__set - local.get $2 - i32.const 2 - i32.const 100 - call $~lib/typedarray/Uint32Array#__set - local.get $2 - i32.const 3 - i32.const -1 - call $~lib/typedarray/Uint32Array#__set - i32.const 4 - call $~lib/typedarray/Int16Array#constructor - local.tee $3 i32.const 0 - i32.const -10 - call $~lib/typedarray/Int16Array#__set - local.get $3 - i32.const 1 - i32.const 100 - call $~lib/typedarray/Int16Array#__set - local.get $3 - i32.const 2 - i32.const 10 - call $~lib/typedarray/Int16Array#__set - local.get $3 + i32.const 1360 + i32.const 323 i32.const 3 - i32.const 300 - call $~lib/typedarray/Int16Array#__set - local.get $0 - local.get $2 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint32Array> - local.get $0 - local.get $3 - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 63 - i32.const 12992 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - return + call $~lib/builtins/abort + unreachable end i32.const 0 i32.const 1360 - i32.const 323 + i32.const 344 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 344 + i32.const 365 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 365 + i32.const 366 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 366 + i32.const 367 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 367 + i32.const 415 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 415 + i32.const 417 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 417 + i32.const 438 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 438 + i32.const 440 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 440 + i32.const 461 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 461 + i32.const 463 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 463 + i32.const 495 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 495 - i32.const 3 + i32.const 626 + i32.const 5 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 626 + i32.const 627 i32.const 5 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 627 + i32.const 629 i32.const 5 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 629 + i32.const 630 i32.const 5 call $~lib/builtins/abort unreachable end - i32.const 0 - i32.const 1360 - i32.const 630 - i32.const 5 + i32.const 1424 + i32.const 1488 + i32.const 1775 + i32.const 47 call $~lib/builtins/abort unreachable ) @@ -36331,8 +35896,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1232 diff --git a/tests/compiler/typeof.optimized.wat b/tests/compiler/typeof.optimized.wat index a789d4c5eb..773adad5a8 100644 --- a/tests/compiler/typeof.optimized.wat +++ b/tests/compiler/typeof.optimized.wat @@ -2,7 +2,6 @@ (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "\0c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00n\00u\00m\00b\00e\00r") @@ -17,84 +16,10 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.eq @@ -124,10 +49,82 @@ i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $0 + local.tee $3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if + local.get $3 + i32.load16_u + local.tee $2 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $2 + local.get $4 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz return end diff --git a/tests/compiler/wasi/abort.optimized.wat b/tests/compiler/wasi/abort.optimized.wat index b2971607ce..cc182b1549 100644 --- a/tests/compiler/wasi/abort.optimized.wat +++ b/tests/compiler/wasi/abort.optimized.wat @@ -231,11 +231,10 @@ (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) i32.const 3 local.set $2 i32.const 4 - local.set $0 + local.set $1 i32.const 0 i32.const 12 i32.store @@ -251,51 +250,51 @@ call $~lib/string/String.UTF8.encodeUnsafe i32.const 19 i32.add - local.tee $1 + local.tee $0 i32.const 544106784 i32.store - local.get $1 + local.get $0 i32.const 4 i32.add - local.tee $1 + local.tee $0 i32.const 1104 i32.const 1100 i32.load i32.const 1 i32.shr_u - local.get $1 + local.get $0 call $~lib/string/String.UTF8.encodeUnsafe i32.add - local.tee $1 + local.tee $0 i32.const 40 i32.store8 i32.const 4 call $~lib/util/number/decimalCount32 - local.tee $4 - local.get $1 + local.tee $3 + local.get $0 i32.const 1 i32.add i32.add - local.set $3 + local.set $0 loop $do-continue|0 local.get $0 - i32.const 10 - i32.div_u - local.get $3 i32.const 1 i32.sub - local.tee $3 - local.get $0 + local.tee $0 + local.get $1 i32.const 10 i32.rem_u i32.const 48 i32.add i32.store8 - local.tee $0 + local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end + local.get $0 local.get $3 - local.get $4 i32.add local.tee $0 i32.const 58 @@ -307,32 +306,32 @@ i32.const 1 i32.add i32.add - local.set $3 + local.set $0 loop $do-continue|1 - local.get $2 - i32.const 10 - i32.div_u - local.get $3 + local.get $0 i32.const 1 i32.sub - local.tee $3 + local.tee $0 local.get $2 i32.const 10 i32.rem_u i32.const 48 i32.add i32.store8 + local.get $2 + i32.const 10 + i32.div_u local.tee $2 br_if $do-continue|1 end + local.get $0 local.get $1 - local.get $3 i32.add - local.tee $2 + local.tee $0 i32.const 2601 i32.store16 i32.const 4 - local.get $2 + local.get $0 i32.const -10 i32.add i32.store diff --git a/tests/compiler/wasi/seed.optimized.wat b/tests/compiler/wasi/seed.optimized.wat index 049af36062..91dcb1f29d 100644 --- a/tests/compiler/wasi/seed.optimized.wat +++ b/tests/compiler/wasi/seed.optimized.wat @@ -294,11 +294,10 @@ (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) i32.const 5 - local.set $1 + local.set $2 i32.const 1399 - local.set $0 + local.set $1 i32.const 0 i32.const 12 i32.store @@ -315,73 +314,73 @@ call $~lib/string/String.UTF8.encodeUnsafe i32.const 23 i32.add - local.tee $2 + local.tee $0 i32.const 40 i32.store8 i32.const 1399 call $~lib/util/number/decimalCount32 - local.tee $4 - local.get $2 + local.tee $3 + local.get $0 i32.const 1 i32.add i32.add - local.set $3 + local.set $0 loop $do-continue|0 local.get $0 - i32.const 10 - i32.div_u - local.get $3 i32.const 1 i32.sub - local.tee $3 - local.get $0 + local.tee $0 + local.get $1 i32.const 10 i32.rem_u i32.const 48 i32.add i32.store8 - local.tee $0 + local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end + local.get $0 local.get $3 - local.get $4 i32.add local.tee $0 i32.const 58 i32.store8 i32.const 5 call $~lib/util/number/decimalCount32 - local.tee $2 + local.tee $1 local.get $0 i32.const 1 i32.add i32.add - local.set $3 + local.set $0 loop $do-continue|1 - local.get $1 - i32.const 10 - i32.div_u - local.get $3 + local.get $0 i32.const 1 i32.sub - local.tee $3 - local.get $1 + local.tee $0 + local.get $2 i32.const 10 i32.rem_u i32.const 48 i32.add i32.store8 - local.tee $1 + local.get $2 + i32.const 10 + i32.div_u + local.tee $2 br_if $do-continue|1 end - local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.add - local.tee $1 + local.tee $0 i32.const 2601 i32.store16 i32.const 4 - local.get $1 + local.get $0 i32.const -10 i32.add i32.store diff --git a/tests/compiler/wasi/trace.optimized.wat b/tests/compiler/wasi/trace.optimized.wat index 84c73a941b..63cdde691b 100644 --- a/tests/compiler/wasi/trace.optimized.wat +++ b/tests/compiler/wasi/trace.optimized.wat @@ -5,7 +5,6 @@ (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_=>_none (func (param i32))) (type $i32_f64_f64_f64_f64_f64_=>_none (func (param i32 f64 f64 f64 f64 f64))) - (type $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i32_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) @@ -27,87 +26,6 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/string/String.UTF8.byteLength (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 1056 - local.set $0 - i32.const 1052 - i32.load - i32.const 1056 - i32.add - local.set $2 - loop $while-continue|0 - local.get $0 - local.get $2 - i32.lt_u - if - local.get $0 - i32.load16_u - local.tee $3 - i32.const 128 - i32.lt_u - if (result i32) - local.get $1 - i32.const 1 - i32.add - else - local.get $3 - i32.const 2048 - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.add - else - local.get $2 - local.get $0 - i32.const 2 - i32.add - i32.gt_u - i32.const 0 - local.get $3 - i32.const 64512 - i32.and - i32.const 55296 - i32.eq - select - if - local.get $0 - i32.load16_u offset=2 - i32.const 64512 - i32.and - i32.const 56320 - i32.eq - if - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - br $while-continue|0 - end - end - local.get $1 - i32.const 3 - i32.add - end - end - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - br $while-continue|0 - end - end - local.get $1 - ) (func $~lib/string/String.UTF8.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -881,16 +799,7 @@ end ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i32.const 10 - i32.rem_u - local.set $3 - local.get $1 - i32.const 10 - i32.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -899,11 +808,16 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end ) @@ -1505,11 +1419,10 @@ (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) i32.const 3 - local.set $1 + local.set $2 i32.const 89 - local.set $0 + local.set $1 i32.const 0 i32.const 12 i32.store @@ -1528,73 +1441,73 @@ call $~lib/string/String.UTF8.encodeUnsafe i32.const 23 i32.add - local.tee $2 + local.tee $0 i32.const 40 i32.store8 i32.const 89 call $~lib/util/number/decimalCount32 - local.tee $4 - local.get $2 + local.tee $3 + local.get $0 i32.const 1 i32.add i32.add - local.set $3 + local.set $0 loop $do-continue|0 local.get $0 - i32.const 10 - i32.div_u - local.get $3 i32.const 1 i32.sub - local.tee $3 - local.get $0 + local.tee $0 + local.get $1 i32.const 10 i32.rem_u i32.const 48 i32.add i32.store8 - local.tee $0 + local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end + local.get $0 local.get $3 - local.get $4 i32.add local.tee $0 i32.const 58 i32.store8 i32.const 3 call $~lib/util/number/decimalCount32 - local.tee $2 + local.tee $1 local.get $0 i32.const 1 i32.add i32.add - local.set $3 + local.set $0 loop $do-continue|1 - local.get $1 - i32.const 10 - i32.div_u - local.get $3 + local.get $0 i32.const 1 i32.sub - local.tee $3 - local.get $1 + local.tee $0 + local.get $2 i32.const 10 i32.rem_u i32.const 48 i32.add i32.store8 - local.tee $1 + local.get $2 + i32.const 10 + i32.div_u + local.tee $2 br_if $do-continue|1 end - local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.add - local.tee $1 + local.tee $0 i32.const 2601 i32.store16 i32.const 4 - local.get $1 + local.get $0 i32.const -10 i32.add i32.store @@ -1614,8 +1527,81 @@ (local $9 i32) (local $10 i32) (local $11 i32) - call $~lib/string/String.UTF8.byteLength - local.tee $7 + i32.const 1056 + local.set $6 + i32.const 1052 + i32.load + i32.const 1056 + i32.add + local.set $8 + loop $while-continue|0 + local.get $6 + local.get $8 + i32.lt_u + if + local.get $6 + i32.load16_u + local.tee $9 + i32.const 128 + i32.lt_u + if (result i32) + local.get $7 + i32.const 1 + i32.add + else + local.get $9 + i32.const 2048 + i32.lt_u + if (result i32) + local.get $7 + i32.const 2 + i32.add + else + local.get $8 + local.get $6 + i32.const 2 + i32.add + i32.gt_u + i32.const 0 + local.get $9 + i32.const 64512 + i32.and + i32.const 55296 + i32.eq + select + if + local.get $6 + i32.load16_u offset=2 + i32.const 64512 + i32.and + i32.const 56320 + i32.eq + if + local.get $7 + i32.const 4 + i32.add + local.set $7 + local.get $6 + i32.const 4 + i32.add + local.set $6 + br $while-continue|0 + end + end + local.get $7 + i32.const 3 + i32.add + end + end + local.set $7 + local.get $6 + i32.const 2 + i32.add + local.set $6 + br $while-continue|0 + end + end + local.get $7 i32.const 56 local.get $7 i32.const 56 diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 01d4fdf079..5124a6f33a 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -1,8 +1,8 @@ (module (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -651,85 +651,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - memory.size - local.tee $0 - i32.const 1 - i32.lt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1264 - i32.const 0 - i32.store - i32.const 2832 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1264 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1264 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1264 - i32.const 2836 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1264 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -929,14 +850,87 @@ end local.get $1 ) - (func $while/Ref#constructor (result i32) + (func $~lib/rt/pure/__new (result i32) (local $0 i32) (local $1 i32) - (local $2 i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if - call $~lib/rt/tlsf/initialize + memory.size + local.tee $1 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1264 + i32.const 0 + i32.store + i32.const 2832 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 1264 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $1 + local.get $0 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1264 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 1264 + i32.const 2836 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1264 + global.set $~lib/rt/tlsf/ROOT end global.get $~lib/rt/tlsf/ROOT call $~lib/rt/tlsf/allocateBlock @@ -960,7 +954,11 @@ local.get $1 i32.const 16 i32.add - local.tee $0 + ) + (func $~lib/rt/pure/__retain (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 i32.const 1264 i32.gt_u if @@ -1021,7 +1019,6 @@ (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) i32.const 0 global.set $while/ran i32.const 10 @@ -1087,10 +1084,10 @@ local.set $0 local.get $1 if (result i32) - local.get $3 + local.get $2 i32.const 1 i32.add - local.tee $3 + local.tee $2 else i32.const 0 end @@ -1107,7 +1104,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 1 i32.ne if @@ -1122,16 +1119,18 @@ global.set $while/ran i32.const 0 global.set $while/ran - loop $while-continue|01 - local.get $2 + i32.const 0 + local.set $0 + loop $while-continue|001 + local.get $0 i32.const 1 i32.add - local.tee $2 + local.tee $0 i32.const 10 i32.ne - br_if $while-continue|01 + br_if $while-continue|001 end - local.get $2 + local.get $0 i32.const 10 i32.ne if @@ -1145,17 +1144,17 @@ i32.const 1 global.set $while/ran i32.const 0 - local.set $2 - loop $while-continue|002 - local.get $2 + local.set $0 + loop $while-continue|01 + local.get $0 i32.const 1 i32.add - local.tee $2 + local.tee $0 i32.const 10 i32.ne - br_if $while-continue|002 + br_if $while-continue|01 end - local.get $2 + local.get $0 i32.const 10 i32.ne if @@ -1181,18 +1180,18 @@ i32.const 0 global.set $while/ran i32.const 10 - local.set $2 - loop $while-continue|013 - local.get $2 + local.set $0 + loop $while-continue|02 + local.get $0 if - local.get $2 + local.get $0 i32.const 1 i32.sub - local.set $2 - br $while-continue|013 + local.set $0 + br $while-continue|02 end end - local.get $2 + local.get $0 if i32.const 0 i32.const 1056 @@ -1209,7 +1208,7 @@ local.set $0 i32.const 10 local.set $1 - loop $while-continue|04 + loop $while-continue|03 local.get $0 if loop $while-continue|1 @@ -1226,7 +1225,7 @@ i32.const 1 i32.sub local.set $0 - br $while-continue|04 + br $while-continue|03 end end local.get $0 @@ -1253,9 +1252,10 @@ global.set $while/ran i32.const 0 local.set $2 - call $while/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.set $0 - loop $while-continue|05 + loop $while-continue|04 local.get $0 if local.get $2 @@ -1273,14 +1273,15 @@ call $~lib/rt/pure/__release end else - call $while/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.set $1 local.get $0 call $~lib/rt/pure/__release end local.get $1 local.set $0 - br $while-continue|05 + br $while-continue|04 end end local.get $2 @@ -1321,11 +1322,13 @@ global.set $while/ran i32.const 0 local.set $2 - call $while/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.set $0 - loop $while-continue|06 + loop $while-continue|05 block $while-break|0 - call $while/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.tee $1 call $~lib/rt/pure/__release local.get $1 @@ -1346,7 +1349,7 @@ local.set $0 br $while-break|0 end - br $while-continue|06 + br $while-continue|05 end end end @@ -1387,30 +1390,30 @@ i32.const 0 global.set $while/ran i32.const 0 - local.set $2 - loop $while-continue|02 - local.get $2 + local.set $0 + loop $while-continue|046 + local.get $0 i32.const 1 i32.add - local.tee $2 + local.tee $0 i32.const 1 i32.lt_s - br_if $while-continue|02 + br_if $while-continue|046 end i32.const 1 global.set $while/ran i32.const 0 global.set $while/ran i32.const 0 - local.set $2 - loop $while-continue|03 - local.get $2 + local.set $0 + loop $while-continue|057 + local.get $0 i32.const 1 i32.add - local.tee $2 + local.tee $0 i32.const 1 i32.lt_s - br_if $while-continue|03 + br_if $while-continue|057 end i32.const 1 global.set $while/ran @@ -1492,8 +1495,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1168 From d67b27762bbcb452c622ec6d6aafb73f8a82e5f0 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Mon, 9 Nov 2020 16:27:40 +0200 Subject: [PATCH 8/8] update --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3593e4fa81..87113a8375 100644 --- a/package-lock.json +++ b/package-lock.json @@ -713,9 +713,9 @@ "optional": true }, "binaryen": { - "version": "98.0.0-nightly.20201105", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-98.0.0-nightly.20201105.tgz", - "integrity": "sha512-Km/GltRKVqln2BxvU5R9i0XfRw9naKUye8qnM3kcArA2YXJq87rYswmoNdz+ap0QSFPfhbWxIvWDEcfCNo+Ifw==" + "version": "98.0.0-nightly.20201109", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-98.0.0-nightly.20201109.tgz", + "integrity": "sha512-iRarAqdH5lMWlMBzrDuJgLYJR2g4QXk93iYE2zpr6gEZkb/jCgDpPUXdhuN11Ge1zZ/6By4DwA1mmifcx7FWaw==" }, "bluebird": { "version": "3.7.2", diff --git a/package.json b/package.json index 12fd10c38a..0b96eed1a7 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "98.0.0-nightly.20201105", + "binaryen": "98.0.0-nightly.20201109", "long": "^4.0.0", "source-map-support": "^0.5.19", "ts-node": "^6.2.0"