From ecd4ce210fb4b14ab63d490adb9168619e806171 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Thu, 7 May 2020 13:35:52 +0300 Subject: [PATCH 1/3] remove all inlines --- std/assembly/atomics.ts | 23 - std/assembly/date.ts | 4 +- std/assembly/map.ts | 2 - std/assembly/math.ts | 77 +- std/assembly/memory.ts | 2 - std/assembly/rt/tlsf.ts | 24 +- std/assembly/set.ts | 4 - std/assembly/string.ts | 2 - std/assembly/typedarray.ts | 38 - std/assembly/util/casemap.ts | 2 - std/assembly/util/hash.ts | 3 +- std/assembly/util/math.ts | 52 - std/assembly/util/memory.ts | 6 - std/assembly/util/number.ts | 18 - std/assembly/util/sort.ts | 4 - std/assembly/util/string.ts | 30 - tests/compiler/binary.untouched.wat | 3349 ++- tests/compiler/class.untouched.wat | 397 +- tests/compiler/do.optimized.wat | 309 +- tests/compiler/do.untouched.wat | 514 +- .../extends-baseaggregate.optimized.wat | 911 +- .../extends-baseaggregate.untouched.wat | 1322 +- tests/compiler/for.optimized.wat | 309 +- tests/compiler/for.untouched.wat | 514 +- .../implicit-getter-setter.optimized.wat | 468 +- .../implicit-getter-setter.untouched.wat | 514 +- tests/compiler/infer-array.optimized.wat | 272 +- tests/compiler/infer-array.untouched.wat | 387 +- tests/compiler/issues/1095.optimized.wat | 307 +- tests/compiler/issues/1095.untouched.wat | 514 +- tests/compiler/managed-cast.optimized.wat | 300 +- tests/compiler/managed-cast.untouched.wat | 514 +- tests/compiler/number.optimized.wat | 960 +- tests/compiler/number.untouched.wat | 1455 +- tests/compiler/object-literal.optimized.wat | 784 +- tests/compiler/object-literal.untouched.wat | 901 +- tests/compiler/rc/global-init.untouched.wat | 256 +- tests/compiler/rc/local-init.optimized.wat | 309 +- tests/compiler/rc/local-init.untouched.wat | 516 +- .../rc/logical-and-mismatch.optimized.wat | 309 +- .../rc/logical-and-mismatch.untouched.wat | 516 +- .../rc/logical-or-mismatch.optimized.wat | 309 +- .../rc/logical-or-mismatch.untouched.wat | 516 +- tests/compiler/rc/optimize.optimized.wat | 310 +- tests/compiler/rc/optimize.untouched.wat | 518 +- tests/compiler/rc/rereturn.optimized.wat | 466 +- tests/compiler/rc/rereturn.untouched.wat | 514 +- .../rc/ternary-mismatch.optimized.wat | 309 +- .../rc/ternary-mismatch.untouched.wat | 516 +- tests/compiler/resolve-access.optimized.wat | 291 +- tests/compiler/resolve-access.untouched.wat | 452 +- tests/compiler/resolve-binary.optimized.wat | 949 +- tests/compiler/resolve-binary.untouched.wat | 3751 ++- .../resolve-elementaccess.optimized.wat | 1966 +- .../resolve-elementaccess.untouched.wat | 2536 +- .../resolve-function-expression.optimized.wat | 151 +- .../resolve-function-expression.untouched.wat | 27 +- .../resolve-propertyaccess.optimized.wat | 44 +- .../resolve-propertyaccess.untouched.wat | 27 +- tests/compiler/resolve-ternary.optimized.wat | 1606 +- tests/compiler/resolve-ternary.untouched.wat | 2035 +- tests/compiler/resolve-unary.optimized.wat | 44 +- tests/compiler/resolve-unary.untouched.wat | 27 +- .../retain-release-sanity.optimized.wat | 989 +- .../retain-release-sanity.untouched.wat | 1324 +- tests/compiler/retain-return.optimized.wat | 311 +- tests/compiler/retain-return.untouched.wat | 514 +- tests/compiler/rt/stub-realloc.optimized.wat | 272 +- tests/compiler/rt/stub-realloc.untouched.wat | 385 +- tests/compiler/runtime-full.optimized.wat | 466 +- tests/compiler/runtime-full.untouched.wat | 516 +- .../compiler/std/array-literal.optimized.wat | 466 +- .../compiler/std/array-literal.untouched.wat | 901 +- tests/compiler/std/array.optimized.wat | 3365 ++- tests/compiler/std/array.untouched.wat | 3675 +-- tests/compiler/std/arraybuffer.optimized.wat | 1099 +- tests/compiler/std/arraybuffer.untouched.wat | 1300 +- tests/compiler/std/dataview.optimized.wat | 464 +- tests/compiler/std/dataview.untouched.wat | 911 +- tests/compiler/std/date.optimized.wat | 34 +- tests/compiler/std/date.untouched.wat | 82 +- tests/compiler/std/hash.optimized.wat | 12 +- tests/compiler/std/hash.untouched.wat | 412 +- tests/compiler/std/map.optimized.wat | 2235 +- tests/compiler/std/map.untouched.wat | 5303 ++-- tests/compiler/std/math.optimized.wat | 3979 +-- tests/compiler/std/math.untouched.wat | 11790 +++----- .../std/operator-overloading.untouched.wat | 1764 +- tests/compiler/std/pointer.optimized.wat | 254 +- tests/compiler/std/pointer.untouched.wat | 782 +- tests/compiler/std/set.optimized.wat | 1793 +- tests/compiler/std/set.untouched.wat | 3634 +-- tests/compiler/std/static-array.optimized.wat | 586 +- tests/compiler/std/static-array.untouched.wat | 802 +- tests/compiler/std/staticarray.optimized.wat | 784 +- tests/compiler/std/staticarray.untouched.wat | 901 +- .../std/string-casemapping.optimized.wat | 1345 +- .../std/string-casemapping.untouched.wat | 1769 +- .../std/string-encoding.optimized.wat | 603 +- .../std/string-encoding.untouched.wat | 941 +- tests/compiler/std/string.optimized.wat | 3819 ++- tests/compiler/std/string.untouched.wat | 9047 +++--- tests/compiler/std/symbol.optimized.wat | 712 +- tests/compiler/std/symbol.untouched.wat | 1269 +- tests/compiler/std/typedarray.optimized.wat | 13840 +++++---- tests/compiler/std/typedarray.untouched.wat | 23725 ++++++++-------- tests/compiler/wasi/seed.optimized.wat | 4 +- tests/compiler/wasi/seed.untouched.wat | 2 +- tests/compiler/wasi/trace.optimized.wat | 1584 +- tests/compiler/wasi/trace.untouched.wat | 1432 +- tests/compiler/while.optimized.wat | 309 +- tests/compiler/while.untouched.wat | 514 +- 112 files changed, 66599 insertions(+), 80983 deletions(-) diff --git a/std/assembly/atomics.ts b/std/assembly/atomics.ts index d506624706..076e384d0c 100644 --- a/std/assembly/atomics.ts +++ b/std/assembly/atomics.ts @@ -2,9 +2,6 @@ import { ArrayBufferView } from "./arraybuffer"; import { E_INDEXOUTOFRANGE } from "./util/error"; export namespace Atomics { - - // @ts-ignore: decorator - @inline export function load(array: T, index: i32): valueof { if (index < 0 || (index << alignof>()) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE); return atomic.load>( @@ -12,8 +9,6 @@ export namespace Atomics { ); } - // @ts-ignore: decorator - @inline export function store(array: T, index: i32, value: valueof): void { if (index < 0 || (index << alignof>()) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE); atomic.store>( @@ -22,8 +17,6 @@ export namespace Atomics { ); } - // @ts-ignore: decorator - @inline export function add(array: T, index: i32, value: valueof): valueof { if (index < 0 || (index << alignof>()) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE); return atomic.add>( @@ -32,8 +25,6 @@ export namespace Atomics { ); } - // @ts-ignore: decorator - @inline export function sub(array: T, index: i32, value: valueof): valueof { if (index < 0 || (index << alignof>()) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE); return atomic.sub>( @@ -42,8 +33,6 @@ export namespace Atomics { ); } - // @ts-ignore: decorator - @inline export function and(array: T, index: i32, value: valueof): valueof { if (index < 0 || (index << alignof>()) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE); return atomic.and>( @@ -52,8 +41,6 @@ export namespace Atomics { ); } - // @ts-ignore: decorator - @inline export function or(array: T, index: i32, value: valueof): valueof { if (index < 0 || (index << alignof>()) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE); return atomic.or>( @@ -62,8 +49,6 @@ export namespace Atomics { ); } - // @ts-ignore: decorator - @inline export function xor(array: T, index: i32, value: valueof): valueof { if (index < 0 || (index << alignof>()) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE); return atomic.xor>( @@ -72,8 +57,6 @@ export namespace Atomics { ); } - // @ts-ignore: decorator - @inline export function exchange(array: T, index: i32, value: valueof): valueof { if (index < 0 || (index << alignof>()) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE); return atomic.xchg>( @@ -82,8 +65,6 @@ export namespace Atomics { ); } - // @ts-ignore: decorator - @inline export function compareExchange( array: T, index: i32, @@ -98,14 +79,10 @@ export namespace Atomics { ); } - // @ts-ignore: decorator - @inline export function wait(array: T, value: valueof, timeout: i64 = -1): AtomicWaitResult { return atomic.wait>(changetype(array.buffer) + array.byteOffset, value, timeout); } - // @ts-ignore: decorator - @inline export function notify(array: T, index: i32, count: i32 = -1): i32 { if (index < 0 || (index << alignof>()) >= array.byteLength) throw new RangeError(E_INDEXOUTOFRANGE); return atomic.notify(changetype(array.buffer) + (index << alignof>()) + array.byteOffset, count); diff --git a/std/assembly/date.ts b/std/assembly/date.ts index b2e7eff65e..ac46f932f7 100644 --- a/std/assembly/date.ts +++ b/std/assembly/date.ts @@ -5,7 +5,7 @@ import { export class Date { - @inline static UTC( + static UTC( year: i32, month: i32 = 0, day: i32 = 1, @@ -17,7 +17,7 @@ export class Date { return Date_UTC(year, month, day, hour, minute, second, millisecond); } - @inline static now(): i64 { + static now(): i64 { return Date_now(); } diff --git a/std/assembly/map.ts b/std/assembly/map.ts index 0e82f9f96c..3e98eac034 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -44,7 +44,6 @@ const BUCKET_SIZE = sizeof(); /** Computes the alignment of an entry. */ // @ts-ignore: decorator -@inline function ENTRY_ALIGN(): usize { // can align to 4 instead of 8 if 32-bit and K/V is <= 32-bits const maxkv = sizeof() > sizeof() ? sizeof() : sizeof(); @@ -54,7 +53,6 @@ function ENTRY_ALIGN(): usize { /** Computes the aligned size of an entry. */ // @ts-ignore: decorator -@inline function ENTRY_SIZE(): usize { const align = ENTRY_ALIGN(); const size = (offsetof>() + align) & ~align; diff --git a/std/assembly/math.ts b/std/assembly/math.ts index d2645c48ef..bfd1931737 100644 --- a/std/assembly/math.ts +++ b/std/assembly/math.ts @@ -65,8 +65,6 @@ function R(z: f64): f64 { // Rational approximation of (asin(x)-x)/x^3 } /** @internal */ -// @ts-ignore: decorator -@inline function expo2(x: f64): f64 { // exp(x)/2 for x >= log(DBL_MAX) const // see: musl/src/math/__expo2.c k = 2043, @@ -83,8 +81,6 @@ function expo2(x: f64): f64 { // exp(x)/2 for x >= log(DBL_MAX) * * Right shift 11 bits to make upper half fit in `double` */ -// @ts-ignore: decorator -@inline function pio2_right(q0: u64, q1: u64): u64 { // see: jdh8/metallic/blob/master/src/math/double/rem_pio2.c // Bits of π/4 const p0: u64 = 0xC4C6628B80DC1CD1; @@ -112,8 +108,6 @@ function pio2_right(q0: u64, q1: u64): u64 { // see: jdh8/metallic/blob/master/s } /** @internal */ -// @ts-ignore: decorator -@inline function umuldi(u: u64, v: u64): u64 { var u1: u64 , v1: u64, w0: u64, w1: u64, t: u64; @@ -189,8 +183,6 @@ function pio2_large_quot(x: f64, u: i64): i32 { // see: jdh8/metallic/blob/maste } /** @internal */ -// @ts-ignore: decorator -@inline function rempio2(x: f64, u: u64, sign: i32): i32 { const pio2_1 = reinterpret(0x3FF921FB54400000); // 1.57079632673412561417e+00 const pio2_1t = reinterpret(0x3DD0B4611A626331); // 6.07710050650619224932e-11 @@ -269,8 +261,6 @@ function rempio2(x: f64, u: u64, sign: i32): i32 { } /** @internal */ -// @ts-ignore: decorator -@inline function sin_kern(x: f64, y: f64, iy: i32): f64 { // see: musl/tree/src/math/__sin.c const S1 = reinterpret(0xBFC5555555555549); // -1.66666666666666324348e-01 const S2 = reinterpret(0x3F8111111110F8A6); // 8.33333333332248946124e-03 @@ -291,8 +281,6 @@ function sin_kern(x: f64, y: f64, iy: i32): f64 { // see: musl/tree/src/math/__s } /** @internal */ -// @ts-ignore: decorator -@inline function cos_kern(x: f64, y: f64): f64 { // see: musl/tree/src/math/__cos.c const C1 = reinterpret(0x3FA555555555554C); // 4.16666666666666019037e-02 const C2 = reinterpret(0xBF56C16C16C15177); // -1.38888888888741095749e-03 @@ -462,8 +450,7 @@ export namespace NativeMath { @lazy export var sincos_cos: f64 = 0; - // @ts-ignore: decorator - @inline export function abs(x: f64): f64 { + export function abs(x: f64): f64 { return builtin_abs(x); } @@ -714,8 +701,6 @@ export namespace NativeMath { return t; } - // @ts-ignore: decorator - @inline export function ceil(x: f64): f64 { return builtin_ceil(x); } @@ -893,14 +878,10 @@ export namespace NativeMath { return (x + y) * twopk; } - // @ts-ignore: decorator - @inline export function floor(x: f64): f64 { return builtin_floor(x); } - // @ts-ignore: decorator - @inline export function fround(x: f64): f64 { return x; } @@ -1165,14 +1146,10 @@ export namespace NativeMath { } } - // @ts-ignore: decorator - @inline export function max(value1: f64, value2: f64): f64 { return builtin_max(value1, value2); } - // @ts-ignore: decorator - @inline export function min(value1: f64, value2: f64): f64 { return builtin_min(value1, value2); } @@ -1421,14 +1398,10 @@ export namespace NativeMath { return reinterpret(r) - 1; } - // @ts-ignore: decorator - @inline export function round(x: f64): f64 { return builtin_copysign(builtin_floor(x + 0.5), x); } - // @ts-ignore: decorator - @inline export function sign(x: f64): f64 { if (ASC_SHRINK_LEVEL > 0) { return builtin_abs(x) > 0 ? builtin_copysign(1, x) : x; @@ -1437,8 +1410,6 @@ export namespace NativeMath { } } - // @ts-ignore: decorator - @inline export function signbit(x: f64): bool { // In ECMAScript all NaN values are indistinguishable from each other // so we need handle NaN and negative NaN in similar way @@ -1490,8 +1461,6 @@ export namespace NativeMath { return t; } - // @ts-ignore: decorator - @inline export function sqrt(x: f64): f64 { return builtin_sqrt(x); } @@ -1541,8 +1510,6 @@ export namespace NativeMath { return builtin_copysign(t, x); } - // @ts-ignore: decorator - @inline export function trunc(x: f64): f64 { return builtin_trunc(x); } @@ -1766,8 +1733,6 @@ function Rf(z: f32): f32 { // Rational approximation of (asin(x)-x)/x^3 return p / q; } -// @ts-ignore: decorator -@inline function expo2f(x: f32): f32 { // exp(x)/2 for x >= log(DBL_MAX) const // see: musl/src/math/__expo2f.c k = 235, @@ -1776,8 +1741,6 @@ function expo2f(x: f32): f32 { // exp(x)/2 for x >= log(DBL_MAX) return NativeMathf.exp(x - kln2) * scale * scale; } -// @ts-ignore: decorator -@inline function pio2f_large_quot(x: f32, u: i32): i32 { // see: jdh8/metallic/blob/master/src/math/float/rem_pio2f.c const coeff = reinterpret(0x3BF921FB54442D18); // π * 0x1p-65 = 8.51530395021638647334e-20 @@ -1806,8 +1769,6 @@ function pio2f_large_quot(x: f32, u: i32): i32 { // see: jdh8/metallic/blob/mast return q; } -// @ts-ignore: decorator -@inline function rempio2f(x: f32, u: u32, sign: i32): i32 { // see: jdh8/metallic/blob/master/src/math/float/rem_pio2f.c const pi2hi = reinterpret(0x3FF921FB50000000); // 1.57079631090164184570 const pi2lo = reinterpret(0x3E5110B4611A6263); // 1.58932547735281966916e-8 @@ -1824,8 +1785,6 @@ function rempio2f(x: f32, u: u32, sign: i32): i32 { // see: jdh8/metallic/blob/m } // |sin(x)/x - s(x)| < 2**-37.5 (~[-4.89e-12, 4.824e-12]). -// @ts-ignore: decorator -@inline function sin_kernf(x: f64): f32 { // see: musl/tree/src/math/__sindf.c const S1 = reinterpret(0xBFC5555554CBAC77); // -0x15555554cbac77.0p-55 const S2 = reinterpret(0x3F811110896EFBB2); // 0x111110896efbb2.0p-59 @@ -1840,8 +1799,6 @@ function sin_kernf(x: f64): f32 { // see: musl/tree/src/math/__sindf.c } // |cos(x) - c(x)| < 2**-34.1 (~[-5.37e-11, 5.295e-11]). -// @ts-ignore: decorator -@inline function cos_kernf(x: f64): f32 { // see: musl/tree/src/math/__cosdf.c const C0 = reinterpret(0xBFDFFFFFFD0C5E81); // -0x1ffffffd0c5e81.0p-54 const C1 = reinterpret(0x3FA55553E1053A42); // 0x155553e1053a42.0p-57 @@ -1855,8 +1812,6 @@ function cos_kernf(x: f64): f32 { // see: musl/tree/src/math/__cosdf.c } // |tan(x)/x - t(x)| < 2**-25.5 (~[-2e-08, 2e-08]). -// @ts-ignore: decorator -@inline function tan_kernf(x: f64, odd: i32): f32 { // see: musl/tree/src/math/__tandf.c const T0 = reinterpret(0x3FD5554D3418C99F); // 0x15554d3418c99f.0p-54 @@ -1878,8 +1833,6 @@ function tan_kernf(x: f64, odd: i32): f32 { // see: musl/tree/src/math/__tandf.c } // See: jdh8/metallic/src/math/float/log2f.c and jdh8/metallic/src/math/float/kernel/atanh.h -// @ts-ignore: decorator -@inline function log2f(x: f64): f64 { const log2e = reinterpret(0x3FF71547652B82FE), // 1.44269504088896340736 @@ -1898,8 +1851,6 @@ function log2f(x: f64): f64 { } // See: jdh8/metallic/src/math/float/exp2f.h and jdh8/metallic/blob/master/src/math/float/kernel/exp2f.h -// @ts-ignore: decorator -@inline function exp2f(x: f64): f64 { const c0 = reinterpret(0x3FE62E4302FCC24A), // 6.931471880289532425e-1 @@ -1961,8 +1912,6 @@ export namespace NativeMathf { @lazy export var sincos_cos: f32 = 0; - // @ts-ignore: decorator - @inline export function abs(x: f32): f32 { return builtin_abs(x); } @@ -2189,8 +2138,6 @@ export namespace NativeMathf { return t; } - // @ts-ignore: decorator - @inline export function ceil(x: f32): f32 { return builtin_ceil(x); } @@ -2264,8 +2211,6 @@ export namespace NativeMathf { return expo2f(x); } - // @ts-ignore: decorator - @inline export function floor(x: f32): f32 { return builtin_floor(x); } @@ -2384,8 +2329,6 @@ export namespace NativeMathf { return (x + y) * twopk; } - // @ts-ignore: decorator - @inline export function fround(x: f32): f32 { return x; } @@ -2420,8 +2363,6 @@ export namespace NativeMathf { return z * builtin_sqrt((x * x + y * y)); } - // @ts-ignore: decorator - @inline export function imul(x: f32, y: f32): f32 { /* * Wasm (MVP) and JS have different approaches for double->int conversions. @@ -2604,14 +2545,10 @@ export namespace NativeMathf { } } - // @ts-ignore: decorator - @inline export function max(value1: f32, value2: f32): f32 { return builtin_max(value1, value2); } - // @ts-ignore: decorator - @inline export function min(value1: f32, value2: f32): f32 { return builtin_min(value1, value2); } @@ -2667,8 +2604,6 @@ export namespace NativeMathf { } } - // @ts-ignore: decorator - @inline export function seedRandom(value: i64): void { NativeMath.seedRandom(value); } @@ -2688,14 +2623,10 @@ export namespace NativeMathf { return reinterpret((r >> 9) | (127 << 23)) - 1.0; } - // @ts-ignore: decorator - @inline export function round(x: f32): f32 { return builtin_copysign(builtin_floor(x + 0.5), x); } - // @ts-ignore: decorator - @inline export function sign(x: f32): f32 { if (ASC_SHRINK_LEVEL > 0) { return builtin_abs(x) > 0 ? builtin_copysign(1, x) : x; @@ -2704,8 +2635,6 @@ export namespace NativeMathf { } } - // @ts-ignore: decorator - @inline export function signbit(x: f32): bool { // @ts-ignore: type return ((reinterpret(x) >>> 31) & (x == x)); @@ -2771,8 +2700,6 @@ export namespace NativeMathf { return t; } - // @ts-ignore: decorator - @inline export function sqrt(x: f32): f32 { return builtin_sqrt(x); } @@ -2841,8 +2768,6 @@ export namespace NativeMathf { return builtin_copysign(t, x); } - // @ts-ignore: decorator - @inline export function trunc(x: f32): f32 { return builtin_trunc(x); } diff --git a/std/assembly/memory.ts b/std/assembly/memory.ts index a4111da292..b8da3f856f 100644 --- a/std/assembly/memory.ts +++ b/std/assembly/memory.ts @@ -55,8 +55,6 @@ export namespace memory { } /** Compares a section of memory to another. */ - // @ts-ignore: decorator - @inline export function compare(vl: usize, vr: usize, n: usize): i32 { return memcmp(vl, vr, n); } diff --git a/std/assembly/rt/tlsf.ts b/std/assembly/rt/tlsf.ts index 2a71356ff3..9445151d43 100644 --- a/std/assembly/rt/tlsf.ts +++ b/std/assembly/rt/tlsf.ts @@ -90,14 +90,12 @@ import { REFCOUNT_MASK } from "./pure"; // @inline const BLOCK_MAXSIZE: usize = 1 << (FL_BITS + SB_BITS - 1); // exclusive, lives in common.ts /** Gets the left block of a block. Only valid if the left block is free. */ -// @ts-ignore: decorator -@inline function GETFREELEFT(block: Block): Block { +function GETFREELEFT(block: Block): Block { return load(changetype(block) - sizeof()); } /** Gets the right block of of a block by advancing to the right by its size. */ -// @ts-ignore: decorator -@inline function GETRIGHT(block: Block): Block { +function GETRIGHT(block: Block): Block { return changetype(changetype(block) + BLOCK_OVERHEAD + (block.mmInfo & ~TAGS_MASK)); } @@ -144,8 +142,7 @@ import { REFCOUNT_MASK } from "./pure"; @lazy export var ROOT: Root; /** Gets the second level map of the specified first level. */ -// @ts-ignore: decorator -@inline function GETSL(root: Root, fl: usize): u32 { +function GETSL(root: Root, fl: usize): u32 { return load( changetype(root) + (fl << alignof()), SL_START @@ -153,8 +150,7 @@ import { REFCOUNT_MASK } from "./pure"; } /** Sets the second level map of the specified first level. */ -// @ts-ignore: decorator -@inline function SETSL(root: Root, fl: usize, slMap: u32): void { +function SETSL(root: Root, fl: usize, slMap: u32): void { store( changetype(root) + (fl << alignof()), slMap, @@ -163,8 +159,7 @@ import { REFCOUNT_MASK } from "./pure"; } /** Gets the head of the free list for the specified combination of first and second level. */ -// @ts-ignore: decorator -@inline function GETHEAD(root: Root, fl: usize, sl: u32): Block | null { +function GETHEAD(root: Root, fl: usize, sl: u32): Block | null { return load( changetype(root) + (((fl << SL_BITS) + sl) << alignof()), HL_START @@ -172,8 +167,7 @@ import { REFCOUNT_MASK } from "./pure"; } /** Sets the head of the free list for the specified combination of first and second level. */ -// @ts-ignore: decorator -@inline function SETHEAD(root: Root, fl: usize, sl: u32, head: Block | null): void { +function SETHEAD(root: Root, fl: usize, sl: u32, head: Block | null): void { store( changetype(root) + (((fl << SL_BITS) + sl) << alignof()), head, @@ -182,8 +176,7 @@ import { REFCOUNT_MASK } from "./pure"; } /** Gets the tail block.. */ -// @ts-ignore: decorator -@inline function GETTAIL(root: Root): Block { +function GETTAIL(root: Root): Block { return load( changetype(root), HL_END @@ -191,8 +184,7 @@ import { REFCOUNT_MASK } from "./pure"; } /** Sets the tail block. */ -// @ts-ignore: decorator -@inline function SETTAIL(root: Root, tail: Block): void { +function SETTAIL(root: Root, tail: Block): void { store( changetype(root), tail, diff --git a/std/assembly/set.ts b/std/assembly/set.ts index 17925f702b..e4b1143489 100644 --- a/std/assembly/set.ts +++ b/std/assembly/set.ts @@ -41,8 +41,6 @@ const EMPTY: usize = 1 << 0; const BUCKET_SIZE = sizeof(); /** Computes the alignment of an entry. */ -// @ts-ignore: decorator -@inline function ENTRY_ALIGN(): usize { // can align to 4 instead of 8 if 32-bit and K is <= 32-bits const align = (sizeof() > sizeof() ? sizeof() : sizeof()) - 1; @@ -50,8 +48,6 @@ function ENTRY_ALIGN(): usize { } /** Computes the aligned size of an entry. */ -// @ts-ignore: decorator -@inline function ENTRY_SIZE(): usize { const align = ENTRY_ALIGN(); const size = (offsetof>() + align) & ~align; diff --git a/std/assembly/string.ts b/std/assembly/string.ts index c5d245bcf1..f49f59bb07 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -237,12 +237,10 @@ import { Array } from "./array"; return changetype(out); // retains } - @inline trimLeft(): String { return this.trimStart(); } - @inline trimRight(): String { return this.trimEnd(); } diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index 947fbf917c..222e027af9 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -1412,8 +1412,6 @@ export class Float64Array extends ArrayBufferView { } } -// @ts-ignore: decorator -@inline function FILL( array: TArray, value: native, @@ -1434,8 +1432,6 @@ function FILL( return array; } -// @ts-ignore: decorator -@inline function SORT( array: TArray, comparator: (a: T, b: T) => i32 @@ -1456,8 +1452,6 @@ function SORT( return array; } -// @ts-ignore: decorator -@inline function SLICE( array: TArray, start: i32, @@ -1476,8 +1470,6 @@ function SLICE( return slice; } -// @ts-ignore: decorator -@inline function SUBARRAY( array: TArray, begin: i32, @@ -1495,8 +1487,6 @@ function SUBARRAY( return changetype(out); // retains } -// @ts-ignore: decorator -@inline function COPY_WITHIN( array: TArray, target: i32, @@ -1520,8 +1510,6 @@ function COPY_WITHIN( return array; } -// @ts-ignore: decorator -@inline function REDUCE( array: TArray, fn: (accumulator: TRet, value: T, index: i32, array: TArray) => TRet, @@ -1534,8 +1522,6 @@ function REDUCE( return initialValue; } -// @ts-ignore: decorator -@inline function REDUCE_RIGHT( array: TArray, fn: (accumulator: TRet, value: T, index: i32, array: TArray) => TRet, @@ -1548,8 +1534,6 @@ function REDUCE_RIGHT( return initialValue; } -// @ts-ignore: decorator -@inline function MAP( array: TArray, fn: (value: T, index: i32, self: TArray) => T, @@ -1572,8 +1556,6 @@ function MAP( return changetype(out); // retains } -// @ts-ignore: decorator -@inline function FILTER( array: TArray, fn: (value: T, index: i32, self: TArray) => bool, @@ -1601,8 +1583,6 @@ function FILTER( return changetype(out); // retains } -// @ts-ignore: decorator -@inline function FIND_INDEX( array: TArray, fn: (value: T, index: i32, array: TArray) => bool, @@ -1614,8 +1594,6 @@ function FIND_INDEX( return -1; } -// @ts-ignore: decorator -@inline function INCLUDES( array: TArray, searchElement: T, @@ -1639,8 +1617,6 @@ function INCLUDES( } } -// @ts-ignore: decorator -@inline function INDEX_OF( array: TArray, searchElement: T, @@ -1658,8 +1634,6 @@ function INDEX_OF( return -1; } -// @ts-ignore: decorator -@inline function LAST_INDEX_OF( array: TArray, searchElement: T, @@ -1678,8 +1652,6 @@ function LAST_INDEX_OF( return -1; } -// @ts-ignore: decorator -@inline function SOME( array: TArray, fn: (value: T, index: i32, array: TArray) => bool, @@ -1691,8 +1663,6 @@ function SOME( return false; } -// @ts-ignore: decorator -@inline function EVERY( array: TArray, fn: (value: T, index: i32, array: TArray) => bool, @@ -1705,8 +1675,6 @@ function EVERY( return true; } -// @ts-ignore: decorator -@inline function FOREACH( array: TArray, fn: (value: T, index: i32, array: TArray) => void, @@ -1717,8 +1685,6 @@ function FOREACH( } } -// @ts-ignore: decorator -@inline function REVERSE(array: TArray): TArray { var dataStart = array.dataStart; for (let front: usize = 0, back: usize = array.length - 1; front < back; ++front, --back) { @@ -1731,8 +1697,6 @@ function REVERSE(array: TArray): TArray { return array; } -// @ts-ignore: decorator -@inline function WRAP(buffer: ArrayBuffer, byteOffset: i32 = 0, length: i32 = -1): TArray { var byteLength: i32; var bufferByteLength = buffer.byteLength; @@ -1762,8 +1726,6 @@ function WRAP(buffer: ArrayBuffer, byteOffset return changetype(out); // retains } -// @ts-ignore: decorator -@inline function SET(target: TArray, source: UArray, offset: i32 = 0): void { // need to assert at compile time that U is not a reference or a function if (isReference()) { diff --git a/std/assembly/util/casemap.ts b/std/assembly/util/casemap.ts index 11bddff6a7..192238025b 100644 --- a/std/assembly/util/casemap.ts +++ b/std/assembly/util/casemap.ts @@ -436,8 +436,6 @@ const MT = memory.data([ ]); // Special binary search routine for Special Casing Tables -// @ts-ignore: decorator -@inline export function bsearch(key: u32, ptr: usize, max: i32): i32 { var min = 0; while (min <= max) { diff --git a/std/assembly/util/hash.ts b/std/assembly/util/hash.ts index 2d58d92909..5ba52e114b 100644 --- a/std/assembly/util/hash.ts +++ b/std/assembly/util/hash.ts @@ -1,5 +1,4 @@ -// @ts-ignore: decorator -@inline + export function HASH(key: T): u32 { if (isString()) { return hashStr(changetype(key)); diff --git a/std/assembly/util/math.ts b/std/assembly/util/math.ts index e345bbb7a6..3c68c1a4c9 100644 --- a/std/assembly/util/math.ts +++ b/std/assembly/util/math.ts @@ -25,8 +25,6 @@ const EXP2F_DATA_TAB = memory.data([ // ULP error: 0.502 (nearest rounding.) // Relative error: 1.69 * 2^-34 in [-1/64, 1/64] (before rounding.) // Wrong count: 168353 (all nearest rounding wrong results with fma.) -// @ts-ignore: decorator -@inline export function exp2f_lut(x: f32): f32 { const N = 1 << EXP2F_TABLE_BITS, @@ -70,8 +68,6 @@ export function exp2f_lut(x: f32): f32 { // ULP error: 0.502 (nearest rounding.) // Relative error: 1.69 * 2^-34 in [-ln2/64, ln2/64] (before rounding.) // Wrong count: 170635 (all nearest rounding wrong results with fma.) -// @ts-ignore: decorator -@inline export function expf_lut(x: f32): f32 { const N = 1 << EXP2F_TABLE_BITS, @@ -150,8 +146,6 @@ const LOG2F_DATA_TAB = memory.data([ // ULP error: 0.752 (nearest rounding.) // Relative error: 1.9 * 2^-26 (before rounding.) -// @ts-ignore: decorator -@inline export function log2f_lut(x: f32): f32 { const N_MASK = (1 << LOG2F_TABLE_BITS) - 1, @@ -233,8 +227,6 @@ const LOGF_DATA_TAB = memory.data([ // ULP error: 0.818 (nearest rounding.) // Relative error: 1.957 * 2^-26 (before rounding.) -// @ts-ignore: decorator -@inline export function logf_lut(x: f32): f32 { const N_MASK = (1 << LOGF_TABLE_BITS) - 1, @@ -288,16 +280,12 @@ export function logf_lut(x: f32): f32 { // Lookup data for powf. See: https://git.musl-libc.org/cgit/musl/tree/src/math/powf.c // -// @ts-ignore: decorator -@inline function zeroinfnanf(ux: u32): bool { return (ux << 1) - 1 >= (0x7f800000 << 1) - 1; } // Returns 0 if not int, 1 if odd int, 2 if even int. The argument is // the bit representation of a non-zero finite floating-point value. -// @ts-ignore: decorator -@inline function checkintf(iy: u32): i32 { var e = iy >> 23 & 0xFF; if (e < 0x7F ) return 0; @@ -310,8 +298,6 @@ function checkintf(iy: u32): i32 { // Subnormal input is normalized so ix has negative biased exponent. // Output is multiplied by N (POWF_SCALE) if TOINT_INTRINICS is set. -// @ts-ignore: decorator -@inline function log2f_inline(ux: u32): f64 { const N_MASK = (1 << LOG2F_TABLE_BITS) - 1; @@ -354,8 +340,6 @@ function log2f_inline(ux: u32): f64 { // The output of log2 and thus the input of exp2 is either scaled by N // (in case of fast toint intrinsics) or not. The unscaled xd must be // in [-1021,1023], sign_bias sets the sign of the result. -// @ts-ignore: decorator -@inline function exp2f_inline(xd: f64, signBias: u32): f32 { const N = 1 << EXP2F_TABLE_BITS, @@ -384,26 +368,18 @@ function exp2f_inline(xd: f64, signBias: u32): f32 { return y; } -// @ts-ignore: decorator -@inline function xflowf(sign: u32, y: f32): f32 { return select(-y, y, sign) * y; } -// @ts-ignore: decorator -@inline function oflowf(sign: u32): f32 { return xflowf(sign, reinterpret(0x70000000)); // 0x1p97f } -// @ts-ignore: decorator -@inline function uflowf(sign: u32): f32 { return xflowf(sign, reinterpret(0x10000000)); // 0x1p-95f } -// @ts-ignore: decorator -@inline export function powf_lut(x: f32, y: f32): f32 { const Ox1p23f = reinterpret(0x4B000000), // 0x1p23f @@ -604,8 +580,6 @@ const EXP_DATA_TAB = memory.data([ // a double. (int32_t)KI is the k used in the argument reduction and exponent // adjustment of scale, positive k here means the result may overflow and // negative k means the result may underflow. -// @ts-ignore: decorator -@inline function specialcase(tmp: f64, sbits: u64, ki: u64): f64 { const Ox1p_1022 = reinterpret(0x0010000000000000), // 0x1p-1022 @@ -639,8 +613,6 @@ function specialcase(tmp: f64, sbits: u64, ki: u64): f64 { return y * Ox1p_1022; } -// @ts-ignore: decorator -@inline export function exp_lut(x: f64): f64 { const N = 1 << EXP_TABLE_BITS, @@ -720,8 +692,6 @@ export function exp_lut(x: f64): f64 { // a double. (int32_t)KI is the k used in the argument reduction and exponent // adjustment of scale, positive k here means the result may overflow and // negative k means the result may underflow. -// @ts-ignore: decorator -@inline function specialcase2(tmp: f64, sbits: u64, ki: u64): f64 { const Ox1p_1022 = reinterpret(0x10000000000000); // 0x1p-1022 var scale: f64; @@ -749,8 +719,6 @@ function specialcase2(tmp: f64, sbits: u64, ki: u64): f64 { return y * Ox1p_1022; } -// @ts-ignore: decorator -@inline export function exp2_lut(x: f64): f64 { const N = 1 << EXP_TABLE_BITS, @@ -978,8 +946,6 @@ const LOG2_DATA_TAB2 = memory.data([ reinterpret(0x3FF5DFFFEBFC3481), reinterpret(0xBC9180902E30E93E) ]); -// @ts-ignore: decorator -@inline export function log2_lut(x: f64): f64 { const N_MASK = (1 << LOG2_TABLE_BITS) - 1; @@ -1394,8 +1360,6 @@ const LOG_DATA_TAB2 = memory.data([ reinterpret(0x3FF5EFFFE7B87A89), reinterpret(0xBC947EB780ED6904) ]); -// @ts-ignore: decorator -@inline export function log_lut(x: f64): f64 { const N_MASK = (1 << LOG_TABLE_BITS) - 1; @@ -1665,8 +1629,6 @@ const POW_LOG_DATA_TAB = memory.data([ // Returns 0 if not int, 1 if odd int, 2 if even int. The argument is // the bit representation of a non-zero finite floating-point value. -// @ts-ignore: decorator -@inline function checkint(iy: u64): i32 { var e = iy >> 52 & 0x7FF; if (e < 0x3FF ) return 0; @@ -1677,27 +1639,19 @@ function checkint(iy: u64): i32 { return 2; } -// @ts-ignore: decorator -@inline function xflow(sign: u32, y: f64): f64 { return select(-y, y, sign) * y; } -// @ts-ignore: decorator -@inline function uflow(sign: u32): f64 { return xflow(sign, reinterpret(0x1000000000000000)); // 0x1p-767 } -// @ts-ignore: decorator -@inline function oflow(sign: u32): f64 { return xflow(sign, reinterpret(0x7000000000000000)); // 0x1p769 } // Returns 1 if input is the bit representation of 0, infinity or nan. -// @ts-ignore: decorator -@inline function zeroinfnan(u: u64): bool { return (u << 1) - 1 >= 0xFFE0000000000000 - 1; } @@ -1709,8 +1663,6 @@ var log_tail: f64 = 0; // Compute y+TAIL = log(x) where the rounded result is y and TAIL has about // additional 15 bits precision. IX is the bit representation of x, but // normalized in the subnormal range using the sign bit for the exponent. -// @ts-ignore: decorator -@inline function log_inline(ix: u64): f64 { const N = 1 << POW_LOG_TABLE_BITS; const N_MASK = N - 1; @@ -1784,8 +1736,6 @@ const SIGN_BIAS = 0x800 << EXP_TABLE_BITS; // Computes sign*exp(x+xtail) where |xtail| < 2^-8/N and |xtail| <= |x|. // The sign_bias argument is SIGN_BIAS or 0 and sets the sign to -1 or 1. -// @ts-ignore: decorator -@inline function exp_inline(x: f64, xtail: f64, sign_bias: u32): f64 { const N = 1 << EXP_TABLE_BITS; const N_MASK = N - 1; @@ -1865,8 +1815,6 @@ function exp_inline(x: f64, xtail: f64, sign_bias: u32): f64 { return scale + scale * tmp; } -// @ts-ignore: decorator -@inline export function pow_lut(x: f64, y: f64): f64 { const Ox1p52 = reinterpret(0x4330000000000000); // 0x1p52 diff --git a/std/assembly/util/memory.ts b/std/assembly/util/memory.ts index d5daa5f526..e08aa56c34 100644 --- a/std/assembly/util/memory.ts +++ b/std/assembly/util/memory.ts @@ -141,8 +141,6 @@ export function memcpy(dest: usize, src: usize, n: usize): void { // see: musl/s } } -// @ts-ignore: decorator -@inline export function memmove(dest: usize, src: usize, n: usize): void { // see: musl/src/string/memmove.c if (dest === src) return; if (ASC_SHRINK_LEVEL < 1) { @@ -190,8 +188,6 @@ export function memmove(dest: usize, src: usize, n: usize): void { // see: musl/ } } -// @ts-ignore: decorator -@inline export function memset(dest: usize, c: u8, n: usize): void { // see: musl/src/string/memset if (ASC_SHRINK_LEVEL > 1) { while (n) { @@ -259,8 +255,6 @@ export function memset(dest: usize, c: u8, n: usize): void { // see: musl/src/st } } -// @ts-ignore: decorator -@inline export function memcmp(vl: usize, vr: usize, n: usize): i32 { if (vl == vr) return 0; if (ASC_SHRINK_LEVEL < 2) { diff --git a/std/assembly/util/number.ts b/std/assembly/util/number.ts index b306fbd6c0..3f84fee2b7 100644 --- a/std/assembly/util/number.ts +++ b/std/assembly/util/number.ts @@ -216,8 +216,6 @@ function utoa_simple(buffer: usize, num: T, offset: usize): vo } while (num); } -// @ts-ignore: decorator -@inline export function utoa32_core(buffer: usize, num: u32, offset: u32): void { if (ASC_SHRINK_LEVEL >= 1) { utoa_simple(buffer, num, offset); @@ -226,8 +224,6 @@ export function utoa32_core(buffer: usize, num: u32, offset: u32): void { } } -// @ts-ignore: decorator -@inline export function utoa64_core(buffer: usize, num: u64, offset: u32): void { if (ASC_SHRINK_LEVEL >= 1) { utoa_simple(buffer, num, offset); @@ -343,8 +339,6 @@ var _frc_pow: u64 = 0; @lazy var _exp_pow: i32 = 0; -// @ts-ignore: decorator -@inline function umul64f(u: u64, v: u64): u64 { var u0 = u & 0xFFFFFFFF; var v0 = v & 0xFFFFFFFF; @@ -364,14 +358,10 @@ function umul64f(u: u64, v: u64): u64 { return u1 * v1 + t + w; } -// @ts-ignore: decorator -@inline function umul64e(e1: i32, e2: i32): i32 { return e1 + e2 + 64; // where 64 is significand size } -// @ts-ignore: decorator -@inline function normalizedBoundaries(f: u64, e: i32): void { var frc = (f << 1) + 1; var exp = e - 1; @@ -386,8 +376,6 @@ function normalizedBoundaries(f: u64, e: i32): void { _exp = exp; } -// @ts-ignore: decorator -@inline function grisuRound(buffer: usize, len: i32, delta: u64, rest: u64, ten_kappa: u64, wp_w: u64): void { var lastp = buffer + ((len - 1) << 1); var digit = load(lastp); @@ -404,8 +392,6 @@ function grisuRound(buffer: usize, len: i32, delta: u64, rest: u64, ten_kappa: u store(lastp, digit); } -// @ts-ignore: decorator -@inline function getCachedPower(minExp: i32): void { const c = reinterpret(0x3FD34413509F79FE); // 1 / lg(10) = 0.30102999566398114 var dk = (-61 - minExp) * c + 347; // dk must be positive, so can do ceiling in positive @@ -418,8 +404,6 @@ function getCachedPower(minExp: i32): void { _exp_pow = load(EXP_POWERS + (index << alignof())); } -// @ts-ignore: decorator -@inline function grisu2(value: f64, buffer: usize, sign: i32): i32 { // frexp routine @@ -511,8 +495,6 @@ function genDigits(buffer: usize, w_frc: u64, w_exp: i32, mp_frc: u64, mp_exp: i } } -// @ts-ignore: decorator -@inline function genExponent(buffer: usize, k: i32): i32 { var sign = k < 0; if (sign) k = -k; diff --git a/std/assembly/util/sort.ts b/std/assembly/util/sort.ts index 3ab895b259..48a242a8a9 100644 --- a/std/assembly/util/sort.ts +++ b/std/assembly/util/sort.ts @@ -1,7 +1,5 @@ import { compareImpl } from "./string"; -// @ts-ignore: decorator -@inline export function COMPARATOR(): (a: T, b: T) => i32 { if (isInteger()) { if (isSigned() && sizeof() <= 4) { @@ -42,8 +40,6 @@ export function COMPARATOR(): (a: T, b: T) => i32 { } } -// @ts-ignore: decorator -@inline export function SORT( dataStart: usize, length: i32, diff --git a/std/assembly/util/string.ts b/std/assembly/util/string.ts index 157a5d3f73..122681efdb 100644 --- a/std/assembly/util/string.ts +++ b/std/assembly/util/string.ts @@ -494,20 +494,14 @@ export const enum CharCode { z = 0x7A } -// @ts-ignore: decorator -@inline export function isAscii(c: u32): bool { return !(c >> 7); } -// @ts-ignore: decorator -@inline export function isLower8(c: u32): bool { return c - CharCode.a < 26; } -// @ts-ignore: decorator -@inline export function isUpper8(c: u32): bool { return c - CharCode.A < 26; } @@ -541,22 +535,16 @@ export function isAlpha(c: u32): bool { return c < 0x2FFFE; } -// @ts-ignore: decorator -@inline export function isCased(c: u32): bool { // @ts-ignore: cast return c < 0x1F18A && stagedBinaryLookup(CASED, c); } -// @ts-ignore: decorator -@inline export function isCaseIgnorable(c: u32): bool { // @ts-ignore: cast return c < 0xE01F0 && stagedBinaryLookup(CASE_IGNORABLES, c); } -// @ts-ignore: decorator -@inline export function isFinalSigma(buffer: usize, index: isize, len: isize): bool { const lookaheadLimit = 30; // max lookahead limit var found = false; @@ -592,8 +580,6 @@ export function isFinalSigma(buffer: usize, index: isize, len: isize): bool { return true; } -// @ts-ignore: decorator -@inline function codePointBefore(buffer: usize, index: isize): i32 { if (index <= 0) return -1; var c = load(buffer + (index - 1 << 1)); @@ -634,8 +620,6 @@ export function compareImpl(str1: string, index1: usize, str2: string, index2: u return 0; } -// @ts-ignore: decorator -@inline export function toLower8(c: u32): u32 { if (ASC_SHRINK_LEVEL > 0) { return c | u32(isUpper8(c)) << 5; @@ -644,8 +628,6 @@ export function toLower8(c: u32): u32 { } } -// @ts-ignore: decorator -@inline export function toUpper8(c: u32): u32 { if (ASC_SHRINK_LEVEL > 0) { return c & ~(u32(isLower8(c)) << 5); @@ -1005,8 +987,6 @@ export function joinReferenceArray(dataStart: usize, length: i32, separator: return result; } -// @ts-ignore: decorator -@inline function scientific(significand: u64, exp: i32): f64 { if (!significand || exp < -342) return 0; if (exp > 308) return Infinity; @@ -1032,8 +1012,6 @@ function scientific(significand: u64, exp: i32): f64 { // Adopted from metallic lib: // https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h -// @ts-ignore: decorator -@inline function scaledown(significand: u64, exp: i32): f64 { const denom: u64 = 6103515625; // 1e14 * 0x1p-14 const scale = reinterpret(0x3F06849B86A12B9B); // 1e-14 * 0x1p32 @@ -1061,8 +1039,6 @@ function scaledown(significand: u64, exp: i32): f64 { // Adopted from metallic lib: // https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h -// @ts-ignore: decorator -@inline function scaleup(significand: u64, exp: i32): f64 { const coeff: u32 = 1220703125; // 1e13 * 0x1p-13; var shift = ctz(significand); @@ -1080,8 +1056,6 @@ function scaleup(significand: u64, exp: i32): f64 { // Adopted from metallic lib: // https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h -// @ts-ignore: decorator -@inline function parseExp(ptr: usize, len: i32): i32 { var sign = 1, magnitude = 0; var code = load(ptr); @@ -1117,8 +1091,6 @@ var __fixmulShift: u64 = 0; // Adopted from metallic lib: // https://github.com/jdh8/metallic/blob/master/src/stdlib/parse/scientific.h -// @ts-ignore: decorator -@inline function fixmul(a: u64, b: u32): u64 { var low = (a & 0xFFFFFFFF) * b; var high = (a >> 32) * b + (low >> 32); @@ -1129,8 +1101,6 @@ function fixmul(a: u64, b: u32): u64 { return (high << space | (low & 0xFFFFFFFF) >> revspace) + (low << space >> 31 & 1); } -// @ts-ignore: decorator -@inline function pow10(n: i32): f64 { // argument `n` should bounds in [0, 22] range return load(POWERS10 + (n << alignof())); diff --git a/tests/compiler/binary.untouched.wat b/tests/compiler/binary.untouched.wat index 75abfb6ac0..d7c2d8da91 100644 --- a/tests/compiler/binary.untouched.wat +++ b/tests/compiler/binary.untouched.wat @@ -1,7 +1,17 @@ (module - (type $none_=>_none (func)) (type $f32_f32_=>_f32 (func (param f32 f32) (result f32))) + (type $i32_=>_f64 (func (param i32) (result f64))) (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) + (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i64_=>_i32 (func (param i64) (result i32))) + (type $i32_=>_f32 (func (param i32) (result f32))) + (type $i32_f32_=>_f32 (func (param i32 f32) (result f32))) + (type $f64_i32_=>_f32 (func (param f64 i32) (result f32))) + (type $i32_f64_=>_f64 (func (param i32 f64) (result f64))) + (type $i64_=>_f64 (func (param i64) (result f64))) + (type $f64_i64_i64_=>_f64 (func (param f64 i64 i64) (result f64))) + (type $f64_f64_i32_=>_f64 (func (param f64 f64 i32) (result f64))) (memory $0 1) (data (i32.const 8) "\00\00\00\00\00\a0\f6?\00\00\00\00\00\00\00\00\00\c8\b9\f2\82,\d6\bf\80V7($\b4\fa<\00\00\00\00\00\80\f6?\00\00\00\00\00\00\00\00\00\08X\bf\bd\d1\d5\bf \f7\e0\d8\08\a5\1c\bd\00\00\00\00\00`\f6?\00\00\00\00\00\00\00\00\00XE\17wv\d5\bfmP\b6\d5\a4b#\bd\00\00\00\00\00@\f6?\00\00\00\00\00\00\00\00\00\f8-\87\ad\1a\d5\bf\d5g\b0\9e\e4\84\e6\bc\00\00\00\00\00 \f6?\00\00\00\00\00\00\00\00\00xw\95_\be\d4\bf\e0>)\93i\1b\04\bd\00\00\00\00\00\00\f6?\00\00\00\00\00\00\00\00\00`\1c\c2\8ba\d4\bf\cc\84LH/\d8\13=\00\00\00\00\00\e0\f5?\00\00\00\00\00\00\00\00\00\a8\86\860\04\d4\bf:\0b\82\ed\f3B\dc<\00\00\00\00\00\c0\f5?\00\00\00\00\00\00\00\00\00HiUL\a6\d3\bf`\94Q\86\c6\b1 =\00\00\00\00\00\a0\f5?\00\00\00\00\00\00\00\00\00\80\98\9a\ddG\d3\bf\92\80\c5\d4MY%=\00\00\00\00\00\80\f5?\00\00\00\00\00\00\00\00\00 \e1\ba\e2\e8\d2\bf\d8+\b7\99\1e{&=\00\00\00\00\00`\f5?\00\00\00\00\00\00\00\00\00\88\de\13Z\89\d2\bf?\b0\cf\b6\14\ca\15=\00\00\00\00\00`\f5?\00\00\00\00\00\00\00\00\00\88\de\13Z\89\d2\bf?\b0\cf\b6\14\ca\15=\00\00\00\00\00@\f5?\00\00\00\00\00\00\00\00\00x\cf\fbA)\d2\bfv\daS($Z\16\bd\00\00\00\00\00 \f5?\00\00\00\00\00\00\00\00\00\98i\c1\98\c8\d1\bf\04T\e7h\bc\af\1f\bd\00\00\00\00\00\00\f5?\00\00\00\00\00\00\00\00\00\a8\ab\ab\\g\d1\bf\f0\a8\823\c6\1f\1f=\00\00\00\00\00\e0\f4?\00\00\00\00\00\00\00\00\00H\ae\f9\8b\05\d1\bffZ\05\fd\c4\a8&\bd\00\00\00\00\00\c0\f4?\00\00\00\00\00\00\00\00\00\90s\e2$\a3\d0\bf\0e\03\f4~\eek\0c\bd\00\00\00\00\00\a0\f4?\00\00\00\00\00\00\00\00\00\d0\b4\94%@\d0\bf\7f-\f4\9e\b86\f0\bc\00\00\00\00\00\a0\f4?\00\00\00\00\00\00\00\00\00\d0\b4\94%@\d0\bf\7f-\f4\9e\b86\f0\bc\00\00\00\00\00\80\f4?\00\00\00\00\00\00\00\00\00@^m\18\b9\cf\bf\87<\99\ab*W\0d=\00\00\00\00\00`\f4?\00\00\00\00\00\00\00\00\00`\dc\cb\ad\f0\ce\bf$\af\86\9c\b7&+=\00\00\00\00\00@\f4?\00\00\00\00\00\00\00\00\00\f0*n\07\'\ce\bf\10\ff?TO/\17\bd\00\00\00\00\00 \f4?\00\00\00\00\00\00\00\00\00\c0Ok!\\\cd\bf\1bh\ca\bb\91\ba!=\00\00\00\00\00\00\f4?\00\00\00\00\00\00\00\00\00\a0\9a\c7\f7\8f\cc\bf4\84\9fhOy\'=\00\00\00\00\00\00\f4?\00\00\00\00\00\00\00\00\00\a0\9a\c7\f7\8f\cc\bf4\84\9fhOy\'=\00\00\00\00\00\e0\f3?\00\00\00\00\00\00\00\00\00\90-t\86\c2\cb\bf\8f\b7\8b1\b0N\19=\00\00\00\00\00\c0\f3?\00\00\00\00\00\00\00\00\00\c0\80N\c9\f3\ca\bff\90\cd?cN\ba<\00\00\00\00\00\a0\f3?\00\00\00\00\00\00\00\00\00\b0\e2\1f\bc#\ca\bf\ea\c1F\dcd\8c%\bd\00\00\00\00\00\a0\f3?\00\00\00\00\00\00\00\00\00\b0\e2\1f\bc#\ca\bf\ea\c1F\dcd\8c%\bd\00\00\00\00\00\80\f3?\00\00\00\00\00\00\00\00\00P\f4\9cZR\c9\bf\e3\d4\c1\04\d9\d1*\bd\00\00\00\00\00`\f3?\00\00\00\00\00\00\00\00\00\d0 e\a0\7f\c8\bf\t\fa\db\7f\bf\bd+=\00\00\00\00\00@\f3?\00\00\00\00\00\00\00\00\00\e0\10\02\89\ab\c7\bfXJSr\90\db+=\00\00\00\00\00@\f3?\00\00\00\00\00\00\00\00\00\e0\10\02\89\ab\c7\bfXJSr\90\db+=\00\00\00\00\00 \f3?\00\00\00\00\00\00\00\00\00\d0\19\e7\0f\d6\c6\bff\e2\b2\a3j\e4\10\bd\00\00\00\00\00\00\f3?\00\00\00\00\00\00\00\00\00\90\a7p0\ff\c5\bf9P\10\9fC\9e\1e\bd\00\00\00\00\00\00\f3?\00\00\00\00\00\00\00\00\00\90\a7p0\ff\c5\bf9P\10\9fC\9e\1e\bd\00\00\00\00\00\e0\f2?\00\00\00\00\00\00\00\00\00\b0\a1\e3\e5&\c5\bf\8f[\07\90\8b\de \bd\00\00\00\00\00\c0\f2?\00\00\00\00\00\00\00\00\00\80\cbl+M\c4\bf\11\0e\bd\00\00\00\00\00\e0\ed?\00\00\00\00\00\00\00\00\00`F\d1;\97\b1?\9b\9e\0dV]2%\bd\00\00\00\00\00\a0\ed?\00\00\00\00\00\00\00\00\00\e0\d1\a7\f5\bd\b3?\d7N\db\a5^\c8,=\00\00\00\00\00`\ed?\00\00\00\00\00\00\00\00\00\a0\97MZ\e9\b5?\1e\1d]<\06i,\bd\00\00\00\00\00@\ed?\00\00\00\00\00\00\00\00\00\c0\ea\n\d3\00\b7?2\ed\9d\a9\8d\1e\ec<\00\00\00\00\00\00\ed?\00\00\00\00\00\00\00\00\00@Y]^3\b9?\daG\bd:\\\11#=\00\00\00\00\00\c0\ec?\00\00\00\00\00\00\00\00\00`\ad\8d\c8j\bb?\e5h\f7+\80\90\13\bd\00\00\00\00\00\a0\ec?\00\00\00\00\00\00\00\00\00@\bc\01X\88\bc?\d3\acZ\c6\d1F&=\00\00\00\00\00`\ec?\00\00\00\00\00\00\00\00\00 \n\839\c7\be?\e0E\e6\afh\c0-\bd\00\00\00\00\00@\ec?\00\00\00\00\00\00\00\00\00\e0\db9\91\e8\bf?\fd\n\a1O\d64%\bd\00\00\00\00\00\00\ec?\00\00\00\00\00\00\00\00\00\e0\'\82\8e\17\c1?\f2\07-\cex\ef!=\00\00\00\00\00\e0\eb?\00\00\00\00\00\00\00\00\00\f0#~+\aa\c1?4\998D\8e\a7,=\00\00\00\00\00\a0\eb?\00\00\00\00\00\00\00\00\00\80\86\0ca\d1\c2?\a1\b4\81\cbl\9d\03=\00\00\00\00\00\80\eb?\00\00\00\00\00\00\00\00\00\90\15\b0\fce\c3?\89rK#\a8/\c6<\00\00\00\00\00@\eb?\00\00\00\00\00\00\00\00\00\b03\83=\91\c4?x\b6\fdTy\83%=\00\00\00\00\00 \eb?\00\00\00\00\00\00\00\00\00\b0\a1\e4\e5\'\c5?\c7}i\e5\e83&=\00\00\00\00\00\e0\ea?\00\00\00\00\00\00\00\00\00\10\8c\beNW\c6?x.<,\8b\cf\19=\00\00\00\00\00\c0\ea?\00\00\00\00\00\00\00\00\00pu\8b\12\f0\c6?\e1!\9c\e5\8d\11%\bd\00\00\00\00\00\a0\ea?\00\00\00\00\00\00\00\00\00PD\85\8d\89\c7?\05C\91p\10f\1c\bd\00\00\00\00\00`\ea?\00\00\00\00\00\00\00\00\00\009\eb\af\be\c8?\d1,\e9\aaT=\07\bd\00\00\00\00\00@\ea?\00\00\00\00\00\00\00\00\00\00\f7\dcZZ\c9?o\ff\a0X(\f2\07=\00\00\00\00\00\00\ea?\00\00\00\00\00\00\00\00\00\e0\8a<\ed\93\ca?i!VPCr(\bd\00\00\00\00\00\e0\e9?\00\00\00\00\00\00\00\00\00\d0[W\d81\cb?\aa\e1\acN\8d5\0c\bd\00\00\00\00\00\c0\e9?\00\00\00\00\00\00\00\00\00\e0;8\87\d0\cb?\b6\12TY\c4K-\bd\00\00\00\00\00\a0\e9?\00\00\00\00\00\00\00\00\00\10\f0\c6\fbo\cc?\d2+\96\c5r\ec\f1\bc\00\00\00\00\00`\e9?\00\00\00\00\00\00\00\00\00\90\d4\b0=\b1\cd?5\b0\15\f7*\ff*\bd\00\00\00\00\00@\e9?\00\00\00\00\00\00\00\00\00\10\e7\ff\0eS\ce?0\f4A`\'\12\c2<\00\00\00\00\00 \e9?\00\00\00\00\00\00\00\00\00\00\dd\e4\ad\f5\ce?\11\8e\bbe\15!\ca\bc\00\00\00\00\00\00\e9?\00\00\00\00\00\00\00\00\00\b0\b3l\1c\99\cf?0\df\0c\ca\ec\cb\1b=\00\00\00\00\00\c0\e8?\00\00\00\00\00\00\00\00\00XM`8q\d0?\91N\ed\16\db\9c\f8<\00\00\00\00\00\a0\e8?\00\00\00\00\00\00\00\00\00`ag-\c4\d0?\e9\ea<\16\8b\18\'=\00\00\00\00\00\80\e8?\00\00\00\00\00\00\00\00\00\e8\'\82\8e\17\d1?\1c\f0\a5c\0e!,\bd\00\00\00\00\00`\e8?\00\00\00\00\00\00\00\00\00\f8\ac\cb\\k\d1?\81\16\a5\f7\cd\9a+=\00\00\00\00\00@\e8?\00\00\00\00\00\00\00\00\00hZc\99\bf\d1?\b7\bdGQ\ed\a6,=\00\00\00\00\00 \e8?\00\00\00\00\00\00\00\00\00\b8\0emE\14\d2?\ea\baF\ba\de\87\n=\00\00\00\00\00\e0\e7?\00\00\00\00\00\00\00\00\00\90\dc|\f0\be\d2?\f4\04PJ\fa\9c*=\00\00\00\00\00\c0\e7?\00\00\00\00\00\00\00\00\00`\d3\e1\f1\14\d3?\b8\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\\\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\"PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\n\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\"4\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\n\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\tf\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\t^\cb\9c\90T\'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\t\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\"CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?\'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\n\e15\d2m<##\e3\19c\c8\ee?c\"b\"\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<\'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?") @@ -17,20 +27,86 @@ (global $binary/F (mut f64) (f64.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/math/NativeMath.pow (param $0 f64) (param $1 f64) (result f64) - (local $2 f64) - (local $3 f64) - (local $4 i32) - (local $5 i64) - (local $6 i64) - (local $7 i64) - (local $8 i64) - (local $9 i64) + (func $~lib/util/math/zeroinfnan (param $0 i64) (result i32) + local.get $0 + i64.const 1 + i64.shl + i64.const 1 + i64.sub + i64.const -9007199254740992 + i64.const 1 + i64.sub + i64.ge_u + ) + (func $~lib/util/math/checkint (param $0 i64) (result i32) + (local $1 i64) + local.get $0 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + local.set $1 + local.get $1 + i64.const 1023 + i64.lt_u + if + i32.const 0 + return + end + local.get $1 + i64.const 1023 + i64.const 52 + i64.add + i64.gt_u + if + i32.const 2 + return + end + i64.const 1 + i64.const 1023 + i64.const 52 + i64.add + local.get $1 + i64.sub + i64.shl + local.set $1 + local.get $0 + local.get $1 + i64.const 1 + i64.sub + i64.and + i64.const 0 + i64.ne + if + i32.const 0 + return + end + local.get $0 + local.get $1 + i64.and + i64.const 0 + i64.ne + if + i32.const 1 + return + end + i32.const 2 + ) + (func $~lib/util/math/log_inline (param $0 i64) (result f64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + (local $4 i64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) (local $10 f64) - (local $11 i64) - (local $12 i32) - (local $13 i64) - (local $14 i64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) (local $15 f64) (local $16 f64) (local $17 f64) @@ -46,1229 +122,1590 @@ (local $27 f64) (local $28 f64) (local $29 f64) - (local $30 f64) - (local $31 f64) - (local $32 f64) - (local $33 f64) - (local $34 f64) - (local $35 f64) - (local $36 f64) - (local $37 f64) - (local $38 f64) - (local $39 i32) - (local $40 i32) - (local $41 i32) - (local $42 i32) - (local $43 i64) - (local $44 i64) + local.get $0 + i64.const 4604531861337669632 + i64.sub + local.set $1 local.get $1 - f64.abs - f64.const 2 - f64.le + i64.const 52 + i64.const 7 + i64.sub + i64.shr_u + i64.const 127 + i64.and + i32.wrap_i64 + local.set $2 + local.get $1 + i64.const 52 + i64.shr_s + local.set $3 + local.get $0 + local.get $1 + i64.const 4095 + i64.const 52 + i64.shl + i64.and + i64.sub + local.set $4 + local.get $4 + f64.reinterpret_i64 + local.set $5 + local.get $3 + f64.convert_i64_s + local.set $6 + i32.const 8 + local.get $2 + i32.const 2 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load + local.set $7 + i32.const 8 + local.get $2 + i32.const 2 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load offset=16 + local.set $8 + i32.const 8 + local.get $2 + i32.const 2 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load offset=24 + local.set $9 + local.get $4 + i64.const 2147483648 + i64.add + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.set $10 + local.get $5 + local.get $10 + f64.sub + local.set $11 + local.get $10 + local.get $7 + f64.mul + f64.const 1 + f64.sub + local.set $12 + local.get $11 + local.get $7 + f64.mul + local.set $13 + local.get $12 + local.get $13 + f64.add + local.set $14 + local.get $6 + f64.const 0.6931471805598903 + f64.mul + local.get $8 + f64.add + local.set $15 + local.get $15 + local.get $14 + f64.add + local.set $16 + local.get $6 + f64.const 5.497923018708371e-14 + f64.mul + local.get $9 + f64.add + local.set $17 + local.get $15 + local.get $16 + f64.sub + local.get $14 + f64.add + local.set $18 + f64.const -0.5 + local.get $14 + f64.mul + local.set $19 + local.get $14 + local.get $19 + f64.mul + local.set $20 + local.get $14 + local.get $20 + f64.mul + local.set $21 + f64.const -0.5 + local.get $12 + f64.mul + local.set $22 + local.get $12 + local.get $22 + f64.mul + local.set $23 + local.get $16 + local.get $23 + f64.add + local.set $24 + local.get $13 + local.get $19 + local.get $22 + f64.add + f64.mul + local.set $25 + local.get $16 + local.get $24 + f64.sub + local.get $23 + f64.add + local.set $26 + local.get $21 + f64.const -0.6666666666666679 + local.get $14 + f64.const 0.5000000000000007 + f64.mul + f64.add + local.get $20 + f64.const 0.7999999995323976 + local.get $14 + f64.const -0.6666666663487739 + f64.mul + f64.add + local.get $20 + f64.const -1.142909628459501 + local.get $14 + f64.const 1.0000415263675542 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + local.set $27 + local.get $17 + local.get $18 + f64.add + local.get $25 + f64.add + local.get $26 + f64.add + local.get $27 + f64.add + local.set $28 + local.get $24 + local.get $28 + f64.add + local.set $29 + local.get $24 + local.get $29 + f64.sub + local.get $28 + f64.add + global.set $~lib/util/math/log_tail + local.get $29 + ) + (func $~lib/util/math/xflow (param $0 i32) (param $1 f64) (result f64) + local.get $1 + f64.neg + local.get $1 + local.get $0 + select + local.get $1 + f64.mul + ) + (func $~lib/util/math/uflow (param $0 i32) (result f64) + local.get $0 + i64.const 1152921504606846976 + f64.reinterpret_i64 + call $~lib/util/math/xflow + ) + (func $~lib/util/math/oflow (param $0 i32) (result f64) + local.get $0 + i64.const 8070450532247928832 + f64.reinterpret_i64 + call $~lib/util/math/xflow + ) + (func $~lib/util/math/specialcase (param $0 f64) (param $1 i64) (param $2 i64) (result f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + local.get $2 + i64.const 2147483648 + i64.and + i64.const 0 + i64.ne + i32.eqz if local.get $1 - f64.const 2 - f64.eq - if - local.get $0 - local.get $0 - f64.mul - return - end - local.get $1 - f64.const 0.5 - f64.eq - if - local.get $0 - f64.sqrt - f64.abs - f64.const inf - local.get $0 - f64.const inf - f64.neg - f64.ne - select - return - end - local.get $1 - f64.const -1 - f64.eq - if - f64.const 1 - local.get $0 - f64.div - return - end - local.get $1 - f64.const 1 - f64.eq - if - local.get $0 - return - end + i64.const 1009 + i64.const 52 + i64.shl + i64.sub + local.set $1 local.get $1 - f64.const 0 - f64.eq - if - f64.const 1 - return - end - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - block $~lib/util/math/pow_lut|inlined.0 (result f64) - local.get $0 + f64.reinterpret_i64 local.set $3 - local.get $1 - local.set $2 - i32.const 0 - local.set $4 + f64.const 5486124068793688683255936e279 local.get $3 - i64.reinterpret_f64 - local.set $5 - local.get $2 - i64.reinterpret_f64 - local.set $6 - local.get $5 - i64.const 52 - i64.shr_u - local.set $7 - local.get $6 - i64.const 52 - i64.shr_u - local.set $8 - local.get $7 - i64.const 1 - i64.sub + local.get $3 + local.get $0 + f64.mul + f64.add + f64.mul + return + end + local.get $1 + i64.const 1022 + i64.const 52 + i64.shl + i64.add + local.set $1 + local.get $1 + f64.reinterpret_i64 + local.set $3 + local.get $3 + local.get $3 + local.get $0 + f64.mul + f64.add + local.set $4 + local.get $4 + f64.abs + f64.const 1 + f64.lt + if + f64.const 1 + local.get $4 + f64.copysign + local.set $5 + local.get $3 + local.get $4 + f64.sub + local.get $3 + local.get $0 + f64.mul + f64.add + local.set $6 + local.get $5 + local.get $4 + f64.add + local.set $7 + local.get $5 + local.get $7 + f64.sub + local.get $4 + f64.add + local.get $6 + f64.add + local.set $6 + local.get $7 + local.get $6 + f64.add + local.get $5 + f64.sub + local.set $4 + local.get $4 + f64.const 0 + f64.eq + if + local.get $1 + i64.const -9223372036854775808 + i64.and + f64.reinterpret_i64 + local.set $4 + end + end + local.get $4 + f64.const 2.2250738585072014e-308 + f64.mul + ) + (func $~lib/util/math/exp_inline (param $0 f64) (param $1 f64) (param $2 i32) (result f64) + (local $3 i32) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i32) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 i64) + local.get $0 + i64.reinterpret_f64 + local.set $15 + local.get $15 + i64.const 52 + i64.shr_u + i32.wrap_i64 + i32.const 2047 + i32.and + local.set $3 + local.get $3 + i32.const 969 + i32.sub + i32.const 63 + i32.ge_u + if + local.get $3 + i32.const 969 + i32.sub + i32.const -2147483648 + i32.ge_u + if + f64.const -1 + f64.const 1 + local.get $2 + select + return + end + local.get $3 + i32.const 1033 + i32.ge_u + if + local.get $15 + i64.const 63 + i64.shr_u + i64.const 0 + i64.ne + if (result f64) + local.get $2 + call $~lib/util/math/uflow + else + local.get $2 + call $~lib/util/math/oflow + end + return + end + i32.const 0 + local.set $3 + end + f64.const 184.6649652337873 + local.get $0 + f64.mul + local.set $9 + local.get $9 + f64.const 6755399441055744 + f64.add + local.set $8 + local.get $8 + i64.reinterpret_f64 + local.set $4 + local.get $8 + f64.const 6755399441055744 + f64.sub + local.set $8 + local.get $0 + local.get $8 + f64.const -0.005415212348111709 + f64.mul + f64.add + local.get $8 + f64.const -1.2864023111638346e-14 + f64.mul + f64.add + local.set $10 + local.get $10 + local.get $1 + f64.add + local.set $10 + local.get $4 + i64.const 127 + i64.and + i64.const 1 + i64.shl + i32.wrap_i64 + local.set $7 + local.get $4 + local.get $2 + i64.extend_i32_u + i64.add + i64.const 52 + i64.const 7 + i64.sub + i64.shl + local.set $5 + i32.const 4104 + local.get $7 + i32.const 3 + i32.shl + i32.add + i64.load + f64.reinterpret_i64 + local.set $13 + i32.const 4104 + local.get $7 + i32.const 3 + i32.shl + i32.add + i64.load offset=8 + local.get $5 + i64.add + local.set $6 + local.get $10 + local.get $10 + f64.mul + local.set $11 + local.get $13 + local.get $10 + f64.add + local.get $11 + f64.const 0.49999999999996786 + local.get $10 + f64.const 0.16666666666665886 + f64.mul + f64.add + f64.mul + f64.add + local.get $11 + local.get $11 + f64.mul + f64.const 0.0416666808410674 + local.get $10 + f64.const 0.008333335853059549 + f64.mul + f64.add + f64.mul + f64.add + local.set $14 + local.get $3 + i32.const 0 + i32.eq + if + local.get $14 + local.get $6 + local.get $4 + call $~lib/util/math/specialcase + return + end + local.get $6 + f64.reinterpret_i64 + local.set $12 + local.get $12 + local.get $12 + local.get $14 + f64.mul + f64.add + ) + (func $~lib/util/math/pow_lut (param $0 f64) (param $1 f64) (result f64) + (local $2 i32) + (local $3 i64) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 f64) + (local $8 i32) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + i32.const 0 + local.set $2 + local.get $0 + i64.reinterpret_f64 + local.set $3 + local.get $1 + i64.reinterpret_f64 + local.set $4 + local.get $3 + i64.const 52 + i64.shr_u + local.set $5 + local.get $4 + i64.const 52 + i64.shr_u + local.set $6 + local.get $5 + i64.const 1 + i64.sub + i64.const 2047 + i64.const 1 + i64.sub + i64.ge_u + if (result i32) + i32.const 1 + else + local.get $6 i64.const 2047 - i64.const 1 + i64.and + i64.const 958 + i64.sub + i64.const 1086 + i64.const 958 i64.sub i64.ge_u - if (result i32) - i32.const 1 - else - local.get $8 - i64.const 2047 - i64.and - i64.const 958 - i64.sub - i64.const 1086 - i64.const 958 - i64.sub - i64.ge_u - end + end + if + local.get $4 + call $~lib/util/math/zeroinfnan + if + local.get $4 + i64.const 1 + i64.shl + i64.const 0 + i64.eq + if + f64.const 1 + return + end + local.get $3 + i64.const 4607182418800017408 + i64.eq + if + f64.const nan:0x8000000000000 + return + end + local.get $3 + i64.const 1 + i64.shl + i64.const -9007199254740992 + i64.gt_u + if (result i32) + i32.const 1 + else + local.get $4 + i64.const 1 + i64.shl + i64.const -9007199254740992 + i64.gt_u + end + if + local.get $0 + local.get $1 + f64.add + return + end + local.get $3 + i64.const 1 + i64.shl + i64.const 9214364837600034816 + i64.eq + if + f64.const nan:0x8000000000000 + return + end + local.get $3 + i64.const 1 + i64.shl + i64.const 9214364837600034816 + i64.lt_u + local.get $4 + i64.const 63 + i64.shr_u + i64.const 0 + i64.ne + i32.eqz + i32.eq + if + f64.const 0 + return + end + local.get $1 + local.get $1 + f64.mul + return + end + local.get $3 + call $~lib/util/math/zeroinfnan + if + local.get $0 + local.get $0 + f64.mul + local.set $7 + local.get $3 + i64.const 63 + i64.shr_u + i32.wrap_i64 + if (result i32) + local.get $4 + call $~lib/util/math/checkint + i32.const 1 + i32.eq + else + i32.const 0 + end + if + local.get $7 + f64.neg + local.set $7 + end + local.get $4 + i64.const 63 + i64.shr_u + i64.const 0 + i64.ne + if (result f64) + f64.const 1 + local.get $7 + f64.div + else + local.get $7 + end + return + end + local.get $3 + i64.const 63 + i64.shr_u + i64.const 0 + i64.ne + if + local.get $4 + call $~lib/util/math/checkint + local.set $8 + local.get $8 + i32.const 0 + i32.eq + if + local.get $0 + local.get $0 + f64.sub + local.get $0 + local.get $0 + f64.sub + f64.div + return + end + local.get $8 + i32.const 1 + i32.eq + if + i32.const 262144 + local.set $2 + end + local.get $3 + i64.const 9223372036854775807 + i64.and + local.set $3 + local.get $5 + i64.const 2047 + i64.and + local.set $5 + end + local.get $6 + i64.const 2047 + i64.and + i64.const 958 + i64.sub + i64.const 1086 + i64.const 958 + i64.sub + i64.ge_u + if + local.get $3 + i64.const 4607182418800017408 + i64.eq + if + f64.const 1 + return + end + local.get $6 + i64.const 2047 + i64.and + i64.const 958 + i64.lt_u + if + f64.const 1 + return + end + local.get $3 + i64.const 4607182418800017408 + i64.gt_u + local.get $6 + i64.const 2048 + i64.lt_u + i32.eq + if (result f64) + f64.const inf + else + f64.const 0 + end + return + end + local.get $5 + i64.const 0 + i64.eq + if + local.get $0 + f64.const 4503599627370496 + f64.mul + i64.reinterpret_f64 + local.set $3 + local.get $3 + i64.const 9223372036854775807 + i64.and + local.set $3 + local.get $3 + i64.const 52 + i64.const 52 + i64.shl + i64.sub + local.set $3 + end + end + local.get $3 + call $~lib/util/math/log_inline + local.set $9 + global.get $~lib/util/math/log_tail + local.set $10 + local.get $4 + i64.const -134217728 + i64.and + f64.reinterpret_i64 + local.set $13 + local.get $1 + local.get $13 + f64.sub + local.set $14 + local.get $9 + i64.reinterpret_f64 + i64.const -134217728 + i64.and + f64.reinterpret_i64 + local.set $15 + local.get $9 + local.get $15 + f64.sub + local.get $10 + f64.add + local.set $16 + local.get $13 + local.get $15 + f64.mul + local.set $11 + local.get $14 + local.get $15 + f64.mul + local.get $1 + local.get $16 + f64.mul + f64.add + local.set $12 + local.get $11 + local.get $12 + local.get $2 + call $~lib/util/math/exp_inline + ) + (func $~lib/math/NativeMath.pow (param $0 f64) (param $1 f64) (result f64) + local.get $1 + f64.abs + f64.const 2 + f64.le + if + local.get $1 + f64.const 2 + f64.eq + if + local.get $0 + local.get $0 + f64.mul + return + end + local.get $1 + f64.const 0.5 + f64.eq + if + local.get $0 + f64.sqrt + f64.abs + f64.const inf + local.get $0 + f64.const inf + f64.neg + f64.ne + select + return + end + local.get $1 + f64.const -1 + f64.eq + if + f64.const 1 + local.get $0 + f64.div + return + end + local.get $1 + f64.const 1 + f64.eq + if + local.get $0 + return + end + local.get $1 + f64.const 0 + f64.eq + if + f64.const 1 + return + end + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $0 + local.get $1 + call $~lib/util/math/pow_lut + return + ) + (func $~lib/math/NativeMathf.mod (param $0 f32) (param $1 f32) (result f32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 f32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + local.get $0 + i32.reinterpret_f32 + local.set $2 + local.get $1 + i32.reinterpret_f32 + local.set $3 + local.get $2 + i32.const 23 + i32.shr_u + i32.const 255 + i32.and + local.set $4 + local.get $3 + i32.const 23 + i32.shr_u + i32.const 255 + i32.and + local.set $5 + local.get $2 + i32.const -2147483648 + i32.and + local.set $6 + local.get $3 + i32.const 1 + i32.shl + local.set $7 + local.get $7 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else + local.get $4 + i32.const 255 + i32.eq + end + if (result i32) + i32.const 1 + else + local.get $1 + local.get $1 + f32.ne + end + if + local.get $0 + local.get $1 + f32.mul + local.set $8 + local.get $8 + local.get $8 + f32.div + return + end + local.get $2 + i32.const 1 + i32.shl + local.set $9 + local.get $9 + local.get $7 + i32.le_u + if + local.get $9 + local.get $7 + i32.eq + if + f32.const 0 + local.get $0 + f32.mul + return + end + local.get $0 + return + end + local.get $4 + i32.eqz + if + local.get $4 + local.get $2 + i32.const 9 + i32.shl + i32.clz + i32.sub + local.set $4 + local.get $2 + i32.const 0 + local.get $4 + i32.sub + i32.const 1 + i32.add + i32.shl + local.set $2 + else + local.get $2 + i32.const -1 + i32.const 9 + i32.shr_u + i32.and + local.set $2 + local.get $2 + i32.const 1 + i32.const 23 + i32.shl + i32.or + local.set $2 + end + local.get $5 + i32.eqz + if + local.get $5 + local.get $3 + i32.const 9 + i32.shl + i32.clz + i32.sub + local.set $5 + local.get $3 + i32.const 0 + local.get $5 + i32.sub + i32.const 1 + i32.add + i32.shl + local.set $3 + else + local.get $3 + i32.const -1 + i32.const 9 + i32.shr_u + i32.and + local.set $3 + local.get $3 + i32.const 1 + i32.const 23 + i32.shl + i32.or + local.set $3 + end + loop $while-continue|0 + local.get $4 + local.get $5 + i32.gt_s + local.set $10 + local.get $10 + if + local.get $2 + local.get $3 + i32.ge_u + if + local.get $2 + local.get $3 + i32.eq + if + f32.const 0 + local.get $0 + f32.mul + return + end + local.get $2 + local.get $3 + i32.sub + local.set $2 + end + local.get $2 + i32.const 1 + i32.shl + local.set $2 + local.get $4 + i32.const 1 + i32.sub + local.set $4 + br $while-continue|0 + end + end + local.get $2 + local.get $3 + i32.ge_u + if + local.get $2 + local.get $3 + i32.eq + if + f32.const 0 + local.get $0 + f32.mul + return + end + local.get $2 + local.get $3 + i32.sub + local.set $2 + end + local.get $2 + i32.const 8 + i32.shl + i32.clz + local.set $11 + local.get $4 + local.get $11 + i32.sub + local.set $4 + local.get $2 + local.get $11 + i32.shl + local.set $2 + local.get $4 + i32.const 0 + i32.gt_s + if + local.get $2 + i32.const 1 + i32.const 23 + i32.shl + i32.sub + local.set $2 + local.get $2 + local.get $4 + i32.const 23 + i32.shl + i32.or + local.set $2 + else + local.get $2 + i32.const 0 + local.get $4 + i32.sub + i32.const 1 + i32.add + i32.shr_u + local.set $2 + end + local.get $2 + local.get $6 + i32.or + local.set $2 + local.get $2 + f32.reinterpret_i32 + ) + (func $~lib/util/math/zeroinfnanf (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 1 + i32.sub + i32.const 2139095040 + i32.const 1 + i32.shl + i32.const 1 + i32.sub + i32.ge_u + ) + (func $~lib/util/math/checkintf (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 23 + i32.shr_u + i32.const 255 + i32.and + local.set $1 + local.get $1 + i32.const 127 + i32.lt_u + if + i32.const 0 + return + end + local.get $1 + i32.const 127 + i32.const 23 + i32.add + i32.gt_u + if + i32.const 2 + return + end + i32.const 1 + i32.const 127 + i32.const 23 + i32.add + local.get $1 + i32.sub + i32.shl + local.set $1 + local.get $0 + local.get $1 + i32.const 1 + i32.sub + i32.and + if + i32.const 0 + return + end + local.get $0 + local.get $1 + i32.and + if + i32.const 1 + return + end + i32.const 2 + ) + (func $~lib/util/math/log2f_inline (param $0 i32) (result f64) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + local.get $0 + i32.const 1060306944 + i32.sub + local.set $1 + local.get $1 + i32.const 23 + i32.const 4 + i32.sub + i32.shr_u + i32.const 15 + i32.and + local.set $2 + local.get $1 + i32.const -8388608 + i32.and + local.set $3 + local.get $0 + local.get $3 + i32.sub + local.set $4 + local.get $3 + i32.const 23 + i32.shr_s + local.set $5 + i32.const 6152 + local.get $2 + i32.const 1 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load + local.set $6 + i32.const 6152 + local.get $2 + i32.const 1 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load offset=8 + local.set $7 + local.get $4 + f32.reinterpret_i32 + f64.promote_f32 + local.set $8 + local.get $8 + local.get $6 + f64.mul + f64.const 1 + f64.sub + local.set $9 + local.get $7 + local.get $5 + f64.convert_i32_s + f64.add + local.set $10 + f64.const 0.288457581109214 + local.get $9 + f64.mul + f64.const -0.36092606229713164 + f64.add + local.set $11 + f64.const 0.480898481472577 + local.get $9 + f64.mul + f64.const -0.7213474675006291 + f64.add + local.set $12 + f64.const 1.4426950408774342 + local.get $9 + f64.mul + local.get $10 + f64.add + local.set $13 + local.get $9 + local.get $9 + f64.mul + local.set $9 + local.get $13 + local.get $12 + local.get $9 + f64.mul + f64.add + local.set $13 + local.get $11 + local.get $9 + local.get $9 + f64.mul + f64.mul + local.get $13 + f64.add + local.set $11 + local.get $11 + ) + (func $~lib/util/math/xflowf (param $0 i32) (param $1 f32) (result f32) + local.get $1 + f32.neg + local.get $1 + local.get $0 + select + local.get $1 + f32.mul + ) + (func $~lib/util/math/oflowf (param $0 i32) (result f32) + local.get $0 + i32.const 1879048192 + f32.reinterpret_i32 + call $~lib/util/math/xflowf + ) + (func $~lib/util/math/uflowf (param $0 i32) (result f32) + local.get $0 + i32.const 268435456 + f32.reinterpret_i32 + call $~lib/util/math/xflowf + ) + (func $~lib/util/math/exp2f_inline (param $0 f64) (param $1 i32) (result f32) + (local $2 f64) + (local $3 i64) + (local $4 f64) + (local $5 i64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + local.get $0 + f64.const 211106232532992 + f64.add + local.set $2 + local.get $2 + i64.reinterpret_f64 + local.set $3 + local.get $0 + local.get $2 + f64.const 211106232532992 + f64.sub + f64.sub + local.set $4 + i32.const 6408 + local.get $3 + i32.wrap_i64 + i32.const 31 + i32.and + i32.const 3 + i32.shl + i32.add + i64.load + local.set $5 + local.get $5 + local.get $3 + local.get $1 + i64.extend_i32_u + i64.add + i64.const 52 + i64.const 5 + i64.sub + i64.shl + i64.add + local.set $5 + local.get $5 + f64.reinterpret_i64 + local.set $8 + f64.const 0.05550361559341535 + local.get $4 + f64.mul + f64.const 0.2402284522445722 + f64.add + local.set $6 + f64.const 0.6931471806916203 + local.get $4 + f64.mul + f64.const 1 + f64.add + local.set $7 + local.get $7 + local.get $6 + local.get $4 + local.get $4 + f64.mul + f64.mul + f64.add + local.set $7 + local.get $7 + local.get $8 + f64.mul + local.set $7 + local.get $7 + f32.demote_f64 + ) + (func $~lib/util/math/powf_lut (param $0 f32) (param $1 f32) (result f32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 f32) + (local $7 i32) + (local $8 f64) + (local $9 f64) + i32.const 0 + local.set $2 + local.get $0 + i32.reinterpret_f32 + local.set $3 + local.get $1 + i32.reinterpret_f32 + local.set $4 + i32.const 0 + local.set $5 + local.get $3 + i32.const 8388608 + i32.sub + i32.const 2139095040 + i32.const 8388608 + i32.sub + i32.ge_u + local.get $4 + call $~lib/util/math/zeroinfnanf + local.tee $5 + i32.or + if + local.get $5 if - local.get $6 - local.set $9 - local.get $9 - i64.const 1 - i64.shl - i64.const 1 - i64.sub - i64.const -9007199254740992 - i64.const 1 - i64.sub - i64.ge_u + local.get $4 + i32.const 1 + i32.shl + i32.const 0 + i32.eq if - local.get $6 - i64.const 1 - i64.shl - i64.const 0 - i64.eq - if - f64.const 1 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 - i64.const 4607182418800017408 - i64.eq - if - f64.const nan:0x8000000000000 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 - i64.const 1 - i64.shl - i64.const -9007199254740992 - i64.gt_u - if (result i32) - i32.const 1 - else - local.get $6 - i64.const 1 - i64.shl - i64.const -9007199254740992 - i64.gt_u - end - if - local.get $3 - local.get $2 - f64.add - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 - i64.const 1 - i64.shl - i64.const 9214364837600034816 - i64.eq - if - f64.const nan:0x8000000000000 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 - i64.const 1 - i64.shl - i64.const 9214364837600034816 - i64.lt_u - local.get $6 - i64.const 63 - i64.shr_u - i64.const 0 - i64.ne - i32.eqz - i32.eq - if - f64.const 0 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $2 - local.get $2 - f64.mul - br $~lib/util/math/pow_lut|inlined.0 + f32.const 1 + return end - local.get $5 - local.set $9 - local.get $9 - i64.const 1 - i64.shl - i64.const 1 - i64.sub - i64.const -9007199254740992 - i64.const 1 - i64.sub - i64.ge_u + local.get $3 + i32.const 1065353216 + i32.eq if - local.get $3 - local.get $3 - f64.mul - local.set $10 - local.get $5 - i64.const 63 - i64.shr_u - i32.wrap_i64 - if (result i32) - block $~lib/util/math/checkint|inlined.0 (result i32) - local.get $6 - local.set $9 - local.get $9 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - local.set $11 - local.get $11 - i64.const 1023 - i64.lt_u - if - i32.const 0 - br $~lib/util/math/checkint|inlined.0 - end - local.get $11 - i64.const 1023 - i64.const 52 - i64.add - i64.gt_u - if - i32.const 2 - br $~lib/util/math/checkint|inlined.0 - end - i64.const 1 - i64.const 1023 - i64.const 52 - i64.add - local.get $11 - i64.sub - i64.shl - local.set $11 - local.get $9 - local.get $11 - i64.const 1 - i64.sub - i64.and - i64.const 0 - i64.ne - if - i32.const 0 - br $~lib/util/math/checkint|inlined.0 - end - local.get $9 - local.get $11 - i64.and - i64.const 0 - i64.ne - if - i32.const 1 - br $~lib/util/math/checkint|inlined.0 - end - i32.const 2 - end - i32.const 1 - i32.eq - else - i32.const 0 - end - if - local.get $10 - f64.neg - local.set $10 - end - local.get $6 - i64.const 63 - i64.shr_u - i64.const 0 - i64.ne - if (result f64) - f64.const 1 - local.get $10 - f64.div - else - local.get $10 - end - br $~lib/util/math/pow_lut|inlined.0 + f32.const nan:0x400000 + return end - local.get $5 - i64.const 63 - i64.shr_u - i64.const 0 - i64.ne - if - block $~lib/util/math/checkint|inlined.1 (result i32) - local.get $6 - local.set $9 - local.get $9 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - local.set $11 - local.get $11 - i64.const 1023 - i64.lt_u - if - i32.const 0 - br $~lib/util/math/checkint|inlined.1 - end - local.get $11 - i64.const 1023 - i64.const 52 - i64.add - i64.gt_u - if - i32.const 2 - br $~lib/util/math/checkint|inlined.1 - end - i64.const 1 - i64.const 1023 - i64.const 52 - i64.add - local.get $11 - i64.sub - i64.shl - local.set $11 - local.get $9 - local.get $11 - i64.const 1 - i64.sub - i64.and - i64.const 0 - i64.ne - if - i32.const 0 - br $~lib/util/math/checkint|inlined.1 - end - local.get $9 - local.get $11 - i64.and - i64.const 0 - i64.ne - if - i32.const 1 - br $~lib/util/math/checkint|inlined.1 - end - i32.const 2 - end - local.set $12 - local.get $12 - i32.const 0 - i32.eq - if - local.get $3 - local.get $3 - f64.sub - local.get $3 - local.get $3 - f64.sub - f64.div - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $12 + local.get $3 + i32.const 1 + i32.shl + i32.const 2139095040 + i32.const 1 + i32.shl + i32.gt_u + if (result i32) i32.const 1 - i32.eq - if - i32.const 262144 - local.set $4 - end - local.get $5 - i64.const 9223372036854775807 - i64.and - local.set $5 - local.get $7 - i64.const 2047 - i64.and - local.set $7 - end - local.get $8 - i64.const 2047 - i64.and - i64.const 958 - i64.sub - i64.const 1086 - i64.const 958 - i64.sub - i64.ge_u - if - local.get $5 - i64.const 4607182418800017408 - i64.eq - if - f64.const 1 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $8 - i64.const 2047 - i64.and - i64.const 958 - i64.lt_u - if - f64.const 1 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 - i64.const 4607182418800017408 - i64.gt_u - local.get $8 - i64.const 2048 - i64.lt_u - i32.eq - if (result f64) - f64.const inf - else - f64.const 0 - end - br $~lib/util/math/pow_lut|inlined.0 + else + local.get $4 + i32.const 1 + i32.shl + i32.const 2139095040 + i32.const 1 + i32.shl + i32.gt_u end - local.get $7 - i64.const 0 - i64.eq if - local.get $3 - f64.const 4503599627370496 - f64.mul - i64.reinterpret_f64 - local.set $5 - local.get $5 - i64.const 9223372036854775807 - i64.and - local.set $5 - local.get $5 - i64.const 52 - i64.const 52 - i64.shl - i64.sub - local.set $5 + local.get $0 + local.get $1 + f32.add + return end - end - local.get $5 - local.set $9 - local.get $9 - i64.const 4604531861337669632 - i64.sub - local.set $11 - local.get $11 - i64.const 52 - i64.const 7 - i64.sub - i64.shr_u - i64.const 127 - i64.and - i32.wrap_i64 - local.set $12 - local.get $11 - i64.const 52 - i64.shr_s - local.set $13 - local.get $9 - local.get $11 - i64.const 4095 - i64.const 52 - i64.shl - i64.and - i64.sub - local.set $14 - local.get $14 - f64.reinterpret_i64 - local.set $10 - local.get $13 - f64.convert_i64_s - local.set $15 - i32.const 8 - local.get $12 - i32.const 2 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load - local.set $16 - i32.const 8 - local.get $12 - i32.const 2 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load offset=16 - local.set $17 - i32.const 8 - local.get $12 - i32.const 2 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load offset=24 - local.set $18 - local.get $14 - i64.const 2147483648 - i64.add - i64.const -4294967296 - i64.and - f64.reinterpret_i64 - local.set $19 - local.get $10 - local.get $19 - f64.sub - local.set $20 - local.get $19 - local.get $16 - f64.mul - f64.const 1 - f64.sub - local.set $21 - local.get $20 - local.get $16 - f64.mul - local.set $22 - local.get $21 - local.get $22 - f64.add - local.set $23 - local.get $15 - f64.const 0.6931471805598903 - f64.mul - local.get $17 - f64.add - local.set $24 - local.get $24 - local.get $23 - f64.add - local.set $25 - local.get $15 - f64.const 5.497923018708371e-14 - f64.mul - local.get $18 - f64.add - local.set $26 - local.get $24 - local.get $25 - f64.sub - local.get $23 - f64.add - local.set $27 - f64.const -0.5 - local.get $23 - f64.mul - local.set $28 - local.get $23 - local.get $28 - f64.mul - local.set $29 - local.get $23 - local.get $29 - f64.mul - local.set $30 - f64.const -0.5 - local.get $21 - f64.mul - local.set $31 - local.get $21 - local.get $31 - f64.mul - local.set $32 - local.get $25 - local.get $32 - f64.add - local.set $33 - local.get $22 - local.get $28 - local.get $31 - f64.add - f64.mul - local.set $34 - local.get $25 - local.get $33 - f64.sub - local.get $32 - f64.add - local.set $35 - local.get $30 - f64.const -0.6666666666666679 - local.get $23 - f64.const 0.5000000000000007 - f64.mul - f64.add - local.get $29 - f64.const 0.7999999995323976 - local.get $23 - f64.const -0.6666666663487739 - f64.mul - f64.add - local.get $29 - f64.const -1.142909628459501 - local.get $23 - f64.const 1.0000415263675542 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - f64.mul - local.set $36 - local.get $26 - local.get $27 - f64.add - local.get $34 - f64.add - local.get $35 - f64.add - local.get $36 - f64.add - local.set $37 - local.get $33 - local.get $37 - f64.add - local.set $38 - local.get $33 - local.get $38 - f64.sub - local.get $37 - f64.add - global.set $~lib/util/math/log_tail - local.get $38 - local.set $38 - global.get $~lib/util/math/log_tail - local.set $37 - local.get $6 - i64.const -134217728 - i64.and - f64.reinterpret_i64 - local.set $34 - local.get $2 - local.get $34 - f64.sub - local.set $33 - local.get $38 - i64.reinterpret_f64 - i64.const -134217728 - i64.and - f64.reinterpret_i64 - local.set $32 - local.get $38 - local.get $32 - f64.sub - local.get $37 - f64.add - local.set $31 - local.get $34 - local.get $32 - f64.mul - local.set $36 - local.get $33 - local.get $32 - f64.mul - local.get $2 - local.get $31 - f64.mul - f64.add - local.set $35 - block $~lib/util/math/exp_inline|inlined.0 (result f64) - local.get $36 - local.set $15 - local.get $35 - local.set $10 - local.get $4 - local.set $12 - local.get $15 - i64.reinterpret_f64 - local.set $9 - local.get $9 - i64.const 52 - i64.shr_u - i32.wrap_i64 - i32.const 2047 - i32.and - local.set $39 - local.get $39 - i32.const 969 - i32.sub - i32.const 63 - i32.ge_u + local.get $3 + i32.const 1 + i32.shl + i32.const 1065353216 + i32.const 1 + i32.shl + i32.eq if - local.get $39 - i32.const 969 - i32.sub - i32.const -2147483648 - i32.ge_u - if - f64.const -1 - f64.const 1 - local.get $12 - select - br $~lib/util/math/exp_inline|inlined.0 - end - local.get $39 - i32.const 1033 - i32.ge_u - if - local.get $9 - i64.const 63 - i64.shr_u - i64.const 0 - i64.ne - if (result f64) - local.get $12 - local.set $41 - local.get $41 - local.set $42 - i64.const 1152921504606846976 - f64.reinterpret_i64 - local.set $16 - local.get $16 - f64.neg - local.get $16 - local.get $42 - select - local.get $16 - f64.mul - else - local.get $12 - local.set $42 - local.get $42 - local.set $41 - i64.const 8070450532247928832 - f64.reinterpret_i64 - local.set $17 - local.get $17 - f64.neg - local.get $17 - local.get $41 - select - local.get $17 - f64.mul - end - br $~lib/util/math/exp_inline|inlined.0 - end - i32.const 0 - local.set $39 + f32.const nan:0x400000 + return end - f64.const 184.6649652337873 - local.get $15 - f64.mul - local.set $29 - local.get $29 - f64.const 6755399441055744 - f64.add - local.set $30 - local.get $30 - i64.reinterpret_f64 - local.set $14 - local.get $30 - f64.const 6755399441055744 - f64.sub - local.set $30 - local.get $15 - local.get $30 - f64.const -0.005415212348111709 - f64.mul - f64.add - local.get $30 - f64.const -1.2864023111638346e-14 - f64.mul - f64.add - local.set $28 - local.get $28 - local.get $10 - f64.add - local.set $28 - local.get $14 - i64.const 127 - i64.and - i64.const 1 - i64.shl - i32.wrap_i64 - local.set $40 - local.get $14 - local.get $12 - i64.extend_i32_u - i64.add - i64.const 52 - i64.const 7 - i64.sub - i64.shl - local.set $13 - i32.const 4104 - local.get $40 - i32.const 3 - i32.shl - i32.add - i64.load - f64.reinterpret_i64 - local.set $25 - i32.const 4104 - local.get $40 - i32.const 3 + local.get $3 + i32.const 1 i32.shl - i32.add - i64.load offset=8 - local.get $13 - i64.add - local.set $11 - local.get $28 - local.get $28 - f64.mul - local.set $27 - local.get $25 - local.get $28 - f64.add - local.get $27 - f64.const 0.49999999999996786 - local.get $28 - f64.const 0.16666666666665886 - f64.mul - f64.add - f64.mul - f64.add - local.get $27 - local.get $27 - f64.mul - f64.const 0.0416666808410674 - local.get $28 - f64.const 0.008333335853059549 - f64.mul - f64.add - f64.mul - f64.add - local.set $24 - local.get $39 - i32.const 0 + i32.const 1065353216 + i32.const 1 + i32.shl + i32.lt_u + local.get $4 + i32.const 31 + i32.shr_u + i32.eqz i32.eq if - block $~lib/util/math/specialcase|inlined.0 (result f64) - local.get $24 - local.set $18 - local.get $11 - local.set $44 - local.get $14 - local.set $43 - local.get $43 - i64.const 2147483648 - i64.and - i64.const 0 - i64.ne - i32.eqz - if - local.get $44 - i64.const 1009 - i64.const 52 - i64.shl - i64.sub - local.set $44 - local.get $44 - f64.reinterpret_i64 - local.set $17 - f64.const 5486124068793688683255936e279 - local.get $17 - local.get $17 - local.get $18 - f64.mul - f64.add - f64.mul - br $~lib/util/math/specialcase|inlined.0 - end - local.get $44 - i64.const 1022 - i64.const 52 - i64.shl - i64.add - local.set $44 - local.get $44 - f64.reinterpret_i64 - local.set $17 - local.get $17 - local.get $17 - local.get $18 - f64.mul - f64.add - local.set $16 - local.get $16 - f64.abs - f64.const 1 - f64.lt - if - f64.const 1 - local.get $16 - f64.copysign - local.set $23 - local.get $17 - local.get $16 - f64.sub - local.get $17 - local.get $18 - f64.mul - f64.add - local.set $22 - local.get $23 - local.get $16 - f64.add - local.set $21 - local.get $23 - local.get $21 - f64.sub - local.get $16 - f64.add - local.get $22 - f64.add - local.set $22 - local.get $21 - local.get $22 - f64.add - local.get $23 - f64.sub - local.set $16 - local.get $16 - f64.const 0 - f64.eq - if - local.get $44 - i64.const -9223372036854775808 - i64.and - f64.reinterpret_i64 - local.set $16 - end - end - local.get $16 - f64.const 2.2250738585072014e-308 - f64.mul - end - br $~lib/util/math/exp_inline|inlined.0 + f32.const 0 + return end - local.get $11 - f64.reinterpret_i64 - local.set $26 - local.get $26 - local.get $26 - local.get $24 - f64.mul - f64.add + local.get $1 + local.get $1 + f32.mul + return end - end - return - ) - (func $~lib/math/NativeMathf.mod (param $0 f32) (param $1 f32) (result f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 f32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $0 - i32.reinterpret_f32 - local.set $2 - local.get $1 - i32.reinterpret_f32 - local.set $3 - local.get $2 - i32.const 23 - i32.shr_u - i32.const 255 - i32.and - local.set $4 - local.get $3 - i32.const 23 - i32.shr_u - i32.const 255 - i32.and - local.set $5 - local.get $2 - i32.const -2147483648 - i32.and - local.set $6 - local.get $3 - i32.const 1 - i32.shl - local.set $7 - local.get $7 - i32.const 0 - i32.eq - if (result i32) - i32.const 1 - else - local.get $4 - i32.const 255 - i32.eq - end - if (result i32) - i32.const 1 - else - local.get $1 - local.get $1 - f32.ne - end - if - local.get $0 - local.get $1 - f32.mul - local.set $8 - local.get $8 - local.get $8 - f32.div - return - end - local.get $2 - i32.const 1 - i32.shl - local.set $9 - local.get $9 - local.get $7 - i32.le_u - if - local.get $9 - local.get $7 - i32.eq + local.get $3 + call $~lib/util/math/zeroinfnanf if - f32.const 0 + local.get $0 local.get $0 f32.mul + local.set $6 + local.get $3 + i32.const 31 + i32.shr_u + if (result i32) + local.get $4 + call $~lib/util/math/checkintf + i32.const 1 + i32.eq + else + i32.const 0 + end + if + local.get $6 + f32.neg + local.set $6 + end + local.get $4 + i32.const 31 + i32.shr_u + if (result f32) + f32.const 1 + local.get $6 + f32.div + else + local.get $6 + end return end - local.get $0 - return - end - local.get $4 - i32.eqz - if - local.get $4 - local.get $2 - i32.const 9 - i32.shl - i32.clz - i32.sub - local.set $4 - local.get $2 - i32.const 0 - local.get $4 - i32.sub - i32.const 1 - i32.add - i32.shl - local.set $2 - else - local.get $2 - i32.const -1 - i32.const 9 - i32.shr_u - i32.and - local.set $2 - local.get $2 - i32.const 1 - i32.const 23 - i32.shl - i32.or - local.set $2 - end - local.get $5 - i32.eqz - if - local.get $5 - local.get $3 - i32.const 9 - i32.shl - i32.clz - i32.sub - local.set $5 - local.get $3 - i32.const 0 - local.get $5 - i32.sub - i32.const 1 - i32.add - i32.shl - local.set $3 - else local.get $3 - i32.const -1 - i32.const 9 + i32.const 31 i32.shr_u - i32.and - local.set $3 - local.get $3 - i32.const 1 - i32.const 23 - i32.shl - i32.or - local.set $3 - end - loop $while-continue|0 - local.get $4 - local.get $5 - i32.gt_s - local.set $10 - local.get $10 if - local.get $2 - local.get $3 - i32.ge_u + local.get $4 + call $~lib/util/math/checkintf + local.set $7 + local.get $7 + i32.const 0 + i32.eq if - local.get $2 - local.get $3 - i32.eq - if - f32.const 0 - local.get $0 - f32.mul - return - end - local.get $2 - local.get $3 - i32.sub - local.set $2 + local.get $0 + local.get $0 + f32.sub + local.get $0 + local.get $0 + f32.sub + f32.div + return end - local.get $2 - i32.const 1 - i32.shl - local.set $2 - local.get $4 + local.get $7 i32.const 1 - i32.sub - local.set $4 - br $while-continue|0 + i32.eq + if + i32.const 65536 + local.set $2 + end + local.get $3 + i32.const 2147483647 + i32.and + local.set $3 end - end - local.get $2 - local.get $3 - i32.ge_u - if - local.get $2 local.get $3 - i32.eq + i32.const 8388608 + i32.lt_u if - f32.const 0 local.get $0 + f32.const 8388608 f32.mul - return + i32.reinterpret_f32 + local.set $3 + local.get $3 + i32.const 2147483647 + i32.and + local.set $3 + local.get $3 + i32.const 23 + i32.const 23 + i32.shl + i32.sub + local.set $3 end - local.get $2 - local.get $3 - i32.sub - local.set $2 end - local.get $2 - i32.const 8 - i32.shl - i32.clz - local.set $11 - local.get $4 - local.get $11 - i32.sub - local.set $4 - local.get $2 - local.get $11 - i32.shl - local.set $2 - local.get $4 - i32.const 0 - i32.gt_s + local.get $3 + call $~lib/util/math/log2f_inline + local.set $8 + local.get $1 + f64.promote_f32 + local.get $8 + f64.mul + local.set $9 + local.get $9 + i64.reinterpret_f64 + i64.const 47 + i64.shr_u + i64.const 65535 + i64.and + i64.const 32959 + i64.ge_u if - local.get $2 - i32.const 1 - i32.const 23 - i32.shl - i32.sub - local.set $2 - local.get $2 - local.get $4 - i32.const 23 - i32.shl - i32.or - local.set $2 - else - local.get $2 - i32.const 0 - local.get $4 - i32.sub - i32.const 1 - i32.add - i32.shr_u - local.set $2 + local.get $9 + f64.const 127.99999995700433 + f64.gt + if + local.get $2 + call $~lib/util/math/oflowf + return + end + local.get $9 + f64.const -150 + f64.le + if + local.get $2 + call $~lib/util/math/uflowf + return + end end + local.get $9 local.get $2 - local.get $6 - i32.or - local.set $2 - local.get $2 - f32.reinterpret_i32 + call $~lib/util/math/exp2f_inline ) (func $~lib/math/NativeMathf.pow (param $0 f32) (param $1 f32) (result f32) - (local $2 f32) - (local $3 f32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 f32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 f64) - (local $16 f64) - (local $17 f64) - (local $18 f64) - (local $19 f64) - (local $20 f64) - (local $21 f64) - (local $22 f64) - (local $23 i64) - (local $24 i64) local.get $1 f32.abs f32.const 2 @@ -1326,537 +1763,9 @@ i32.const 1 i32.lt_s drop - block $~lib/util/math/powf_lut|inlined.0 (result f32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - i32.const 0 - local.set $4 - local.get $3 - i32.reinterpret_f32 - local.set $5 - local.get $2 - i32.reinterpret_f32 - local.set $6 - i32.const 0 - local.set $7 - local.get $5 - i32.const 8388608 - i32.sub - i32.const 2139095040 - i32.const 8388608 - i32.sub - i32.ge_u - local.get $6 - local.set $8 - local.get $8 - i32.const 1 - i32.shl - i32.const 1 - i32.sub - i32.const 2139095040 - i32.const 1 - i32.shl - i32.const 1 - i32.sub - i32.ge_u - i32.const 0 - i32.ne - local.tee $7 - i32.or - if - local.get $7 - if - local.get $6 - i32.const 1 - i32.shl - i32.const 0 - i32.eq - if - f32.const 1 - br $~lib/util/math/powf_lut|inlined.0 - end - local.get $5 - i32.const 1065353216 - i32.eq - if - f32.const nan:0x400000 - br $~lib/util/math/powf_lut|inlined.0 - end - local.get $5 - i32.const 1 - i32.shl - i32.const 2139095040 - i32.const 1 - i32.shl - i32.gt_u - if (result i32) - i32.const 1 - else - local.get $6 - i32.const 1 - i32.shl - i32.const 2139095040 - i32.const 1 - i32.shl - i32.gt_u - end - if - local.get $3 - local.get $2 - f32.add - br $~lib/util/math/powf_lut|inlined.0 - end - local.get $5 - i32.const 1 - i32.shl - i32.const 1065353216 - i32.const 1 - i32.shl - i32.eq - if - f32.const nan:0x400000 - br $~lib/util/math/powf_lut|inlined.0 - end - local.get $5 - i32.const 1 - i32.shl - i32.const 1065353216 - i32.const 1 - i32.shl - i32.lt_u - local.get $6 - i32.const 31 - i32.shr_u - i32.eqz - i32.eq - if - f32.const 0 - br $~lib/util/math/powf_lut|inlined.0 - end - local.get $2 - local.get $2 - f32.mul - br $~lib/util/math/powf_lut|inlined.0 - end - local.get $5 - local.set $8 - local.get $8 - i32.const 1 - i32.shl - i32.const 1 - i32.sub - i32.const 2139095040 - i32.const 1 - i32.shl - i32.const 1 - i32.sub - i32.ge_u - if - local.get $3 - local.get $3 - f32.mul - local.set $9 - local.get $5 - i32.const 31 - i32.shr_u - if (result i32) - block $~lib/util/math/checkintf|inlined.0 (result i32) - local.get $6 - local.set $8 - local.get $8 - i32.const 23 - i32.shr_u - i32.const 255 - i32.and - local.set $10 - local.get $10 - i32.const 127 - i32.lt_u - if - i32.const 0 - br $~lib/util/math/checkintf|inlined.0 - end - local.get $10 - i32.const 127 - i32.const 23 - i32.add - i32.gt_u - if - i32.const 2 - br $~lib/util/math/checkintf|inlined.0 - end - i32.const 1 - i32.const 127 - i32.const 23 - i32.add - local.get $10 - i32.sub - i32.shl - local.set $10 - local.get $8 - local.get $10 - i32.const 1 - i32.sub - i32.and - if - i32.const 0 - br $~lib/util/math/checkintf|inlined.0 - end - local.get $8 - local.get $10 - i32.and - if - i32.const 1 - br $~lib/util/math/checkintf|inlined.0 - end - i32.const 2 - end - i32.const 1 - i32.eq - else - i32.const 0 - end - if - local.get $9 - f32.neg - local.set $9 - end - local.get $6 - i32.const 31 - i32.shr_u - if (result f32) - f32.const 1 - local.get $9 - f32.div - else - local.get $9 - end - br $~lib/util/math/powf_lut|inlined.0 - end - local.get $5 - i32.const 31 - i32.shr_u - if - block $~lib/util/math/checkintf|inlined.1 (result i32) - local.get $6 - local.set $8 - local.get $8 - i32.const 23 - i32.shr_u - i32.const 255 - i32.and - local.set $10 - local.get $10 - i32.const 127 - i32.lt_u - if - i32.const 0 - br $~lib/util/math/checkintf|inlined.1 - end - local.get $10 - i32.const 127 - i32.const 23 - i32.add - i32.gt_u - if - i32.const 2 - br $~lib/util/math/checkintf|inlined.1 - end - i32.const 1 - i32.const 127 - i32.const 23 - i32.add - local.get $10 - i32.sub - i32.shl - local.set $10 - local.get $8 - local.get $10 - i32.const 1 - i32.sub - i32.and - if - i32.const 0 - br $~lib/util/math/checkintf|inlined.1 - end - local.get $8 - local.get $10 - i32.and - if - i32.const 1 - br $~lib/util/math/checkintf|inlined.1 - end - i32.const 2 - end - local.set $10 - local.get $10 - i32.const 0 - i32.eq - if - local.get $3 - local.get $3 - f32.sub - local.get $3 - local.get $3 - f32.sub - f32.div - br $~lib/util/math/powf_lut|inlined.0 - end - local.get $10 - i32.const 1 - i32.eq - if - i32.const 65536 - local.set $4 - end - local.get $5 - i32.const 2147483647 - i32.and - local.set $5 - end - local.get $5 - i32.const 8388608 - i32.lt_u - if - local.get $3 - f32.const 8388608 - f32.mul - i32.reinterpret_f32 - local.set $5 - local.get $5 - i32.const 2147483647 - i32.and - local.set $5 - local.get $5 - i32.const 23 - i32.const 23 - i32.shl - i32.sub - local.set $5 - end - end - local.get $5 - local.set $8 - local.get $8 - i32.const 1060306944 - i32.sub - local.set $10 - local.get $10 - i32.const 23 - i32.const 4 - i32.sub - i32.shr_u - i32.const 15 - i32.and - local.set $11 - local.get $10 - i32.const -8388608 - i32.and - local.set $12 - local.get $8 - local.get $12 - i32.sub - local.set $13 - local.get $12 - i32.const 23 - i32.shr_s - local.set $14 - i32.const 6152 - local.get $11 - i32.const 1 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load - local.set $15 - i32.const 6152 - local.get $11 - i32.const 1 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load offset=8 - local.set $16 - local.get $13 - f32.reinterpret_i32 - f64.promote_f32 - local.set $17 - local.get $17 - local.get $15 - f64.mul - f64.const 1 - f64.sub - local.set $18 - local.get $16 - local.get $14 - f64.convert_i32_s - f64.add - local.set $19 - f64.const 0.288457581109214 - local.get $18 - f64.mul - f64.const -0.36092606229713164 - f64.add - local.set $20 - f64.const 0.480898481472577 - local.get $18 - f64.mul - f64.const -0.7213474675006291 - f64.add - local.set $21 - f64.const 1.4426950408774342 - local.get $18 - f64.mul - local.get $19 - f64.add - local.set $22 - local.get $18 - local.get $18 - f64.mul - local.set $18 - local.get $22 - local.get $21 - local.get $18 - f64.mul - f64.add - local.set $22 - local.get $20 - local.get $18 - local.get $18 - f64.mul - f64.mul - local.get $22 - f64.add - local.set $20 - local.get $20 - local.set $22 - local.get $2 - f64.promote_f32 - local.get $22 - f64.mul - local.set $21 - local.get $21 - i64.reinterpret_f64 - i64.const 47 - i64.shr_u - i64.const 65535 - i64.and - i64.const 32959 - i64.ge_u - if - local.get $21 - f64.const 127.99999995700433 - f64.gt - if - local.get $4 - local.set $8 - local.get $8 - local.set $10 - i32.const 1879048192 - f32.reinterpret_i32 - local.set $9 - local.get $9 - f32.neg - local.get $9 - local.get $10 - select - local.get $9 - f32.mul - br $~lib/util/math/powf_lut|inlined.0 - end - local.get $21 - f64.const -150 - f64.le - if - local.get $4 - local.set $11 - local.get $11 - local.set $12 - i32.const 268435456 - f32.reinterpret_i32 - local.set $9 - local.get $9 - f32.neg - local.get $9 - local.get $12 - select - local.get $9 - f32.mul - br $~lib/util/math/powf_lut|inlined.0 - end - end - local.get $21 - local.set $15 - local.get $4 - local.set $13 - local.get $15 - f64.const 211106232532992 - f64.add - local.set $20 - local.get $20 - i64.reinterpret_f64 - local.set $23 - local.get $15 - local.get $20 - f64.const 211106232532992 - f64.sub - f64.sub - local.set $19 - i32.const 6408 - local.get $23 - i32.wrap_i64 - i32.const 31 - i32.and - i32.const 3 - i32.shl - i32.add - i64.load - local.set $24 - local.get $24 - local.get $23 - local.get $13 - i64.extend_i32_u - i64.add - i64.const 52 - i64.const 5 - i64.sub - i64.shl - i64.add - local.set $24 - local.get $24 - f64.reinterpret_i64 - local.set $16 - f64.const 0.05550361559341535 - local.get $19 - f64.mul - f64.const 0.2402284522445722 - f64.add - local.set $18 - f64.const 0.6931471806916203 - local.get $19 - f64.mul - f64.const 1 - f64.add - local.set $17 - local.get $17 - local.get $18 - local.get $19 - local.get $19 - f64.mul - f64.mul - f64.add - local.set $17 - local.get $17 - local.get $16 - f64.mul - local.set $17 - local.get $17 - f32.demote_f64 - end + local.get $0 + local.get $1 + call $~lib/util/math/powf_lut return ) (func $~lib/math/NativeMath.mod (param $0 f64) (param $1 f64) (result f64) diff --git a/tests/compiler/class.untouched.wat b/tests/compiler/class.untouched.wat index 32445315c1..9847f32df1 100644 --- a/tests/compiler/class.untouched.wat +++ b/tests/compiler/class.untouched.wat @@ -237,219 +237,214 @@ i32.store offset=12 local.get $2 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + (local $6 i64) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 + i32.const 0 + i32.const 1 + i32.gt_s + drop + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.set $3 + local.get $0 + local.get $1 + i32.store8 + local.get $3 + local.get $1 + i32.store8 offset=3 + local.get $2 + i32.const 2 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store8 offset=1 + local.get $0 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=1 + local.get $2 + i32.const 6 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store8 offset=3 + local.get $3 + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $5 + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.set $3 + local.get $0 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=16 + local.get $3 + local.get $5 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=12 + local.get $0 + local.get $5 + i32.store offset=16 + local.get $0 + local.get $5 + i32.store offset=20 + local.get $0 + local.get $5 + i32.store offset=24 + local.get $3 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=12 + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $5 + i64.extend_i32_u + local.get $5 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $6 + loop $while-continue|0 local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - i32.const 4 - i32.sub - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - local.get $4 - i32.store8 offset=3 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=1 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and + i32.const 32 + i32.ge_u local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - i32.const 28 - i32.sub - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=24 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=16 - local.get $6 - local.get $8 - i32.store offset=20 - local.get $3 - i32.const 24 - i32.le_u if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=4 - local.get $6 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=12 - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 + local.get $0 + local.get $6 + i64.store + local.get $0 + local.get $6 + i64.store offset=8 + local.get $0 + local.get $6 + i64.store offset=16 + local.get $0 + local.get $6 + i64.store offset=24 + local.get $2 i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 end end ) + (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memset + ) (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index d3ce08b230..31485a2a39 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -1,11 +1,13 @@ (module (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) - (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result 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))) + (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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -105,6 +107,58 @@ i32.const 1 global.set $do/ran ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -119,7 +173,7 @@ if i32.const 0 i32.const 1072 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -141,7 +195,7 @@ if i32.const 0 i32.const 1072 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -160,23 +214,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -184,72 +238,56 @@ if i32.const 0 i32.const 1072 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -257,7 +295,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -280,7 +318,7 @@ if i32.const 0 i32.const 1072 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -294,22 +332,16 @@ if i32.const 0 i32.const 1072 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -318,7 +350,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -327,7 +359,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -338,16 +370,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -367,7 +393,7 @@ if i32.const 0 i32.const 1072 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -400,8 +426,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -422,7 +448,7 @@ if i32.const 0 i32.const 1072 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -432,17 +458,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1072 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -471,13 +497,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -485,21 +511,15 @@ if i32.const 0 i32.const 1072 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -514,37 +534,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -568,7 +579,7 @@ if i32.const 0 i32.const 1072 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -585,7 +596,7 @@ if i32.const 0 i32.const 1072 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -613,7 +624,7 @@ if i32.const 0 i32.const 1072 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -665,7 +676,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -686,7 +697,8 @@ unreachable end i32.const 1216 - local.tee $0 + local.set $2 + i32.const 1216 i32.const 0 i32.store i32.const 2784 @@ -697,35 +709,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1216 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1216 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -745,24 +748,23 @@ i32.const 1216 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 - i32.load offset=4 + i32.const 0 + call $~lib/rt/tlsf/GETSL i32.const -2 i32.and local.tee $2 if (result i32) local.get $0 + i32.const 0 local.get $2 i32.ctz - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -774,31 +776,22 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1072 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end @@ -812,7 +805,7 @@ if i32.const 0 i32.const 1072 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -831,15 +824,16 @@ local.tee $1 i32.eqz if - i32.const 16 memory.size - local.tee $2 + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl i32.const 65551 @@ -848,18 +842,16 @@ i32.and i32.const 16 i32.shr_u - local.set $1 - local.get $2 + local.tee $2 local.get $1 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -868,7 +860,7 @@ end end local.get $0 - local.get $2 + local.get $1 i32.const 16 i32.shl memory.size @@ -882,7 +874,7 @@ if i32.const 0 i32.const 1072 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -898,7 +890,7 @@ if i32.const 0 i32.const 1072 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -953,20 +945,9 @@ i32.and i32.store local.get $1 - i32.const 16 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 + call $~lib/rt/tlsf/GETRIGHT local.get $1 - i32.load - i32.const -4 - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const -3 i32.and diff --git a/tests/compiler/do.untouched.wat b/tests/compiler/do.untouched.wat index 418a287303..93359ed5ed 100644 --- a/tests/compiler/do.untouched.wat +++ b/tests/compiler/do.untouched.wat @@ -2,8 +2,8 @@ (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (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_i32_=>_none (func (param i32 i32 i32))) @@ -440,6 +440,69 @@ i32.const 1 global.set $do/ran ) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -448,9 +511,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -463,7 +523,7 @@ if i32.const 0 i32.const 64 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -490,7 +550,7 @@ if i32.const 0 i32.const 64 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -544,7 +604,7 @@ if i32.const 0 i32.const 64 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -569,77 +629,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -656,6 +674,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -667,8 +691,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -676,7 +698,7 @@ if i32.const 0 i32.const 64 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -693,28 +715,18 @@ if i32.const 0 i32.const 64 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -725,44 +737,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -770,30 +772,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 64 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -812,22 +810,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -853,7 +851,7 @@ if i32.const 0 i32.const 64 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -865,18 +863,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 64 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -930,27 +928,15 @@ if i32.const 0 i32.const 64 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -965,24 +951,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -992,31 +964,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -1024,8 +980,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -1051,24 +1005,22 @@ if i32.const 0 i32.const 64 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -1076,7 +1028,7 @@ if i32.const 0 i32.const 64 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -1084,16 +1036,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -1109,7 +1061,7 @@ if i32.const 0 i32.const 64 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -1118,8 +1070,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -1130,49 +1082,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -1185,10 +1133,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -1238,73 +1182,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -1317,11 +1234,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -1341,7 +1258,7 @@ if i32.const 112 i32.const 64 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -1367,9 +1284,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1437,31 +1351,24 @@ if i32.const 0 i32.const 64 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1474,79 +1381,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 64 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1583,9 +1459,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1599,12 +1473,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1614,7 +1488,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1651,7 +1525,7 @@ if i32.const 0 i32.const 64 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1702,29 +1576,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1744,7 +1598,7 @@ if i32.const 0 i32.const 64 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1791,7 +1645,7 @@ if i32.const 0 i32.const 64 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1812,7 +1666,7 @@ if i32.const 0 i32.const 64 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1833,7 +1687,7 @@ if i32.const 0 i32.const 64 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index e0b0674624..8412a4920f 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -3,9 +3,9 @@ (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -30,6 +30,58 @@ (global $~lib/rt/pure/END (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -44,7 +96,7 @@ if i32.const 0 i32.const 1136 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -66,7 +118,7 @@ if i32.const 0 i32.const 1136 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -85,23 +137,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -109,72 +161,56 @@ if i32.const 0 i32.const 1136 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -182,7 +218,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -205,7 +241,7 @@ if i32.const 0 i32.const 1136 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -219,22 +255,16 @@ if i32.const 0 i32.const 1136 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -243,7 +273,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -252,7 +282,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -263,16 +293,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -292,7 +316,7 @@ if i32.const 0 i32.const 1136 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -325,8 +349,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -347,7 +371,7 @@ if i32.const 0 i32.const 1136 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -357,17 +381,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1136 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -396,13 +420,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -410,21 +434,15 @@ if i32.const 0 i32.const 1136 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -439,37 +457,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -493,7 +502,7 @@ if i32.const 0 i32.const 1136 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -510,7 +519,7 @@ if i32.const 0 i32.const 1136 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -538,7 +547,7 @@ if i32.const 0 i32.const 1136 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -590,7 +599,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -611,7 +620,8 @@ unreachable end i32.const 1568 - local.tee $0 + local.set $2 + i32.const 1568 i32.const 0 i32.store i32.const 3136 @@ -622,35 +632,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1568 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1568 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -670,7 +671,7 @@ i32.const 1568 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) local.get $0 @@ -679,7 +680,7 @@ if i32.const 1184 i32.const 1136 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -752,17 +753,14 @@ if i32.const 0 i32.const 1136 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const -1 local.get $1 i32.shl @@ -770,16 +768,10 @@ local.tee $1 if (result i32) local.get $0 + local.get $2 local.get $1 i32.ctz - local.get $2 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -795,31 +787,22 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1136 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end @@ -837,7 +820,7 @@ if i32.const 0 i32.const 1136 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -880,20 +863,9 @@ i32.and i32.store local.get $1 - i32.const 16 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 + call $~lib/rt/tlsf/GETRIGHT local.get $1 - i32.load - i32.const -4 - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const -3 i32.and @@ -908,7 +880,7 @@ if i32.const 0 i32.const 1136 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -932,15 +904,16 @@ local.tee $3 i32.eqz if - i32.const 16 memory.size local.tee $3 i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -965,9 +938,7 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 - local.get $5 + local.tee $5 local.get $3 local.get $5 i32.gt_s @@ -1000,7 +971,7 @@ if i32.const 0 i32.const 1136 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1016,7 +987,7 @@ if i32.const 0 i32.const 1136 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -1131,184 +1102,186 @@ if i32.const 0 i32.const 1136 - i32.const 581 + i32.const 573 i32.const 3 call $~lib/builtins/abort unreachable end local.get $1 ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $0 + local.get $1 + i32.lt_u + if local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 + i32.const 7 + i32.and local.get $0 - local.get $1 - i32.lt_u + i32.const 7 + i32.and + i32.eq if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + return end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $2 + i32.const 1 + i32.sub + local.set $2 local.get $0 - local.tee $2 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $1 - local.get $2 local.get $3 + local.get $4 i32.load8_u i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 + br $while-continue|0 end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 - local.get $4 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and if - local.get $4 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $4 - local.get $0 + local.tee $2 i32.add local.get $1 - local.get $4 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) @@ -1348,13 +1321,7 @@ return end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.tee $6 i32.load local.tee $4 @@ -1378,10 +1345,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 @@ -1411,7 +1378,7 @@ i32.const 16 i32.add local.get $2 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $1 i32.const 1564 i32.ge_u @@ -1422,161 +1389,171 @@ end local.get $3 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (local $2 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 4 - i32.sub - local.tee $2 - i32.const 0 - i32.store8 offset=3 - local.get $1 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 offset=1 - local.get $0 - i32.const 0 - i32.store8 offset=2 - local.get $2 - i32.const 0 - i32.store8 offset=2 - local.get $2 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 offset=3 - local.get $2 - i32.const 0 - i32.store8 - local.get $1 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $2 - i32.add - local.tee $0 - i32.const 0 - i32.store - local.get $0 - local.get $1 - local.get $2 - i32.sub - i32.const -4 - i32.and - local.tee $2 - i32.add - i32.const 28 - i32.sub - local.tee $1 - i32.const 0 - i32.store offset=24 - local.get $2 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $2 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $1 - i32.const 0 - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $0 - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $1 - i32.add - local.set $0 - local.get $2 + local.get $1 + i32.eqz + if + return + end + local.get $0 + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 4 + i32.sub + local.tee $2 + i32.const 0 + i32.store8 offset=3 + local.get $1 + i32.const 2 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store8 offset=1 + local.get $0 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=1 + local.get $1 + i32.const 6 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store8 offset=3 + local.get $2 + i32.const 0 + i32.store8 + local.get $1 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $2 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $0 + local.get $1 + local.get $2 + i32.sub + i32.const -4 + i32.and + local.tee $2 + i32.add + i32.const 28 + i32.sub + local.tee $1 + i32.const 0 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + i32.const 0 + i32.store offset=24 + local.get $1 + i32.const 0 + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $1 + i32.add + local.set $0 + local.get $2 + local.get $1 + i32.sub + local.set $1 + loop $while-continue|0 local.get $1 - i32.sub - local.set $1 - loop $while-continue|0 + i32.const 32 + i32.ge_u + if + local.get $0 + i64.const 0 + i64.store + local.get $0 + i64.const 0 + i64.store offset=8 + local.get $0 + i64.const 0 + i64.store offset=16 + local.get $0 + i64.const 0 + i64.store offset=24 local.get $1 i32.const 32 - i32.ge_u - if - local.get $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i64.const 0 - i64.store offset=16 - local.get $0 - i64.const 0 - i64.store offset=24 - local.get $1 - i32.const 32 - i32.sub - local.set $1 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $while-continue|0 - end + i32.sub + local.set $1 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 end end ) @@ -1632,7 +1609,7 @@ local.get $5 local.get $3 i32.sub - call $~lib/memory/memory.fill + call $~lib/util/memory/memset local.get $1 local.get $4 i32.ne @@ -2047,7 +2024,7 @@ local.tee $2 local.get $1 local.get $3 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $1 if call $~lib/rt/tlsf/maybeInitialize diff --git a/tests/compiler/extends-baseaggregate.untouched.wat b/tests/compiler/extends-baseaggregate.untouched.wat index fd84213021..a202353c9b 100644 --- a/tests/compiler/extends-baseaggregate.untouched.wat +++ b/tests/compiler/extends-baseaggregate.untouched.wat @@ -3,8 +3,8 @@ (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 $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -37,6 +37,69 @@ (global $~lib/heap/__heap_base i32 (i32.const 556)) (export "memory" (memory $0)) (start $~start) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -45,9 +108,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -60,7 +120,7 @@ if i32.const 0 i32.const 128 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -87,7 +147,7 @@ if i32.const 0 i32.const 128 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -141,7 +201,7 @@ if i32.const 0 i32.const 128 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -166,77 +226,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -253,6 +271,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -264,8 +288,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -273,7 +295,7 @@ if i32.const 0 i32.const 128 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -290,28 +312,18 @@ if i32.const 0 i32.const 128 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -322,44 +334,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -367,30 +369,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 128 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -409,22 +407,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -450,7 +448,7 @@ if i32.const 0 i32.const 128 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -462,18 +460,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 128 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -527,27 +525,15 @@ if i32.const 0 i32.const 128 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -562,24 +548,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -589,31 +561,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -621,8 +577,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -648,24 +602,22 @@ if i32.const 0 i32.const 128 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -673,7 +625,7 @@ if i32.const 0 i32.const 128 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -681,16 +633,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -706,7 +658,7 @@ if i32.const 0 i32.const 128 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -715,8 +667,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -727,49 +679,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -782,10 +730,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -835,73 +779,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -914,11 +831,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -938,7 +855,7 @@ if i32.const 176 i32.const 128 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -964,9 +881,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1034,31 +948,24 @@ if i32.const 0 i32.const 128 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1071,79 +978,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 128 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1180,9 +1056,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1196,12 +1070,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1211,7 +1085,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1248,7 +1122,7 @@ if i32.const 0 i32.const 128 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1299,29 +1173,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1341,7 +1195,7 @@ if i32.const 0 i32.const 128 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1388,7 +1242,7 @@ if i32.const 0 i32.const 128 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1409,7 +1263,7 @@ if i32.const 0 i32.const 128 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1430,7 +1284,7 @@ if i32.const 0 i32.const 128 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -1603,7 +1457,7 @@ if i32.const 0 i32.const 128 - i32.const 581 + i32.const 573 i32.const 3 call $~lib/builtins/abort unreachable @@ -2634,238 +2488,233 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if local.get $0 - local.set $5 local.get $1 - local.set $4 local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if i32.const 0 - i32.const 1 + i32.const 2 i32.lt_s drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 + local.get $3 + if + local.get $2 + i32.eqz if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 + return end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 i32.const 1 i32.add - local.set $5 - local.get $7 + local.set $0 local.get $4 - local.tee $7 + local.get $1 + local.tee $4 i32.const 1 i32.add - local.set $4 - local.get $7 + local.set $1 + local.get $4 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 + br $while-continue|0 end end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 @@ -2914,22 +2763,12 @@ return end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $5 local.get $5 - i32.const 16 - i32.add - local.get $5 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $6 local.get $6 - i32.load - local.set $7 - local.get $7 i32.const 1 i32.and if @@ -2940,25 +2779,25 @@ i32.and i32.const 16 i32.add - local.get $7 + local.get $6 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $5 - local.get $5 + local.set $7 + local.get $7 local.get $3 i32.ge_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $4 i32.const 3 i32.and - local.get $5 + local.get $7 i32.or i32.store local.get $1 @@ -3011,219 +2850,214 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + (local $6 i64) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - i32.const 4 - i32.sub - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - local.get $4 - i32.store8 offset=3 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=1 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and + i32.const 0 + i32.const 1 + i32.gt_s + drop + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.set $3 + local.get $0 + local.get $1 + i32.store8 + local.get $3 + local.get $1 + i32.store8 offset=3 + local.get $2 + i32.const 2 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store8 offset=1 + local.get $0 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=1 + local.get $2 + i32.const 6 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store8 offset=3 + local.get $3 + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $5 + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.set $3 + local.get $0 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=16 + local.get $3 + local.get $5 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=12 + local.get $0 + local.get $5 + i32.store offset=16 + local.get $0 + local.get $5 + i32.store offset=20 + local.get $0 + local.get $5 + i32.store offset=24 + local.get $3 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=12 + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $5 + i64.extend_i32_u + local.get $5 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $6 + loop $while-continue|0 + local.get $2 + i32.const 32 + i32.ge_u local.set $7 - local.get $5 local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - i32.const 28 - i32.sub - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=24 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=16 - local.get $6 - local.get $8 - i32.store offset=20 - local.get $3 - i32.const 24 - i32.le_u if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=4 - local.get $6 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=12 - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 + local.get $0 + local.get $6 + i64.store + local.get $0 + local.get $6 + i64.store offset=8 + local.get $0 + local.get $6 + i64.store offset=16 + local.get $0 + local.get $6 + i64.store offset=24 + local.get $2 i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 end end ) + (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memset + ) (func $~lib/array/ensureSize (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 5ffcec178e..66375886ee 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -1,11 +1,13 @@ (module (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) - (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result 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))) + (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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -102,6 +104,58 @@ i32.const 1 global.set $for/ran ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -116,7 +170,7 @@ if i32.const 0 i32.const 1072 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -138,7 +192,7 @@ if i32.const 0 i32.const 1072 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -157,23 +211,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -181,72 +235,56 @@ if i32.const 0 i32.const 1072 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -254,7 +292,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -277,7 +315,7 @@ if i32.const 0 i32.const 1072 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -291,22 +329,16 @@ if i32.const 0 i32.const 1072 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -315,7 +347,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -324,7 +356,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -335,16 +367,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -364,7 +390,7 @@ if i32.const 0 i32.const 1072 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -397,8 +423,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -419,7 +445,7 @@ if i32.const 0 i32.const 1072 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -429,17 +455,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1072 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -468,13 +494,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -482,21 +508,15 @@ if i32.const 0 i32.const 1072 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -511,37 +531,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -565,7 +576,7 @@ if i32.const 0 i32.const 1072 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -582,7 +593,7 @@ if i32.const 0 i32.const 1072 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -610,7 +621,7 @@ if i32.const 0 i32.const 1072 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -662,7 +673,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -683,7 +694,8 @@ unreachable end i32.const 1216 - local.tee $0 + local.set $2 + i32.const 1216 i32.const 0 i32.store i32.const 2784 @@ -694,35 +706,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1216 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1216 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -742,24 +745,23 @@ i32.const 1216 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 - i32.load offset=4 + i32.const 0 + call $~lib/rt/tlsf/GETSL i32.const -2 i32.and local.tee $2 if (result i32) local.get $0 + i32.const 0 local.get $2 i32.ctz - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -771,31 +773,22 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1072 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end @@ -809,7 +802,7 @@ if i32.const 0 i32.const 1072 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -828,15 +821,16 @@ local.tee $1 i32.eqz if - i32.const 16 memory.size - local.tee $2 + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl i32.const 65551 @@ -845,18 +839,16 @@ i32.and i32.const 16 i32.shr_u - local.set $1 - local.get $2 + local.tee $2 local.get $1 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -865,7 +857,7 @@ end end local.get $0 - local.get $2 + local.get $1 i32.const 16 i32.shl memory.size @@ -879,7 +871,7 @@ if i32.const 0 i32.const 1072 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -895,7 +887,7 @@ if i32.const 0 i32.const 1072 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -950,20 +942,9 @@ i32.and i32.store local.get $1 - i32.const 16 - i32.add - local.tee $0 + call $~lib/rt/tlsf/GETRIGHT 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 + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const -3 i32.and diff --git a/tests/compiler/for.untouched.wat b/tests/compiler/for.untouched.wat index 78c447d516..c46ee396d0 100644 --- a/tests/compiler/for.untouched.wat +++ b/tests/compiler/for.untouched.wat @@ -3,11 +3,11 @@ (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_i32 (func (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_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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -453,6 +453,69 @@ i32.const 1 global.set $for/ran ) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -461,9 +524,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -476,7 +536,7 @@ if i32.const 0 i32.const 64 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -503,7 +563,7 @@ if i32.const 0 i32.const 64 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -557,7 +617,7 @@ if i32.const 0 i32.const 64 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -582,77 +642,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -669,6 +687,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -680,8 +704,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -689,7 +711,7 @@ if i32.const 0 i32.const 64 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -706,28 +728,18 @@ if i32.const 0 i32.const 64 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -738,44 +750,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -783,30 +785,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 64 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -825,22 +823,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -866,7 +864,7 @@ if i32.const 0 i32.const 64 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -878,18 +876,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 64 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -943,27 +941,15 @@ if i32.const 0 i32.const 64 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -978,24 +964,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -1005,31 +977,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -1037,8 +993,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -1064,24 +1018,22 @@ if i32.const 0 i32.const 64 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -1089,7 +1041,7 @@ if i32.const 0 i32.const 64 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -1097,16 +1049,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -1122,7 +1074,7 @@ if i32.const 0 i32.const 64 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -1131,8 +1083,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -1143,49 +1095,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -1198,10 +1146,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -1251,73 +1195,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -1330,11 +1247,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -1354,7 +1271,7 @@ if i32.const 112 i32.const 64 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -1380,9 +1297,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1450,31 +1364,24 @@ if i32.const 0 i32.const 64 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1487,79 +1394,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 64 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1596,9 +1472,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1612,12 +1486,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1627,7 +1501,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1664,7 +1538,7 @@ if i32.const 0 i32.const 64 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1715,29 +1589,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1757,7 +1611,7 @@ if i32.const 0 i32.const 64 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1804,7 +1658,7 @@ if i32.const 0 i32.const 64 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1825,7 +1679,7 @@ if i32.const 0 i32.const 64 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1846,7 +1700,7 @@ if i32.const 0 i32.const 64 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index 454a19e0c9..0fa0db838c 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -1,13 +1,13 @@ (module (type $i32_=>_none (func (param i32))) - (type $i32_i32_=>_none (func (param i32 i32))) (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_i32_=>_none (func (param i32 i32 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_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -37,6 +37,58 @@ (export "Managed#get:foo" (func $implicit-getter-setter/Managed#get:foo)) (export "Managed#set:foo" (func $implicit-getter-setter/Managed#set:foo)) (export "Managed#constructor" (func $implicit-getter-setter/Managed#constructor)) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -51,7 +103,7 @@ if i32.const 0 i32.const 1040 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -73,7 +125,7 @@ if i32.const 0 i32.const 1040 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -92,23 +144,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -116,72 +168,56 @@ if i32.const 0 i32.const 1040 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -189,7 +225,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -212,7 +248,7 @@ if i32.const 0 i32.const 1040 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -226,22 +262,16 @@ if i32.const 0 i32.const 1040 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -250,7 +280,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -259,7 +289,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -270,16 +300,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -299,7 +323,7 @@ if i32.const 0 i32.const 1040 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -332,8 +356,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -354,7 +378,7 @@ if i32.const 0 i32.const 1040 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -364,17 +388,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1040 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -403,13 +427,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -417,21 +441,15 @@ if i32.const 0 i32.const 1040 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -446,37 +464,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -500,7 +509,7 @@ if i32.const 0 i32.const 1040 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -517,7 +526,7 @@ if i32.const 0 i32.const 1040 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -545,7 +554,7 @@ if i32.const 0 i32.const 1040 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -597,7 +606,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -618,7 +627,8 @@ unreachable end i32.const 1232 - local.tee $0 + local.set $2 + i32.const 1232 i32.const 0 i32.store i32.const 2800 @@ -629,35 +639,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1232 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1232 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -677,7 +678,7 @@ i32.const 1232 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -735,17 +736,14 @@ if i32.const 0 i32.const 1040 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const -1 local.get $1 i32.shl @@ -753,16 +751,10 @@ local.tee $1 if (result i32) local.get $0 + local.get $2 local.get $1 i32.ctz - local.get $2 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -778,111 +770,27 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1040 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 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 15 - i32.and - if - i32.const 0 - i32.const 1040 - i32.const 365 - 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 32 - 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 16 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 16 - 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 16 - 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) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -891,37 +799,38 @@ if i32.const 0 i32.const 1040 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + local.tee $3 i32.const 1073741808 i32.ge_u if i32.const 1088 i32.const 1040 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable end local.get $0 - local.get $1 + local.get $3 i32.const 15 i32.add i32.const -16 i32.and - local.tee $3 + local.tee $1 i32.const 16 - local.get $3 + local.get $1 i32.const 16 i32.gt_u select local.tee $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if i32.const 1 @@ -931,18 +840,19 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if - i32.const 16 memory.size - local.tee $3 + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -967,10 +877,8 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 - local.get $5 - local.get $3 + local.tee $5 + local.get $1 local.get $5 i32.gt_s select @@ -987,7 +895,7 @@ end end local.get $0 - local.get $3 + local.get $1 i32.const 16 i32.shl memory.size @@ -997,19 +905,19 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if i32.const 0 i32.const 1040 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable end end end - local.get $3 + local.get $1 i32.load i32.const -4 i32.and @@ -1018,30 +926,86 @@ if i32.const 0 i32.const 1040 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 0 i32.store offset=4 - local.get $3 + local.get $1 local.get $2 i32.store offset=8 - local.get $3 local.get $1 + local.get $3 i32.store offset=12 local.get $0 - local.get $3 + local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 + local.get $1 + i32.load + local.set $2 local.get $4 - call $~lib/rt/tlsf/prepareBlock - local.get $3 + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1040 + i32.const 357 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const -4 + i32.and + local.get $4 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $4 + local.get $2 + i32.const 2 + i32.and + i32.or + i32.store + local.get $4 + local.get $1 + i32.const 16 + i32.add + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + call $~lib/rt/tlsf/GETRIGHT + local.get $1 + call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $1 call $~lib/rt/rtrace/onalloc - local.get $3 + local.get $1 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize diff --git a/tests/compiler/implicit-getter-setter.untouched.wat b/tests/compiler/implicit-getter-setter.untouched.wat index 0bf24f8ead..00d0972e46 100644 --- a/tests/compiler/implicit-getter-setter.untouched.wat +++ b/tests/compiler/implicit-getter-setter.untouched.wat @@ -4,9 +4,9 @@ (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 $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_=>_none (func)) (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) @@ -41,6 +41,69 @@ (export "Managed#get:foo" (func $implicit-getter-setter/Managed#get:foo)) (export "Managed#set:foo" (func $implicit-getter-setter/Managed#set:foo)) (export "Managed#constructor" (func $implicit-getter-setter/Managed#constructor)) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -49,9 +112,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -64,7 +124,7 @@ if i32.const 0 i32.const 32 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -91,7 +151,7 @@ if i32.const 0 i32.const 32 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -145,7 +205,7 @@ if i32.const 0 i32.const 32 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -170,77 +230,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -257,6 +275,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -268,8 +292,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -277,7 +299,7 @@ if i32.const 0 i32.const 32 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -294,28 +316,18 @@ if i32.const 0 i32.const 32 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -326,44 +338,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -371,30 +373,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 32 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -413,22 +411,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -454,7 +452,7 @@ if i32.const 0 i32.const 32 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -466,18 +464,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 32 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -531,27 +529,15 @@ if i32.const 0 i32.const 32 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -566,24 +552,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -593,31 +565,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -625,8 +581,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -652,24 +606,22 @@ if i32.const 0 i32.const 32 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -677,7 +629,7 @@ if i32.const 0 i32.const 32 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -685,16 +637,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -710,7 +662,7 @@ if i32.const 0 i32.const 32 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -719,8 +671,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -731,49 +683,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -786,10 +734,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -839,73 +783,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -918,11 +835,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -942,7 +859,7 @@ if i32.const 80 i32.const 32 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -968,9 +885,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1038,31 +952,24 @@ if i32.const 0 i32.const 32 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1075,79 +982,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 32 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1184,9 +1060,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1200,12 +1074,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1215,7 +1089,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1252,7 +1126,7 @@ if i32.const 0 i32.const 32 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1303,29 +1177,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1345,7 +1199,7 @@ if i32.const 0 i32.const 32 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1392,7 +1246,7 @@ if i32.const 0 i32.const 32 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1413,7 +1267,7 @@ if i32.const 0 i32.const 32 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1434,7 +1288,7 @@ if i32.const 0 i32.const 32 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index ebe9642e9f..95481f9449 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -112,177 +112,179 @@ i32.store offset=12 local.get $4 ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $0 + local.get $1 + i32.lt_u + if local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 + i32.const 7 + i32.and local.get $0 - local.get $1 - i32.lt_u + i32.const 7 + i32.and + i32.eq if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + return end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $2 + i32.const 1 + i32.sub + local.set $2 local.get $0 - local.tee $2 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $1 - local.get $2 local.get $3 + local.get $4 i32.load8_u i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 + br $while-continue|0 end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 - local.get $4 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and if - local.get $4 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $4 - local.get $0 + local.tee $2 i32.add local.get $1 - local.get $4 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) (func $~lib/rt/__allocArray (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) @@ -306,7 +308,7 @@ local.get $1 local.get $3 local.get $5 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove end local.get $2 local.get $1 diff --git a/tests/compiler/infer-array.untouched.wat b/tests/compiler/infer-array.untouched.wat index 3858de811f..a8d38a0988 100644 --- a/tests/compiler/infer-array.untouched.wat +++ b/tests/compiler/infer-array.untouched.wat @@ -1,8 +1,8 @@ (module (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_=>_none (func (param i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) @@ -1168,238 +1168,233 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if local.get $0 - local.set $5 local.get $1 - local.set $4 local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if i32.const 0 - i32.const 1 + i32.const 2 i32.lt_s drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.tee $7 + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 i32.const 1 i32.add - local.set $5 - local.get $7 + local.set $0 local.get $4 - local.tee $7 + local.get $1 + local.tee $4 i32.const 1 i32.add - local.set $4 - local.get $7 + local.set $1 + local.get $4 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 + br $while-continue|0 end end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) (func $~lib/rt/__allocBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index 555c78f813..58c8d49e05 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -2,10 +2,12 @@ (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result 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_=>_none (func)) (type $none_=>_i32 (func (result 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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -21,6 +23,58 @@ (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -35,7 +89,7 @@ if i32.const 0 i32.const 1040 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -57,7 +111,7 @@ if i32.const 0 i32.const 1040 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -76,23 +130,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -100,72 +154,56 @@ if i32.const 0 i32.const 1040 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -173,7 +211,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -196,7 +234,7 @@ if i32.const 0 i32.const 1040 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -210,22 +248,16 @@ if i32.const 0 i32.const 1040 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -234,7 +266,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -243,7 +275,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -254,16 +286,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -283,7 +309,7 @@ if i32.const 0 i32.const 1040 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -316,8 +342,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -338,7 +364,7 @@ if i32.const 0 i32.const 1040 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -348,17 +374,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1040 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -387,13 +413,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -401,21 +427,15 @@ if i32.const 0 i32.const 1040 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -430,37 +450,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -484,7 +495,7 @@ if i32.const 0 i32.const 1040 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -501,7 +512,7 @@ if i32.const 0 i32.const 1040 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -529,7 +540,7 @@ if i32.const 0 i32.const 1040 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -581,7 +592,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -602,7 +613,8 @@ unreachable end i32.const 1264 - local.tee $0 + local.set $2 + i32.const 1264 i32.const 0 i32.store i32.const 2832 @@ -613,35 +625,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1264 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1264 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -661,24 +664,23 @@ i32.const 1264 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 - i32.load offset=4 + i32.const 0 + call $~lib/rt/tlsf/GETSL i32.const -2 i32.and local.tee $2 if (result i32) local.get $0 + i32.const 0 local.get $2 i32.ctz - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -690,31 +692,22 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1040 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end @@ -728,7 +721,7 @@ if i32.const 0 i32.const 1040 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -747,15 +740,16 @@ local.tee $1 i32.eqz if - i32.const 16 memory.size - local.tee $2 + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl i32.const 65551 @@ -764,18 +758,16 @@ i32.and i32.const 16 i32.shr_u - local.set $1 - local.get $2 + local.tee $2 local.get $1 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -784,7 +776,7 @@ end end local.get $0 - local.get $2 + local.get $1 i32.const 16 i32.shl memory.size @@ -798,7 +790,7 @@ if i32.const 0 i32.const 1040 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -814,7 +806,7 @@ if i32.const 0 i32.const 1040 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -869,20 +861,9 @@ i32.and i32.store local.get $1 - i32.const 16 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 + call $~lib/rt/tlsf/GETRIGHT local.get $1 - i32.load - i32.const -4 - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const -3 i32.and diff --git a/tests/compiler/issues/1095.untouched.wat b/tests/compiler/issues/1095.untouched.wat index ababb570f7..b592c2a128 100644 --- a/tests/compiler/issues/1095.untouched.wat +++ b/tests/compiler/issues/1095.untouched.wat @@ -1,8 +1,8 @@ (module (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) (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_i32_=>_none (func (param i32 i32 i32))) @@ -27,6 +27,69 @@ (global $~lib/heap/__heap_base i32 (i32.const 252)) (export "memory" (memory $0)) (start $~start) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -35,9 +98,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -50,7 +110,7 @@ if i32.const 0 i32.const 32 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -77,7 +137,7 @@ if i32.const 0 i32.const 32 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -131,7 +191,7 @@ if i32.const 0 i32.const 32 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -156,77 +216,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -243,6 +261,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -254,8 +278,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -263,7 +285,7 @@ if i32.const 0 i32.const 32 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -280,28 +302,18 @@ if i32.const 0 i32.const 32 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -312,44 +324,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -357,30 +359,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 32 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -399,22 +397,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -440,7 +438,7 @@ if i32.const 0 i32.const 32 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -452,18 +450,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 32 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -517,27 +515,15 @@ if i32.const 0 i32.const 32 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -552,24 +538,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -579,31 +551,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -611,8 +567,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -638,24 +592,22 @@ if i32.const 0 i32.const 32 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -663,7 +615,7 @@ if i32.const 0 i32.const 32 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -671,16 +623,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -696,7 +648,7 @@ if i32.const 0 i32.const 32 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -705,8 +657,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -717,49 +669,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -772,10 +720,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -825,73 +769,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -904,11 +821,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -928,7 +845,7 @@ if i32.const 80 i32.const 32 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -954,9 +871,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1024,31 +938,24 @@ if i32.const 0 i32.const 32 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1061,79 +968,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 32 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1170,9 +1046,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1186,12 +1060,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1201,7 +1075,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1238,7 +1112,7 @@ if i32.const 0 i32.const 32 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1289,29 +1163,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1331,7 +1185,7 @@ if i32.const 0 i32.const 32 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1378,7 +1232,7 @@ if i32.const 0 i32.const 32 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1399,7 +1253,7 @@ if i32.const 0 i32.const 32 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1420,7 +1274,7 @@ if i32.const 0 i32.const 32 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index 0ed2b2c8b5..75840109dd 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -3,10 +3,11 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_i32 (func (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))) (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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -23,6 +24,58 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -37,7 +90,7 @@ if i32.const 0 i32.const 1040 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -59,7 +112,7 @@ if i32.const 0 i32.const 1040 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -78,23 +131,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -102,72 +155,56 @@ if i32.const 0 i32.const 1040 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -175,7 +212,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -198,7 +235,7 @@ if i32.const 0 i32.const 1040 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -212,22 +249,16 @@ if i32.const 0 i32.const 1040 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -236,7 +267,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -245,7 +276,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -256,16 +287,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -285,7 +310,7 @@ if i32.const 0 i32.const 1040 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -318,8 +343,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -340,7 +365,7 @@ if i32.const 0 i32.const 1040 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -350,17 +375,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1040 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -389,13 +414,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -403,21 +428,15 @@ if i32.const 0 i32.const 1040 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -432,37 +451,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -486,7 +496,7 @@ if i32.const 0 i32.const 1040 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -503,7 +513,7 @@ if i32.const 0 i32.const 1040 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -531,7 +541,7 @@ if i32.const 0 i32.const 1040 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -583,7 +593,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -604,7 +614,8 @@ unreachable end i32.const 1280 - local.tee $0 + local.set $2 + i32.const 1280 i32.const 0 i32.store i32.const 2848 @@ -615,35 +626,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1280 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1280 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -663,24 +665,23 @@ i32.const 1280 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 - i32.load offset=4 + i32.const 0 + call $~lib/rt/tlsf/GETSL i32.const -2 i32.and local.tee $2 if (result i32) local.get $0 + i32.const 0 local.get $2 i32.ctz - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -692,31 +693,22 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1040 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end @@ -729,7 +721,7 @@ if i32.const 0 i32.const 1040 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -748,15 +740,16 @@ local.tee $2 i32.eqz if - i32.const 16 memory.size local.tee $2 i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $2 + i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl i32.const 65551 @@ -765,9 +758,7 @@ i32.and i32.const 16 i32.shr_u - local.set $3 - local.get $2 - local.get $3 + local.tee $3 local.get $2 local.get $3 i32.gt_s @@ -799,7 +790,7 @@ if i32.const 0 i32.const 1040 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -815,7 +806,7 @@ if i32.const 0 i32.const 1040 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -870,20 +861,9 @@ i32.and i32.store local.get $2 - i32.const 16 - i32.add - local.tee $0 - local.get $2 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 + call $~lib/rt/tlsf/GETRIGHT local.get $2 - i32.load - i32.const -4 - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const -3 i32.and diff --git a/tests/compiler/managed-cast.untouched.wat b/tests/compiler/managed-cast.untouched.wat index 1c3c6de678..dcc156abed 100644 --- a/tests/compiler/managed-cast.untouched.wat +++ b/tests/compiler/managed-cast.untouched.wat @@ -2,8 +2,8 @@ (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) (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))) @@ -29,6 +29,69 @@ (global $~lib/heap/__heap_base i32 (i32.const 268)) (export "_start" (func $~start)) (export "memory" (memory $0)) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -37,9 +100,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -52,7 +112,7 @@ if i32.const 0 i32.const 32 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -79,7 +139,7 @@ if i32.const 0 i32.const 32 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -133,7 +193,7 @@ if i32.const 0 i32.const 32 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -158,77 +218,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -245,6 +263,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -256,8 +280,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -265,7 +287,7 @@ if i32.const 0 i32.const 32 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -282,28 +304,18 @@ if i32.const 0 i32.const 32 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -314,44 +326,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -359,30 +361,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 32 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -401,22 +399,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -442,7 +440,7 @@ if i32.const 0 i32.const 32 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -454,18 +452,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 32 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -519,27 +517,15 @@ if i32.const 0 i32.const 32 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -554,24 +540,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -581,31 +553,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -613,8 +569,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -640,24 +594,22 @@ if i32.const 0 i32.const 32 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -665,7 +617,7 @@ if i32.const 0 i32.const 32 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -673,16 +625,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -698,7 +650,7 @@ if i32.const 0 i32.const 32 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -707,8 +659,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -719,49 +671,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -774,10 +722,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -827,73 +771,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -906,11 +823,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -930,7 +847,7 @@ if i32.const 80 i32.const 32 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -956,9 +873,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1026,31 +940,24 @@ if i32.const 0 i32.const 32 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1063,79 +970,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 32 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1172,9 +1048,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1188,12 +1062,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1203,7 +1077,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1240,7 +1114,7 @@ if i32.const 0 i32.const 32 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1291,29 +1165,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1333,7 +1187,7 @@ if i32.const 0 i32.const 32 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1380,7 +1234,7 @@ if i32.const 0 i32.const 32 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1401,7 +1255,7 @@ if i32.const 0 i32.const 32 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1422,7 +1276,7 @@ if i32.const 0 i32.const 32 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index fd3da8cab3..091471b7c6 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -1,13 +1,15 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result 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_=>_i32 (func (param i32 i32 i32) (result i32))) (type $f32_=>_i32 (func (param f32) (result i32))) (type $f64_=>_i32 (func (param f64) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) (type $i32_i64_i32_i64_i32_i64_=>_i32 (func (param i32 i64 i32 i64 i32 i64) (result i32))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1024) "\02\00\00\00\01\00\00\00\01\00\00\00\02\00\00\000") @@ -31,6 +33,9 @@ (data (i32.const 2448) "\n\00\00\00\01\00\00\00\01\00\00\00\n\00\00\00f\00a\00l\00s\00e") (global $number/a (mut i32) (i32.const 1)) (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) + (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) + (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) + (global $~lib/util/number/_exp (mut i32) (i32.const 0)) (global $~lib/util/number/_K (mut i32) (i32.const 0)) (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) @@ -162,7 +167,7 @@ i32.store offset=12 local.get $3 ) - (func $~lib/util/number/utoa_simple (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -216,7 +221,7 @@ local.tee $2 local.get $0 local.get $3 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core local.get $1 if local.get $2 @@ -344,12 +349,120 @@ end i32.const 0 ) + (func $~lib/util/number/umul64f (param $0 i64) (param $1 i64) (result i64) + (local $2 i64) + (local $3 i64) + local.get $1 + i64.const 4294967295 + i64.and + local.tee $2 + local.get $0 + i64.const 32 + i64.shr_u + local.tee $3 + i64.mul + local.get $2 + local.get $0 + i64.const 4294967295 + i64.and + local.tee $2 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.set $0 + local.get $3 + local.get $1 + i64.const 32 + i64.shr_u + local.tee $1 + i64.mul + local.get $0 + i64.const 32 + i64.shr_u + i64.add + local.get $1 + local.get $2 + i64.mul + local.get $0 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + i64.add + ) + (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.add + i32.const -64 + i32.sub + ) + (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) + local.get $0 + local.get $1 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.tee $0 + i32.load16_u + local.set $1 + loop $while-continue|1 + i32.const 1 + local.get $5 + local.get $3 + i64.sub + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.sub + i64.gt_u + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.lt_u + select + i32.const 0 + local.get $2 + local.get $3 + i64.sub + local.get $4 + i64.ge_u + i32.const 0 + local.get $3 + local.get $5 + i64.lt_u + select + select + if + local.get $1 + i32.const 1 + i32.sub + local.set $1 + local.get $3 + local.get $4 + i64.add + local.set $3 + br $while-continue|1 + end + end + local.get $0 + local.get $1 + i32.store16 + ) (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) - (local $7 i64) + (local $7 i32) (local $8 i32) (local $9 i64) - (local $10 i32) + (local $10 i64) (local $11 i64) (local $12 i64) local.get $3 @@ -361,25 +474,25 @@ i32.const 0 local.get $4 i32.sub - local.tee $10 + local.tee $8 i64.extend_i32_s i64.shl - local.tee $11 + local.tee $10 i64.const 1 i64.sub - local.tee $12 + local.tee $11 i64.and - local.set $7 + local.set $1 local.get $3 - local.get $10 + local.get $8 i64.extend_i32_s i64.shr_u i32.wrap_i64 - local.tee $6 + local.tee $2 call $~lib/util/number/decimalCount32 - local.set $4 + local.set $7 loop $while-continue|0 - local.get $4 + local.get $7 i32.const 0 i32.gt_s if @@ -394,281 +507,236 @@ block $case3|1 block $case2|1 block $case1|1 - local.get $4 + local.get $7 i32.const 10 i32.ne if - local.get $4 + local.get $7 i32.const 1 i32.sub br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 end - local.get $6 + local.get $2 i32.const 1000000000 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 1000000000 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 + local.get $2 i32.const 100000000 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 100000000 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 + local.get $2 i32.const 10000000 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 10000000 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 + local.get $2 i32.const 1000000 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 1000000 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 + local.get $2 i32.const 100000 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 100000 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 + local.get $2 i32.const 10000 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 10000 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 + local.get $2 i32.const 1000 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 1000 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 + local.get $2 i32.const 100 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 100 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 + local.get $2 i32.const 10 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 10 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 - local.set $2 + local.get $2 + local.set $4 i32.const 0 - local.set $6 + local.set $2 br $break|1 end i32.const 0 - local.set $2 + local.set $4 end - local.get $2 - local.get $8 + local.get $4 + local.get $6 i32.or if local.get $0 - local.get $8 + local.get $6 i32.const 1 i32.shl i32.add - local.get $2 + local.get $4 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 - local.get $8 + local.get $6 i32.const 1 i32.add - local.set $8 + local.set $6 end - local.get $4 + local.get $7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.get $6 + local.set $7 + local.get $1 + local.get $2 i64.extend_i32_u - local.get $10 + local.get $8 i64.extend_i32_s i64.shl i64.add - local.tee $1 + local.tee $3 local.get $5 i64.le_u if - local.get $4 + local.get $7 global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $4 + local.get $0 + local.get $6 + local.get $5 + local.get $3 + local.get $7 i32.const 2 i32.shl i32.const 2152 i32.add i64.load32_u - local.get $10 + local.get $8 i64.extend_i32_s i64.shl - local.set $3 - local.get $0 - local.get $8 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.tee $0 - i32.load16_u - local.set $4 - loop $while-continue|3 - i32.const 1 - local.get $9 - local.get $1 - i64.sub - local.get $1 - local.get $3 - i64.add - local.tee $7 - local.get $9 - i64.sub - i64.gt_u - local.get $7 - local.get $9 - i64.lt_u - select - i32.const 0 - local.get $5 - local.get $1 - i64.sub - local.get $3 - i64.ge_u - i32.const 0 - local.get $1 - local.get $9 - i64.lt_u - select - select - if - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.get $3 - i64.add - local.set $1 - br $while-continue|3 - end - end - local.get $0 - local.get $4 - i32.store16 - local.get $8 + local.get $9 + call $~lib/util/number/grisuRound + local.get $6 return end br $while-continue|0 end end - local.get $10 + local.get $8 i64.extend_i32_s - local.set $1 - loop $while-continue|4 + local.set $12 + loop $while-continue|2 local.get $5 i64.const 10 i64.mul local.set $5 - local.get $7 + local.get $1 i64.const 10 i64.mul local.tee $3 - local.get $1 + local.get $12 i64.shr_u - local.tee $7 - local.get $8 + local.tee $1 + local.get $6 i64.extend_i32_s i64.or i64.const 0 i64.ne if local.get $0 - local.get $8 + local.get $6 i32.const 1 i32.shl i32.add - local.get $7 + local.get $1 i32.wrap_i64 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 - local.get $8 + local.get $6 i32.const 1 i32.add - local.set $8 + local.set $6 end - local.get $4 + local.get $7 i32.const 1 i32.sub - local.set $4 + local.set $7 local.get $3 - local.get $12 + local.get $11 i64.and - local.tee $7 + local.tee $1 local.get $5 i64.ge_u - br_if $while-continue|4 + br_if $while-continue|2 end - local.get $4 + local.get $7 global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $7 - local.set $1 + local.get $0 + local.get $6 + local.get $5 + local.get $1 + local.get $10 local.get $9 i32.const 0 - local.get $4 + local.get $7 i32.sub i32.const 2 i32.shl @@ -676,235 +744,212 @@ i32.add i64.load32_u i64.mul - local.set $3 + call $~lib/util/number/grisuRound + local.get $6 + ) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 - local.get $8 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.tee $0 - i32.load16_u - local.set $4 - loop $while-continue|6 - i32.const 1 - local.get $3 - local.get $1 - i64.sub - local.get $1 - local.get $11 - i64.add - local.tee $7 - local.get $3 - i64.sub - i64.gt_u - local.get $7 - local.get $3 - i64.lt_u - select - i32.const 0 - local.get $5 + local.get $1 + i32.eq + if + return + end + local.get $0 + local.get $1 + i32.lt_u + if local.get $1 - i64.sub - local.get $11 - i64.ge_u - i32.const 0 - local.get $1 - local.get $3 - i64.lt_u - select - select - if - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.get $11 - i64.add - local.set $1 - br $while-continue|6 - end - end - local.get $0 - local.get $4 - i32.store16 - local.get $8 - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 + i32.const 7 + i32.and local.get $0 - local.get $1 + i32.const 7 + i32.and i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.lt_u if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + return end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $2 + i32.const 1 + i32.sub + local.set $2 local.get $0 - local.tee $2 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $1 - local.get $2 local.get $3 + local.get $4 i32.load8_u i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 + br $while-continue|0 end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 - local.get $4 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and if - local.get $4 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $4 - local.get $0 + local.tee $2 i32.add local.get $1 - local.get $4 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) + (func $~lib/util/number/genExponent (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.const 0 + i32.lt_s + local.tee $2 + if + i32.const 0 + local.get $1 + i32.sub + local.set $1 + end + local.get $1 + local.get $1 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.tee $1 + call $~lib/util/number/utoa32_core + local.get $0 + i32.const 45 + i32.const 43 + local.get $2 + select + i32.store16 + local.get $1 + ) (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 @@ -989,7 +1034,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $0 i32.const 46 i32.store16 @@ -1018,7 +1063,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $0 i32.const 3014704 i32.store @@ -1055,36 +1100,12 @@ i32.const 101 i32.store16 offset=2 local.get $0 - local.tee $1 i32.const 4 i32.add local.get $3 i32.const 1 i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $2 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $1 - i32.const 45 - i32.const 43 - local.get $2 - select - i32.store16 offset=4 - local.get $0 + call $~lib/util/number/genExponent i32.const 2 i32.add else @@ -1100,7 +1121,7 @@ local.tee $2 i32.const 2 i32.sub - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $0 i32.const 46 i32.store16 offset=2 @@ -1111,36 +1132,12 @@ i32.const 101 i32.store16 offset=2 local.get $0 - local.tee $2 i32.const 4 i32.add local.get $3 i32.const 1 i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $3 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $2 - i32.const 45 - i32.const 43 - local.get $3 - select - i32.store16 offset=4 - local.get $0 + call $~lib/util/number/genExponent local.get $1 i32.add i32.const 2 @@ -1150,124 +1147,6 @@ end end ) - (func $~lib/util/number/dtoa_core (param $0 i32) (result i32) - (local $1 i64) - (local $2 i64) - (local $3 i64) - (local $4 f64) - i32.const -4 - global.set $~lib/util/number/_K - i32.const 1632 - i64.load - global.set $~lib/util/number/_frc_pow - i32.const 2064 - i32.load16_s - global.set $~lib/util/number/_exp_pow - local.get $0 - local.get $0 - global.get $~lib/util/number/_frc_pow - local.tee $2 - i64.const 32 - i64.shr_u - local.tee $3 - i64.const 2147483648 - i64.mul - local.get $2 - i64.const 4294967295 - i64.and - local.tee $2 - i64.const 2147483648 - i64.mul - i64.const 0 - i64.add - local.tee $1 - i64.const 32 - i64.shr_u - i64.add - local.get $1 - i64.const 4294967295 - i64.and - i64.const 0 - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - global.get $~lib/util/number/_exp_pow - local.tee $0 - i32.const 2 - i32.add - local.get $3 - i64.const 2147483648 - i64.mul - local.get $2 - i64.const 2147483648 - i64.mul - local.get $2 - i64.const 1024 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $1 - i64.const 32 - i64.shr_u - i64.add - local.get $3 - i64.const 1024 - i64.mul - local.get $1 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - i64.const 1 - i64.sub - local.tee $1 - local.get $0 - i32.const 2 - i32.add - local.get $1 - local.get $3 - i64.const 2147483647 - i64.mul - local.get $2 - i64.const 2147483647 - i64.mul - local.get $2 - i64.const 4294966784 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $1 - i64.const 32 - i64.shr_u - i64.add - local.get $3 - i64.const 4294966784 - i64.mul - local.get $1 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - i64.const 1 - i64.add - i64.sub - call $~lib/util/number/genDigits - global.get $~lib/util/number/_K - call $~lib/util/number/prettify - ) (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -1340,7 +1219,7 @@ local.get $2 i32.add local.get $3 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $1 ) (func $~lib/number/F32.isSafeInteger (param $0 f32) (result i32) @@ -1399,6 +1278,8 @@ (local $0 i32) (local $1 i32) (local $2 i32) + (local $3 i64) + (local $4 i64) i32.const 2480 global.set $~lib/rt/stub/offset global.get $number/a @@ -1416,12 +1297,57 @@ end i32.const 56 call $~lib/rt/stub/__alloc - local.tee $1 - call $~lib/util/number/dtoa_core - local.tee $0 + local.set $1 + i64.const -9223372036854774784 + global.set $~lib/util/number/_frc_plus + i64.const 9223372036854775296 + global.set $~lib/util/number/_frc_minus + i32.const -62 + global.set $~lib/util/number/_exp + i32.const -4 + global.set $~lib/util/number/_K + i32.const 1632 + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 2064 + i32.load16_s + global.set $~lib/util/number/_exp_pow + global.get $~lib/util/number/_exp_pow + local.set $0 + local.get $1 + local.get $1 + i64.const -9223372036854775808 + global.get $~lib/util/number/_frc_pow + local.tee $3 + call $~lib/util/number/umul64f + i32.const -62 + local.get $0 + call $~lib/util/number/umul64e + global.get $~lib/util/number/_frc_plus + local.get $3 + call $~lib/util/number/umul64f + i64.const 1 + i64.sub + local.tee $4 + global.get $~lib/util/number/_exp + local.get $0 + call $~lib/util/number/umul64e + local.get $4 + global.get $~lib/util/number/_frc_minus + local.get $3 + call $~lib/util/number/umul64f + i64.const 1 + i64.add + i64.sub + call $~lib/util/number/genDigits + global.get $~lib/util/number/_K + call $~lib/util/number/prettify + local.tee $2 + local.set $0 + local.get $2 i32.const 28 i32.ne - if + if (result i32) local.get $1 local.get $0 call $~lib/string/String#substring @@ -1466,9 +1392,9 @@ local.get $2 global.set $~lib/rt/stub/offset end - local.set $1 + else + local.get $1 end - local.get $1 i32.const 2272 call $~lib/string/String.__eq i32.eqz @@ -1578,11 +1504,11 @@ unreachable end global.get $number/a - local.tee $1 + local.tee $0 i32.const 1 i32.add global.set $number/a - local.get $1 + local.get $0 call $~lib/number/I32#toString i32.const 1072 call $~lib/string/String.__eq @@ -1596,11 +1522,11 @@ unreachable end global.get $number/a - local.tee $1 + local.tee $0 i32.const 1 i32.sub global.set $number/a - local.get $1 + local.get $0 call $~lib/number/I32#toString i32.const 2400 call $~lib/string/String.__eq diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index 5f8f7c3b6c..c905e41a96 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -1,17 +1,21 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $f64_=>_i32 (func (param f64) (result i32))) (type $none_=>_none (func)) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $f32_=>_i32 (func (param f32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) + (type $i64_i32_=>_none (func (param i64 i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 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))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $f64_i32_=>_i32 (func (param f64 i32) (result i32))) + (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 16) "\02\00\00\00\01\00\00\00\01\00\00\00\02\00\00\000\00") @@ -360,6 +364,16 @@ i32.store16 end ) + (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 0 + i32.const 1 + i32.ge_s + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa32_lut + ) (func $~lib/rt/stub/__retain (param $0 i32) (result i32) local.get $0 ) @@ -367,9 +381,6 @@ (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 i32.eqz if @@ -399,19 +410,9 @@ call $~lib/rt/stub/__alloc local.set $3 local.get $3 - local.set $6 local.get $0 - local.set $5 local.get $2 - local.set $4 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $6 - local.get $5 - local.get $4 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core local.get $1 if local.get $3 @@ -649,6 +650,248 @@ call $~lib/rt/stub/__release local.get $2 ) + (func $~lib/util/number/normalizedBoundaries (param $0 i64) (param $1 i32) + (local $2 i64) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i64.const 1 + i64.shl + i64.const 1 + i64.add + local.set $2 + local.get $1 + i32.const 1 + i32.sub + local.set $3 + local.get $2 + i64.clz + i32.wrap_i64 + local.set $4 + local.get $2 + local.get $4 + i64.extend_i32_s + i64.shl + local.set $2 + local.get $3 + local.get $4 + i32.sub + local.set $3 + i32.const 1 + local.get $0 + i64.const 4503599627370496 + i64.eq + i32.add + local.set $5 + local.get $2 + global.set $~lib/util/number/_frc_plus + local.get $0 + local.get $5 + i64.extend_i32_s + i64.shl + i64.const 1 + i64.sub + local.get $1 + local.get $5 + i32.sub + local.get $3 + i32.sub + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_minus + local.get $3 + global.set $~lib/util/number/_exp + ) + (func $~lib/util/number/getCachedPower (param $0 i32) + (local $1 f64) + (local $2 i32) + (local $3 i32) + i32.const -61 + local.get $0 + i32.sub + f64.convert_i32_s + f64.const 0.30102999566398114 + f64.mul + f64.const 347 + f64.add + local.set $1 + local.get $1 + i32.trunc_f64_s + local.set $2 + local.get $2 + local.get $2 + f64.convert_i32_s + local.get $1 + f64.ne + i32.add + local.set $2 + local.get $2 + i32.const 3 + i32.shr_s + i32.const 1 + i32.add + local.set $3 + i32.const 348 + local.get $3 + i32.const 3 + i32.shl + i32.sub + global.set $~lib/util/number/_K + i32.const 672 + local.get $3 + i32.const 3 + i32.shl + i32.add + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 1368 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow + ) + (func $~lib/util/number/umul64f (param $0 i64) (param $1 i64) (result i64) + (local $2 i64) + (local $3 i64) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i64) + (local $8 i64) + local.get $0 + i64.const 4294967295 + i64.and + local.set $2 + local.get $1 + i64.const 4294967295 + i64.and + local.set $3 + local.get $0 + i64.const 32 + i64.shr_u + local.set $4 + local.get $1 + i64.const 32 + i64.shr_u + local.set $5 + local.get $2 + local.get $3 + i64.mul + local.set $6 + local.get $4 + local.get $3 + i64.mul + local.get $6 + i64.const 32 + i64.shr_u + i64.add + local.set $7 + local.get $2 + local.get $5 + i64.mul + local.get $7 + i64.const 4294967295 + i64.and + i64.add + local.set $8 + local.get $8 + i64.const 2147483647 + i64.add + local.set $8 + local.get $7 + i64.const 32 + i64.shr_u + local.set $7 + local.get $8 + i64.const 32 + i64.shr_u + local.set $8 + local.get $4 + local.get $5 + i64.mul + local.get $7 + i64.add + local.get $8 + i64.add + ) + (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.add + i32.const 64 + i32.add + ) + (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.set $6 + local.get $6 + i32.load16_u + local.set $7 + loop $while-continue|1 + local.get $3 + local.get $5 + i64.lt_u + if (result i32) + local.get $2 + local.get $3 + i64.sub + local.get $4 + i64.ge_u + else + i32.const 0 + end + if (result i32) + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.lt_u + if (result i32) + i32.const 1 + else + local.get $5 + local.get $3 + i64.sub + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.sub + i64.gt_u + end + else + i32.const 0 + end + local.set $8 + local.get $8 + if + local.get $7 + i32.const 1 + i32.sub + local.set $7 + local.get $3 + local.get $4 + i64.add + local.set $3 + br $while-continue|1 + end + end + local.get $6 + local.get $7 + i32.store16 + ) (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) @@ -664,14 +907,6 @@ (local $18 i32) (local $19 i64) (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i32) - (local $25 i32) - (local $26 i32) - (local $27 i32) - (local $28 i64) i32.const 0 local.get $4 i32.sub @@ -911,13 +1146,9 @@ i32.add global.set $~lib/util/number/_K local.get $0 - local.set $24 local.get $15 - local.set $18 local.get $5 - local.set $23 local.get $19 - local.set $22 i32.const 1544 local.get $14 i32.const 2 @@ -927,79 +1158,15 @@ local.get $7 i64.extend_i32_s i64.shl - local.set $21 local.get $10 - local.set $20 - local.get $24 - local.get $18 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.set $25 - local.get $25 - i32.load16_u - local.set $26 - loop $while-continue|3 - local.get $22 - local.get $20 - i64.lt_u - if (result i32) - local.get $23 - local.get $22 - i64.sub - local.get $21 - i64.ge_u - else - i32.const 0 - end - if (result i32) - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.lt_u - if (result i32) - i32.const 1 - else - local.get $20 - local.get $22 - i64.sub - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.sub - i64.gt_u - end - else - i32.const 0 - end - local.set $27 - local.get $27 - if - local.get $26 - i32.const 1 - i32.sub - local.set $26 - local.get $22 - local.get $21 - i64.add - local.set $22 - br $while-continue|3 - end - end - local.get $25 - local.get $26 - i32.store16 + call $~lib/util/number/grisuRound local.get $15 return end br $while-continue|0 end end - loop $while-continue|4 + loop $while-continue|2 i32.const 1 local.set $16 local.get $16 @@ -1016,8 +1183,8 @@ local.get $7 i64.extend_i32_s i64.shr_u - local.set $23 - local.get $23 + local.set $20 + local.get $20 local.get $15 i64.extend_i32_s i64.or @@ -1026,16 +1193,16 @@ if local.get $0 local.get $15 - local.tee $26 + local.tee $18 i32.const 1 i32.add local.set $15 - local.get $26 + local.get $18 i32.const 1 i32.shl i32.add i32.const 48 - local.get $23 + local.get $20 i32.wrap_i64 i32.const 65535 i32.and @@ -1070,88 +1237,125 @@ i64.mul local.set $10 local.get $0 - local.set $18 local.get $15 - local.set $27 local.get $5 - local.set $28 local.get $13 - local.set $22 local.get $8 - local.set $21 local.get $10 - local.set $20 - local.get $18 - local.get $27 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.set $26 - local.get $26 - i32.load16_u - local.set $25 - loop $while-continue|6 - local.get $22 - local.get $20 - i64.lt_u - if (result i32) - local.get $28 - local.get $22 - i64.sub - local.get $21 - i64.ge_u - else - i32.const 0 - end - if (result i32) - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.lt_u - if (result i32) - i32.const 1 - else - local.get $20 - local.get $22 - i64.sub - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.sub - i64.gt_u - end - else - i32.const 0 - end - local.set $24 - local.get $24 - if - local.get $25 - i32.const 1 - i32.sub - local.set $25 - local.get $22 - local.get $21 - i64.add - local.set $22 - br $while-continue|6 - end - end - local.get $26 - local.get $25 - i32.store16 + call $~lib/util/number/grisuRound local.get $15 return end - br $while-continue|4 + br $while-continue|2 end end unreachable ) + (func $~lib/util/number/grisu2 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (local $3 i64) + (local $4 i32) + (local $5 i64) + (local $6 i64) + (local $7 i32) + (local $8 i64) + (local $9 i32) + (local $10 i64) + (local $11 i32) + (local $12 i64) + (local $13 i32) + (local $14 i64) + (local $15 i64) + local.get $0 + i64.reinterpret_f64 + local.set $3 + local.get $3 + i64.const 9218868437227405312 + i64.and + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.set $4 + local.get $3 + i64.const 4503599627370495 + i64.and + local.set $5 + local.get $4 + i32.const 0 + i32.ne + i64.extend_i32_u + i64.const 52 + i64.shl + local.get $5 + i64.add + local.set $6 + local.get $4 + i32.const 1 + local.get $4 + select + i32.const 1023 + i32.const 52 + i32.add + i32.sub + local.set $4 + local.get $6 + local.get $4 + call $~lib/util/number/normalizedBoundaries + global.get $~lib/util/number/_exp + call $~lib/util/number/getCachedPower + local.get $6 + i64.clz + i32.wrap_i64 + local.set $7 + local.get $6 + local.get $7 + i64.extend_i32_s + i64.shl + local.set $6 + local.get $4 + local.get $7 + i32.sub + local.set $4 + global.get $~lib/util/number/_frc_pow + local.set $8 + global.get $~lib/util/number/_exp_pow + local.set $9 + local.get $6 + local.get $8 + call $~lib/util/number/umul64f + local.set $10 + local.get $4 + local.get $9 + call $~lib/util/number/umul64e + local.set $11 + global.get $~lib/util/number/_frc_plus + local.get $8 + call $~lib/util/number/umul64f + i64.const 1 + i64.sub + local.set $12 + global.get $~lib/util/number/_exp + local.get $9 + call $~lib/util/number/umul64e + local.set $13 + global.get $~lib/util/number/_frc_minus + local.get $8 + call $~lib/util/number/umul64f + i64.const 1 + i64.add + local.set $14 + local.get $12 + local.get $14 + i64.sub + local.set $15 + local.get $1 + local.get $10 + local.get $11 + local.get $12 + local.get $13 + local.get $15 + local.get $2 + call $~lib/util/number/genDigits + ) (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -2176,248 +2380,269 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if local.get $0 - local.set $5 local.get $1 - local.set $4 local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if i32.const 0 - i32.const 1 + i32.const 2 i32.lt_s drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 + local.get $3 + if + local.get $2 + i32.eqz if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 + return end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + br $while-continue|0 end - loop $while-continue|1 - local.get $3 + end + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|2 + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.tee $7 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 + i32.sub + local.tee $2 i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 + local.get $1 + local.get $2 i32.add - local.set $4 - local.get $7 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + br $while-continue|3 end end - loop $while-continue|5 + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 - i32.const 1 + local.get $2 + i32.const 8 i32.sub - local.tee $3 + local.set $2 + local.get $0 + local.get $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $2 i32.add - i32.load8_u - i32.store8 - br $while-continue|5 + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end + end + ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) + (func $~lib/util/number/genExponent (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.set $2 + local.get $2 + if + i32.const 0 + local.get $1 + i32.sub + local.set $1 end + local.get $1 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.set $3 + local.get $0 + local.get $1 + local.get $3 + call $~lib/util/number/utoa32_core + local.get $0 + i32.const 45 + i32.const 43 + local.get $2 + select + i32.store16 + local.get $3 ) (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $11 i32) local.get $2 i32.eqz if @@ -2600,48 +2825,10 @@ local.get $0 i32.const 4 i32.add - local.set $5 local.get $3 i32.const 1 i32.sub - local.set $6 - local.get $6 - i32.const 0 - i32.lt_s - local.set $4 - local.get $4 - if - i32.const 0 - local.get $6 - i32.sub - local.set $6 - end - local.get $6 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.set $7 - local.get $5 - local.set $10 - local.get $6 - local.set $9 - local.get $7 - local.set $8 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $10 - local.get $9 - local.get $8 - call $~lib/util/number/utoa32_lut - local.get $5 - i32.const 45 - i32.const 43 - local.get $4 - select - i32.store16 - local.get $7 + call $~lib/util/number/genExponent local.set $1 local.get $1 i32.const 2 @@ -2651,14 +2838,14 @@ local.get $1 i32.const 1 i32.shl - local.set $7 + local.set $4 local.get $0 i32.const 4 i32.add local.get $0 i32.const 2 i32.add - local.get $7 + local.get $4 i32.const 2 i32.sub call $~lib/memory/memory.copy @@ -2666,58 +2853,20 @@ i32.const 46 i32.store16 offset=2 local.get $0 - local.get $7 + local.get $4 i32.add i32.const 101 i32.store16 offset=2 local.get $1 local.get $0 - local.get $7 + local.get $4 i32.add i32.const 4 i32.add - local.set $9 local.get $3 i32.const 1 i32.sub - local.set $8 - local.get $8 - i32.const 0 - i32.lt_s - local.set $4 - local.get $4 - if - i32.const 0 - local.get $8 - i32.sub - local.set $8 - end - local.get $8 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.set $5 - local.get $9 - local.set $11 - local.get $8 - local.set $6 - local.get $5 - local.set $10 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $11 - local.get $6 - local.get $10 - call $~lib/util/number/utoa32_lut - local.get $9 - i32.const 45 - i32.const 43 - local.get $4 - select - i32.store16 - local.get $5 + call $~lib/util/number/genExponent i32.add local.set $1 local.get $1 @@ -2736,31 +2885,6 @@ (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i64) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i64) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i64) - (local $25 i64) - (local $26 i32) - (local $27 i64) - (local $28 i32) local.get $1 f64.const 0 f64.lt @@ -2775,387 +2899,22 @@ i32.store16 end local.get $1 - local.set $5 local.get $0 - local.set $4 local.get $2 + call $~lib/util/number/grisu2 local.set $3 - local.get $5 - i64.reinterpret_f64 - local.set $6 - local.get $6 - i64.const 9218868437227405312 - i64.and - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.set $7 - local.get $6 - i64.const 4503599627370495 - i64.and - local.set $8 - local.get $7 - i32.const 0 - i32.ne - i64.extend_i32_u - i64.const 52 - i64.shl - local.get $8 - i64.add - local.set $9 - local.get $7 - i32.const 1 - local.get $7 - select - i32.const 1023 - i32.const 52 - i32.add - i32.sub - local.set $7 - local.get $9 - local.set $11 - local.get $7 - local.set $10 - local.get $11 - i64.const 1 - i64.shl - i64.const 1 - i64.add - local.set $12 - local.get $10 - i32.const 1 - i32.sub - local.set $13 - local.get $12 - i64.clz - i32.wrap_i64 - local.set $14 - local.get $12 - local.get $14 - i64.extend_i32_s - i64.shl - local.set $12 - local.get $13 - local.get $14 - i32.sub - local.set $13 - i32.const 1 - local.get $11 - i64.const 4503599627370496 - i64.eq - i32.add - local.set $15 - local.get $12 - global.set $~lib/util/number/_frc_plus - local.get $11 - local.get $15 - i64.extend_i32_s - i64.shl - i64.const 1 - i64.sub - local.get $10 - local.get $15 - i32.sub - local.get $13 - i32.sub - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_minus - local.get $13 - global.set $~lib/util/number/_exp - global.get $~lib/util/number/_exp - local.set $10 - i32.const -61 - local.get $10 - i32.sub - f64.convert_i32_s - f64.const 0.30102999566398114 - f64.mul - f64.const 347 - f64.add - local.set $16 - local.get $16 - i32.trunc_f64_s - local.set $15 - local.get $15 - local.get $15 - f64.convert_i32_s - local.get $16 - f64.ne - i32.add - local.set $15 - local.get $15 - i32.const 3 - i32.shr_s - i32.const 1 - i32.add - local.set $14 - i32.const 348 - local.get $14 - i32.const 3 - i32.shl - i32.sub - global.set $~lib/util/number/_K - i32.const 672 - local.get $14 - i32.const 3 - i32.shl - i32.add - i64.load - global.set $~lib/util/number/_frc_pow - i32.const 1368 - local.get $14 - i32.const 1 - i32.shl - i32.add - i32.load16_s - global.set $~lib/util/number/_exp_pow - local.get $9 - i64.clz - i32.wrap_i64 - local.set $14 - local.get $9 - local.get $14 - i64.extend_i32_s - i64.shl - local.set $9 - local.get $7 - local.get $14 - i32.sub - local.set $7 - global.get $~lib/util/number/_frc_pow - local.set $12 - global.get $~lib/util/number/_exp_pow - local.set $15 - local.get $9 - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $18 - local.get $11 - i64.const 4294967295 - i64.and - local.set $19 - local.get $17 - i64.const 32 - i64.shr_u - local.set $20 - local.get $11 - i64.const 32 - i64.shr_u - local.set $21 - local.get $18 - local.get $19 - i64.mul - local.set $22 - local.get $20 - local.get $19 - i64.mul - local.get $22 - i64.const 32 - i64.shr_u - i64.add - local.set $23 - local.get $18 - local.get $21 - i64.mul - local.get $23 - i64.const 4294967295 - i64.and - i64.add - local.set $24 - local.get $24 - i64.const 2147483647 - i64.add - local.set $24 - local.get $23 - i64.const 32 - i64.shr_u - local.set $23 - local.get $24 - i64.const 32 - i64.shr_u - local.set $24 - local.get $20 - local.get $21 - i64.mul - local.get $23 - i64.add - local.get $24 - i64.add - local.set $24 - local.get $7 - local.set $10 - local.get $15 - local.set $13 - local.get $10 - local.get $13 - i32.add - i32.const 64 - i32.add - local.set $10 - global.get $~lib/util/number/_frc_plus - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $23 - local.get $11 - i64.const 4294967295 - i64.and - local.set $22 - local.get $17 - i64.const 32 - i64.shr_u - local.set $21 - local.get $11 - i64.const 32 - i64.shr_u - local.set $20 - local.get $23 - local.get $22 - i64.mul - local.set $19 - local.get $21 - local.get $22 - i64.mul - local.get $19 - i64.const 32 - i64.shr_u - i64.add - local.set $18 - local.get $23 - local.get $20 - i64.mul - local.get $18 - i64.const 4294967295 - i64.and - i64.add - local.set $25 - local.get $25 - i64.const 2147483647 - i64.add - local.set $25 - local.get $18 - i64.const 32 - i64.shr_u - local.set $18 - local.get $25 - i64.const 32 - i64.shr_u - local.set $25 - local.get $21 - local.get $20 - i64.mul - local.get $18 - i64.add - local.get $25 - i64.add - i64.const 1 - i64.sub - local.set $25 - global.get $~lib/util/number/_exp - local.set $26 - local.get $15 - local.set $13 - local.get $26 - local.get $13 - i32.add - i32.const 64 - i32.add - local.set $26 - global.get $~lib/util/number/_frc_minus - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $18 - local.get $11 - i64.const 4294967295 - i64.and - local.set $19 - local.get $17 - i64.const 32 - i64.shr_u - local.set $20 - local.get $11 - i64.const 32 - i64.shr_u - local.set $21 - local.get $18 - local.get $19 - i64.mul - local.set $22 - local.get $20 - local.get $19 - i64.mul - local.get $22 - i64.const 32 - i64.shr_u - i64.add - local.set $23 - local.get $18 - local.get $21 - i64.mul - local.get $23 - i64.const 4294967295 - i64.and - i64.add - local.set $27 - local.get $27 - i64.const 2147483647 - i64.add - local.set $27 - local.get $23 - i64.const 32 - i64.shr_u - local.set $23 - local.get $27 - i64.const 32 - i64.shr_u - local.set $27 - local.get $20 - local.get $21 - i64.mul - local.get $23 - i64.add - local.get $27 - i64.add - i64.const 1 - i64.add - local.set $27 - local.get $25 - local.get $27 - i64.sub - local.set $23 - local.get $4 - local.get $24 - local.get $10 - local.get $25 - local.get $26 - local.get $23 - local.get $3 - call $~lib/util/number/genDigits - local.set $28 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $28 + local.get $3 local.get $2 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.set $28 - local.get $28 + local.set $3 + local.get $3 local.get $2 i32.add ) diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index e7c00c0c50..5f34354273 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -1,11 +1,11 @@ (module (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_=>_none (func (param i32 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 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -29,6 +29,58 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -43,7 +95,7 @@ if i32.const 0 i32.const 1088 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -65,7 +117,7 @@ if i32.const 0 i32.const 1088 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -84,23 +136,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -108,72 +160,56 @@ if i32.const 0 i32.const 1088 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -181,7 +217,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -204,7 +240,7 @@ if i32.const 0 i32.const 1088 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -218,22 +254,16 @@ if i32.const 0 i32.const 1088 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -242,7 +272,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -251,7 +281,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -262,16 +292,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -291,7 +315,7 @@ if i32.const 0 i32.const 1088 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -324,8 +348,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -346,7 +370,7 @@ if i32.const 0 i32.const 1088 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -356,17 +380,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1088 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -395,13 +419,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -409,21 +433,15 @@ if i32.const 0 i32.const 1088 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -438,37 +456,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -492,7 +501,7 @@ if i32.const 0 i32.const 1088 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -509,7 +518,7 @@ if i32.const 0 i32.const 1088 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -537,7 +546,7 @@ if i32.const 0 i32.const 1088 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -589,7 +598,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -610,7 +619,8 @@ unreachable end i32.const 1440 - local.tee $0 + local.set $2 + i32.const 1440 i32.const 0 i32.store i32.const 3008 @@ -621,35 +631,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1440 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1440 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -669,7 +670,7 @@ i32.const 1440 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -727,17 +728,14 @@ if i32.const 0 i32.const 1088 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const -1 local.get $1 i32.shl @@ -745,16 +743,10 @@ local.tee $1 if (result i32) local.get $0 + local.get $2 local.get $1 i32.ctz - local.get $2 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -770,151 +762,68 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1088 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end end ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - local.get $1 - i32.load - local.set $3 - local.get $2 - i32.const 15 - i32.and + (local $5 i32) + global.get $~lib/rt/tlsf/collectLock if i32.const 0 i32.const 1088 - i32.const 365 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable end + local.get $1 + local.tee $3 + i32.const 1073741808 + i32.ge_u + if + i32.const 1136 + i32.const 1088 + i32.const 453 + i32.const 30 + call $~lib/builtins/abort + unreachable + end + local.get $0 local.get $3 - i32.const -4 + i32.const 15 + i32.add + i32.const -16 i32.and - local.get $2 - i32.sub + local.tee $1 + i32.const 16 + local.get $1 + i32.const 16 + i32.gt_u + select local.tee $4 - i32.const 32 - 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 16 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 16 - 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 16 - 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) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - global.get $~lib/rt/tlsf/collectLock - if - i32.const 0 - i32.const 1088 - i32.const 501 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1073741808 - i32.ge_u - if - i32.const 1136 - i32.const 1088 - i32.const 461 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $3 - i32.const 16 - local.get $3 - i32.const 16 - i32.gt_u - select - local.tee $4 - call $~lib/rt/tlsf/searchBlock - local.tee $3 - i32.eqz + call $~lib/rt/tlsf/searchBlock + local.tee $1 + i32.eqz if i32.const 1 global.set $~lib/rt/tlsf/collectLock @@ -923,18 +832,19 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if - i32.const 16 memory.size - local.tee $3 + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -959,10 +869,8 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 - local.get $5 - local.get $3 + local.tee $5 + local.get $1 local.get $5 i32.gt_s select @@ -979,7 +887,7 @@ end end local.get $0 - local.get $3 + local.get $1 i32.const 16 i32.shl memory.size @@ -989,19 +897,19 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if i32.const 0 i32.const 1088 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable end end end - local.get $3 + local.get $1 i32.load i32.const -4 i32.and @@ -1010,30 +918,86 @@ if i32.const 0 i32.const 1088 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 0 i32.store offset=4 - local.get $3 + local.get $1 local.get $2 i32.store offset=8 - local.get $3 local.get $1 + local.get $3 i32.store offset=12 local.get $0 - local.get $3 + local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 + local.get $1 + i32.load + local.set $2 local.get $4 - call $~lib/rt/tlsf/prepareBlock - local.get $3 + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1088 + i32.const 357 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const -4 + i32.and + local.get $4 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $4 + local.get $2 + i32.const 2 + i32.and + i32.or + i32.store + local.get $4 + local.get $1 + i32.const 16 + i32.add + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + call $~lib/rt/tlsf/GETRIGHT + local.get $1 + call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $1 call $~lib/rt/rtrace/onalloc - local.get $3 + local.get $1 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -1221,176 +1185,178 @@ end i32.const 0 ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $0 + local.get $1 + i32.lt_u + if local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 + i32.const 7 + i32.and local.get $0 - local.get $1 - i32.lt_u + i32.const 7 + i32.and + i32.eq if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + return end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $2 + i32.const 1 + i32.sub + local.set $2 local.get $0 - local.tee $2 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $1 - local.get $2 local.get $3 + local.get $4 i32.load8_u i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 + br $while-continue|0 end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 - local.get $4 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and if - local.get $4 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $4 - local.get $0 + local.tee $2 i32.add local.get $1 - local.get $4 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 end end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 + end + end + end + loop $while-continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end end end ) @@ -1472,7 +1438,7 @@ if i32.const 0 i32.const 1088 - i32.const 581 + i32.const 573 i32.const 3 call $~lib/builtins/abort unreachable @@ -1879,7 +1845,7 @@ i32.const 1040 i32.add local.get $1 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $0 call $~lib/rt/pure/__retain end diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/object-literal.untouched.wat index 98f6656a59..c2fa2c2bfc 100644 --- a/tests/compiler/object-literal.untouched.wat +++ b/tests/compiler/object-literal.untouched.wat @@ -2,10 +2,10 @@ (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result 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_=>_i32 (func (param i32 i32 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_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) @@ -35,6 +35,69 @@ (global $~lib/heap/__heap_base i32 (i32.const 424)) (export "_start" (func $~start)) (export "memory" (memory $0)) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -43,9 +106,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -58,7 +118,7 @@ if i32.const 0 i32.const 80 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -85,7 +145,7 @@ if i32.const 0 i32.const 80 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -139,7 +199,7 @@ if i32.const 0 i32.const 80 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -164,77 +224,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -251,6 +269,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -262,8 +286,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -271,7 +293,7 @@ if i32.const 0 i32.const 80 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -288,28 +310,18 @@ if i32.const 0 i32.const 80 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -320,44 +332,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -365,30 +367,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 80 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -407,22 +405,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -448,7 +446,7 @@ if i32.const 0 i32.const 80 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -460,18 +458,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 80 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -525,27 +523,15 @@ if i32.const 0 i32.const 80 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -560,24 +546,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -587,31 +559,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -619,8 +575,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -646,24 +600,22 @@ if i32.const 0 i32.const 80 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -671,7 +623,7 @@ if i32.const 0 i32.const 80 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -679,16 +631,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -704,7 +656,7 @@ if i32.const 0 i32.const 80 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -713,8 +665,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -725,49 +677,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -780,10 +728,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -833,73 +777,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -912,11 +829,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -936,7 +853,7 @@ if i32.const 128 i32.const 80 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -962,9 +879,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1032,31 +946,24 @@ if i32.const 0 i32.const 80 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1069,79 +976,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 80 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1178,9 +1054,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1194,12 +1068,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1209,7 +1083,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1246,7 +1120,7 @@ if i32.const 0 i32.const 80 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1297,29 +1171,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1339,7 +1193,7 @@ if i32.const 0 i32.const 80 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1386,7 +1240,7 @@ if i32.const 0 i32.const 80 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1407,7 +1261,7 @@ if i32.const 0 i32.const 80 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1428,7 +1282,7 @@ if i32.const 0 i32.const 80 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -2821,238 +2675,233 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if local.get $0 - local.set $5 local.get $1 - local.set $4 local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if i32.const 0 - i32.const 1 + i32.const 2 i32.lt_s drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.tee $7 + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 i32.const 1 i32.add - local.set $5 - local.get $7 + local.set $0 local.get $4 - local.tee $7 + local.get $1 + local.tee $4 i32.const 1 i32.add - local.set $4 - local.get $7 + local.set $1 + local.get $4 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 + br $while-continue|0 end end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 end end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 + end + end + end + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end end end ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -3218,7 +3067,7 @@ if i32.const 0 i32.const 80 - i32.const 581 + i32.const 573 i32.const 3 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/rc/global-init.untouched.wat b/tests/compiler/rc/global-init.untouched.wat index 5e52828faa..9a17bd8209 100644 --- a/tests/compiler/rc/global-init.untouched.wat +++ b/tests/compiler/rc/global-init.untouched.wat @@ -1,10 +1,13 @@ (module (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (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_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result 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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) (import "rtrace" "ondecrement" (func $~lib/rt/rtrace/ondecrement (param i32))) @@ -138,6 +141,60 @@ (func $~start call $start:rc/global-init ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -146,9 +203,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -161,7 +215,7 @@ if i32.const 0 i32.const 96 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -188,7 +242,7 @@ if i32.const 0 i32.const 96 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -242,7 +296,7 @@ if i32.const 0 i32.const 96 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -267,77 +321,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -354,6 +366,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -365,8 +383,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -374,7 +390,7 @@ if i32.const 0 i32.const 96 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -391,28 +407,18 @@ if i32.const 0 i32.const 96 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -423,44 +429,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -468,30 +464,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 96 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -510,22 +502,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -551,7 +543,7 @@ if i32.const 0 i32.const 96 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -563,18 +555,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 96 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -628,27 +620,15 @@ if i32.const 0 i32.const 96 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -663,24 +643,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -690,31 +656,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) (local $2 i32) diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index c49de915d2..daffd6c278 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -1,11 +1,13 @@ (module (type $i32_=>_none (func (param i32))) - (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result 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))) + (type $none_=>_none (func)) (type $none_=>_i32 (func (result 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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -20,6 +22,58 @@ (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -34,7 +88,7 @@ if i32.const 0 i32.const 1056 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -56,7 +110,7 @@ if i32.const 0 i32.const 1056 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -75,23 +129,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -99,72 +153,56 @@ if i32.const 0 i32.const 1056 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -172,7 +210,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -195,7 +233,7 @@ if i32.const 0 i32.const 1056 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -209,22 +247,16 @@ if i32.const 0 i32.const 1056 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -233,7 +265,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -242,7 +274,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -253,16 +285,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -282,7 +308,7 @@ if i32.const 0 i32.const 1056 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -315,8 +341,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -337,7 +363,7 @@ if i32.const 0 i32.const 1056 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -347,17 +373,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1056 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -386,13 +412,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -400,21 +426,15 @@ if i32.const 0 i32.const 1056 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -429,37 +449,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -483,7 +494,7 @@ if i32.const 0 i32.const 1056 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -500,7 +511,7 @@ if i32.const 0 i32.const 1056 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -528,7 +539,7 @@ if i32.const 0 i32.const 1056 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -580,7 +591,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -601,7 +612,8 @@ unreachable end i32.const 1200 - local.tee $0 + local.set $2 + i32.const 1200 i32.const 0 i32.store i32.const 2768 @@ -612,35 +624,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1200 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1200 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -660,24 +663,23 @@ i32.const 1200 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 - i32.load offset=4 + i32.const 0 + call $~lib/rt/tlsf/GETSL i32.const -2 i32.and local.tee $2 if (result i32) local.get $0 + i32.const 0 local.get $2 i32.ctz - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -689,31 +691,22 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1056 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end @@ -727,7 +720,7 @@ if i32.const 0 i32.const 1056 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -746,15 +739,16 @@ local.tee $1 i32.eqz if - i32.const 16 memory.size - local.tee $2 + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl i32.const 65551 @@ -763,18 +757,16 @@ i32.and i32.const 16 i32.shr_u - local.set $1 - local.get $2 + local.tee $2 local.get $1 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -783,7 +775,7 @@ end end local.get $0 - local.get $2 + local.get $1 i32.const 16 i32.shl memory.size @@ -797,7 +789,7 @@ if i32.const 0 i32.const 1056 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -813,7 +805,7 @@ if i32.const 0 i32.const 1056 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -868,20 +860,9 @@ i32.and i32.store local.get $1 - i32.const 16 - i32.add - local.tee $0 + call $~lib/rt/tlsf/GETRIGHT 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 + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const -3 i32.and diff --git a/tests/compiler/rc/local-init.untouched.wat b/tests/compiler/rc/local-init.untouched.wat index 3f346a5bc7..56adaf9c7b 100644 --- a/tests/compiler/rc/local-init.untouched.wat +++ b/tests/compiler/rc/local-init.untouched.wat @@ -1,13 +1,13 @@ (module (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) (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_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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -40,6 +40,69 @@ (func $rc/local-init/getRef (result i32) i32.const 32 ) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -48,9 +111,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -63,7 +123,7 @@ if i32.const 0 i32.const 48 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -90,7 +150,7 @@ if i32.const 0 i32.const 48 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -144,7 +204,7 @@ if i32.const 0 i32.const 48 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -169,77 +229,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -256,6 +274,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -267,8 +291,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -276,7 +298,7 @@ if i32.const 0 i32.const 48 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -293,28 +315,18 @@ if i32.const 0 i32.const 48 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -325,44 +337,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -370,30 +372,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 48 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -412,22 +410,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -453,7 +451,7 @@ if i32.const 0 i32.const 48 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -465,18 +463,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 48 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -530,27 +528,15 @@ if i32.const 0 i32.const 48 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -565,24 +551,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -592,31 +564,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -624,8 +580,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -651,24 +605,22 @@ if i32.const 0 i32.const 48 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -676,7 +628,7 @@ if i32.const 0 i32.const 48 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -684,16 +636,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -709,7 +661,7 @@ if i32.const 0 i32.const 48 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -718,8 +670,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -730,49 +682,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -785,10 +733,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -838,73 +782,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -917,11 +834,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -941,7 +858,7 @@ if i32.const 96 i32.const 48 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -967,9 +884,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1037,31 +951,24 @@ if i32.const 0 i32.const 48 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1074,79 +981,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 48 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1183,9 +1059,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1199,12 +1073,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1214,7 +1088,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1251,7 +1125,7 @@ if i32.const 0 i32.const 48 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1302,29 +1176,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1344,7 +1198,7 @@ if i32.const 0 i32.const 48 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1391,7 +1245,7 @@ if i32.const 0 i32.const 48 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1412,7 +1266,7 @@ if i32.const 0 i32.const 48 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1433,7 +1287,7 @@ if i32.const 0 i32.const 48 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index 6a906a7a83..8763b19e3f 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -2,10 +2,12 @@ (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_i32 (func (result 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))) + (type $none_=>_none (func)) + (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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -20,6 +22,58 @@ (global $rc/logical-and-mismatch/gloRef (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -34,7 +88,7 @@ if i32.const 0 i32.const 1040 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -56,7 +110,7 @@ if i32.const 0 i32.const 1040 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -75,23 +129,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -99,72 +153,56 @@ if i32.const 0 i32.const 1040 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -172,7 +210,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -195,7 +233,7 @@ if i32.const 0 i32.const 1040 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -209,22 +247,16 @@ if i32.const 0 i32.const 1040 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -233,7 +265,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -242,7 +274,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -253,16 +285,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -282,7 +308,7 @@ if i32.const 0 i32.const 1040 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -315,8 +341,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -337,7 +363,7 @@ if i32.const 0 i32.const 1040 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -347,17 +373,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1040 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -386,13 +412,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -400,21 +426,15 @@ if i32.const 0 i32.const 1040 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -429,37 +449,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -483,7 +494,7 @@ if i32.const 0 i32.const 1040 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -500,7 +511,7 @@ if i32.const 0 i32.const 1040 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -528,7 +539,7 @@ if i32.const 0 i32.const 1040 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -580,7 +591,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -601,7 +612,8 @@ unreachable end i32.const 1184 - local.tee $0 + local.set $2 + i32.const 1184 i32.const 0 i32.store i32.const 2752 @@ -612,35 +624,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1184 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1184 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -660,24 +663,23 @@ i32.const 1184 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 - i32.load offset=4 + i32.const 0 + call $~lib/rt/tlsf/GETSL i32.const -2 i32.and local.tee $2 if (result i32) local.get $0 + i32.const 0 local.get $2 i32.ctz - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -689,31 +691,22 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1040 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end @@ -727,7 +720,7 @@ if i32.const 0 i32.const 1040 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -746,15 +739,16 @@ local.tee $1 i32.eqz if - i32.const 16 memory.size - local.tee $2 + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl i32.const 65551 @@ -763,18 +757,16 @@ i32.and i32.const 16 i32.shr_u - local.set $1 - local.get $2 + local.tee $2 local.get $1 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -783,7 +775,7 @@ end end local.get $0 - local.get $2 + local.get $1 i32.const 16 i32.shl memory.size @@ -797,7 +789,7 @@ if i32.const 0 i32.const 1040 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -813,7 +805,7 @@ if i32.const 0 i32.const 1040 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -868,20 +860,9 @@ i32.and i32.store local.get $1 - i32.const 16 - i32.add - local.tee $0 + call $~lib/rt/tlsf/GETRIGHT 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 + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const -3 i32.and diff --git a/tests/compiler/rc/logical-and-mismatch.untouched.wat b/tests/compiler/rc/logical-and-mismatch.untouched.wat index 75a31a6e5d..c28f0e7a9d 100644 --- a/tests/compiler/rc/logical-and-mismatch.untouched.wat +++ b/tests/compiler/rc/logical-and-mismatch.untouched.wat @@ -1,13 +1,13 @@ (module (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) (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_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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -26,6 +26,69 @@ (global $~lib/heap/__heap_base i32 (i32.const 176)) (export "memory" (memory $0)) (start $~start) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -34,9 +97,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -49,7 +109,7 @@ if i32.const 0 i32.const 32 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -76,7 +136,7 @@ if i32.const 0 i32.const 32 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -130,7 +190,7 @@ if i32.const 0 i32.const 32 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -155,77 +215,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -242,6 +260,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -253,8 +277,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -262,7 +284,7 @@ if i32.const 0 i32.const 32 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -279,28 +301,18 @@ if i32.const 0 i32.const 32 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -311,44 +323,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -356,30 +358,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 32 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -398,22 +396,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -439,7 +437,7 @@ if i32.const 0 i32.const 32 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -451,18 +449,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 32 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -516,27 +514,15 @@ if i32.const 0 i32.const 32 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -551,24 +537,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -578,31 +550,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -610,8 +566,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -637,24 +591,22 @@ if i32.const 0 i32.const 32 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -662,7 +614,7 @@ if i32.const 0 i32.const 32 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -670,16 +622,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -695,7 +647,7 @@ if i32.const 0 i32.const 32 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -704,8 +656,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -716,49 +668,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -771,10 +719,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -824,73 +768,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -903,11 +820,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -927,7 +844,7 @@ if i32.const 80 i32.const 32 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -953,9 +870,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1023,31 +937,24 @@ if i32.const 0 i32.const 32 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1060,79 +967,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 32 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1169,9 +1045,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1185,12 +1059,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1200,7 +1074,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1237,7 +1111,7 @@ if i32.const 0 i32.const 32 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1288,29 +1162,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1330,7 +1184,7 @@ if i32.const 0 i32.const 32 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1377,7 +1231,7 @@ if i32.const 0 i32.const 32 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1398,7 +1252,7 @@ if i32.const 0 i32.const 32 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1419,7 +1273,7 @@ if i32.const 0 i32.const 32 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index 946c55476b..4b29c21ab8 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -2,10 +2,12 @@ (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_i32 (func (result 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))) + (type $none_=>_none (func)) + (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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -20,6 +22,58 @@ (global $rc/logical-or-mismatch/gloRef (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -34,7 +88,7 @@ if i32.const 0 i32.const 1040 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -56,7 +110,7 @@ if i32.const 0 i32.const 1040 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -75,23 +129,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -99,72 +153,56 @@ if i32.const 0 i32.const 1040 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -172,7 +210,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -195,7 +233,7 @@ if i32.const 0 i32.const 1040 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -209,22 +247,16 @@ if i32.const 0 i32.const 1040 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -233,7 +265,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -242,7 +274,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -253,16 +285,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -282,7 +308,7 @@ if i32.const 0 i32.const 1040 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -315,8 +341,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -337,7 +363,7 @@ if i32.const 0 i32.const 1040 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -347,17 +373,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1040 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -386,13 +412,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -400,21 +426,15 @@ if i32.const 0 i32.const 1040 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -429,37 +449,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -483,7 +494,7 @@ if i32.const 0 i32.const 1040 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -500,7 +511,7 @@ if i32.const 0 i32.const 1040 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -528,7 +539,7 @@ if i32.const 0 i32.const 1040 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -580,7 +591,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -601,7 +612,8 @@ unreachable end i32.const 1184 - local.tee $0 + local.set $2 + i32.const 1184 i32.const 0 i32.store i32.const 2752 @@ -612,35 +624,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1184 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1184 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -660,24 +663,23 @@ i32.const 1184 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 - i32.load offset=4 + i32.const 0 + call $~lib/rt/tlsf/GETSL i32.const -2 i32.and local.tee $2 if (result i32) local.get $0 + i32.const 0 local.get $2 i32.ctz - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -689,31 +691,22 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1040 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end @@ -727,7 +720,7 @@ if i32.const 0 i32.const 1040 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -746,15 +739,16 @@ local.tee $1 i32.eqz if - i32.const 16 memory.size - local.tee $2 + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl i32.const 65551 @@ -763,18 +757,16 @@ i32.and i32.const 16 i32.shr_u - local.set $1 - local.get $2 + local.tee $2 local.get $1 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -783,7 +775,7 @@ end end local.get $0 - local.get $2 + local.get $1 i32.const 16 i32.shl memory.size @@ -797,7 +789,7 @@ if i32.const 0 i32.const 1040 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -813,7 +805,7 @@ if i32.const 0 i32.const 1040 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -868,20 +860,9 @@ i32.and i32.store local.get $1 - i32.const 16 - i32.add - local.tee $0 + call $~lib/rt/tlsf/GETRIGHT 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 + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const -3 i32.and diff --git a/tests/compiler/rc/logical-or-mismatch.untouched.wat b/tests/compiler/rc/logical-or-mismatch.untouched.wat index 05b2addd50..045041d0e2 100644 --- a/tests/compiler/rc/logical-or-mismatch.untouched.wat +++ b/tests/compiler/rc/logical-or-mismatch.untouched.wat @@ -1,13 +1,13 @@ (module (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) (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_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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -26,6 +26,69 @@ (global $~lib/heap/__heap_base i32 (i32.const 176)) (export "memory" (memory $0)) (start $~start) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -34,9 +97,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -49,7 +109,7 @@ if i32.const 0 i32.const 32 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -76,7 +136,7 @@ if i32.const 0 i32.const 32 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -130,7 +190,7 @@ if i32.const 0 i32.const 32 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -155,77 +215,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -242,6 +260,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -253,8 +277,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -262,7 +284,7 @@ if i32.const 0 i32.const 32 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -279,28 +301,18 @@ if i32.const 0 i32.const 32 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -311,44 +323,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -356,30 +358,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 32 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -398,22 +396,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -439,7 +437,7 @@ if i32.const 0 i32.const 32 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -451,18 +449,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 32 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -516,27 +514,15 @@ if i32.const 0 i32.const 32 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -551,24 +537,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -578,31 +550,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -610,8 +566,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -637,24 +591,22 @@ if i32.const 0 i32.const 32 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -662,7 +614,7 @@ if i32.const 0 i32.const 32 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -670,16 +622,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -695,7 +647,7 @@ if i32.const 0 i32.const 32 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -704,8 +656,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -716,49 +668,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -771,10 +719,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -824,73 +768,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -903,11 +820,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -927,7 +844,7 @@ if i32.const 80 i32.const 32 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -953,9 +870,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1023,31 +937,24 @@ if i32.const 0 i32.const 32 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1060,79 +967,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 32 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1169,9 +1045,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1185,12 +1059,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1200,7 +1074,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1237,7 +1111,7 @@ if i32.const 0 i32.const 32 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1288,29 +1162,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1330,7 +1184,7 @@ if i32.const 0 i32.const 32 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1377,7 +1231,7 @@ if i32.const 0 i32.const 32 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1398,7 +1252,7 @@ if i32.const 0 i32.const 32 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1419,7 +1273,7 @@ if i32.const 0 i32.const 32 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index adad34ed33..09b023696f 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -1,12 +1,13 @@ (module (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_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $none_=>_i32 (func (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))) + (type $none_=>_none (func)) + (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 "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) @@ -110,6 +111,58 @@ end local.get $0 ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -124,7 +177,7 @@ if i32.const 0 i32.const 1088 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -146,7 +199,7 @@ if i32.const 0 i32.const 1088 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -165,23 +218,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -189,72 +242,56 @@ if i32.const 0 i32.const 1088 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -262,7 +299,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -285,7 +322,7 @@ if i32.const 0 i32.const 1088 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -299,22 +336,16 @@ if i32.const 0 i32.const 1088 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -323,7 +354,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -332,7 +363,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -343,16 +374,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -372,7 +397,7 @@ if i32.const 0 i32.const 1088 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -405,8 +430,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -427,7 +452,7 @@ if i32.const 0 i32.const 1088 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -437,17 +462,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1088 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -476,13 +501,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -490,21 +515,15 @@ if i32.const 0 i32.const 1088 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -519,37 +538,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -573,7 +583,7 @@ if i32.const 0 i32.const 1088 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -590,7 +600,7 @@ if i32.const 0 i32.const 1088 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -618,7 +628,7 @@ if i32.const 0 i32.const 1088 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -670,7 +680,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -691,7 +701,8 @@ unreachable end i32.const 1216 - local.tee $0 + local.set $2 + i32.const 1216 i32.const 0 i32.store i32.const 2784 @@ -702,35 +713,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1216 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1216 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -750,24 +752,23 @@ i32.const 1216 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 - i32.load offset=4 + i32.const 0 + call $~lib/rt/tlsf/GETSL i32.const -2 i32.and local.tee $2 if (result i32) local.get $0 + i32.const 0 local.get $2 i32.ctz - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -779,31 +780,22 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1088 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end @@ -817,7 +809,7 @@ if i32.const 0 i32.const 1088 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -836,15 +828,16 @@ local.tee $1 i32.eqz if - i32.const 16 memory.size - local.tee $2 + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl i32.const 65551 @@ -853,18 +846,16 @@ i32.and i32.const 16 i32.shr_u - local.set $1 - local.get $2 + local.tee $2 local.get $1 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -873,7 +864,7 @@ end end local.get $0 - local.get $2 + local.get $1 i32.const 16 i32.shl memory.size @@ -887,7 +878,7 @@ if i32.const 0 i32.const 1088 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -903,7 +894,7 @@ if i32.const 0 i32.const 1088 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -958,20 +949,9 @@ i32.and i32.store local.get $1 - i32.const 16 - i32.add - local.tee $0 + call $~lib/rt/tlsf/GETRIGHT 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 + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const -3 i32.and diff --git a/tests/compiler/rc/optimize.untouched.wat b/tests/compiler/rc/optimize.untouched.wat index 2504b02101..2c31dbbaec 100644 --- a/tests/compiler/rc/optimize.untouched.wat +++ b/tests/compiler/rc/optimize.untouched.wat @@ -1,13 +1,13 @@ (module - (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result 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 $none_=>_i32 (func (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result 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))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) @@ -129,6 +129,69 @@ end local.get $0 ) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -137,9 +200,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -152,7 +212,7 @@ if i32.const 0 i32.const 80 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -179,7 +239,7 @@ if i32.const 0 i32.const 80 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -233,7 +293,7 @@ if i32.const 0 i32.const 80 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -258,77 +318,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -345,6 +363,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -356,8 +380,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -365,7 +387,7 @@ if i32.const 0 i32.const 80 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -382,28 +404,18 @@ if i32.const 0 i32.const 80 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -414,44 +426,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -459,30 +461,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 80 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -501,22 +499,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -542,7 +540,7 @@ if i32.const 0 i32.const 80 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -554,18 +552,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 80 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -619,27 +617,15 @@ if i32.const 0 i32.const 80 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -654,24 +640,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -681,31 +653,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -713,8 +669,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -740,24 +694,22 @@ if i32.const 0 i32.const 80 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -765,7 +717,7 @@ if i32.const 0 i32.const 80 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -773,16 +725,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -798,7 +750,7 @@ if i32.const 0 i32.const 80 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -807,8 +759,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -819,49 +771,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -874,10 +822,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -927,73 +871,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -1006,11 +923,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -1030,7 +947,7 @@ if i32.const 128 i32.const 80 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -1056,9 +973,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1126,31 +1040,24 @@ if i32.const 0 i32.const 80 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1163,79 +1070,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 80 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1272,9 +1148,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1288,12 +1162,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1303,7 +1177,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1340,7 +1214,7 @@ if i32.const 0 i32.const 80 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1391,29 +1265,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1433,7 +1287,7 @@ if i32.const 0 i32.const 80 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1480,7 +1334,7 @@ if i32.const 0 i32.const 80 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1501,7 +1355,7 @@ if i32.const 0 i32.const 80 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1522,7 +1376,7 @@ if i32.const 0 i32.const 80 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index 160b6e5eb6..dafdc9f9b4 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -1,13 +1,13 @@ (module + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (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 (func (param i32 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 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1024) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") @@ -23,6 +23,58 @@ (export "__release" (func $~lib/rt/pure/__release)) (export "__collect" (func $~start)) (export "__rtti_base" (global $~lib/rt/__rtti_base)) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -37,7 +89,7 @@ if i32.const 0 i32.const 1040 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -59,7 +111,7 @@ if i32.const 0 i32.const 1040 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -78,23 +130,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -102,72 +154,56 @@ if i32.const 0 i32.const 1040 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -175,7 +211,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -198,7 +234,7 @@ if i32.const 0 i32.const 1040 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -212,22 +248,16 @@ if i32.const 0 i32.const 1040 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -236,7 +266,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -245,7 +275,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -256,16 +286,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -285,7 +309,7 @@ if i32.const 0 i32.const 1040 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -318,8 +342,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -340,7 +364,7 @@ if i32.const 0 i32.const 1040 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -350,17 +374,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1040 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -389,13 +413,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -403,21 +427,15 @@ if i32.const 0 i32.const 1040 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -432,37 +450,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -486,7 +495,7 @@ if i32.const 0 i32.const 1040 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -503,7 +512,7 @@ if i32.const 0 i32.const 1040 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -531,7 +540,7 @@ if i32.const 0 i32.const 1040 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -583,7 +592,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -604,7 +613,8 @@ unreachable end i32.const 1232 - local.tee $0 + local.set $2 + i32.const 1232 i32.const 0 i32.store i32.const 2800 @@ -615,35 +625,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1232 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1232 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -663,7 +664,7 @@ i32.const 1232 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -721,17 +722,14 @@ if i32.const 0 i32.const 1040 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const -1 local.get $1 i32.shl @@ -739,16 +737,10 @@ local.tee $1 if (result i32) local.get $0 + local.get $2 local.get $1 i32.ctz - local.get $2 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -764,111 +756,27 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1040 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 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 15 - i32.and - if - i32.const 0 - i32.const 1040 - i32.const 365 - 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 32 - 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 16 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 16 - 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 16 - 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) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -877,37 +785,38 @@ if i32.const 0 i32.const 1040 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + local.tee $3 i32.const 1073741808 i32.ge_u if i32.const 1088 i32.const 1040 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable end local.get $0 - local.get $1 + local.get $3 i32.const 15 i32.add i32.const -16 i32.and - local.tee $3 + local.tee $1 i32.const 16 - local.get $3 + local.get $1 i32.const 16 i32.gt_u select local.tee $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if i32.const 1 @@ -917,18 +826,19 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if - i32.const 16 memory.size - local.tee $3 + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -953,10 +863,8 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 - local.get $5 - local.get $3 + local.tee $5 + local.get $1 local.get $5 i32.gt_s select @@ -973,7 +881,7 @@ end end local.get $0 - local.get $3 + local.get $1 i32.const 16 i32.shl memory.size @@ -983,19 +891,19 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if i32.const 0 i32.const 1040 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable end end end - local.get $3 + local.get $1 i32.load i32.const -4 i32.and @@ -1004,28 +912,84 @@ if i32.const 0 i32.const 1040 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 0 i32.store offset=4 - local.get $3 + local.get $1 local.get $2 i32.store offset=8 - local.get $3 local.get $1 + local.get $3 i32.store offset=12 local.get $0 - local.get $3 + local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 + local.get $1 + i32.load + local.set $2 local.get $4 - call $~lib/rt/tlsf/prepareBlock - local.get $3 + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1040 + i32.const 357 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const -4 + i32.and + local.get $4 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $4 + local.get $2 + i32.const 2 + i32.and + i32.or + i32.store + local.get $4 + local.get $1 + i32.const 16 + i32.add + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + call $~lib/rt/tlsf/GETRIGHT + local.get $1 + call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $1 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize diff --git a/tests/compiler/rc/rereturn.untouched.wat b/tests/compiler/rc/rereturn.untouched.wat index 86eaab64c7..a5171d55c2 100644 --- a/tests/compiler/rc/rereturn.untouched.wat +++ b/tests/compiler/rc/rereturn.untouched.wat @@ -1,9 +1,9 @@ (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 $none_=>_i32 (func (result 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_i32_=>_none (func (param i32 i32 i32))) @@ -28,6 +28,69 @@ (export "__collect" (func $~lib/rt/pure/__collect)) (export "__rtti_base" (global $~lib/rt/__rtti_base)) (start $~start) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -36,9 +99,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -51,7 +111,7 @@ if i32.const 0 i32.const 32 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -78,7 +138,7 @@ if i32.const 0 i32.const 32 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -132,7 +192,7 @@ if i32.const 0 i32.const 32 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -157,77 +217,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -244,6 +262,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -255,8 +279,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -264,7 +286,7 @@ if i32.const 0 i32.const 32 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -281,28 +303,18 @@ if i32.const 0 i32.const 32 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -313,44 +325,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -358,30 +360,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 32 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -400,22 +398,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -441,7 +439,7 @@ if i32.const 0 i32.const 32 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -453,18 +451,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 32 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -518,27 +516,15 @@ if i32.const 0 i32.const 32 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -553,24 +539,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -580,31 +552,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -612,8 +568,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -639,24 +593,22 @@ if i32.const 0 i32.const 32 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -664,7 +616,7 @@ if i32.const 0 i32.const 32 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -672,16 +624,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -697,7 +649,7 @@ if i32.const 0 i32.const 32 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -706,8 +658,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -718,49 +670,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -773,10 +721,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -826,73 +770,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -905,11 +822,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -929,7 +846,7 @@ if i32.const 80 i32.const 32 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -955,9 +872,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1025,31 +939,24 @@ if i32.const 0 i32.const 32 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1062,79 +969,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 32 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1171,9 +1047,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1187,12 +1061,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1202,7 +1076,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1239,7 +1113,7 @@ if i32.const 0 i32.const 32 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1290,29 +1164,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1332,7 +1186,7 @@ if i32.const 0 i32.const 32 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1379,7 +1233,7 @@ if i32.const 0 i32.const 32 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1400,7 +1254,7 @@ if i32.const 0 i32.const 32 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1421,7 +1275,7 @@ if i32.const 0 i32.const 32 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index ae587c4e1a..eafc465097 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -2,10 +2,12 @@ (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_i32 (func (result 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))) + (type $none_=>_none (func)) + (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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -22,6 +24,58 @@ (export "test1" (func $rc/ternary-mismatch/test1)) (export "test2" (func $rc/ternary-mismatch/test2)) (start $~start) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -36,7 +90,7 @@ if i32.const 0 i32.const 1040 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -58,7 +112,7 @@ if i32.const 0 i32.const 1040 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -77,23 +131,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -101,72 +155,56 @@ if i32.const 0 i32.const 1040 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -174,7 +212,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -197,7 +235,7 @@ if i32.const 0 i32.const 1040 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -211,22 +249,16 @@ if i32.const 0 i32.const 1040 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -235,7 +267,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -244,7 +276,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -255,16 +287,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -284,7 +310,7 @@ if i32.const 0 i32.const 1040 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -317,8 +343,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -339,7 +365,7 @@ if i32.const 0 i32.const 1040 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -349,17 +375,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1040 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -388,13 +414,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -402,21 +428,15 @@ if i32.const 0 i32.const 1040 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -431,37 +451,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -485,7 +496,7 @@ if i32.const 0 i32.const 1040 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -502,7 +513,7 @@ if i32.const 0 i32.const 1040 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -530,7 +541,7 @@ if i32.const 0 i32.const 1040 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -582,7 +593,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -603,7 +614,8 @@ unreachable end i32.const 1184 - local.tee $0 + local.set $2 + i32.const 1184 i32.const 0 i32.store i32.const 2752 @@ -614,35 +626,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1184 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1184 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -662,24 +665,23 @@ i32.const 1184 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 - i32.load offset=4 + i32.const 0 + call $~lib/rt/tlsf/GETSL i32.const -2 i32.and local.tee $2 if (result i32) local.get $0 + i32.const 0 local.get $2 i32.ctz - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -691,31 +693,22 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1040 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end @@ -729,7 +722,7 @@ if i32.const 0 i32.const 1040 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -748,15 +741,16 @@ local.tee $1 i32.eqz if - i32.const 16 memory.size - local.tee $2 + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl i32.const 65551 @@ -765,18 +759,16 @@ i32.and i32.const 16 i32.shr_u - local.set $1 - local.get $2 + local.tee $2 local.get $1 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -785,7 +777,7 @@ end end local.get $0 - local.get $2 + local.get $1 i32.const 16 i32.shl memory.size @@ -799,7 +791,7 @@ if i32.const 0 i32.const 1040 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -815,7 +807,7 @@ if i32.const 0 i32.const 1040 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -870,20 +862,9 @@ i32.and i32.store local.get $1 - i32.const 16 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 + call $~lib/rt/tlsf/GETRIGHT local.get $1 - i32.load - i32.const -4 - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const -3 i32.and diff --git a/tests/compiler/rc/ternary-mismatch.untouched.wat b/tests/compiler/rc/ternary-mismatch.untouched.wat index f502716e41..0ccbc2d0f9 100644 --- a/tests/compiler/rc/ternary-mismatch.untouched.wat +++ b/tests/compiler/rc/ternary-mismatch.untouched.wat @@ -1,13 +1,13 @@ (module + (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 $none_=>_none (func)) - (type $none_=>_i32 (func (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_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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -28,6 +28,69 @@ (export "test1" (func $rc/ternary-mismatch/test1)) (export "test2" (func $rc/ternary-mismatch/test2)) (start $~start) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -36,9 +99,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -51,7 +111,7 @@ if i32.const 0 i32.const 32 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -78,7 +138,7 @@ if i32.const 0 i32.const 32 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -132,7 +192,7 @@ if i32.const 0 i32.const 32 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -157,77 +217,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -244,6 +262,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -255,8 +279,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -264,7 +286,7 @@ if i32.const 0 i32.const 32 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -281,28 +303,18 @@ if i32.const 0 i32.const 32 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -313,44 +325,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -358,30 +360,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 32 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -400,22 +398,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -441,7 +439,7 @@ if i32.const 0 i32.const 32 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -453,18 +451,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 32 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -518,27 +516,15 @@ if i32.const 0 i32.const 32 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -553,24 +539,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -580,31 +552,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -612,8 +568,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -639,24 +593,22 @@ if i32.const 0 i32.const 32 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -664,7 +616,7 @@ if i32.const 0 i32.const 32 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -672,16 +624,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -697,7 +649,7 @@ if i32.const 0 i32.const 32 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -706,8 +658,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -718,49 +670,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -773,10 +721,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -826,73 +770,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -905,11 +822,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -929,7 +846,7 @@ if i32.const 80 i32.const 32 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -955,9 +872,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1025,31 +939,24 @@ if i32.const 0 i32.const 32 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1062,79 +969,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 32 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1171,9 +1047,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1187,12 +1061,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1202,7 +1076,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1239,7 +1113,7 @@ if i32.const 0 i32.const 32 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1290,29 +1164,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1332,7 +1186,7 @@ if i32.const 0 i32.const 32 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1379,7 +1233,7 @@ if i32.const 0 i32.const 32 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1400,7 +1254,7 @@ if i32.const 0 i32.const 32 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1421,7 +1275,7 @@ if i32.const 0 i32.const 32 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index bd61fa52a9..d1df70ff35 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -103,86 +103,44 @@ i32.store offset=12 local.get $4 ) - (func $~lib/memory/memory.copy (param $0 i32) + (func $~lib/util/memory/memmove (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - i32.const 1040 - local.set $1 i32.const 8 local.set $4 - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - i32.const 1040 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 + i32.const 1040 + local.set $1 + local.get $0 + i32.const 1040 + i32.eq + if + return + end + local.get $0 + i32.const 1040 + i32.lt_u + if local.get $0 - i32.const 1040 - i32.lt_u + i32.const 7 + i32.and + i32.eqz if - local.get $0 - i32.const 7 - i32.and - i32.eqz - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if local.get $4 - i32.const 8 - i32.ge_u + i32.eqz if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + return end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $4 + i32.const 1 + i32.sub + local.set $4 local.get $0 local.tee $2 i32.const 1 @@ -197,81 +155,127 @@ local.get $3 i32.load8_u i32.store8 + br $while-continue|0 + end + end + loop $while-continue|1 + local.get $4 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store local.get $4 - i32.const 1 + i32.const 8 i32.sub local.set $4 - br $while-continue|2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $while-continue|1 end end - else - local.get $0 - i32.const 7 - i32.and - i32.eqz + end + loop $while-continue|2 + local.get $4 if - loop $while-continue|3 - local.get $0 + local.get $0 + local.tee $2 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $2 + local.get $3 + i32.load8_u + i32.store8 + local.get $4 + i32.const 1 + i32.sub + local.set $4 + br $while-continue|2 + end + end + else + local.get $0 + i32.const 7 + i32.and + i32.eqz + if + loop $while-continue|3 + local.get $0 + local.get $4 + i32.add + i32.const 7 + i32.and + if local.get $4 - i32.add - i32.const 7 - i32.and + i32.eqz if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - i32.add - local.get $4 - i32.const 1040 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 + return end - end - loop $while-continue|4 + local.get $0 local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - i32.add - local.get $4 - i32.const 1040 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.const 1 + i32.sub + local.tee $4 + i32.add + local.get $4 + i32.const 1040 + i32.add + i32.load8_u + i32.store8 + br $while-continue|3 end end - loop $while-continue|5 + loop $while-continue|4 local.get $4 + i32.const 8 + i32.ge_u if local.get $0 local.get $4 - i32.const 1 + i32.const 8 i32.sub local.tee $4 i32.add local.get $4 i32.const 1040 i32.add - i32.load8_u - i32.store8 - br $while-continue|5 + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $4 + if + local.get $0 + local.get $4 + i32.const 1 + i32.sub + local.tee $4 + i32.add + local.get $4 + i32.const 1040 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) @@ -316,7 +320,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -344,7 +348,7 @@ end ) (func $~lib/number/U64#toString (param $0 i64) (result i32) - (local $1 i64) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -353,7 +357,7 @@ i64.eqz if i32.const 1184 - local.set $3 + local.set $2 br $__inlined_func$~lib/util/number/utoa64 end local.get $0 @@ -362,17 +366,17 @@ if local.get $0 i32.wrap_i64 - local.tee $2 + local.tee $1 call $~lib/util/number/decimalCount32 - local.tee $4 + local.tee $3 i32.const 1 i32.shl i32.const 1 call $~lib/rt/stub/__alloc - local.tee $3 - local.get $2 - local.get $4 - call $~lib/util/number/utoa_simple + local.tee $2 + local.get $1 + local.get $3 + call $~lib/util/number/utoa32_core else local.get $0 i64.const 100000000000 @@ -418,40 +422,43 @@ i64.const 1000000000000000 i64.lt_u select - local.tee $2 + local.tee $1 i32.const 1 i32.shl i32.const 1 call $~lib/rt/stub/__alloc - local.tee $3 - local.set $4 + local.tee $2 + local.set $3 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.get $4 - local.get $2 + local.set $0 + local.get $3 + local.get $1 i32.const 1 i32.sub - local.tee $2 + local.tee $1 i32.const 1 i32.shl i32.add - local.get $0 - i64.const 10 - i64.rem_u - i32.wrap_i64 + local.get $4 i32.const 48 i32.add i32.store16 - local.tee $0 + local.get $0 i64.const 0 i64.ne br_if $do-continue|0 end end end - local.get $3 + local.get $2 ) (func $resolve-access/arrayAccess (result i32) (local $0 i32) @@ -464,7 +471,7 @@ i32.const 0 call $~lib/rt/stub/__alloc local.tee $1 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $0 local.get $1 i32.store @@ -541,7 +548,7 @@ local.tee $2 local.get $0 local.get $1 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core end local.get $2 ) diff --git a/tests/compiler/resolve-access.untouched.wat b/tests/compiler/resolve-access.untouched.wat index 41c5ec2cad..be7b1a88d9 100644 --- a/tests/compiler/resolve-access.untouched.wat +++ b/tests/compiler/resolve-access.untouched.wat @@ -1,13 +1,13 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i64_=>_i32 (func (param i64) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i64_=>_i32 (func (param i64) (result i32))) (type $none_=>_i32 (func (result i32))) (type $i32_=>_none (func (param i32))) + (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $i32_i64_i32_=>_none (func (param i32 i64 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_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) @@ -1162,238 +1162,233 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if local.get $0 - local.set $5 local.get $1 - local.set $4 local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if i32.const 0 - i32.const 1 + i32.const 2 i32.lt_s drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.tee $7 + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 i32.const 1 i32.add - local.set $5 - local.get $7 + local.set $0 local.get $4 - local.tee $7 + local.get $1 + local.tee $4 i32.const 1 i32.add - local.set $4 - local.get $7 + local.set $1 + local.get $4 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 + br $while-continue|0 end end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 end end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 + end + end + end + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end end end ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) (func $~lib/rt/__allocBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 @@ -1670,6 +1665,16 @@ i32.store16 end ) + (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 0 + i32.const 1 + i32.ge_s + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa32_lut + ) (func $~lib/util/number/decimalCount64High (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 @@ -1852,14 +1857,20 @@ local.get $2 call $~lib/util/number/utoa32_lut ) + (func $~lib/util/number/utoa64_core (param $0 i32) (param $1 i64) (param $2 i32) + i32.const 0 + i32.const 1 + i32.ge_s + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa64_lut + ) (func $~lib/util/number/utoa64 (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i64) local.get $0 i64.const 0 i64.ne @@ -1886,19 +1897,9 @@ call $~lib/rt/stub/__alloc local.set $1 local.get $1 - local.set $6 local.get $2 - local.set $5 local.get $3 - local.set $4 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $6 - local.get $5 - local.get $4 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core else local.get $0 call $~lib/util/number/decimalCount64High @@ -1910,19 +1911,9 @@ call $~lib/rt/stub/__alloc local.set $1 local.get $1 - local.set $5 local.get $0 - local.set $7 local.get $3 - local.set $4 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $5 - local.get $7 - local.get $4 - call $~lib/util/number/utoa64_lut + call $~lib/util/number/utoa64_core end local.get $1 call $~lib/rt/stub/__retain @@ -2007,9 +1998,6 @@ (func $~lib/util/number/utoa32 (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 i32.eqz if @@ -2026,19 +2014,9 @@ call $~lib/rt/stub/__alloc local.set $2 local.get $2 - local.set $5 local.get $0 - local.set $4 local.get $1 - local.set $3 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core local.get $2 call $~lib/rt/stub/__retain ) diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index bbc14781d5..fd5ec4ab22 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -1,12 +1,14 @@ (module - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) (type $none_=>_i32 (func (result i32))) (type $i32_i64_i32_i64_i32_i64_=>_i32 (func (param i32 i64 i32 i64 i32 i64) (result i32))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1024) "\08\00\00\00\01\00\00\00\01\00\00\00\08\00\00\00t\00r\00u\00e") @@ -43,6 +45,9 @@ (data (i32.const 2880) "\06\00\00\00\01\00\00\00\01\00\00\00\06\00\00\00p\00o\00w") (global $resolve-binary/a (mut i32) (i32.const 0)) (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) + (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) + (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) + (global $~lib/util/number/_exp (mut i32) (i32.const 0)) (global $~lib/util/number/_K (mut i32) (i32.const 0)) (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) @@ -292,7 +297,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/util/number/utoa_simple (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -347,7 +352,7 @@ local.tee $2 local.get $0 local.get $3 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core local.get $1 if local.get $2 @@ -359,12 +364,120 @@ i32.const 1200 end ) + (func $~lib/util/number/umul64f (param $0 i64) (param $1 i64) (result i64) + (local $2 i64) + (local $3 i64) + local.get $1 + i64.const 4294967295 + i64.and + local.tee $2 + local.get $0 + i64.const 32 + i64.shr_u + local.tee $3 + i64.mul + local.get $2 + local.get $0 + i64.const 4294967295 + i64.and + local.tee $2 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.set $0 + local.get $3 + local.get $1 + i64.const 32 + i64.shr_u + local.tee $1 + i64.mul + local.get $0 + i64.const 32 + i64.shr_u + i64.add + local.get $1 + local.get $2 + i64.mul + local.get $0 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + i64.add + ) + (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.add + i32.const -64 + i32.sub + ) + (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) + local.get $0 + local.get $1 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.tee $0 + i32.load16_u + local.set $1 + loop $while-continue|1 + i32.const 1 + local.get $5 + local.get $3 + i64.sub + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.sub + i64.gt_u + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.lt_u + select + i32.const 0 + local.get $2 + local.get $3 + i64.sub + local.get $4 + i64.ge_u + i32.const 0 + local.get $3 + local.get $5 + i64.lt_u + select + select + if + local.get $1 + i32.const 1 + i32.sub + local.set $1 + local.get $3 + local.get $4 + i64.add + local.set $3 + br $while-continue|1 + end + end + local.get $0 + local.get $1 + i32.store16 + ) (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) - (local $7 i64) + (local $7 i32) (local $8 i32) (local $9 i64) - (local $10 i32) + (local $10 i64) (local $11 i64) (local $12 i64) local.get $3 @@ -376,25 +489,25 @@ i32.const 0 local.get $4 i32.sub - local.tee $10 + local.tee $8 i64.extend_i32_s i64.shl - local.tee $11 + local.tee $10 i64.const 1 i64.sub - local.tee $12 + local.tee $11 i64.and - local.set $7 + local.set $1 local.get $3 - local.get $10 + local.get $8 i64.extend_i32_s i64.shr_u i32.wrap_i64 - local.tee $6 + local.tee $2 call $~lib/util/number/decimalCount32 - local.set $4 + local.set $7 loop $while-continue|0 - local.get $4 + local.get $7 i32.const 0 i32.gt_s if @@ -409,281 +522,236 @@ block $case3|1 block $case2|1 block $case1|1 - local.get $4 + local.get $7 i32.const 10 i32.ne if - local.get $4 + local.get $7 i32.const 1 i32.sub br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 end - local.get $6 + local.get $2 i32.const 1000000000 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 1000000000 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 + local.get $2 i32.const 100000000 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 100000000 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 + local.get $2 i32.const 10000000 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 10000000 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 + local.get $2 i32.const 1000000 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 1000000 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 + local.get $2 i32.const 100000 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 100000 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 + local.get $2 i32.const 10000 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 10000 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 + local.get $2 i32.const 1000 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 1000 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 + local.get $2 i32.const 100 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 100 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 + local.get $2 i32.const 10 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 10 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 - local.set $2 + local.get $2 + local.set $4 i32.const 0 - local.set $6 + local.set $2 br $break|1 end i32.const 0 - local.set $2 + local.set $4 end - local.get $2 - local.get $8 + local.get $4 + local.get $6 i32.or if local.get $0 - local.get $8 + local.get $6 i32.const 1 i32.shl i32.add - local.get $2 + local.get $4 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 - local.get $8 + local.get $6 i32.const 1 i32.add - local.set $8 + local.set $6 end - local.get $4 + local.get $7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.get $6 + local.set $7 + local.get $1 + local.get $2 i64.extend_i32_u - local.get $10 + local.get $8 i64.extend_i32_s i64.shl i64.add - local.tee $1 + local.tee $3 local.get $5 i64.le_u if - local.get $4 + local.get $7 global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $4 + local.get $0 + local.get $6 + local.get $5 + local.get $3 + local.get $7 i32.const 2 i32.shl i32.const 2296 i32.add i64.load32_u - local.get $10 + local.get $8 i64.extend_i32_s i64.shl - local.set $3 - local.get $0 - local.get $8 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.tee $0 - i32.load16_u - local.set $4 - loop $while-continue|3 - i32.const 1 - local.get $9 - local.get $1 - i64.sub - local.get $1 - local.get $3 - i64.add - local.tee $7 - local.get $9 - i64.sub - i64.gt_u - local.get $7 - local.get $9 - i64.lt_u - select - i32.const 0 - local.get $5 - local.get $1 - i64.sub - local.get $3 - i64.ge_u - i32.const 0 - local.get $1 - local.get $9 - i64.lt_u - select - select - if - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.get $3 - i64.add - local.set $1 - br $while-continue|3 - end - end - local.get $0 - local.get $4 - i32.store16 - local.get $8 + local.get $9 + call $~lib/util/number/grisuRound + local.get $6 return end br $while-continue|0 end end - local.get $10 + local.get $8 i64.extend_i32_s - local.set $1 - loop $while-continue|4 + local.set $12 + loop $while-continue|2 local.get $5 i64.const 10 i64.mul local.set $5 - local.get $7 + local.get $1 i64.const 10 i64.mul local.tee $3 - local.get $1 + local.get $12 i64.shr_u - local.tee $7 - local.get $8 + local.tee $1 + local.get $6 i64.extend_i32_s i64.or i64.const 0 i64.ne if local.get $0 - local.get $8 + local.get $6 i32.const 1 i32.shl i32.add - local.get $7 + local.get $1 i32.wrap_i64 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 - local.get $8 + local.get $6 i32.const 1 i32.add - local.set $8 + local.set $6 end - local.get $4 + local.get $7 i32.const 1 i32.sub - local.set $4 + local.set $7 local.get $3 - local.get $12 + local.get $11 i64.and - local.tee $7 + local.tee $1 local.get $5 i64.ge_u - br_if $while-continue|4 + br_if $while-continue|2 end - local.get $4 + local.get $7 global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $7 - local.set $1 + local.get $0 + local.get $6 + local.get $5 + local.get $1 + local.get $10 local.get $9 i32.const 0 - local.get $4 + local.get $7 i32.sub i32.const 2 i32.shl @@ -691,234 +759,211 @@ i32.add i64.load32_u i64.mul - local.set $3 + call $~lib/util/number/grisuRound + local.get $6 + ) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 - local.get $8 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.tee $0 - i32.load16_u - local.set $4 - loop $while-continue|6 - i32.const 1 - local.get $3 - local.get $1 - i64.sub + local.get $1 + i32.eq + if + return + end + local.get $0 + local.get $1 + i32.lt_u + if local.get $1 - local.get $11 - i64.add - local.tee $7 - local.get $3 - i64.sub - i64.gt_u - local.get $7 - local.get $3 - i64.lt_u - select - i32.const 0 - local.get $5 - local.get $1 - i64.sub - local.get $11 - i64.ge_u - i32.const 0 - local.get $1 - local.get $3 - i64.lt_u - select - select - if - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.get $11 - i64.add - local.set $1 - br $while-continue|6 - end - end - local.get $0 - local.get $4 - i32.store16 - local.get $8 - ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 + i32.const 7 + i32.and local.get $0 - local.get $1 + i32.const 7 + i32.and i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.lt_u if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + return end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $2 + i32.const 1 + i32.sub + local.set $2 local.get $0 - local.tee $2 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $1 - local.get $2 local.get $3 + local.get $4 i32.load8_u i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 + br $while-continue|0 end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 - local.get $4 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and if - local.get $4 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $4 - local.get $0 + local.tee $2 i32.add local.get $1 - local.get $4 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end + end + ) + (func $~lib/util/number/genExponent (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.const 0 + i32.lt_s + local.tee $2 + if + i32.const 0 + local.get $1 + i32.sub + local.set $1 end + local.get $1 + local.get $1 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.tee $1 + call $~lib/util/number/utoa32_core + local.get $0 + i32.const 45 + i32.const 43 + local.get $2 + select + i32.store16 + local.get $1 ) (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -1004,7 +1049,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $0 i32.const 46 i32.store16 @@ -1033,7 +1078,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $0 i32.const 3014704 i32.store @@ -1070,36 +1115,12 @@ i32.const 101 i32.store16 offset=2 local.get $0 - local.tee $1 i32.const 4 i32.add local.get $3 i32.const 1 i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $2 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $1 - i32.const 45 - i32.const 43 - local.get $2 - select - i32.store16 offset=4 - local.get $0 + call $~lib/util/number/genExponent i32.const 2 i32.add else @@ -1115,7 +1136,7 @@ local.tee $2 i32.const 2 i32.sub - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $0 i32.const 46 i32.store16 offset=2 @@ -1126,36 +1147,12 @@ i32.const 101 i32.store16 offset=2 local.get $0 - local.tee $2 i32.const 4 i32.add local.get $3 i32.const 1 i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $3 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $2 - i32.const 45 - i32.const 43 - local.get $3 - select - i32.store16 offset=4 - local.get $0 + call $~lib/util/number/genExponent local.get $1 i32.add i32.const 2 @@ -1165,123 +1162,6 @@ end end ) - (func $~lib/util/number/dtoa_core (param $0 i32) (result i32) - (local $1 i64) - (local $2 i64) - (local $3 i64) - i32.const -4 - global.set $~lib/util/number/_K - i32.const 1776 - i64.load - global.set $~lib/util/number/_frc_pow - i32.const 2208 - i32.load16_s - global.set $~lib/util/number/_exp_pow - local.get $0 - local.get $0 - global.get $~lib/util/number/_frc_pow - local.tee $2 - i64.const 32 - i64.shr_u - local.tee $3 - i64.const 2147483648 - i64.mul - local.get $2 - i64.const 4294967295 - i64.and - local.tee $2 - i64.const 2147483648 - i64.mul - i64.const 0 - i64.add - local.tee $1 - i64.const 32 - i64.shr_u - i64.add - local.get $1 - i64.const 4294967295 - i64.and - i64.const 0 - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - global.get $~lib/util/number/_exp_pow - local.tee $0 - i32.const 3 - i32.add - local.get $3 - i64.const 2147483648 - i64.mul - local.get $2 - i64.const 2147483648 - i64.mul - local.get $2 - i64.const 1024 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $1 - i64.const 32 - i64.shr_u - i64.add - local.get $3 - i64.const 1024 - i64.mul - local.get $1 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - i64.const 1 - i64.sub - local.tee $1 - local.get $0 - i32.const 3 - i32.add - local.get $1 - local.get $3 - i64.const 2147483647 - i64.mul - local.get $2 - i64.const 2147483647 - i64.mul - local.get $2 - i64.const 4294966784 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $1 - i64.const 32 - i64.shr_u - i64.add - local.get $3 - i64.const 4294966784 - i64.mul - local.get $1 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - i64.const 1 - i64.add - i64.sub - call $~lib/util/number/genDigits - global.get $~lib/util/number/_K - call $~lib/util/number/prettify - ) (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -1355,18 +1235,63 @@ local.get $2 i32.add local.get $3 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $1 ) (func $~lib/number/F64#toString (result i32) (local $0 i32) (local $1 i32) - (local $2 i32) + (local $2 i64) + (local $3 i32) + (local $4 i64) i32.const 56 i32.const 1 call $~lib/rt/stub/__alloc - local.tee $0 - call $~lib/util/number/dtoa_core + local.set $0 + i64.const -9223372036854774784 + global.set $~lib/util/number/_frc_plus + i64.const 9223372036854775296 + global.set $~lib/util/number/_frc_minus + i32.const -61 + global.set $~lib/util/number/_exp + i32.const -4 + global.set $~lib/util/number/_K + i32.const 1776 + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 2208 + i32.load16_s + global.set $~lib/util/number/_exp_pow + global.get $~lib/util/number/_exp_pow + local.set $1 + local.get $0 + local.get $0 + i64.const -9223372036854775808 + global.get $~lib/util/number/_frc_pow + local.tee $2 + call $~lib/util/number/umul64f + i32.const -61 + local.get $1 + call $~lib/util/number/umul64e + global.get $~lib/util/number/_frc_plus + local.get $2 + call $~lib/util/number/umul64f + i64.const 1 + i64.sub + local.tee $4 + global.get $~lib/util/number/_exp + local.get $1 + call $~lib/util/number/umul64e + local.get $4 + global.get $~lib/util/number/_frc_minus + local.get $2 + call $~lib/util/number/umul64f + i64.const 1 + i64.add + i64.sub + call $~lib/util/number/genDigits + global.get $~lib/util/number/_K + call $~lib/util/number/prettify local.tee $1 i32.const 28 i32.ne @@ -1393,7 +1318,7 @@ local.get $0 i32.const 16 i32.sub - local.tee $2 + local.tee $3 i32.load offset=4 i32.const 1 i32.ne @@ -1407,12 +1332,12 @@ end global.get $~lib/rt/stub/offset local.get $0 - local.get $2 + local.get $3 i32.load i32.add i32.eq if - local.get $2 + local.get $3 global.set $~lib/rt/stub/offset end else diff --git a/tests/compiler/resolve-binary.untouched.wat b/tests/compiler/resolve-binary.untouched.wat index 9e716591e0..2704f5af56 100644 --- a/tests/compiler/resolve-binary.untouched.wat +++ b/tests/compiler/resolve-binary.untouched.wat @@ -1,17 +1,27 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i64_=>_i32 (func (param i64) (result i32))) + (type $i32_=>_f64 (func (param i32) (result f64))) + (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) + (type $i64_i32_=>_none (func (param i64 i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 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))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $f64_=>_i32 (func (param f64) (result i32))) (type $f64_i32_=>_i32 (func (param f64 i32) (result i32))) - (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) + (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) + (type $i32_f64_=>_f64 (func (param i32 f64) (result f64))) + (type $i64_=>_f64 (func (param i64) (result f64))) + (type $f64_i64_i64_=>_f64 (func (param f64 i64 i64) (result f64))) + (type $f64_f64_i32_=>_f64 (func (param f64 f64 i32) (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 16) "\08\00\00\00\01\00\00\00\01\00\00\00\08\00\00\00t\00r\00u\00e\00") @@ -593,13 +603,20 @@ i32.store16 end ) + (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 0 + i32.const 1 + i32.ge_s + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa32_lut + ) (func $~lib/util/number/itoa32 (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 i32.eqz if @@ -629,19 +646,9 @@ call $~lib/rt/stub/__alloc local.set $3 local.get $3 - local.set $6 local.get $0 - local.set $5 local.get $2 - local.set $4 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $6 - local.get $5 - local.get $4 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core local.get $1 if local.get $3 @@ -669,20 +676,86 @@ local.get $0 call $~lib/util/number/itoa ) - (func $~lib/math/NativeMath.pow (param $0 f64) (param $1 f64) (result f64) - (local $2 f64) - (local $3 f64) - (local $4 i32) - (local $5 i64) - (local $6 i64) - (local $7 i64) - (local $8 i64) - (local $9 i64) + (func $~lib/util/math/zeroinfnan (param $0 i64) (result i32) + local.get $0 + i64.const 1 + i64.shl + i64.const 1 + i64.sub + i64.const -9007199254740992 + i64.const 1 + i64.sub + i64.ge_u + ) + (func $~lib/util/math/checkint (param $0 i64) (result i32) + (local $1 i64) + local.get $0 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + local.set $1 + local.get $1 + i64.const 1023 + i64.lt_u + if + i32.const 0 + return + end + local.get $1 + i64.const 1023 + i64.const 52 + i64.add + i64.gt_u + if + i32.const 2 + return + end + i64.const 1 + i64.const 1023 + i64.const 52 + i64.add + local.get $1 + i64.sub + i64.shl + local.set $1 + local.get $0 + local.get $1 + i64.const 1 + i64.sub + i64.and + i64.const 0 + i64.ne + if + i32.const 0 + return + end + local.get $0 + local.get $1 + i64.and + i64.const 0 + i64.ne + if + i32.const 1 + return + end + i32.const 2 + ) + (func $~lib/util/math/log_inline (param $0 i64) (result f64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + (local $4 i64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) (local $10 f64) - (local $11 i64) - (local $12 i32) - (local $13 i64) - (local $14 i64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) (local $15 f64) (local $16 f64) (local $17 f64) @@ -698,956 +771,1086 @@ (local $27 f64) (local $28 f64) (local $29 f64) - (local $30 f64) - (local $31 f64) - (local $32 f64) - (local $33 f64) - (local $34 f64) - (local $35 f64) - (local $36 f64) - (local $37 f64) - (local $38 f64) - (local $39 i32) - (local $40 i32) - (local $41 i32) - (local $42 i32) - (local $43 i64) - (local $44 i64) + local.get $0 + i64.const 4604531861337669632 + i64.sub + local.set $1 local.get $1 - f64.abs - f64.const 2 - f64.le - if - local.get $1 - f64.const 2 - f64.eq - if - local.get $0 - local.get $0 - f64.mul - return - end - local.get $1 - f64.const 0.5 - f64.eq - if - local.get $0 - f64.sqrt - f64.abs - f64.const inf - local.get $0 - f64.const inf - f64.neg - f64.ne - select - return - end - local.get $1 - f64.const -1 - f64.eq - if - f64.const 1 - local.get $0 - f64.div - return - end - local.get $1 - f64.const 1 - f64.eq - if - local.get $0 - return - end - local.get $1 - f64.const 0 - f64.eq - if - f64.const 1 - return - end - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - block $~lib/util/math/pow_lut|inlined.0 (result f64) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - i32.const 0 - local.set $4 - local.get $3 - i64.reinterpret_f64 - local.set $5 - local.get $2 - i64.reinterpret_f64 - local.set $6 - local.get $5 - i64.const 52 - i64.shr_u - local.set $7 - local.get $6 - i64.const 52 - i64.shr_u - local.set $8 - local.get $7 - i64.const 1 - i64.sub - i64.const 2047 - i64.const 1 - i64.sub - i64.ge_u - if (result i32) - i32.const 1 - else - local.get $8 - i64.const 2047 - i64.and - i64.const 958 - i64.sub - i64.const 1086 - i64.const 958 - i64.sub - i64.ge_u - end - if - local.get $6 - local.set $9 - local.get $9 - i64.const 1 - i64.shl - i64.const 1 - i64.sub - i64.const -9007199254740992 - i64.const 1 - i64.sub - i64.ge_u - if - local.get $6 - i64.const 1 - i64.shl - i64.const 0 - i64.eq - if - f64.const 1 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 - i64.const 4607182418800017408 - i64.eq - if - f64.const nan:0x8000000000000 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 - i64.const 1 - i64.shl - i64.const -9007199254740992 - i64.gt_u - if (result i32) - i32.const 1 - else - local.get $6 - i64.const 1 - i64.shl - i64.const -9007199254740992 - i64.gt_u - end - if - local.get $3 - local.get $2 - f64.add - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 - i64.const 1 - i64.shl - i64.const 9214364837600034816 - i64.eq - if - f64.const nan:0x8000000000000 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 - i64.const 1 - i64.shl - i64.const 9214364837600034816 - i64.lt_u - local.get $6 - i64.const 63 - i64.shr_u - i64.const 0 - i64.ne - i32.eqz - i32.eq - if - f64.const 0 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $2 - local.get $2 - f64.mul - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 - local.set $9 - local.get $9 - i64.const 1 - i64.shl - i64.const 1 - i64.sub - i64.const -9007199254740992 - i64.const 1 - i64.sub - i64.ge_u - if - local.get $3 - local.get $3 - f64.mul - local.set $10 - local.get $5 - i64.const 63 - i64.shr_u - i32.wrap_i64 - if (result i32) - block $~lib/util/math/checkint|inlined.0 (result i32) - local.get $6 - local.set $9 - local.get $9 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - local.set $11 - local.get $11 - i64.const 1023 - i64.lt_u - if - i32.const 0 - br $~lib/util/math/checkint|inlined.0 - end - local.get $11 - i64.const 1023 - i64.const 52 - i64.add - i64.gt_u - if - i32.const 2 - br $~lib/util/math/checkint|inlined.0 - end - i64.const 1 - i64.const 1023 - i64.const 52 - i64.add - local.get $11 - i64.sub - i64.shl - local.set $11 - local.get $9 - local.get $11 - i64.const 1 - i64.sub - i64.and - i64.const 0 - i64.ne - if - i32.const 0 - br $~lib/util/math/checkint|inlined.0 - end - local.get $9 - local.get $11 - i64.and - i64.const 0 - i64.ne - if - i32.const 1 - br $~lib/util/math/checkint|inlined.0 - end - i32.const 2 - end - i32.const 1 - i32.eq - else - i32.const 0 - end - if - local.get $10 - f64.neg - local.set $10 - end - local.get $6 - i64.const 63 - i64.shr_u - i64.const 0 - i64.ne - if (result f64) - f64.const 1 - local.get $10 - f64.div - else - local.get $10 - end - br $~lib/util/math/pow_lut|inlined.0 + i64.const 52 + i64.const 7 + i64.sub + i64.shr_u + i64.const 127 + i64.and + i32.wrap_i64 + local.set $2 + local.get $1 + i64.const 52 + i64.shr_s + local.set $3 + local.get $0 + local.get $1 + i64.const 4095 + i64.const 52 + i64.shl + i64.and + i64.sub + local.set $4 + local.get $4 + f64.reinterpret_i64 + local.set $5 + local.get $3 + f64.convert_i64_s + local.set $6 + i32.const 664 + local.get $2 + i32.const 2 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load + local.set $7 + i32.const 664 + local.get $2 + i32.const 2 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load offset=16 + local.set $8 + i32.const 664 + local.get $2 + i32.const 2 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load offset=24 + local.set $9 + local.get $4 + i64.const 2147483648 + i64.add + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.set $10 + local.get $5 + local.get $10 + f64.sub + local.set $11 + local.get $10 + local.get $7 + f64.mul + f64.const 1 + f64.sub + local.set $12 + local.get $11 + local.get $7 + f64.mul + local.set $13 + local.get $12 + local.get $13 + f64.add + local.set $14 + local.get $6 + f64.const 0.6931471805598903 + f64.mul + local.get $8 + f64.add + local.set $15 + local.get $15 + local.get $14 + f64.add + local.set $16 + local.get $6 + f64.const 5.497923018708371e-14 + f64.mul + local.get $9 + f64.add + local.set $17 + local.get $15 + local.get $16 + f64.sub + local.get $14 + f64.add + local.set $18 + f64.const -0.5 + local.get $14 + f64.mul + local.set $19 + local.get $14 + local.get $19 + f64.mul + local.set $20 + local.get $14 + local.get $20 + f64.mul + local.set $21 + f64.const -0.5 + local.get $12 + f64.mul + local.set $22 + local.get $12 + local.get $22 + f64.mul + local.set $23 + local.get $16 + local.get $23 + f64.add + local.set $24 + local.get $13 + local.get $19 + local.get $22 + f64.add + f64.mul + local.set $25 + local.get $16 + local.get $24 + f64.sub + local.get $23 + f64.add + local.set $26 + local.get $21 + f64.const -0.6666666666666679 + local.get $14 + f64.const 0.5000000000000007 + f64.mul + f64.add + local.get $20 + f64.const 0.7999999995323976 + local.get $14 + f64.const -0.6666666663487739 + f64.mul + f64.add + local.get $20 + f64.const -1.142909628459501 + local.get $14 + f64.const 1.0000415263675542 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + local.set $27 + local.get $17 + local.get $18 + f64.add + local.get $25 + f64.add + local.get $26 + f64.add + local.get $27 + f64.add + local.set $28 + local.get $24 + local.get $28 + f64.add + local.set $29 + local.get $24 + local.get $29 + f64.sub + local.get $28 + f64.add + global.set $~lib/util/math/log_tail + local.get $29 + ) + (func $~lib/util/math/xflow (param $0 i32) (param $1 f64) (result f64) + local.get $1 + f64.neg + local.get $1 + local.get $0 + select + local.get $1 + f64.mul + ) + (func $~lib/util/math/uflow (param $0 i32) (result f64) + local.get $0 + i64.const 1152921504606846976 + f64.reinterpret_i64 + call $~lib/util/math/xflow + ) + (func $~lib/util/math/oflow (param $0 i32) (result f64) + local.get $0 + i64.const 8070450532247928832 + f64.reinterpret_i64 + call $~lib/util/math/xflow + ) + (func $~lib/util/math/specialcase (param $0 f64) (param $1 i64) (param $2 i64) (result f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + local.get $2 + i64.const 2147483648 + i64.and + i64.const 0 + i64.ne + i32.eqz + if + local.get $1 + i64.const 1009 + i64.const 52 + i64.shl + i64.sub + local.set $1 + local.get $1 + f64.reinterpret_i64 + local.set $3 + f64.const 5486124068793688683255936e279 + local.get $3 + local.get $3 + local.get $0 + f64.mul + f64.add + f64.mul + return + end + local.get $1 + i64.const 1022 + i64.const 52 + i64.shl + i64.add + local.set $1 + local.get $1 + f64.reinterpret_i64 + local.set $3 + local.get $3 + local.get $3 + local.get $0 + f64.mul + f64.add + local.set $4 + local.get $4 + f64.abs + f64.const 1 + f64.lt + if + f64.const 1 + local.get $4 + f64.copysign + local.set $5 + local.get $3 + local.get $4 + f64.sub + local.get $3 + local.get $0 + f64.mul + f64.add + local.set $6 + local.get $5 + local.get $4 + f64.add + local.set $7 + local.get $5 + local.get $7 + f64.sub + local.get $4 + f64.add + local.get $6 + f64.add + local.set $6 + local.get $7 + local.get $6 + f64.add + local.get $5 + f64.sub + local.set $4 + local.get $4 + f64.const 0 + f64.eq + if + local.get $1 + i64.const -9223372036854775808 + i64.and + f64.reinterpret_i64 + local.set $4 + end + end + local.get $4 + f64.const 2.2250738585072014e-308 + f64.mul + ) + (func $~lib/util/math/exp_inline (param $0 f64) (param $1 f64) (param $2 i32) (result f64) + (local $3 i32) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i32) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 i64) + local.get $0 + i64.reinterpret_f64 + local.set $15 + local.get $15 + i64.const 52 + i64.shr_u + i32.wrap_i64 + i32.const 2047 + i32.and + local.set $3 + local.get $3 + i32.const 969 + i32.sub + i32.const 63 + i32.ge_u + if + local.get $3 + i32.const 969 + i32.sub + i32.const -2147483648 + i32.ge_u + if + f64.const -1 + f64.const 1 + local.get $2 + select + return + end + local.get $3 + i32.const 1033 + i32.ge_u + if + local.get $15 + i64.const 63 + i64.shr_u + i64.const 0 + i64.ne + if (result f64) + local.get $2 + call $~lib/util/math/uflow + else + local.get $2 + call $~lib/util/math/oflow + end + return + end + i32.const 0 + local.set $3 + end + f64.const 184.6649652337873 + local.get $0 + f64.mul + local.set $9 + local.get $9 + f64.const 6755399441055744 + f64.add + local.set $8 + local.get $8 + i64.reinterpret_f64 + local.set $4 + local.get $8 + f64.const 6755399441055744 + f64.sub + local.set $8 + local.get $0 + local.get $8 + f64.const -0.005415212348111709 + f64.mul + f64.add + local.get $8 + f64.const -1.2864023111638346e-14 + f64.mul + f64.add + local.set $10 + local.get $10 + local.get $1 + f64.add + local.set $10 + local.get $4 + i64.const 127 + i64.and + i64.const 1 + i64.shl + i32.wrap_i64 + local.set $7 + local.get $4 + local.get $2 + i64.extend_i32_u + i64.add + i64.const 52 + i64.const 7 + i64.sub + i64.shl + local.set $5 + i32.const 4760 + local.get $7 + i32.const 3 + i32.shl + i32.add + i64.load + f64.reinterpret_i64 + local.set $13 + i32.const 4760 + local.get $7 + i32.const 3 + i32.shl + i32.add + i64.load offset=8 + local.get $5 + i64.add + local.set $6 + local.get $10 + local.get $10 + f64.mul + local.set $11 + local.get $13 + local.get $10 + f64.add + local.get $11 + f64.const 0.49999999999996786 + local.get $10 + f64.const 0.16666666666665886 + f64.mul + f64.add + f64.mul + f64.add + local.get $11 + local.get $11 + f64.mul + f64.const 0.0416666808410674 + local.get $10 + f64.const 0.008333335853059549 + f64.mul + f64.add + f64.mul + f64.add + local.set $14 + local.get $3 + i32.const 0 + i32.eq + if + local.get $14 + local.get $6 + local.get $4 + call $~lib/util/math/specialcase + return + end + local.get $6 + f64.reinterpret_i64 + local.set $12 + local.get $12 + local.get $12 + local.get $14 + f64.mul + f64.add + ) + (func $~lib/util/math/pow_lut (param $0 f64) (param $1 f64) (result f64) + (local $2 i32) + (local $3 i64) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 f64) + (local $8 i32) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + i32.const 0 + local.set $2 + local.get $0 + i64.reinterpret_f64 + local.set $3 + local.get $1 + i64.reinterpret_f64 + local.set $4 + local.get $3 + i64.const 52 + i64.shr_u + local.set $5 + local.get $4 + i64.const 52 + i64.shr_u + local.set $6 + local.get $5 + i64.const 1 + i64.sub + i64.const 2047 + i64.const 1 + i64.sub + i64.ge_u + if (result i32) + i32.const 1 + else + local.get $6 + i64.const 2047 + i64.and + i64.const 958 + i64.sub + i64.const 1086 + i64.const 958 + i64.sub + i64.ge_u + end + if + local.get $4 + call $~lib/util/math/zeroinfnan + if + local.get $4 + i64.const 1 + i64.shl + i64.const 0 + i64.eq + if + f64.const 1 + return + end + local.get $3 + i64.const 4607182418800017408 + i64.eq + if + f64.const nan:0x8000000000000 + return end - local.get $5 + local.get $3 + i64.const 1 + i64.shl + i64.const -9007199254740992 + i64.gt_u + if (result i32) + i32.const 1 + else + local.get $4 + i64.const 1 + i64.shl + i64.const -9007199254740992 + i64.gt_u + end + if + local.get $0 + local.get $1 + f64.add + return + end + local.get $3 + i64.const 1 + i64.shl + i64.const 9214364837600034816 + i64.eq + if + f64.const nan:0x8000000000000 + return + end + local.get $3 + i64.const 1 + i64.shl + i64.const 9214364837600034816 + i64.lt_u + local.get $4 i64.const 63 i64.shr_u i64.const 0 i64.ne + i32.eqz + i32.eq if - block $~lib/util/math/checkint|inlined.1 (result i32) - local.get $6 - local.set $9 - local.get $9 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - local.set $11 - local.get $11 - i64.const 1023 - i64.lt_u - if - i32.const 0 - br $~lib/util/math/checkint|inlined.1 - end - local.get $11 - i64.const 1023 - i64.const 52 - i64.add - i64.gt_u - if - i32.const 2 - br $~lib/util/math/checkint|inlined.1 - end - i64.const 1 - i64.const 1023 - i64.const 52 - i64.add - local.get $11 - i64.sub - i64.shl - local.set $11 - local.get $9 - local.get $11 - i64.const 1 - i64.sub - i64.and - i64.const 0 - i64.ne - if - i32.const 0 - br $~lib/util/math/checkint|inlined.1 - end - local.get $9 - local.get $11 - i64.and - i64.const 0 - i64.ne - if - i32.const 1 - br $~lib/util/math/checkint|inlined.1 - end - i32.const 2 - end - local.set $12 - local.get $12 - i32.const 0 - i32.eq - if - local.get $3 - local.get $3 - f64.sub - local.get $3 - local.get $3 - f64.sub - f64.div - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $12 + f64.const 0 + return + end + local.get $1 + local.get $1 + f64.mul + return + end + local.get $3 + call $~lib/util/math/zeroinfnan + if + local.get $0 + local.get $0 + f64.mul + local.set $7 + local.get $3 + i64.const 63 + i64.shr_u + i32.wrap_i64 + if (result i32) + local.get $4 + call $~lib/util/math/checkint i32.const 1 i32.eq - if - i32.const 262144 - local.set $4 - end - local.get $5 - i64.const 9223372036854775807 - i64.and - local.set $5 + else + i32.const 0 + end + if local.get $7 - i64.const 2047 - i64.and + f64.neg local.set $7 end + local.get $4 + i64.const 63 + i64.shr_u + i64.const 0 + i64.ne + if (result f64) + f64.const 1 + local.get $7 + f64.div + else + local.get $7 + end + return + end + local.get $3 + i64.const 63 + i64.shr_u + i64.const 0 + i64.ne + if + local.get $4 + call $~lib/util/math/checkint + local.set $8 local.get $8 - i64.const 2047 - i64.and - i64.const 958 - i64.sub - i64.const 1086 - i64.const 958 - i64.sub - i64.ge_u + i32.const 0 + i32.eq if - local.get $5 - i64.const 4607182418800017408 - i64.eq - if - f64.const 1 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $8 - i64.const 2047 - i64.and - i64.const 958 - i64.lt_u - if - f64.const 1 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 - i64.const 4607182418800017408 - i64.gt_u - local.get $8 - i64.const 2048 - i64.lt_u - i32.eq - if (result f64) - f64.const inf - else - f64.const 0 - end - br $~lib/util/math/pow_lut|inlined.0 + local.get $0 + local.get $0 + f64.sub + local.get $0 + local.get $0 + f64.sub + f64.div + return end - local.get $7 - i64.const 0 - i64.eq + local.get $8 + i32.const 1 + i32.eq if - local.get $3 - f64.const 4503599627370496 - f64.mul - i64.reinterpret_f64 - local.set $5 - local.get $5 - i64.const 9223372036854775807 - i64.and - local.set $5 - local.get $5 - i64.const 52 - i64.const 52 - i64.shl - i64.sub - local.set $5 + i32.const 262144 + local.set $2 end + local.get $3 + i64.const 9223372036854775807 + i64.and + local.set $3 + local.get $5 + i64.const 2047 + i64.and + local.set $5 end - local.get $5 - local.set $9 - local.get $9 - i64.const 4604531861337669632 - i64.sub - local.set $11 - local.get $11 - i64.const 52 - i64.const 7 - i64.sub - i64.shr_u - i64.const 127 - i64.and - i32.wrap_i64 - local.set $12 - local.get $11 - i64.const 52 - i64.shr_s - local.set $13 - local.get $9 - local.get $11 - i64.const 4095 - i64.const 52 - i64.shl - i64.and - i64.sub - local.set $14 - local.get $14 - f64.reinterpret_i64 - local.set $10 - local.get $13 - f64.convert_i64_s - local.set $15 - i32.const 664 - local.get $12 - i32.const 2 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load - local.set $16 - i32.const 664 - local.get $12 - i32.const 2 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load offset=16 - local.set $17 - i32.const 664 - local.get $12 - i32.const 2 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load offset=24 - local.set $18 - local.get $14 - i64.const 2147483648 - i64.add - i64.const -4294967296 - i64.and - f64.reinterpret_i64 - local.set $19 - local.get $10 - local.get $19 - f64.sub - local.set $20 - local.get $19 - local.get $16 - f64.mul - f64.const 1 - f64.sub - local.set $21 - local.get $20 - local.get $16 - f64.mul - local.set $22 - local.get $21 - local.get $22 - f64.add - local.set $23 - local.get $15 - f64.const 0.6931471805598903 - f64.mul - local.get $17 - f64.add - local.set $24 - local.get $24 - local.get $23 - f64.add - local.set $25 - local.get $15 - f64.const 5.497923018708371e-14 - f64.mul - local.get $18 - f64.add - local.set $26 - local.get $24 - local.get $25 - f64.sub - local.get $23 - f64.add - local.set $27 - f64.const -0.5 - local.get $23 - f64.mul - local.set $28 - local.get $23 - local.get $28 - f64.mul - local.set $29 - local.get $23 - local.get $29 - f64.mul - local.set $30 - f64.const -0.5 - local.get $21 - f64.mul - local.set $31 - local.get $21 - local.get $31 - f64.mul - local.set $32 - local.get $25 - local.get $32 - f64.add - local.set $33 - local.get $22 - local.get $28 - local.get $31 - f64.add - f64.mul - local.set $34 - local.get $25 - local.get $33 - f64.sub - local.get $32 - f64.add - local.set $35 - local.get $30 - f64.const -0.6666666666666679 - local.get $23 - f64.const 0.5000000000000007 - f64.mul - f64.add - local.get $29 - f64.const 0.7999999995323976 - local.get $23 - f64.const -0.6666666663487739 - f64.mul - f64.add - local.get $29 - f64.const -1.142909628459501 - local.get $23 - f64.const 1.0000415263675542 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - f64.mul - local.set $36 - local.get $26 - local.get $27 - f64.add - local.get $34 - f64.add - local.get $35 - f64.add - local.get $36 - f64.add - local.set $37 - local.get $33 - local.get $37 - f64.add - local.set $38 - local.get $33 - local.get $38 - f64.sub - local.get $37 - f64.add - global.set $~lib/util/math/log_tail - local.get $38 - local.set $38 - global.get $~lib/util/math/log_tail - local.set $37 local.get $6 - i64.const -134217728 - i64.and - f64.reinterpret_i64 - local.set $34 - local.get $2 - local.get $34 - f64.sub - local.set $33 - local.get $38 - i64.reinterpret_f64 - i64.const -134217728 + i64.const 2047 i64.and - f64.reinterpret_i64 - local.set $32 - local.get $38 - local.get $32 - f64.sub - local.get $37 - f64.add - local.set $31 - local.get $34 - local.get $32 - f64.mul - local.set $36 - local.get $33 - local.get $32 - f64.mul - local.get $2 - local.get $31 - f64.mul - f64.add - local.set $35 - block $~lib/util/math/exp_inline|inlined.0 (result f64) - local.get $36 - local.set $15 - local.get $35 - local.set $10 - local.get $4 - local.set $12 - local.get $15 - i64.reinterpret_f64 - local.set $9 - local.get $9 - i64.const 52 - i64.shr_u - i32.wrap_i64 - i32.const 2047 - i32.and - local.set $39 - local.get $39 - i32.const 969 - i32.sub - i32.const 63 - i32.ge_u + i64.const 958 + i64.sub + i64.const 1086 + i64.const 958 + i64.sub + i64.ge_u + if + local.get $3 + i64.const 4607182418800017408 + i64.eq if - local.get $39 - i32.const 969 - i32.sub - i32.const -2147483648 - i32.ge_u - if - f64.const -1 - f64.const 1 - local.get $12 - select - br $~lib/util/math/exp_inline|inlined.0 - end - local.get $39 - i32.const 1033 - i32.ge_u - if - local.get $9 - i64.const 63 - i64.shr_u - i64.const 0 - i64.ne - if (result f64) - local.get $12 - local.set $41 - local.get $41 - local.set $42 - i64.const 1152921504606846976 - f64.reinterpret_i64 - local.set $16 - local.get $16 - f64.neg - local.get $16 - local.get $42 - select - local.get $16 - f64.mul - else - local.get $12 - local.set $42 - local.get $42 - local.set $41 - i64.const 8070450532247928832 - f64.reinterpret_i64 - local.set $17 - local.get $17 - f64.neg - local.get $17 - local.get $41 - select - local.get $17 - f64.mul - end - br $~lib/util/math/exp_inline|inlined.0 - end - i32.const 0 - local.set $39 + f64.const 1 + return end - f64.const 184.6649652337873 - local.get $15 + local.get $6 + i64.const 2047 + i64.and + i64.const 958 + i64.lt_u + if + f64.const 1 + return + end + local.get $3 + i64.const 4607182418800017408 + i64.gt_u + local.get $6 + i64.const 2048 + i64.lt_u + i32.eq + if (result f64) + f64.const inf + else + f64.const 0 + end + return + end + local.get $5 + i64.const 0 + i64.eq + if + local.get $0 + f64.const 4503599627370496 f64.mul - local.set $29 - local.get $29 - f64.const 6755399441055744 - f64.add - local.set $30 - local.get $30 i64.reinterpret_f64 - local.set $14 - local.get $30 - f64.const 6755399441055744 - f64.sub - local.set $30 - local.get $15 - local.get $30 - f64.const -0.005415212348111709 - f64.mul - f64.add - local.get $30 - f64.const -1.2864023111638346e-14 - f64.mul - f64.add - local.set $28 - local.get $28 - local.get $10 - f64.add - local.set $28 - local.get $14 - i64.const 127 + local.set $3 + local.get $3 + i64.const 9223372036854775807 i64.and - i64.const 1 - i64.shl - i32.wrap_i64 - local.set $40 - local.get $14 - local.get $12 - i64.extend_i32_u - i64.add + local.set $3 + local.get $3 i64.const 52 - i64.const 7 + i64.const 52 + i64.shl + i64.sub + local.set $3 + end + end + local.get $3 + call $~lib/util/math/log_inline + local.set $9 + global.get $~lib/util/math/log_tail + local.set $10 + local.get $4 + i64.const -134217728 + i64.and + f64.reinterpret_i64 + local.set $13 + local.get $1 + local.get $13 + f64.sub + local.set $14 + local.get $9 + i64.reinterpret_f64 + i64.const -134217728 + i64.and + f64.reinterpret_i64 + local.set $15 + local.get $9 + local.get $15 + f64.sub + local.get $10 + f64.add + local.set $16 + local.get $13 + local.get $15 + f64.mul + local.set $11 + local.get $14 + local.get $15 + f64.mul + local.get $1 + local.get $16 + f64.mul + f64.add + local.set $12 + local.get $11 + local.get $12 + local.get $2 + call $~lib/util/math/exp_inline + ) + (func $~lib/math/NativeMath.pow (param $0 f64) (param $1 f64) (result f64) + local.get $1 + f64.abs + f64.const 2 + f64.le + if + local.get $1 + f64.const 2 + f64.eq + if + local.get $0 + local.get $0 + f64.mul + return + end + local.get $1 + f64.const 0.5 + f64.eq + if + local.get $0 + f64.sqrt + f64.abs + f64.const inf + local.get $0 + f64.const inf + f64.neg + f64.ne + select + return + end + local.get $1 + f64.const -1 + f64.eq + if + f64.const 1 + local.get $0 + f64.div + return + end + local.get $1 + f64.const 1 + f64.eq + if + local.get $0 + return + end + local.get $1 + f64.const 0 + f64.eq + if + f64.const 1 + return + end + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $0 + local.get $1 + call $~lib/util/math/pow_lut + return + ) + (func $~lib/util/number/normalizedBoundaries (param $0 i64) (param $1 i32) + (local $2 i64) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i64.const 1 + i64.shl + i64.const 1 + i64.add + local.set $2 + local.get $1 + i32.const 1 + i32.sub + local.set $3 + local.get $2 + i64.clz + i32.wrap_i64 + local.set $4 + local.get $2 + local.get $4 + i64.extend_i32_s + i64.shl + local.set $2 + local.get $3 + local.get $4 + i32.sub + local.set $3 + i32.const 1 + local.get $0 + i64.const 4503599627370496 + i64.eq + i32.add + local.set $5 + local.get $2 + global.set $~lib/util/number/_frc_plus + local.get $0 + local.get $5 + i64.extend_i32_s + i64.shl + i64.const 1 + i64.sub + local.get $1 + local.get $5 + i32.sub + local.get $3 + i32.sub + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_minus + local.get $3 + global.set $~lib/util/number/_exp + ) + (func $~lib/util/number/getCachedPower (param $0 i32) + (local $1 f64) + (local $2 i32) + (local $3 i32) + i32.const -61 + local.get $0 + i32.sub + f64.convert_i32_s + f64.const 0.30102999566398114 + f64.mul + f64.const 347 + f64.add + local.set $1 + local.get $1 + i32.trunc_f64_s + local.set $2 + local.get $2 + local.get $2 + f64.convert_i32_s + local.get $1 + f64.ne + i32.add + local.set $2 + local.get $2 + i32.const 3 + i32.shr_s + i32.const 1 + i32.add + local.set $3 + i32.const 348 + local.get $3 + i32.const 3 + i32.shl + i32.sub + global.set $~lib/util/number/_K + i32.const 6960 + local.get $3 + i32.const 3 + i32.shl + i32.add + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 7656 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow + ) + (func $~lib/util/number/umul64f (param $0 i64) (param $1 i64) (result i64) + (local $2 i64) + (local $3 i64) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i64) + (local $8 i64) + local.get $0 + i64.const 4294967295 + i64.and + local.set $2 + local.get $1 + i64.const 4294967295 + i64.and + local.set $3 + local.get $0 + i64.const 32 + i64.shr_u + local.set $4 + local.get $1 + i64.const 32 + i64.shr_u + local.set $5 + local.get $2 + local.get $3 + i64.mul + local.set $6 + local.get $4 + local.get $3 + i64.mul + local.get $6 + i64.const 32 + i64.shr_u + i64.add + local.set $7 + local.get $2 + local.get $5 + i64.mul + local.get $7 + i64.const 4294967295 + i64.and + i64.add + local.set $8 + local.get $8 + i64.const 2147483647 + i64.add + local.set $8 + local.get $7 + i64.const 32 + i64.shr_u + local.set $7 + local.get $8 + i64.const 32 + i64.shr_u + local.set $8 + local.get $4 + local.get $5 + i64.mul + local.get $7 + i64.add + local.get $8 + i64.add + ) + (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.add + i32.const 64 + i32.add + ) + (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.set $6 + local.get $6 + i32.load16_u + local.set $7 + loop $while-continue|1 + local.get $3 + local.get $5 + i64.lt_u + if (result i32) + local.get $2 + local.get $3 i64.sub - i64.shl - local.set $13 - i32.const 4760 - local.get $40 - i32.const 3 - i32.shl - i32.add - i64.load - f64.reinterpret_i64 - local.set $25 - i32.const 4760 - local.get $40 - i32.const 3 - i32.shl - i32.add - i64.load offset=8 - local.get $13 - i64.add - local.set $11 - local.get $28 - local.get $28 - f64.mul - local.set $27 - local.get $25 - local.get $28 - f64.add - local.get $27 - f64.const 0.49999999999996786 - local.get $28 - f64.const 0.16666666666665886 - f64.mul - f64.add - f64.mul - f64.add - local.get $27 - local.get $27 - f64.mul - f64.const 0.0416666808410674 - local.get $28 - f64.const 0.008333335853059549 - f64.mul - f64.add - f64.mul - f64.add - local.set $24 - local.get $39 + local.get $4 + i64.ge_u + else i32.const 0 - i32.eq - if - block $~lib/util/math/specialcase|inlined.0 (result f64) - local.get $24 - local.set $18 - local.get $11 - local.set $44 - local.get $14 - local.set $43 - local.get $43 - i64.const 2147483648 - i64.and - i64.const 0 - i64.ne - i32.eqz - if - local.get $44 - i64.const 1009 - i64.const 52 - i64.shl - i64.sub - local.set $44 - local.get $44 - f64.reinterpret_i64 - local.set $17 - f64.const 5486124068793688683255936e279 - local.get $17 - local.get $17 - local.get $18 - f64.mul - f64.add - f64.mul - br $~lib/util/math/specialcase|inlined.0 - end - local.get $44 - i64.const 1022 - i64.const 52 - i64.shl - i64.add - local.set $44 - local.get $44 - f64.reinterpret_i64 - local.set $17 - local.get $17 - local.get $17 - local.get $18 - f64.mul - f64.add - local.set $16 - local.get $16 - f64.abs - f64.const 1 - f64.lt - if - f64.const 1 - local.get $16 - f64.copysign - local.set $23 - local.get $17 - local.get $16 - f64.sub - local.get $17 - local.get $18 - f64.mul - f64.add - local.set $22 - local.get $23 - local.get $16 - f64.add - local.set $21 - local.get $23 - local.get $21 - f64.sub - local.get $16 - f64.add - local.get $22 - f64.add - local.set $22 - local.get $21 - local.get $22 - f64.add - local.get $23 - f64.sub - local.set $16 - local.get $16 - f64.const 0 - f64.eq - if - local.get $44 - i64.const -9223372036854775808 - i64.and - f64.reinterpret_i64 - local.set $16 - end - end - local.get $16 - f64.const 2.2250738585072014e-308 - f64.mul - end - br $~lib/util/math/exp_inline|inlined.0 + end + if (result i32) + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.lt_u + if (result i32) + i32.const 1 + else + local.get $5 + local.get $3 + i64.sub + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.sub + i64.gt_u end - local.get $11 - f64.reinterpret_i64 - local.set $26 - local.get $26 - local.get $26 - local.get $24 - f64.mul - f64.add + else + i32.const 0 + end + local.set $8 + local.get $8 + if + local.get $7 + i32.const 1 + i32.sub + local.set $7 + local.get $3 + local.get $4 + i64.add + local.set $3 + br $while-continue|1 end end - return + local.get $6 + local.get $7 + i32.store16 ) (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) @@ -1664,14 +1867,6 @@ (local $18 i32) (local $19 i64) (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i32) - (local $25 i32) - (local $26 i32) - (local $27 i32) - (local $28 i64) i32.const 0 local.get $4 i32.sub @@ -1911,13 +2106,9 @@ i32.add global.set $~lib/util/number/_K local.get $0 - local.set $24 local.get $15 - local.set $18 local.get $5 - local.set $23 local.get $19 - local.set $22 i32.const 7832 local.get $14 i32.const 2 @@ -1927,79 +2118,15 @@ local.get $7 i64.extend_i32_s i64.shl - local.set $21 local.get $10 - local.set $20 - local.get $24 - local.get $18 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.set $25 - local.get $25 - i32.load16_u - local.set $26 - loop $while-continue|3 - local.get $22 - local.get $20 - i64.lt_u - if (result i32) - local.get $23 - local.get $22 - i64.sub - local.get $21 - i64.ge_u - else - i32.const 0 - end - if (result i32) - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.lt_u - if (result i32) - i32.const 1 - else - local.get $20 - local.get $22 - i64.sub - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.sub - i64.gt_u - end - else - i32.const 0 - end - local.set $27 - local.get $27 - if - local.get $26 - i32.const 1 - i32.sub - local.set $26 - local.get $22 - local.get $21 - i64.add - local.set $22 - br $while-continue|3 - end - end - local.get $25 - local.get $26 - i32.store16 + call $~lib/util/number/grisuRound local.get $15 return end br $while-continue|0 end end - loop $while-continue|4 + loop $while-continue|2 i32.const 1 local.set $16 local.get $16 @@ -2016,8 +2143,8 @@ local.get $7 i64.extend_i32_s i64.shr_u - local.set $23 - local.get $23 + local.set $20 + local.get $20 local.get $15 i64.extend_i32_s i64.or @@ -2026,16 +2153,16 @@ if local.get $0 local.get $15 - local.tee $26 + local.tee $18 i32.const 1 i32.add local.set $15 - local.get $26 + local.get $18 i32.const 1 i32.shl i32.add i32.const 48 - local.get $23 + local.get $20 i32.wrap_i64 i32.const 65535 i32.and @@ -2070,88 +2197,125 @@ i64.mul local.set $10 local.get $0 - local.set $18 local.get $15 - local.set $27 local.get $5 - local.set $28 local.get $13 - local.set $22 local.get $8 - local.set $21 local.get $10 - local.set $20 - local.get $18 - local.get $27 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.set $26 - local.get $26 - i32.load16_u - local.set $25 - loop $while-continue|6 - local.get $22 - local.get $20 - i64.lt_u - if (result i32) - local.get $28 - local.get $22 - i64.sub - local.get $21 - i64.ge_u - else - i32.const 0 - end - if (result i32) - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.lt_u - if (result i32) - i32.const 1 - else - local.get $20 - local.get $22 - i64.sub - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.sub - i64.gt_u - end - else - i32.const 0 - end - local.set $24 - local.get $24 - if - local.get $25 - i32.const 1 - i32.sub - local.set $25 - local.get $22 - local.get $21 - i64.add - local.set $22 - br $while-continue|6 - end - end - local.get $26 - local.get $25 - i32.store16 + call $~lib/util/number/grisuRound local.get $15 return end - br $while-continue|4 + br $while-continue|2 end end unreachable ) + (func $~lib/util/number/grisu2 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (local $3 i64) + (local $4 i32) + (local $5 i64) + (local $6 i64) + (local $7 i32) + (local $8 i64) + (local $9 i32) + (local $10 i64) + (local $11 i32) + (local $12 i64) + (local $13 i32) + (local $14 i64) + (local $15 i64) + local.get $0 + i64.reinterpret_f64 + local.set $3 + local.get $3 + i64.const 9218868437227405312 + i64.and + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.set $4 + local.get $3 + i64.const 4503599627370495 + i64.and + local.set $5 + local.get $4 + i32.const 0 + i32.ne + i64.extend_i32_u + i64.const 52 + i64.shl + local.get $5 + i64.add + local.set $6 + local.get $4 + i32.const 1 + local.get $4 + select + i32.const 1023 + i32.const 52 + i32.add + i32.sub + local.set $4 + local.get $6 + local.get $4 + call $~lib/util/number/normalizedBoundaries + global.get $~lib/util/number/_exp + call $~lib/util/number/getCachedPower + local.get $6 + i64.clz + i32.wrap_i64 + local.set $7 + local.get $6 + local.get $7 + i64.extend_i32_s + i64.shl + local.set $6 + local.get $4 + local.get $7 + i32.sub + local.set $4 + global.get $~lib/util/number/_frc_pow + local.set $8 + global.get $~lib/util/number/_exp_pow + local.set $9 + local.get $6 + local.get $8 + call $~lib/util/number/umul64f + local.set $10 + local.get $4 + local.get $9 + call $~lib/util/number/umul64e + local.set $11 + global.get $~lib/util/number/_frc_plus + local.get $8 + call $~lib/util/number/umul64f + i64.const 1 + i64.sub + local.set $12 + global.get $~lib/util/number/_exp + local.get $9 + call $~lib/util/number/umul64e + local.set $13 + global.get $~lib/util/number/_frc_minus + local.get $8 + call $~lib/util/number/umul64f + i64.const 1 + i64.add + local.set $14 + local.get $12 + local.get $14 + i64.sub + local.set $15 + local.get $1 + local.get $10 + local.get $11 + local.get $12 + local.get $13 + local.get $15 + local.get $2 + call $~lib/util/number/genDigits + ) (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -3176,986 +3340,541 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $3 - local.set $6 - local.get $6 - if - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|5 - end - end - end - end - ) - (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/memory/memmove (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $2 - i32.eqz + local.get $0 + local.get $1 + i32.eq if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 46 - i32.const 48 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 2 - i32.add return end + i32.const 0 + i32.const 1 + i32.lt_s + drop local.get $1 local.get $2 i32.add - local.set $3 - local.get $1 - local.get $3 - i32.le_s + local.get $0 + i32.le_u if (result i32) - local.get $3 - i32.const 21 - i32.le_s + i32.const 1 else - i32.const 0 + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u end if - local.get $1 - local.set $4 - loop $for-loop|0 - local.get $4 - local.get $3 - i32.lt_s - local.set $5 - local.get $5 - if - local.get $0 - local.get $4 - i32.const 1 - i32.shl - i32.add - i32.const 48 - i32.store16 - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 - end - end local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.const 46 - i32.const 48 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $3 - i32.const 2 - i32.add + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy return - else - local.get $3 + end + local.get $0 + local.get $1 + i32.lt_u + if i32.const 0 - i32.gt_s - if (result i32) - local.get $3 - i32.const 21 - i32.le_s - else - i32.const 0 - end + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.set $4 - local.get $4 - i32.const 2 - i32.add - local.get $4 - i32.const 0 - local.get $2 - i32.sub - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.const 46 - i32.store16 - local.get $1 - i32.const 1 - i32.add - return - else - i32.const -6 - local.get $3 - i32.lt_s - if (result i32) - local.get $3 - i32.const 0 - i32.le_s - else - i32.const 0 - end - if - i32.const 2 - local.get $3 - i32.sub - local.set $4 - local.get $0 - local.get $4 - i32.const 1 - i32.shl - i32.add - local.get $0 - local.get $1 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy + loop $while-continue|0 local.get $0 - i32.const 48 - i32.const 46 - i32.const 16 - i32.shl - i32.or - i32.store - i32.const 2 - local.set $5 - loop $for-loop|1 - local.get $5 - local.get $4 - i32.lt_s - local.set $6 - local.get $6 + i32.const 7 + i32.and + local.set $3 + local.get $3 + if + local.get $2 + i32.eqz if - local.get $0 - local.get $5 - i32.const 1 - i32.shl - i32.add - i32.const 48 - i32.store16 - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|1 + return end - end - local.get $1 - local.get $4 - i32.add - return - else - local.get $1 - i32.const 1 - i32.eq - if - local.get $0 - i32.const 101 - i32.store16 offset=2 - local.get $0 - i32.const 4 - i32.add - local.set $5 - local.get $3 + local.get $2 i32.const 1 i32.sub - local.set $6 - local.get $6 - i32.const 0 - i32.lt_s - local.set $4 - local.get $4 - if - i32.const 0 - local.get $6 - i32.sub - local.set $6 - end - local.get $6 - call $~lib/util/number/decimalCount32 + local.set $2 + local.get $0 + local.tee $4 i32.const 1 i32.add - local.set $7 - local.get $5 - local.set $10 - local.get $6 - local.set $9 - local.get $7 - local.set $8 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $10 - local.get $9 - local.get $8 - call $~lib/util/number/utoa32_lut - local.get $5 - i32.const 45 - i32.const 43 + local.set $0 local.get $4 - select - i32.store16 - local.get $7 - local.set $1 local.get $1 - i32.const 2 + local.tee $4 + i32.const 1 i32.add - return - else + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + br $while-continue|0 + end + end + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 local.get $1 - i32.const 1 - i32.shl - local.set $7 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 local.get $0 - i32.const 4 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 i32.add + local.set $1 + br $while-continue|1 + end + end + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 + local.get $3 + if + local.get $2 + i32.eqz + if + return + end local.get $0 - i32.const 2 - i32.add - local.get $7 - i32.const 2 + local.get $2 + i32.const 1 i32.sub - call $~lib/memory/memory.copy - local.get $0 - i32.const 46 - i32.store16 offset=2 - local.get $0 - local.get $7 + local.tee $2 i32.add - i32.const 101 - i32.store16 offset=2 local.get $1 - local.get $0 - local.get $7 - i32.add - i32.const 4 + local.get $2 i32.add - local.set $9 - local.get $3 - i32.const 1 + i32.load8_u + i32.store8 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $2 + i32.const 8 i32.sub - local.set $8 - local.get $8 - i32.const 0 - i32.lt_s - local.set $4 - local.get $4 - if - i32.const 0 - local.get $8 - i32.sub - local.set $8 - end - local.get $8 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.set $5 - local.get $9 - local.set $11 - local.get $8 - local.set $6 - local.get $5 - local.set $10 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $11 - local.get $6 - local.get $10 - call $~lib/util/number/utoa32_lut - local.get $9 - i32.const 45 - i32.const 43 - local.get $4 - select - i32.store16 - local.get $5 + local.set $2 + local.get $0 + local.get $2 i32.add - local.set $1 local.get $1 - i32.const 2 + local.get $2 i32.add - return + i64.load + i64.store + br $while-continue|4 end - unreachable end - unreachable end - unreachable + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end - unreachable ) - (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) + (func $~lib/util/number/genExponent (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i64) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i64) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i64) - (local $25 i64) - (local $26 i32) - (local $27 i64) - (local $28 i32) local.get $1 - f64.const 0 - f64.lt + i32.const 0 + i32.lt_s local.set $2 local.get $2 if + i32.const 0 local.get $1 - f64.neg + i32.sub local.set $1 - local.get $0 - i32.const 45 - i32.store16 end local.get $1 - local.set $5 - local.get $0 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - i64.reinterpret_f64 - local.set $6 - local.get $6 - i64.const 9218868437227405312 - i64.and - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.set $7 - local.get $6 - i64.const 4503599627370495 - i64.and - local.set $8 - local.get $7 - i32.const 0 - i32.ne - i64.extend_i32_u - i64.const 52 - i64.shl - local.get $8 - i64.add - local.set $9 - local.get $7 - i32.const 1 - local.get $7 - select - i32.const 1023 - i32.const 52 - i32.add - i32.sub - local.set $7 - local.get $9 - local.set $11 - local.get $7 - local.set $10 - local.get $11 - i64.const 1 - i64.shl - i64.const 1 - i64.add - local.set $12 - local.get $10 - i32.const 1 - i32.sub - local.set $13 - local.get $12 - i64.clz - i32.wrap_i64 - local.set $14 - local.get $12 - local.get $14 - i64.extend_i32_s - i64.shl - local.set $12 - local.get $13 - local.get $14 - i32.sub - local.set $13 - i32.const 1 - local.get $11 - i64.const 4503599627370496 - i64.eq - i32.add - local.set $15 - local.get $12 - global.set $~lib/util/number/_frc_plus - local.get $11 - local.get $15 - i64.extend_i32_s - i64.shl - i64.const 1 - i64.sub - local.get $10 - local.get $15 - i32.sub - local.get $13 - i32.sub - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_minus - local.get $13 - global.set $~lib/util/number/_exp - global.get $~lib/util/number/_exp - local.set $10 - i32.const -61 - local.get $10 - i32.sub - f64.convert_i32_s - f64.const 0.30102999566398114 - f64.mul - f64.const 347 - f64.add - local.set $16 - local.get $16 - i32.trunc_f64_s - local.set $15 - local.get $15 - local.get $15 - f64.convert_i32_s - local.get $16 - f64.ne - i32.add - local.set $15 - local.get $15 - i32.const 3 - i32.shr_s - i32.const 1 - i32.add - local.set $14 - i32.const 348 - local.get $14 - i32.const 3 - i32.shl - i32.sub - global.set $~lib/util/number/_K - i32.const 6960 - local.get $14 - i32.const 3 - i32.shl - i32.add - i64.load - global.set $~lib/util/number/_frc_pow - i32.const 7656 - local.get $14 + call $~lib/util/number/decimalCount32 i32.const 1 - i32.shl - i32.add - i32.load16_s - global.set $~lib/util/number/_exp_pow - local.get $9 - i64.clz - i32.wrap_i64 - local.set $14 - local.get $9 - local.get $14 - i64.extend_i32_s - i64.shl - local.set $9 - local.get $7 - local.get $14 - i32.sub - local.set $7 - global.get $~lib/util/number/_frc_pow - local.set $12 - global.get $~lib/util/number/_exp_pow - local.set $15 - local.get $9 - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $18 - local.get $11 - i64.const 4294967295 - i64.and - local.set $19 - local.get $17 - i64.const 32 - i64.shr_u - local.set $20 - local.get $11 - i64.const 32 - i64.shr_u - local.set $21 - local.get $18 - local.get $19 - i64.mul - local.set $22 - local.get $20 - local.get $19 - i64.mul - local.get $22 - i64.const 32 - i64.shr_u - i64.add - local.set $23 - local.get $18 - local.get $21 - i64.mul - local.get $23 - i64.const 4294967295 - i64.and - i64.add - local.set $24 - local.get $24 - i64.const 2147483647 - i64.add - local.set $24 - local.get $23 - i64.const 32 - i64.shr_u - local.set $23 - local.get $24 - i64.const 32 - i64.shr_u - local.set $24 - local.get $20 - local.get $21 - i64.mul - local.get $23 - i64.add - local.get $24 - i64.add - local.set $24 - local.get $7 - local.set $10 - local.get $15 - local.set $13 - local.get $10 - local.get $13 - i32.add - i32.const 64 - i32.add - local.set $10 - global.get $~lib/util/number/_frc_plus - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $23 - local.get $11 - i64.const 4294967295 - i64.and - local.set $22 - local.get $17 - i64.const 32 - i64.shr_u - local.set $21 - local.get $11 - i64.const 32 - i64.shr_u - local.set $20 - local.get $23 - local.get $22 - i64.mul - local.set $19 - local.get $21 - local.get $22 - i64.mul - local.get $19 - i64.const 32 - i64.shr_u - i64.add - local.set $18 - local.get $23 - local.get $20 - i64.mul - local.get $18 - i64.const 4294967295 - i64.and - i64.add - local.set $25 - local.get $25 - i64.const 2147483647 - i64.add - local.set $25 - local.get $18 - i64.const 32 - i64.shr_u - local.set $18 - local.get $25 - i64.const 32 - i64.shr_u - local.set $25 - local.get $21 - local.get $20 - i64.mul - local.get $18 - i64.add - local.get $25 - i64.add - i64.const 1 - i64.sub - local.set $25 - global.get $~lib/util/number/_exp - local.set $26 - local.get $15 - local.set $13 - local.get $26 - local.get $13 - i32.add - i32.const 64 i32.add - local.set $26 - global.get $~lib/util/number/_frc_minus - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $18 - local.get $11 - i64.const 4294967295 - i64.and - local.set $19 - local.get $17 - i64.const 32 - i64.shr_u - local.set $20 - local.get $11 - i64.const 32 - i64.shr_u - local.set $21 - local.get $18 - local.get $19 - i64.mul - local.set $22 - local.get $20 - local.get $19 - i64.mul - local.get $22 - i64.const 32 - i64.shr_u - i64.add - local.set $23 - local.get $18 - local.get $21 - i64.mul - local.get $23 - i64.const 4294967295 - i64.and - i64.add - local.set $27 - local.get $27 - i64.const 2147483647 - i64.add - local.set $27 - local.get $23 - i64.const 32 - i64.shr_u - local.set $23 - local.get $27 - i64.const 32 - i64.shr_u - local.set $27 - local.get $20 - local.get $21 - i64.mul - local.get $23 - i64.add - local.get $27 - i64.add - i64.const 1 - i64.add - local.set $27 - local.get $25 - local.get $27 - i64.sub - local.set $23 - local.get $4 - local.get $24 - local.get $10 - local.get $25 - local.get $26 - local.get $23 + local.set $3 + local.get $0 + local.get $1 + local.get $3 + call $~lib/util/number/utoa32_core + local.get $0 + i32.const 45 + i32.const 43 + local.get $2 + select + i32.store16 + local.get $3 + ) + (func $~lib/util/number/prettify (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 + i32.eqz + if + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 46 + i32.const 48 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 2 + i32.add + return + end + local.get $1 + local.get $2 + i32.add + local.set $3 + local.get $1 local.get $3 - call $~lib/util/number/genDigits - local.set $28 + i32.le_s + if (result i32) + local.get $3 + i32.const 21 + i32.le_s + else + i32.const 0 + end + if + local.get $1 + local.set $4 + loop $for-loop|0 + local.get $4 + local.get $3 + i32.lt_s + local.set $5 + local.get $5 + if + local.get $0 + local.get $4 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 + end + end + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.const 46 + i32.const 48 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $3 + i32.const 2 + i32.add + return + else + local.get $3 + i32.const 0 + i32.gt_s + if (result i32) + local.get $3 + i32.const 21 + i32.le_s + else + i32.const 0 + end + if + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.set $4 + local.get $4 + i32.const 2 + i32.add + local.get $4 + i32.const 0 + local.get $2 + i32.sub + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.const 46 + i32.store16 + local.get $1 + i32.const 1 + i32.add + return + else + i32.const -6 + local.get $3 + i32.lt_s + if (result i32) + local.get $3 + i32.const 0 + i32.le_s + else + i32.const 0 + end + if + i32.const 2 + local.get $3 + i32.sub + local.set $4 + local.get $0 + local.get $4 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $1 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $0 + i32.const 48 + i32.const 46 + i32.const 16 + i32.shl + i32.or + i32.store + i32.const 2 + local.set $5 + loop $for-loop|1 + local.get $5 + local.get $4 + i32.lt_s + local.set $6 + local.get $6 + if + local.get $0 + local.get $5 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|1 + end + end + local.get $1 + local.get $4 + i32.add + return + else + local.get $1 + i32.const 1 + i32.eq + if + local.get $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + i32.const 4 + i32.add + local.get $3 + i32.const 1 + i32.sub + call $~lib/util/number/genExponent + local.set $1 + local.get $1 + i32.const 2 + i32.add + return + else + local.get $1 + i32.const 1 + i32.shl + local.set $4 + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $4 + i32.const 2 + i32.sub + call $~lib/memory/memory.copy + local.get $0 + i32.const 46 + i32.store16 offset=2 + local.get $0 + local.get $4 + i32.add + i32.const 101 + i32.store16 offset=2 + local.get $1 + local.get $0 + local.get $4 + i32.add + i32.const 4 + i32.add + local.get $3 + i32.const 1 + i32.sub + call $~lib/util/number/genExponent + i32.add + local.set $1 + local.get $1 + i32.const 2 + i32.add + return + end + unreachable + end + unreachable + end + unreachable + end + unreachable + ) + (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + f64.const 0 + f64.lt + local.set $2 + local.get $2 + if + local.get $1 + f64.neg + local.set $1 + local.get $0 + i32.const 45 + i32.store16 + end + local.get $1 + local.get $0 + local.get $2 + call $~lib/util/number/grisu2 + local.set $3 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $28 + local.get $3 local.get $2 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.set $28 - local.get $28 + local.set $3 + local.get $3 local.get $2 i32.add ) diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index e3812e440d..21ca221915 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -6,10 +6,12 @@ (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_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) (type $i32_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) - (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $f32_=>_i32 (func (param f32) (result i32))) + (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -129,161 +131,171 @@ i32.store offset=12 local.get $4 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (local $2 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 4 - i32.sub - local.tee $2 - i32.const 0 - i32.store8 offset=3 - local.get $1 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 offset=1 - local.get $0 - i32.const 0 - i32.store8 offset=2 - local.get $2 - i32.const 0 - i32.store8 offset=2 - local.get $2 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 offset=3 - local.get $2 - i32.const 0 - i32.store8 - local.get $1 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $2 - i32.add - local.tee $0 - i32.const 0 - i32.store - local.get $0 - local.get $1 - local.get $2 - i32.sub - i32.const -4 - i32.and - local.tee $2 - i32.add - i32.const 28 - i32.sub - local.tee $1 - i32.const 0 - i32.store offset=24 - local.get $2 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $2 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $1 - i32.const 0 - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $0 - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $1 - i32.add - local.set $0 - local.get $2 + local.get $1 + i32.eqz + if + return + end + local.get $0 + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 4 + i32.sub + local.tee $2 + i32.const 0 + i32.store8 offset=3 + local.get $1 + i32.const 2 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store8 offset=1 + local.get $0 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=1 + local.get $1 + i32.const 6 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store8 offset=3 + local.get $2 + i32.const 0 + i32.store8 + local.get $1 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $2 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $0 + local.get $1 + local.get $2 + i32.sub + i32.const -4 + i32.and + local.tee $2 + i32.add + i32.const 28 + i32.sub + local.tee $1 + i32.const 0 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + i32.const 0 + i32.store offset=24 + local.get $1 + i32.const 0 + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $1 + i32.add + local.set $0 + local.get $2 + local.get $1 + i32.sub + local.set $1 + loop $while-continue|0 local.get $1 - i32.sub - local.set $1 - loop $while-continue|0 + i32.const 32 + i32.ge_u + if + local.get $0 + i64.const 0 + i64.store + local.get $0 + i64.const 0 + i64.store offset=8 + local.get $0 + i64.const 0 + i64.store offset=16 + local.get $0 + i64.const 0 + i64.store offset=24 local.get $1 i32.const 32 - i32.ge_u - if - local.get $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i64.const 0 - i64.store offset=16 - local.get $0 - i64.const 0 - i64.store offset=24 - local.get $1 - i32.const 32 - i32.sub - local.set $1 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $while-continue|0 - end + i32.sub + local.set $1 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 end end ) @@ -310,7 +322,7 @@ call $~lib/rt/stub/__alloc local.tee $2 local.get $1 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset local.get $0 i32.eqz if @@ -389,17 +401,69 @@ i32.add f32.load ) - (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) + (func $~lib/util/number/umul64f (param $0 i64) (param $1 i64) (result i64) + (local $2 i64) + (local $3 i64) + local.get $1 + i64.const 4294967295 + i64.and + local.tee $2 local.get $0 - i32.const 10 - i32.ge_u - i32.const 1 - i32.add + i64.const 32 + i64.shr_u + local.tee $3 + i64.mul + local.get $2 local.get $0 - i32.const 10000 - i32.ge_u - i32.const 3 - i32.add + i64.const 4294967295 + i64.and + local.tee $2 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.set $0 + local.get $3 + local.get $1 + i64.const 32 + i64.shr_u + local.tee $1 + i64.mul + local.get $0 + i64.const 32 + i64.shr_u + i64.add + local.get $1 + local.get $2 + i64.mul + local.get $0 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + i64.add + ) + (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.add + i32.const -64 + i32.sub + ) + (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) + local.get $0 + i32.const 10 + i32.ge_u + i32.const 1 + i32.add + local.get $0 + i32.const 10000 + i32.ge_u + i32.const 3 + i32.add local.get $0 i32.const 1000 i32.ge_u @@ -431,14 +495,69 @@ i32.lt_u select ) + (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) + local.get $0 + local.get $1 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.tee $0 + i32.load16_u + local.set $1 + loop $while-continue|1 + i32.const 1 + local.get $5 + local.get $3 + i64.sub + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.sub + i64.gt_u + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.lt_u + select + i32.const 0 + local.get $2 + local.get $3 + i64.sub + local.get $4 + i64.ge_u + i32.const 0 + local.get $3 + local.get $5 + i64.lt_u + select + select + if + local.get $1 + i32.const 1 + i32.sub + local.set $1 + local.get $3 + local.get $4 + i64.add + local.set $3 + br $while-continue|1 + end + end + local.get $0 + local.get $1 + i32.store16 + ) (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) - (local $8 i64) + (local $8 i32) (local $9 i64) - (local $10 i32) + (local $10 i64) (local $11 i64) (local $12 i64) - (local $13 i64) local.get $3 local.get $1 i64.sub @@ -448,25 +567,25 @@ i32.const 0 local.get $4 i32.sub - local.tee $10 + local.tee $8 i64.extend_i32_s i64.shl - local.tee $11 + local.tee $10 i64.const 1 i64.sub - local.tee $12 + local.tee $11 i64.and - local.set $8 + local.set $1 local.get $3 - local.get $10 + local.get $8 i64.extend_i32_s i64.shr_u i32.wrap_i64 - local.tee $7 + local.tee $2 call $~lib/util/number/decimalCount32 - local.set $4 + local.set $7 loop $while-continue|0 - local.get $4 + local.get $7 i32.const 0 i32.gt_s if @@ -481,116 +600,116 @@ block $case3|1 block $case2|1 block $case1|1 - local.get $4 - local.tee $2 + local.get $7 + local.tee $4 i32.const 10 i32.ne if - local.get $2 + local.get $4 i32.const 1 i32.sub br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 end - local.get $7 + local.get $2 i32.const 1000000000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 1000000000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 100000000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 100000000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 10000000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 10000000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 1000000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 1000000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 100000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 100000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 10000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 10000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 1000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 1000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 100 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 100 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 10 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 10 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 - local.set $2 + local.get $2 + local.set $4 i32.const 0 - local.set $7 + local.set $2 br $break|1 end i32.const 0 - local.set $2 + local.set $4 end - local.get $2 + local.get $4 local.get $6 i32.or if @@ -599,7 +718,7 @@ i32.const 1 i32.shl i32.add - local.get $2 + local.get $4 i32.const 65535 i32.and i32.const 48 @@ -610,110 +729,61 @@ i32.add local.set $6 end - local.get $4 + local.get $7 i32.const 1 i32.sub - local.set $4 - local.get $8 - local.get $7 + local.set $7 + local.get $1 + local.get $2 i64.extend_i32_u - local.get $10 + local.get $8 i64.extend_i32_s i64.shl i64.add - local.tee $1 + local.tee $3 local.get $5 i64.le_u if - local.get $4 + local.get $7 global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $4 + local.get $0 + local.get $6 + local.get $5 + local.get $3 + local.get $7 i32.const 2 i32.shl i32.const 2280 i32.add i64.load32_u - local.get $10 + local.get $8 i64.extend_i32_s i64.shl - local.set $3 - local.get $0 - local.get $6 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_u - local.set $4 - loop $while-continue|3 - i32.const 1 - local.get $9 - local.get $1 - i64.sub - local.get $1 - local.get $3 - i64.add - local.get $9 - i64.sub - i64.gt_u - local.get $1 - local.get $3 - i64.add - local.get $9 - i64.lt_u - select - i32.const 0 - local.get $5 - local.get $1 - i64.sub - local.get $3 - i64.ge_u - i32.const 0 - local.get $1 - local.get $9 - i64.lt_u - select - select - if - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.get $3 - i64.add - local.set $1 - br $while-continue|3 - end - end - local.get $2 - local.get $4 - i32.store16 + local.get $9 + call $~lib/util/number/grisuRound local.get $6 return end br $while-continue|0 end end - local.get $10 + local.get $8 i64.extend_i32_s - local.set $13 - loop $while-continue|4 (result i32) + local.set $3 + loop $while-continue|2 (result i32) local.get $5 i64.const 10 i64.mul local.set $5 - local.get $8 + local.get $1 i64.const 10 i64.mul - local.tee $3 - local.get $13 - i64.shr_u local.tee $1 + local.get $3 + i64.shr_u + local.tee $12 local.get $6 i64.extend_i32_s i64.or @@ -722,41 +792,45 @@ if local.get $0 local.get $6 + local.tee $2 i32.const 1 i32.shl i32.add - local.get $1 + local.get $12 i32.wrap_i64 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 - local.get $6 + local.get $2 i32.const 1 i32.add local.set $6 end - local.get $4 + local.get $7 i32.const 1 i32.sub - local.set $4 - local.get $3 - local.get $12 + local.set $7 + local.get $1 + local.get $11 i64.and - local.tee $8 + local.tee $1 local.get $5 i64.ge_u - br_if $while-continue|4 - local.get $4 + br_if $while-continue|2 + local.get $7 global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $8 - local.set $1 + local.get $0 + local.get $6 + local.get $5 + local.get $1 + local.get $10 local.get $9 i32.const 0 - local.get $4 + local.get $7 i32.sub i32.const 2 i32.shl @@ -764,238 +838,333 @@ i32.add i64.load32_u i64.mul - local.set $3 - local.get $0 - local.get $6 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_u - local.set $4 - loop $while-continue|6 - i32.const 1 - local.get $3 - local.get $1 - i64.sub - local.get $1 - local.get $11 - i64.add - local.get $3 - i64.sub - i64.gt_u - local.get $1 - local.get $11 - i64.add - local.get $3 - i64.lt_u - select - i32.const 0 - local.get $5 - local.get $1 - i64.sub - local.get $11 - i64.ge_u - i32.const 0 - local.get $1 - local.get $3 - i64.lt_u - select - select - if - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.get $11 - i64.add - local.set $1 - br $while-continue|6 - end - end - local.get $2 - local.get $4 - i32.store16 + call $~lib/util/number/grisuRound local.get $6 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/grisu2 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $4 + (local $4 i64) + (local $5 i32) + (local $6 i64) + (local $7 i32) + local.get $0 + i64.reinterpret_f64 + local.tee $4 + i64.const 9218868437227405312 + i64.and + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.tee $5 + i32.const 0 + i32.ne + i64.extend_i32_u + i64.const 52 + i64.shl + local.get $4 + i64.const 4503599627370495 + i64.and + i64.add + local.tee $4 + i64.const 1 + i64.shl + i64.const 1 + i64.add + local.tee $6 + i64.clz + i32.wrap_i64 + local.set $3 + local.get $6 + local.get $3 + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_plus + local.get $5 + i32.const 1 + local.get $5 + select + i32.const 1075 + i32.sub + local.tee $5 + i32.const 1 + i32.sub + local.get $3 + i32.sub + local.set $3 + local.get $4 + local.get $4 + i64.const 4503599627370496 + i64.eq + i32.const 1 + i32.add + local.tee $7 + i64.extend_i32_s + i64.shl + i64.const 1 + i64.sub + local.get $5 + local.get $7 + i32.sub + local.get $3 + i32.sub + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_minus + local.get $3 + global.set $~lib/util/number/_exp + i32.const 348 + i32.const -61 + global.get $~lib/util/number/_exp + i32.sub + f64.convert_i32_s + f64.const 0.30102999566398114 + f64.mul + f64.const 347 + f64.add + local.tee $0 + i32.trunc_f64_s + local.tee $3 + local.get $3 + f64.convert_i32_s + local.get $0 + f64.ne + i32.add + i32.const 3 + i32.shr_s + i32.const 1 + i32.add + local.tee $3 + i32.const 3 + i32.shl + local.tee $7 + i32.sub + global.set $~lib/util/number/_K + local.get $7 + i32.const 1408 + i32.add + i64.load + global.set $~lib/util/number/_frc_pow + local.get $3 + i32.const 1 + i32.shl + i32.const 2104 + i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow + global.get $~lib/util/number/_exp_pow + local.set $3 + local.get $1 + local.get $4 + local.get $4 + i64.clz + i32.wrap_i64 + local.tee $1 + i64.extend_i32_s + i64.shl + global.get $~lib/util/number/_frc_pow + local.tee $4 + call $~lib/util/number/umul64f + local.get $5 + local.get $1 + i32.sub + local.get $3 + call $~lib/util/number/umul64e + global.get $~lib/util/number/_frc_plus + local.get $4 + call $~lib/util/number/umul64f + i64.const 1 + i64.sub + local.tee $6 + global.get $~lib/util/number/_exp + local.get $3 + call $~lib/util/number/umul64e + local.get $6 + global.get $~lib/util/number/_frc_minus + local.get $4 + call $~lib/util/number/umul64f + i64.const 1 + i64.add + i64.sub + local.get $2 + call $~lib/util/number/genDigits + ) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and if + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 local.get $0 - local.tee $2 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $1 - local.get $2 local.get $3 + local.get $4 i32.load8_u i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 + br $while-continue|0 end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 - local.get $4 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and if - local.get $4 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $4 - local.get $0 + local.tee $2 i32.add local.get $1 - local.get $4 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 end end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 + end + end + end + loop $while-continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end end end ) - (func $~lib/util/number/utoa_simple (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -1022,541 +1191,230 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $2 - i32.eqz + (func $~lib/util/number/genExponent (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.const 0 + i32.lt_s + local.tee $2 if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 3145774 - i32.store + i32.const 0 local.get $1 - i32.const 2 - i32.add - return + i32.sub + local.set $1 end local.get $1 local.get $1 - local.get $2 + call $~lib/util/number/decimalCount32 + i32.const 1 i32.add - local.tee $3 - i32.le_s - if (result i32) - local.get $3 - i32.const 21 - i32.le_s - else - i32.const 0 - end - if (result i32) - loop $for-loop|0 - local.get $1 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 48 - i32.store16 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end + local.tee $1 + call $~lib/util/number/utoa32_core + local.get $0 + i32.const 45 + i32.const 43 + local.get $2 + select + i32.store16 + local.get $1 + ) + (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $2 + i32.eqz + if local.get $0 - local.get $3 + local.get $1 i32.const 1 i32.shl i32.add i32.const 3145774 i32.store - local.get $3 - i32.const 2 - i32.add - else - local.get $3 - i32.const 21 - i32.le_s - i32.const 0 - local.get $3 - i32.const 0 - i32.gt_s - select - if (result i32) - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.tee $0 - i32.const 2 - i32.add - local.get $0 - i32.const 0 - local.get $2 - i32.sub - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - i32.const 46 - i32.store16 - local.get $1 - i32.const 1 - i32.add - else - local.get $3 - i32.const 0 - i32.le_s - i32.const 0 - i32.const -6 - local.get $3 - i32.lt_s - select - if (result i32) - local.get $0 - i32.const 2 - local.get $3 - i32.sub - local.tee $3 - i32.const 1 - i32.shl - i32.add - local.get $0 - local.get $1 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - i32.const 3014704 - i32.store - i32.const 2 - local.set $2 - loop $for-loop|1 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 48 - i32.store16 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 - end - end - local.get $1 - local.get $3 - i32.add - else - local.get $1 - i32.const 1 - i32.eq - if (result i32) - local.get $0 - i32.const 101 - i32.store16 offset=2 - local.get $0 - local.tee $1 - i32.const 4 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $2 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $1 - i32.const 45 - i32.const 43 - local.get $2 - select - i32.store16 offset=4 - local.get $0 - i32.const 2 - i32.add - else - local.get $0 - i32.const 4 - i32.add - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.const 1 - i32.shl - local.tee $2 - i32.const 2 - i32.sub - call $~lib/memory/memory.copy - local.get $0 - i32.const 46 - i32.store16 offset=2 - local.get $0 - local.get $2 - i32.add - local.tee $0 - i32.const 101 - i32.store16 offset=2 - local.get $0 - local.tee $2 - i32.const 4 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $3 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $2 - i32.const 45 - i32.const 43 - local.get $3 - select - i32.store16 offset=4 - local.get $0 - local.get $1 - i32.add - i32.const 2 - i32.add - end - end - end - end - ) - (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) - (local $2 i64) - (local $3 i64) - (local $4 i32) - (local $5 i64) - (local $6 i32) - (local $7 i64) - (local $8 i32) - (local $9 i32) - (local $10 i64) - local.get $1 - f64.const 0 - f64.lt - local.tee $8 - if (result f64) - local.get $0 - i32.const 45 - i32.store16 - local.get $1 - f64.neg - else local.get $1 - end - i64.reinterpret_f64 - local.tee $3 - i64.const 9218868437227405312 - i64.and - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.tee $6 - i32.const 0 - i32.ne - i64.extend_i32_u - i64.const 52 - i64.shl - local.get $3 - i64.const 4503599627370495 - i64.and - i64.add - local.tee $2 - i64.const 1 - i64.shl - i64.const 1 - i64.add - local.tee $3 - local.get $3 - i64.clz - i32.wrap_i64 - local.tee $4 - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_plus - local.get $6 - i32.const 1 - local.get $6 - select - i32.const 1075 - i32.sub - local.tee $6 - i32.const 1 - i32.sub - local.get $4 - i32.sub - local.set $4 - local.get $2 - local.get $2 - i64.const 4503599627370496 - i64.eq - i32.const 1 - i32.add - local.tee $9 - i64.extend_i32_s - i64.shl - i64.const 1 - i64.sub - local.get $6 - local.get $9 - i32.sub - local.get $4 - i32.sub - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_minus - local.get $4 - global.set $~lib/util/number/_exp - i32.const 348 - i32.const -61 - global.get $~lib/util/number/_exp - i32.sub - f64.convert_i32_s - f64.const 0.30102999566398114 - f64.mul - f64.const 347 - f64.add - local.tee $1 - i32.trunc_f64_s - local.tee $4 - local.get $4 - f64.convert_i32_s - local.get $1 - f64.ne - i32.add - i32.const 3 - i32.shr_s - i32.const 1 - i32.add - local.tee $4 - i32.const 3 - i32.shl - local.tee $9 - i32.sub - global.set $~lib/util/number/_K - local.get $9 - i32.const 1408 - i32.add - i64.load - global.set $~lib/util/number/_frc_pow - local.get $4 - i32.const 1 - i32.shl - i32.const 2104 - i32.add - i32.load16_s - global.set $~lib/util/number/_exp_pow - global.get $~lib/util/number/_frc_pow - local.tee $3 - i64.const 4294967295 - i64.and - local.set $5 - local.get $0 - local.get $8 - i32.const 1 - i32.shl - i32.add - local.get $0 - local.get $2 - local.get $2 - i64.clz - i32.wrap_i64 - local.tee $0 - i64.extend_i32_s - i64.shl - local.tee $2 - i64.const 32 - i64.shr_u - local.tee $7 - local.get $3 - i64.const 32 - i64.shr_u - local.tee $10 - i64.mul - local.get $5 - local.get $7 - i64.mul - local.get $2 - i64.const 4294967295 - i64.and - local.tee $2 - local.get $5 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $5 - i64.const 32 - i64.shr_u - i64.add - local.get $2 - local.get $10 - i64.mul - local.get $5 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - global.get $~lib/util/number/_exp_pow - local.tee $4 - local.get $6 - local.get $0 - i32.sub - i32.add - i32.const -64 - i32.sub - global.get $~lib/util/number/_frc_plus - local.tee $2 - i64.const 32 - i64.shr_u - local.tee $5 - local.get $3 - i64.const 32 - i64.shr_u - local.tee $7 - i64.mul - local.get $3 - i64.const 4294967295 - i64.and - local.tee $10 - local.get $5 - i64.mul - local.get $2 - i64.const 4294967295 - i64.and - local.tee $2 - local.get $10 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $5 - i64.const 32 - i64.shr_u - i64.add - local.get $2 - local.get $7 - i64.mul - local.get $5 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - i64.const 1 - i64.sub - local.tee $2 - local.get $4 - global.get $~lib/util/number/_exp - i32.add - i32.const -64 - i32.sub - local.get $2 - global.get $~lib/util/number/_frc_minus - local.tee $2 - i64.const 32 - i64.shr_u - local.tee $5 - local.get $3 - i64.const 32 - i64.shr_u - local.tee $7 - i64.mul - local.get $3 - i64.const 4294967295 - i64.and - local.tee $3 - local.get $5 - i64.mul - local.get $2 - i64.const 4294967295 - i64.and - local.tee $2 - local.get $3 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $3 - i64.const 32 - i64.shr_u - i64.add + i32.const 2 + i32.add + return + end + local.get $1 + local.get $1 local.get $2 - local.get $7 - i64.mul - local.get $3 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - i64.const 1 - i64.add - i64.sub - local.get $8 - call $~lib/util/number/genDigits - local.get $8 - i32.sub - global.get $~lib/util/number/_K - call $~lib/util/number/prettify - local.get $8 i32.add + local.tee $3 + i32.le_s + if (result i32) + local.get $3 + i32.const 21 + i32.le_s + else + i32.const 0 + end + if (result i32) + loop $for-loop|0 + local.get $1 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.const 3145774 + i32.store + local.get $3 + i32.const 2 + i32.add + else + local.get $3 + i32.const 21 + i32.le_s + i32.const 0 + local.get $3 + i32.const 0 + i32.gt_s + select + if (result i32) + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.tee $0 + i32.const 2 + i32.add + local.get $0 + i32.const 0 + local.get $2 + i32.sub + i32.const 1 + i32.shl + call $~lib/util/memory/memmove + local.get $0 + i32.const 46 + i32.store16 + local.get $1 + i32.const 1 + i32.add + else + local.get $3 + i32.const 0 + i32.le_s + i32.const 0 + i32.const -6 + local.get $3 + i32.lt_s + select + if (result i32) + local.get $0 + i32.const 2 + local.get $3 + i32.sub + local.tee $3 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $1 + i32.const 1 + i32.shl + call $~lib/util/memory/memmove + local.get $0 + i32.const 3014704 + i32.store + i32.const 2 + local.set $2 + loop $for-loop|1 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|1 + end + end + local.get $1 + local.get $3 + i32.add + else + local.get $1 + i32.const 1 + i32.eq + if (result i32) + local.get $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + i32.const 4 + i32.add + local.get $3 + i32.const 1 + i32.sub + call $~lib/util/number/genExponent + i32.const 2 + i32.add + else + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.const 1 + i32.shl + local.tee $2 + i32.const 2 + i32.sub + call $~lib/util/memory/memmove + local.get $0 + i32.const 46 + i32.store16 offset=2 + local.get $0 + local.get $2 + i32.add + local.tee $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + i32.const 4 + i32.add + local.get $3 + i32.const 1 + i32.sub + call $~lib/util/number/genExponent + local.get $1 + i32.add + i32.const 2 + i32.add + end + end + end + end ) (func $~lib/string/String#get:length (param $0 i32) (result i32) local.get $0 @@ -1639,67 +1497,93 @@ local.get $2 i32.add local.get $3 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $1 ) (func $~lib/number/F32#toString (param $0 f32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 f64) + (local $3 f64) + (local $4 i32) block $__inlined_func$~lib/util/number/dtoa local.get $0 f64.promote_f32 - local.tee $4 + local.tee $3 f64.const 0 f64.eq if i32.const 1280 - local.set $2 + local.set $1 br $__inlined_func$~lib/util/number/dtoa end - local.get $4 - local.get $4 + local.get $3 + local.get $3 f64.sub f64.const 0 f64.ne if - local.get $4 - local.get $4 + local.get $3 + local.get $3 f64.ne if i32.const 1312 - local.set $2 + local.set $1 br $__inlined_func$~lib/util/number/dtoa end i32.const 1344 i32.const 1392 - local.get $4 + local.get $3 f64.const 0 f64.lt select - local.set $2 + local.set $1 br $__inlined_func$~lib/util/number/dtoa end i32.const 56 i32.const 1 call $~lib/rt/stub/__alloc + local.tee $1 + local.set $4 + local.get $3 + f64.const 0 + f64.lt local.tee $2 + if + local.get $4 + i32.const 45 + i32.store16 + local.get $3 + f64.neg + local.set $3 + end local.get $4 - call $~lib/util/number/dtoa_core - local.tee $1 + local.get $2 + i32.const 1 + i32.shl + i32.add + local.get $3 + local.get $4 + local.get $2 + call $~lib/util/number/grisu2 + local.get $2 + i32.sub + global.get $~lib/util/number/_K + call $~lib/util/number/prettify + local.get $2 + i32.add + local.tee $2 i32.const 28 i32.eq br_if $__inlined_func$~lib/util/number/dtoa - local.get $2 local.get $1 - call $~lib/string/String#substring local.get $2 + call $~lib/string/String#substring + local.get $1 i32.const 15 i32.and i32.eqz i32.const 0 - local.get $2 + local.get $1 select i32.eqz if @@ -1710,10 +1594,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.const 16 i32.sub - local.tee $3 + local.tee $4 i32.load offset=4 i32.const 1 i32.ne @@ -1726,18 +1610,18 @@ unreachable end global.get $~lib/rt/stub/offset - local.get $2 - local.get $3 + local.get $1 + local.get $4 i32.load i32.add i32.eq if - local.get $3 + local.get $4 global.set $~lib/rt/stub/offset end - local.set $2 + local.set $1 end - local.get $2 + local.get $1 ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -1906,7 +1790,7 @@ local.tee $1 local.get $0 local.get $2 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core end local.get $1 ) diff --git a/tests/compiler/resolve-elementaccess.untouched.wat b/tests/compiler/resolve-elementaccess.untouched.wat index 34ec5fba67..8033aed085 100644 --- a/tests/compiler/resolve-elementaccess.untouched.wat +++ b/tests/compiler/resolve-elementaccess.untouched.wat @@ -1,17 +1,21 @@ (module - (type $i32_=>_i32 (func (param i32) (result 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 (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) + (type $i64_i32_=>_none (func (param i64 i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 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))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $f32_=>_i32 (func (param f32) (result i32))) (type $f64_=>_i32 (func (param f64) (result i32))) + (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -161,302 +165,297 @@ i32.store offset=12 local.get $2 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + (local $6 i64) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - i32.const 4 - i32.sub - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - local.get $4 - i32.store8 offset=3 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=1 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - i32.const 28 - i32.sub - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=24 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=16 - local.get $6 - local.get $8 - i32.store offset=20 - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=4 - local.get $6 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=12 - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) - (func $~lib/rt/stub/__retain (param $0 i32) (result i32) - local.get $0 - ) - (func $~lib/rt/stub/__release (param $0 i32) - nop - ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (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 $1 - i32.const 1073741808 + i32.const 0 + i32.const 1 + i32.gt_s + drop local.get $2 - i32.shr_u - i32.gt_u + i32.eqz if - i32.const 32 - i32.const 80 - i32.const 18 - i32.const 57 - call $~lib/builtins/abort - unreachable + return end - local.get $1 + local.get $0 local.get $2 - i32.shl - local.tee $1 - i32.const 0 - call $~lib/rt/stub/__alloc + i32.add + i32.const 4 + i32.sub local.set $3 + local.get $0 + local.get $1 + i32.store8 local.get $3 - i32.const 0 local.get $1 - call $~lib/memory/memory.fill - local.get $0 - i32.eqz + i32.store8 offset=3 + local.get $2 + i32.const 2 + i32.le_u if - i32.const 12 - i32.const 2 - call $~lib/rt/stub/__alloc - call $~lib/rt/stub/__retain - local.set $0 + return 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 $1 + i32.store8 offset=1 local.get $0 - local.tee $4 + local.get $1 + i32.store8 offset=2 local.get $3 - local.tee $5 - local.get $4 - i32.load - local.tee $6 - i32.ne + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=1 + local.get $2 + i32.const 6 + i32.le_u if - local.get $5 - call $~lib/rt/stub/__retain - local.set $5 - local.get $6 - call $~lib/rt/stub/__release + return end - local.get $5 - i32.store local.get $0 + local.get $1 + i32.store8 offset=3 local.get $3 - i32.store offset=4 - local.get $0 local.get $1 - i32.store offset=8 - local.get $0 - ) - (func $~lib/typedarray/Float32Array#constructor (param $0 i32) (param $1 i32) (result i32) - local.get $0 - if (result i32) - local.get $0 - else + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $5 + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.set $3 + local.get $0 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=16 + local.get $3 + local.get $5 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=12 + local.get $0 + local.get $5 + i32.store offset=16 + local.get $0 + local.get $5 + i32.store offset=20 + local.get $0 + local.get $5 + i32.store offset=24 + local.get $3 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=12 + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $5 + i64.extend_i32_u + local.get $5 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $6 + loop $while-continue|0 + local.get $2 + i32.const 32 + i32.ge_u + local.set $7 + local.get $7 + if + local.get $0 + local.get $6 + i64.store + local.get $0 + local.get $6 + i64.store offset=8 + local.get $0 + local.get $6 + i64.store offset=16 + local.get $0 + local.get $6 + i64.store offset=24 + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 + end + end + ) + (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memset + ) + (func $~lib/rt/stub/__retain (param $0 i32) (result i32) + local.get $0 + ) + (func $~lib/rt/stub/__release (param $0 i32) + nop + ) + (func $~lib/arraybuffer/ArrayBufferView#constructor (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 $1 + i32.const 1073741808 + local.get $2 + i32.shr_u + i32.gt_u + if + i32.const 32 + i32.const 80 + i32.const 18 + i32.const 57 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.shl + local.tee $1 + i32.const 0 + call $~lib/rt/stub/__alloc + local.set $3 + local.get $3 + i32.const 0 + local.get $1 + call $~lib/memory/memory.fill + local.get $0 + i32.eqz + if + i32.const 12 + i32.const 2 + call $~lib/rt/stub/__alloc + call $~lib/rt/stub/__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 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + i32.load + local.tee $6 + i32.ne + if + local.get $5 + call $~lib/rt/stub/__retain + local.set $5 + local.get $6 + call $~lib/rt/stub/__release + end + local.get $5 + i32.store + local.get $0 + local.get $3 + i32.store offset=4 + local.get $0 + local.get $1 + i32.store offset=8 + local.get $0 + ) + (func $~lib/typedarray/Float32Array#constructor (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + else i32.const 12 i32.const 3 call $~lib/rt/stub/__alloc @@ -515,41 +514,215 @@ i32.add f32.load ) - (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) + (func $~lib/util/number/normalizedBoundaries (param $0 i64) (param $1 i32) + (local $2 i64) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 - i32.const 100000 - i32.lt_u - if - local.get $0 - i32.const 100 - i32.lt_u - if - i32.const 1 - local.get $0 - i32.const 10 - i32.ge_u - i32.add - return - else - i32.const 3 - local.get $0 - i32.const 10000 - i32.ge_u - i32.add - local.get $0 - i32.const 1000 - i32.ge_u - i32.add - return - end - unreachable - else - local.get $0 - i32.const 10000000 - i32.lt_u - if - i32.const 6 - local.get $0 + i64.const 1 + i64.shl + i64.const 1 + i64.add + local.set $2 + local.get $1 + i32.const 1 + i32.sub + local.set $3 + local.get $2 + i64.clz + i32.wrap_i64 + local.set $4 + local.get $2 + local.get $4 + i64.extend_i32_s + i64.shl + local.set $2 + local.get $3 + local.get $4 + i32.sub + local.set $3 + i32.const 1 + local.get $0 + i64.const 4503599627370496 + i64.eq + i32.add + local.set $5 + local.get $2 + global.set $~lib/util/number/_frc_plus + local.get $0 + local.get $5 + i64.extend_i32_s + i64.shl + i64.const 1 + i64.sub + local.get $1 + local.get $5 + i32.sub + local.get $3 + i32.sub + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_minus + local.get $3 + global.set $~lib/util/number/_exp + ) + (func $~lib/util/number/getCachedPower (param $0 i32) + (local $1 f64) + (local $2 i32) + (local $3 i32) + i32.const -61 + local.get $0 + i32.sub + f64.convert_i32_s + f64.const 0.30102999566398114 + f64.mul + f64.const 347 + f64.add + local.set $1 + local.get $1 + i32.trunc_f64_s + local.set $2 + local.get $2 + local.get $2 + f64.convert_i32_s + local.get $1 + f64.ne + i32.add + local.set $2 + local.get $2 + i32.const 3 + i32.shr_s + i32.const 1 + i32.add + local.set $3 + i32.const 348 + local.get $3 + i32.const 3 + i32.shl + i32.sub + global.set $~lib/util/number/_K + i32.const 400 + local.get $3 + i32.const 3 + i32.shl + i32.add + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 1096 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow + ) + (func $~lib/util/number/umul64f (param $0 i64) (param $1 i64) (result i64) + (local $2 i64) + (local $3 i64) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i64) + (local $8 i64) + local.get $0 + i64.const 4294967295 + i64.and + local.set $2 + local.get $1 + i64.const 4294967295 + i64.and + local.set $3 + local.get $0 + i64.const 32 + i64.shr_u + local.set $4 + local.get $1 + i64.const 32 + i64.shr_u + local.set $5 + local.get $2 + local.get $3 + i64.mul + local.set $6 + local.get $4 + local.get $3 + i64.mul + local.get $6 + i64.const 32 + i64.shr_u + i64.add + local.set $7 + local.get $2 + local.get $5 + i64.mul + local.get $7 + i64.const 4294967295 + i64.and + i64.add + local.set $8 + local.get $8 + i64.const 2147483647 + i64.add + local.set $8 + local.get $7 + i64.const 32 + i64.shr_u + local.set $7 + local.get $8 + i64.const 32 + i64.shr_u + local.set $8 + local.get $4 + local.get $5 + i64.mul + local.get $7 + i64.add + local.get $8 + i64.add + ) + (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.add + i32.const 64 + i32.add + ) + (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) + local.get $0 + i32.const 100000 + i32.lt_u + if + local.get $0 + i32.const 100 + i32.lt_u + if + i32.const 1 + local.get $0 + i32.const 10 + i32.ge_u + i32.add + return + else + i32.const 3 + local.get $0 + i32.const 10000 + i32.ge_u + i32.add + local.get $0 + i32.const 1000 + i32.ge_u + i32.add + return + end + unreachable + else + local.get $0 + i32.const 10000000 + i32.lt_u + if + i32.const 6 + local.get $0 i32.const 1000000 i32.ge_u i32.add @@ -570,6 +743,74 @@ end unreachable ) + (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.set $6 + local.get $6 + i32.load16_u + local.set $7 + loop $while-continue|1 + local.get $3 + local.get $5 + i64.lt_u + if (result i32) + local.get $2 + local.get $3 + i64.sub + local.get $4 + i64.ge_u + else + i32.const 0 + end + if (result i32) + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.lt_u + if (result i32) + i32.const 1 + else + local.get $5 + local.get $3 + i64.sub + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.sub + i64.gt_u + end + else + i32.const 0 + end + local.set $8 + local.get $8 + if + local.get $7 + i32.const 1 + i32.sub + local.set $7 + local.get $3 + local.get $4 + i64.add + local.set $3 + br $while-continue|1 + end + end + local.get $6 + local.get $7 + i32.store16 + ) (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) @@ -585,14 +826,6 @@ (local $18 i32) (local $19 i64) (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i32) - (local $25 i32) - (local $26 i32) - (local $27 i32) - (local $28 i64) i32.const 0 local.get $4 i32.sub @@ -832,13 +1065,9 @@ i32.add global.set $~lib/util/number/_K local.get $0 - local.set $24 local.get $15 - local.set $18 local.get $5 - local.set $23 local.get $19 - local.set $22 i32.const 1272 local.get $14 i32.const 2 @@ -848,79 +1077,15 @@ local.get $7 i64.extend_i32_s i64.shl - local.set $21 local.get $10 - local.set $20 - local.get $24 - local.get $18 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.set $25 - local.get $25 - i32.load16_u - local.set $26 - loop $while-continue|3 - local.get $22 - local.get $20 - i64.lt_u - if (result i32) - local.get $23 - local.get $22 - i64.sub - local.get $21 - i64.ge_u - else - i32.const 0 - end - if (result i32) - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.lt_u - if (result i32) - i32.const 1 - else - local.get $20 - local.get $22 - i64.sub - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.sub - i64.gt_u - end - else - i32.const 0 - end - local.set $27 - local.get $27 - if - local.get $26 - i32.const 1 - i32.sub - local.set $26 - local.get $22 - local.get $21 - i64.add - local.set $22 - br $while-continue|3 - end - end - local.get $25 - local.get $26 - i32.store16 + call $~lib/util/number/grisuRound local.get $15 return end br $while-continue|0 end end - loop $while-continue|4 + loop $while-continue|2 i32.const 1 local.set $16 local.get $16 @@ -937,8 +1102,8 @@ local.get $7 i64.extend_i32_s i64.shr_u - local.set $23 - local.get $23 + local.set $20 + local.get $20 local.get $15 i64.extend_i32_s i64.or @@ -947,16 +1112,16 @@ if local.get $0 local.get $15 - local.tee $26 + local.tee $18 i32.const 1 i32.add local.set $15 - local.get $26 + local.get $18 i32.const 1 i32.shl i32.add i32.const 48 - local.get $23 + local.get $20 i32.wrap_i64 i32.const 65535 i32.and @@ -991,88 +1156,125 @@ i64.mul local.set $10 local.get $0 - local.set $18 local.get $15 - local.set $27 local.get $5 - local.set $28 local.get $13 - local.set $22 local.get $8 - local.set $21 local.get $10 - local.set $20 - local.get $18 - local.get $27 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.set $26 - local.get $26 - i32.load16_u - local.set $25 - loop $while-continue|6 - local.get $22 - local.get $20 - i64.lt_u - if (result i32) - local.get $28 - local.get $22 - i64.sub - local.get $21 - i64.ge_u - else - i32.const 0 - end - if (result i32) - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.lt_u - if (result i32) - i32.const 1 - else - local.get $20 - local.get $22 - i64.sub - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.sub - i64.gt_u - end - else - i32.const 0 - end - local.set $24 - local.get $24 - if - local.get $25 - i32.const 1 - i32.sub - local.set $25 - local.get $22 - local.get $21 - i64.add - local.set $22 - br $while-continue|6 - end - end - local.get $26 - local.get $25 - i32.store16 + call $~lib/util/number/grisuRound local.get $15 return end - br $while-continue|4 + br $while-continue|2 end end unreachable ) + (func $~lib/util/number/grisu2 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (local $3 i64) + (local $4 i32) + (local $5 i64) + (local $6 i64) + (local $7 i32) + (local $8 i64) + (local $9 i32) + (local $10 i64) + (local $11 i32) + (local $12 i64) + (local $13 i32) + (local $14 i64) + (local $15 i64) + local.get $0 + i64.reinterpret_f64 + local.set $3 + local.get $3 + i64.const 9218868437227405312 + i64.and + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.set $4 + local.get $3 + i64.const 4503599627370495 + i64.and + local.set $5 + local.get $4 + i32.const 0 + i32.ne + i64.extend_i32_u + i64.const 52 + i64.shl + local.get $5 + i64.add + local.set $6 + local.get $4 + i32.const 1 + local.get $4 + select + i32.const 1023 + i32.const 52 + i32.add + i32.sub + local.set $4 + local.get $6 + local.get $4 + call $~lib/util/number/normalizedBoundaries + global.get $~lib/util/number/_exp + call $~lib/util/number/getCachedPower + local.get $6 + i64.clz + i32.wrap_i64 + local.set $7 + local.get $6 + local.get $7 + i64.extend_i32_s + i64.shl + local.set $6 + local.get $4 + local.get $7 + i32.sub + local.set $4 + global.get $~lib/util/number/_frc_pow + local.set $8 + global.get $~lib/util/number/_exp_pow + local.set $9 + local.get $6 + local.get $8 + call $~lib/util/number/umul64f + local.set $10 + local.get $4 + local.get $9 + call $~lib/util/number/umul64e + local.set $11 + global.get $~lib/util/number/_frc_plus + local.get $8 + call $~lib/util/number/umul64f + i64.const 1 + i64.sub + local.set $12 + global.get $~lib/util/number/_exp + local.get $9 + call $~lib/util/number/umul64e + local.set $13 + global.get $~lib/util/number/_frc_minus + local.get $8 + call $~lib/util/number/umul64f + i64.const 1 + i64.add + local.set $14 + local.get $12 + local.get $14 + i64.sub + local.set $15 + local.get $1 + local.get $10 + local.get $11 + local.get $12 + local.get $13 + local.get $15 + local.get $2 + call $~lib/util/number/genDigits + ) (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -2097,238 +2299,233 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if local.get $0 - local.set $5 local.get $1 - local.set $4 local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if i32.const 0 - i32.const 1 + i32.const 2 i32.lt_s drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 + local.get $3 + if + local.get $2 + i32.eqz if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 + return end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + br $while-continue|0 end - loop $while-continue|1 - local.get $3 + end + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|2 + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.tee $7 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 + i32.sub + local.tee $2 i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 + local.get $1 + local.get $2 i32.add - local.set $4 - local.get $7 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + br $while-continue|3 end end - loop $while-continue|5 + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 - i32.const 1 + local.get $2 + i32.const 8 i32.sub - local.tee $3 + local.set $2 + local.get $0 + local.get $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $2 i32.add - i32.load8_u - i32.store8 - br $while-continue|5 + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) (func $~lib/util/number/utoa32_lut (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -2469,16 +2666,52 @@ i32.store16 end ) + (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 0 + i32.const 1 + i32.ge_s + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa32_lut + ) + (func $~lib/util/number/genExponent (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.set $2 + local.get $2 + if + i32.const 0 + local.get $1 + i32.sub + local.set $1 + end + local.get $1 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.set $3 + local.get $0 + local.get $1 + local.get $3 + call $~lib/util/number/utoa32_core + local.get $0 + i32.const 45 + i32.const 43 + local.get $2 + select + i32.store16 + local.get $3 + ) (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $11 i32) local.get $2 i32.eqz if @@ -2497,726 +2730,260 @@ i32.const 2 i32.add return - end - local.get $1 - local.get $2 - i32.add - local.set $3 - local.get $1 - local.get $3 - i32.le_s - if (result i32) - local.get $3 - i32.const 21 - i32.le_s - else - i32.const 0 - end - if - local.get $1 - local.set $4 - loop $for-loop|0 - local.get $4 - local.get $3 - i32.lt_s - local.set $5 - local.get $5 - if - local.get $0 - local.get $4 - i32.const 1 - i32.shl - i32.add - i32.const 48 - i32.store16 - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 - end - end - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.const 46 - i32.const 48 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $3 - i32.const 2 - i32.add - return - else - local.get $3 - i32.const 0 - i32.gt_s - if (result i32) - local.get $3 - i32.const 21 - i32.le_s - else - i32.const 0 - end - if - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.set $4 - local.get $4 - i32.const 2 - i32.add - local.get $4 - i32.const 0 - local.get $2 - i32.sub - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.const 46 - i32.store16 - local.get $1 - i32.const 1 - i32.add - return - else - i32.const -6 - local.get $3 - i32.lt_s - if (result i32) - local.get $3 - i32.const 0 - i32.le_s - else - i32.const 0 - end - if - i32.const 2 - local.get $3 - i32.sub - local.set $4 - local.get $0 - local.get $4 - i32.const 1 - i32.shl - i32.add - local.get $0 - local.get $1 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - i32.const 48 - i32.const 46 - i32.const 16 - i32.shl - i32.or - i32.store - i32.const 2 - local.set $5 - loop $for-loop|1 - local.get $5 - local.get $4 - i32.lt_s - local.set $6 - local.get $6 - if - local.get $0 - local.get $5 - i32.const 1 - i32.shl - i32.add - i32.const 48 - i32.store16 - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|1 - end - end - local.get $1 - local.get $4 - i32.add - return - else - local.get $1 - i32.const 1 - i32.eq - if - local.get $0 - i32.const 101 - i32.store16 offset=2 - local.get $0 - i32.const 4 - i32.add - local.set $5 - local.get $3 - i32.const 1 - i32.sub - local.set $6 - local.get $6 - i32.const 0 - i32.lt_s - local.set $4 - local.get $4 - if - i32.const 0 - local.get $6 - i32.sub - local.set $6 - end - local.get $6 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.set $7 - local.get $5 - local.set $10 - local.get $6 - local.set $9 - local.get $7 - local.set $8 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $10 - local.get $9 - local.get $8 - call $~lib/util/number/utoa32_lut - local.get $5 - i32.const 45 - i32.const 43 - local.get $4 - select - i32.store16 - local.get $7 - local.set $1 - local.get $1 - i32.const 2 - i32.add - return - else - local.get $1 - i32.const 1 - i32.shl - local.set $7 - local.get $0 - i32.const 4 - i32.add - local.get $0 - i32.const 2 - i32.add - local.get $7 - i32.const 2 - i32.sub - call $~lib/memory/memory.copy - local.get $0 - i32.const 46 - i32.store16 offset=2 - local.get $0 - local.get $7 - i32.add - i32.const 101 - i32.store16 offset=2 - local.get $1 - local.get $0 - local.get $7 - i32.add - i32.const 4 - i32.add - local.set $9 - local.get $3 - i32.const 1 - i32.sub - local.set $8 - local.get $8 - i32.const 0 - i32.lt_s - local.set $4 - local.get $4 - if - i32.const 0 - local.get $8 - i32.sub - local.set $8 - end - local.get $8 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.set $5 - local.get $9 - local.set $11 - local.get $8 - local.set $6 - local.get $5 - local.set $10 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $11 - local.get $6 - local.get $10 - call $~lib/util/number/utoa32_lut - local.get $9 - i32.const 45 - i32.const 43 - local.get $4 - select - i32.store16 - local.get $5 - i32.add - local.set $1 - local.get $1 - i32.const 2 - i32.add - return - end - unreachable - end - unreachable - end - unreachable - end - unreachable - ) - (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i64) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i64) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i64) - (local $25 i64) - (local $26 i32) - (local $27 i64) - (local $28 i32) - local.get $1 - f64.const 0 - f64.lt - local.set $2 - local.get $2 - if - local.get $1 - f64.neg - local.set $1 - local.get $0 - i32.const 45 - i32.store16 - end - local.get $1 - local.set $5 - local.get $0 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - i64.reinterpret_f64 - local.set $6 - local.get $6 - i64.const 9218868437227405312 - i64.and - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.set $7 - local.get $6 - i64.const 4503599627370495 - i64.and - local.set $8 - local.get $7 - i32.const 0 - i32.ne - i64.extend_i32_u - i64.const 52 - i64.shl - local.get $8 - i64.add - local.set $9 - local.get $7 - i32.const 1 - local.get $7 - select - i32.const 1023 - i32.const 52 - i32.add - i32.sub - local.set $7 - local.get $9 - local.set $11 - local.get $7 - local.set $10 - local.get $11 - i64.const 1 - i64.shl - i64.const 1 - i64.add - local.set $12 - local.get $10 - i32.const 1 - i32.sub - local.set $13 - local.get $12 - i64.clz - i32.wrap_i64 - local.set $14 - local.get $12 - local.get $14 - i64.extend_i32_s - i64.shl - local.set $12 - local.get $13 - local.get $14 - i32.sub - local.set $13 - i32.const 1 - local.get $11 - i64.const 4503599627370496 - i64.eq - i32.add - local.set $15 - local.get $12 - global.set $~lib/util/number/_frc_plus - local.get $11 - local.get $15 - i64.extend_i32_s - i64.shl - i64.const 1 - i64.sub - local.get $10 - local.get $15 - i32.sub - local.get $13 - i32.sub - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_minus - local.get $13 - global.set $~lib/util/number/_exp - global.get $~lib/util/number/_exp - local.set $10 - i32.const -61 - local.get $10 - i32.sub - f64.convert_i32_s - f64.const 0.30102999566398114 - f64.mul - f64.const 347 - f64.add - local.set $16 - local.get $16 - i32.trunc_f64_s - local.set $15 - local.get $15 - local.get $15 - f64.convert_i32_s - local.get $16 - f64.ne - i32.add - local.set $15 - local.get $15 - i32.const 3 - i32.shr_s - i32.const 1 - i32.add - local.set $14 - i32.const 348 - local.get $14 - i32.const 3 - i32.shl - i32.sub - global.set $~lib/util/number/_K - i32.const 400 - local.get $14 - i32.const 3 - i32.shl - i32.add - i64.load - global.set $~lib/util/number/_frc_pow - i32.const 1096 - local.get $14 - i32.const 1 - i32.shl - i32.add - i32.load16_s - global.set $~lib/util/number/_exp_pow - local.get $9 - i64.clz - i32.wrap_i64 - local.set $14 - local.get $9 - local.get $14 - i64.extend_i32_s - i64.shl - local.set $9 - local.get $7 - local.get $14 - i32.sub - local.set $7 - global.get $~lib/util/number/_frc_pow - local.set $12 - global.get $~lib/util/number/_exp_pow - local.set $15 - local.get $9 - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $18 - local.get $11 - i64.const 4294967295 - i64.and - local.set $19 - local.get $17 - i64.const 32 - i64.shr_u - local.set $20 - local.get $11 - i64.const 32 - i64.shr_u - local.set $21 - local.get $18 - local.get $19 - i64.mul - local.set $22 - local.get $20 - local.get $19 - i64.mul - local.get $22 - i64.const 32 - i64.shr_u - i64.add - local.set $23 - local.get $18 - local.get $21 - i64.mul - local.get $23 - i64.const 4294967295 - i64.and - i64.add - local.set $24 - local.get $24 - i64.const 2147483647 - i64.add - local.set $24 - local.get $23 - i64.const 32 - i64.shr_u - local.set $23 - local.get $24 - i64.const 32 - i64.shr_u - local.set $24 - local.get $20 - local.get $21 - i64.mul - local.get $23 - i64.add - local.get $24 - i64.add - local.set $24 - local.get $7 - local.set $10 - local.get $15 - local.set $13 - local.get $10 - local.get $13 - i32.add - i32.const 64 - i32.add - local.set $10 - global.get $~lib/util/number/_frc_plus - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $23 - local.get $11 - i64.const 4294967295 - i64.and - local.set $22 - local.get $17 - i64.const 32 - i64.shr_u - local.set $21 - local.get $11 - i64.const 32 - i64.shr_u - local.set $20 - local.get $23 - local.get $22 - i64.mul - local.set $19 - local.get $21 - local.get $22 - i64.mul - local.get $19 - i64.const 32 - i64.shr_u - i64.add - local.set $18 - local.get $23 - local.get $20 - i64.mul - local.get $18 - i64.const 4294967295 - i64.and - i64.add - local.set $25 - local.get $25 - i64.const 2147483647 - i64.add - local.set $25 - local.get $18 - i64.const 32 - i64.shr_u - local.set $18 - local.get $25 - i64.const 32 - i64.shr_u - local.set $25 - local.get $21 - local.get $20 - i64.mul - local.get $18 - i64.add - local.get $25 - i64.add - i64.const 1 - i64.sub - local.set $25 - global.get $~lib/util/number/_exp - local.set $26 - local.get $15 - local.set $13 - local.get $26 - local.get $13 - i32.add - i32.const 64 - i32.add - local.set $26 - global.get $~lib/util/number/_frc_minus - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $18 - local.get $11 - i64.const 4294967295 - i64.and - local.set $19 - local.get $17 - i64.const 32 - i64.shr_u - local.set $20 - local.get $11 - i64.const 32 - i64.shr_u - local.set $21 - local.get $18 - local.get $19 - i64.mul - local.set $22 - local.get $20 - local.get $19 - i64.mul - local.get $22 - i64.const 32 - i64.shr_u - i64.add - local.set $23 - local.get $18 - local.get $21 - i64.mul - local.get $23 - i64.const 4294967295 - i64.and - i64.add - local.set $27 - local.get $27 - i64.const 2147483647 - i64.add - local.set $27 - local.get $23 - i64.const 32 - i64.shr_u - local.set $23 - local.get $27 - i64.const 32 - i64.shr_u - local.set $27 - local.get $20 - local.get $21 - i64.mul - local.get $23 - i64.add - local.get $27 - i64.add - i64.const 1 - i64.add - local.set $27 - local.get $25 - local.get $27 - i64.sub - local.set $23 - local.get $4 - local.get $24 - local.get $10 - local.get $25 - local.get $26 - local.get $23 + end + local.get $1 + local.get $2 + i32.add + local.set $3 + local.get $1 local.get $3 - call $~lib/util/number/genDigits - local.set $28 + i32.le_s + if (result i32) + local.get $3 + i32.const 21 + i32.le_s + else + i32.const 0 + end + if + local.get $1 + local.set $4 + loop $for-loop|0 + local.get $4 + local.get $3 + i32.lt_s + local.set $5 + local.get $5 + if + local.get $0 + local.get $4 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 + end + end + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.const 46 + i32.const 48 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $3 + i32.const 2 + i32.add + return + else + local.get $3 + i32.const 0 + i32.gt_s + if (result i32) + local.get $3 + i32.const 21 + i32.le_s + else + i32.const 0 + end + if + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.set $4 + local.get $4 + i32.const 2 + i32.add + local.get $4 + i32.const 0 + local.get $2 + i32.sub + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.const 46 + i32.store16 + local.get $1 + i32.const 1 + i32.add + return + else + i32.const -6 + local.get $3 + i32.lt_s + if (result i32) + local.get $3 + i32.const 0 + i32.le_s + else + i32.const 0 + end + if + i32.const 2 + local.get $3 + i32.sub + local.set $4 + local.get $0 + local.get $4 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $1 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $0 + i32.const 48 + i32.const 46 + i32.const 16 + i32.shl + i32.or + i32.store + i32.const 2 + local.set $5 + loop $for-loop|1 + local.get $5 + local.get $4 + i32.lt_s + local.set $6 + local.get $6 + if + local.get $0 + local.get $5 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|1 + end + end + local.get $1 + local.get $4 + i32.add + return + else + local.get $1 + i32.const 1 + i32.eq + if + local.get $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + i32.const 4 + i32.add + local.get $3 + i32.const 1 + i32.sub + call $~lib/util/number/genExponent + local.set $1 + local.get $1 + i32.const 2 + i32.add + return + else + local.get $1 + i32.const 1 + i32.shl + local.set $4 + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $4 + i32.const 2 + i32.sub + call $~lib/memory/memory.copy + local.get $0 + i32.const 46 + i32.store16 offset=2 + local.get $0 + local.get $4 + i32.add + i32.const 101 + i32.store16 offset=2 + local.get $1 + local.get $0 + local.get $4 + i32.add + i32.const 4 + i32.add + local.get $3 + i32.const 1 + i32.sub + call $~lib/util/number/genExponent + i32.add + local.set $1 + local.get $1 + i32.const 2 + i32.add + return + end + unreachable + end + unreachable + end + unreachable + end + unreachable + ) + (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + f64.const 0 + f64.lt + local.set $2 + local.get $2 + if + local.get $1 + f64.neg + local.set $1 + local.get $0 + i32.const 45 + i32.store16 + end + local.get $1 + local.get $0 + local.get $2 + call $~lib/util/number/grisu2 + local.set $3 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $28 + local.get $3 local.get $2 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.set $28 - local.get $28 + local.set $3 + local.get $3 local.get $2 i32.add ) @@ -3726,9 +3493,6 @@ (func $~lib/util/number/utoa32 (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 i32.eqz if @@ -3745,19 +3509,9 @@ call $~lib/rt/stub/__alloc local.set $2 local.get $2 - local.set $5 local.get $0 - local.set $4 local.get $1 - local.set $3 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core local.get $2 call $~lib/rt/stub/__retain ) diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index d13b7b438a..8eeca3502c 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -108,93 +108,96 @@ (local $5 i32) i32.const 1168 global.set $~lib/rt/stub/offset - block $__inlined_func$~lib/string/String.__eq (result i32) - i32.const 42 - local.set $2 - i32.const 2 - local.set $5 - i32.const 1184 - local.tee $1 - i32.const 16 + i32.const 42 + local.set $1 + i32.const 2 + local.set $5 + i32.const 1184 + local.tee $2 + i32.const 16 + i32.add + local.tee $0 + memory.size + local.tee $3 + i32.const 16 + i32.shl + local.tee $4 + i32.gt_u + if + local.get $3 + local.get $0 + local.get $4 + i32.sub + i32.const 65535 i32.add - local.tee $0 - memory.size - local.tee $3 + i32.const -65536 + i32.and i32.const 16 - i32.shl + i32.shr_u local.tee $4 - i32.gt_u + local.get $3 + local.get $4 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s if - local.get $3 - local.get $0 - local.get $4 - i32.sub - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $4 - local.get $3 local.get $4 - i32.gt_s - select memory.grow i32.const 0 i32.lt_s if - local.get $4 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end + unreachable end end - local.get $0 - global.set $~lib/rt/stub/offset + end + local.get $0 + global.set $~lib/rt/stub/offset + local.get $2 + i32.const 16 + i32.sub + local.tee $0 + i32.const 16 + i32.store + local.get $0 + i32.const 1 + i32.store offset=4 + local.get $0 + i32.const 1 + i32.store offset=8 + local.get $0 + i32.const 4 + i32.store offset=12 + local.get $2 + local.set $0 + loop $do-continue|0 local.get $1 - i32.const 16 - i32.sub - local.tee $0 - i32.const 16 - i32.store + 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 $5 i32.const 1 - i32.store offset=4 - local.get $0 + i32.sub + local.tee $5 i32.const 1 - i32.store offset=8 - local.get $0 - i32.const 4 - i32.store offset=12 + i32.shl + i32.add + local.get $3 + i32.const 48 + i32.add + i32.store16 local.get $1 - local.set $3 - loop $do-continue|0 - local.get $2 - i32.const 10 - i32.div_u - local.get $3 - local.get $5 - i32.const 1 - i32.sub - local.tee $5 - i32.const 1 - i32.shl - i32.add - local.get $2 - i32.const 10 - i32.rem_u - i32.const 48 - i32.add - i32.store16 - local.tee $2 - br_if $do-continue|0 - end + br_if $do-continue|0 + end + block $__inlined_func$~lib/string/String.__eq (result i32) i32.const 1 - local.get $1 + local.get $2 i32.const 1152 i32.eq br_if $__inlined_func$~lib/string/String.__eq @@ -202,18 +205,18 @@ block $folding-inner0 i32.const 0 i32.const 1 - local.get $1 + local.get $2 select br_if $folding-inner0 - local.get $1 + local.get $2 call $~lib/string/String#get:length - local.tee $2 + local.tee $1 i32.const 1152 call $~lib/string/String#get:length i32.ne br_if $folding-inner0 - local.get $1 local.get $2 + local.get $1 call $~lib/util/string/compareImpl i32.eqz br $__inlined_func$~lib/string/String.__eq diff --git a/tests/compiler/resolve-function-expression.untouched.wat b/tests/compiler/resolve-function-expression.untouched.wat index 3e35a909ed..888813d750 100644 --- a/tests/compiler/resolve-function-expression.untouched.wat +++ b/tests/compiler/resolve-function-expression.untouched.wat @@ -2,8 +2,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) - (type $i32_i32_=>_i32 (func (param i32 i32) (result 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_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -345,6 +345,16 @@ i32.store16 end ) + (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 0 + i32.const 1 + i32.ge_s + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa32_lut + ) (func $~lib/rt/stub/__retain (param $0 i32) (result i32) local.get $0 ) @@ -352,9 +362,6 @@ (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 i32.eqz if @@ -384,19 +391,9 @@ call $~lib/rt/stub/__alloc local.set $3 local.get $3 - local.set $6 local.get $0 - local.set $5 local.get $2 - local.set $4 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $6 - local.get $5 - local.get $4 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core local.get $1 if local.get $3 diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index 586d530108..44ee1415b3 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -111,25 +111,19 @@ (local $3 i32) (local $4 i32) (local $5 i32) - block $__inlined_func$~lib/util/number/itoa32 - local.get $0 - i32.eqz - if - i32.const 1040 - local.set $2 - br $__inlined_func$~lib/util/number/itoa32 - end + local.get $0 + if local.get $0 i32.const 31 i32.shr_u - local.tee $3 + local.tee $2 if i32.const 0 local.get $0 i32.sub local.set $0 end - local.get $3 + local.get $2 local.get $0 i32.const 10 i32.ge_u @@ -171,42 +165,48 @@ i32.lt_u select i32.add - local.tee $4 + local.tee $3 i32.const 1 i32.shl i32.const 1 call $~lib/rt/stub/__alloc - local.tee $2 - local.set $5 + local.tee $1 + 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.get $5 + local.set $0 local.get $4 + local.get $3 i32.const 1 i32.sub - local.tee $4 + local.tee $3 i32.const 1 i32.shl i32.add - local.get $0 - i32.const 10 - i32.rem_u + local.get $5 i32.const 48 i32.add i32.store16 - local.tee $0 + local.get $0 br_if $do-continue|0 end - local.get $3 + local.get $2 if - local.get $2 + local.get $1 i32.const 45 i32.store16 end + else + i32.const 1040 + local.set $1 end - local.get $2 + local.get $1 ) (func $~lib/string/String#get:length (param $0 i32) (result i32) local.get $0 diff --git a/tests/compiler/resolve-propertyaccess.untouched.wat b/tests/compiler/resolve-propertyaccess.untouched.wat index 3dcedd8795..0a9e73c794 100644 --- a/tests/compiler/resolve-propertyaccess.untouched.wat +++ b/tests/compiler/resolve-propertyaccess.untouched.wat @@ -2,8 +2,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (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 (func (param i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -341,6 +341,16 @@ i32.store16 end ) + (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 0 + i32.const 1 + i32.ge_s + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa32_lut + ) (func $~lib/rt/stub/__retain (param $0 i32) (result i32) local.get $0 ) @@ -348,9 +358,6 @@ (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 i32.eqz if @@ -380,19 +387,9 @@ call $~lib/rt/stub/__alloc local.set $3 local.get $3 - local.set $6 local.get $0 - local.set $5 local.get $2 - local.set $4 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $6 - local.get $5 - local.get $4 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core local.get $1 if local.get $3 diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 45b4ecfee3..1d4aec020b 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -1,14 +1,16 @@ (module + (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 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) (type $none_=>_i32 (func (result i32))) (type $i32_i64_i32_i64_i32_i64_=>_i32 (func (param i32 i64 i32 i64 i32 i64) (result i32))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1024) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") @@ -29,6 +31,9 @@ (data (i32.const 2416) "\03\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 ") (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) + (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) + (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) + (global $~lib/util/number/_exp (mut i32) (i32.const 0)) (global $~lib/util/number/_K (mut i32) (i32.const 0)) (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) @@ -41,6 +46,58 @@ (export "__collect" (func $~lib/rt/pure/__collect)) (export "__rtti_base" (global $~lib/rt/__rtti_base)) (start $~start) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -55,7 +112,7 @@ if i32.const 0 i32.const 1040 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -77,7 +134,7 @@ if i32.const 0 i32.const 1040 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -96,23 +153,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -120,72 +177,56 @@ if i32.const 0 i32.const 1040 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -193,7 +234,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -216,7 +257,7 @@ if i32.const 0 i32.const 1040 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -230,22 +271,16 @@ if i32.const 0 i32.const 1040 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -254,7 +289,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -263,7 +298,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -274,16 +309,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -303,7 +332,7 @@ if i32.const 0 i32.const 1040 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -336,8 +365,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -358,7 +387,7 @@ if i32.const 0 i32.const 1040 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -368,17 +397,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1040 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -407,13 +436,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -421,21 +450,15 @@ if i32.const 0 i32.const 1040 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -450,37 +473,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -504,7 +518,7 @@ if i32.const 0 i32.const 1040 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -521,7 +535,7 @@ if i32.const 0 i32.const 1040 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -549,7 +563,7 @@ if i32.const 0 i32.const 1040 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -601,7 +615,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -622,7 +636,8 @@ unreachable end i32.const 2448 - local.tee $0 + local.set $2 + i32.const 2448 i32.const 0 i32.store i32.const 4016 @@ -633,35 +648,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 2448 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 2448 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -681,7 +687,7 @@ i32.const 2448 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -739,17 +745,14 @@ if i32.const 0 i32.const 1040 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const -1 local.get $1 i32.shl @@ -757,16 +760,10 @@ local.tee $1 if (result i32) local.get $0 + local.get $2 local.get $1 i32.ctz - local.get $2 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -782,151 +779,68 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1040 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end end ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - local.get $1 - i32.load - local.set $3 - local.get $2 - i32.const 15 - i32.and + (local $5 i32) + global.get $~lib/rt/tlsf/collectLock if i32.const 0 i32.const 1040 - i32.const 365 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable end + local.get $1 + local.tee $3 + i32.const 1073741808 + i32.ge_u + if + i32.const 1088 + i32.const 1040 + i32.const 453 + i32.const 30 + call $~lib/builtins/abort + unreachable + end + local.get $0 local.get $3 - i32.const -4 + i32.const 15 + i32.add + i32.const -16 i32.and - local.get $2 - i32.sub + local.tee $1 + i32.const 16 + local.get $1 + i32.const 16 + i32.gt_u + select local.tee $4 - i32.const 32 - 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 16 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 16 - 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 16 - 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) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - global.get $~lib/rt/tlsf/collectLock - if - i32.const 0 - i32.const 1040 - i32.const 501 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1073741808 - i32.ge_u - if - i32.const 1088 - i32.const 1040 - i32.const 461 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $3 - i32.const 16 - local.get $3 - i32.const 16 - i32.gt_u - select - local.tee $4 - call $~lib/rt/tlsf/searchBlock - local.tee $3 - i32.eqz + call $~lib/rt/tlsf/searchBlock + local.tee $1 + i32.eqz if i32.const 1 global.set $~lib/rt/tlsf/collectLock @@ -935,18 +849,19 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if - i32.const 16 memory.size - local.tee $3 + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -971,10 +886,8 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 - local.get $5 - local.get $3 + local.tee $5 + local.get $1 local.get $5 i32.gt_s select @@ -991,7 +904,7 @@ end end local.get $0 - local.get $3 + local.get $1 i32.const 16 i32.shl memory.size @@ -1001,19 +914,19 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if i32.const 0 i32.const 1040 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable end end end - local.get $3 + local.get $1 i32.load i32.const -4 i32.and @@ -1022,28 +935,84 @@ if i32.const 0 i32.const 1040 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 0 i32.store offset=4 - local.get $3 + local.get $1 local.get $2 i32.store offset=8 - local.get $3 local.get $1 + local.get $3 i32.store offset=12 local.get $0 - local.get $3 + local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 + local.get $1 + i32.load + local.set $2 local.get $4 - call $~lib/rt/tlsf/prepareBlock - local.get $3 + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1040 + i32.const 357 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const -4 + i32.and + local.get $4 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $4 + local.get $2 + i32.const 2 + i32.and + i32.or + i32.store + local.get $4 + local.get $1 + i32.const 16 + i32.add + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + call $~lib/rt/tlsf/GETRIGHT + local.get $1 + call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $1 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -1155,7 +1124,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -1298,331 +1267,394 @@ end i32.const 0 ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) - (local $6 i32) - (local $7 i64) - (local $8 i32) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 i64) - local.get $3 + (func $~lib/util/number/umul64f (param $0 i64) (param $1 i64) (result i64) + (local $2 i64) + (local $3 i64) local.get $1 - i64.sub - local.set $9 - local.get $3 - i64.const 1 - i32.const 0 - local.get $4 - i32.sub - local.tee $10 - i64.extend_i32_s - i64.shl - local.tee $11 - i64.const 1 - i64.sub - local.tee $12 + i64.const 4294967295 i64.and - local.set $7 + local.tee $2 + local.get $0 + i64.const 32 + i64.shr_u + local.tee $3 + i64.mul + local.get $2 + local.get $0 + i64.const 4294967295 + i64.and + local.tee $2 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.set $0 local.get $3 - local.get $10 - i64.extend_i32_s + local.get $1 + i64.const 32 i64.shr_u - i32.wrap_i64 - local.tee $6 - call $~lib/util/number/decimalCount32 - local.set $4 - loop $while-continue|0 - local.get $4 - i32.const 0 - i32.gt_s - if - block $break|1 - block $case10|1 - block $case9|1 - block $case8|1 - block $case7|1 - block $case6|1 - block $case5|1 - block $case4|1 - block $case3|1 - block $case2|1 - block $case1|1 - local.get $4 - i32.const 10 - i32.ne - if - local.get $4 - i32.const 1 - i32.sub - br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 - end - local.get $6 - i32.const 1000000000 - i32.div_u - local.set $2 - local.get $6 - i32.const 1000000000 - i32.rem_u - local.set $6 - br $break|1 - end - local.get $6 - i32.const 100000000 - i32.div_u - local.set $2 - local.get $6 - i32.const 100000000 - i32.rem_u - local.set $6 - br $break|1 - end - local.get $6 - i32.const 10000000 - i32.div_u - local.set $2 - local.get $6 + local.tee $1 + i64.mul + local.get $0 + i64.const 32 + i64.shr_u + i64.add + local.get $1 + local.get $2 + i64.mul + local.get $0 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + i64.add + ) + (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.add + i32.const -64 + i32.sub + ) + (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) + local.get $0 + local.get $1 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.tee $0 + i32.load16_u + local.set $1 + loop $while-continue|1 + i32.const 1 + local.get $5 + local.get $3 + i64.sub + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.sub + i64.gt_u + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.lt_u + select + i32.const 0 + local.get $2 + local.get $3 + i64.sub + local.get $4 + i64.ge_u + i32.const 0 + local.get $3 + local.get $5 + i64.lt_u + select + select + if + local.get $1 + i32.const 1 + i32.sub + local.set $1 + local.get $3 + local.get $4 + i64.add + local.set $3 + br $while-continue|1 + end + end + local.get $0 + local.get $1 + i32.store16 + ) + (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i64) + (local $10 i64) + (local $11 i64) + (local $12 i64) + local.get $3 + local.get $1 + i64.sub + local.set $9 + local.get $3 + i64.const 1 + i32.const 0 + local.get $4 + i32.sub + local.tee $8 + i64.extend_i32_s + i64.shl + local.tee $10 + i64.const 1 + i64.sub + local.tee $11 + i64.and + local.set $1 + local.get $3 + local.get $8 + i64.extend_i32_s + i64.shr_u + i32.wrap_i64 + local.tee $2 + call $~lib/util/number/decimalCount32 + local.set $7 + loop $while-continue|0 + local.get $7 + i32.const 0 + i32.gt_s + if + block $break|1 + block $case10|1 + block $case9|1 + block $case8|1 + block $case7|1 + block $case6|1 + block $case5|1 + block $case4|1 + block $case3|1 + block $case2|1 + block $case1|1 + local.get $7 + i32.const 10 + i32.ne + if + local.get $7 + i32.const 1 + i32.sub + br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 + end + local.get $2 + i32.const 1000000000 + i32.div_u + local.set $4 + local.get $2 + i32.const 1000000000 + i32.rem_u + local.set $2 + br $break|1 + end + local.get $2 + i32.const 100000000 + i32.div_u + local.set $4 + local.get $2 + i32.const 100000000 + i32.rem_u + local.set $2 + br $break|1 + end + local.get $2 + i32.const 10000000 + i32.div_u + local.set $4 + local.get $2 i32.const 10000000 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 + local.get $2 i32.const 1000000 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 1000000 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 + local.get $2 i32.const 100000 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 100000 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 + local.get $2 i32.const 10000 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 10000 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 + local.get $2 i32.const 1000 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 1000 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 + local.get $2 i32.const 100 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 100 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 + local.get $2 i32.const 10 i32.div_u - local.set $2 - local.get $6 + local.set $4 + local.get $2 i32.const 10 i32.rem_u - local.set $6 + local.set $2 br $break|1 end - local.get $6 - local.set $2 + local.get $2 + local.set $4 i32.const 0 - local.set $6 + local.set $2 br $break|1 end i32.const 0 - local.set $2 + local.set $4 end - local.get $2 - local.get $8 + local.get $4 + local.get $6 i32.or if local.get $0 - local.get $8 + local.get $6 i32.const 1 i32.shl i32.add - local.get $2 + local.get $4 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 - local.get $8 + local.get $6 i32.const 1 i32.add - local.set $8 + local.set $6 end - local.get $4 + local.get $7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.get $6 + local.set $7 + local.get $1 + local.get $2 i64.extend_i32_u - local.get $10 + local.get $8 i64.extend_i32_s i64.shl i64.add - local.tee $1 + local.tee $3 local.get $5 i64.le_u if - local.get $4 + local.get $7 global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $4 + local.get $0 + local.get $6 + local.get $5 + local.get $3 + local.get $7 i32.const 2 i32.shl i32.const 2328 i32.add i64.load32_u - local.get $10 + local.get $8 i64.extend_i32_s i64.shl - local.set $3 - local.get $0 - local.get $8 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.tee $0 - i32.load16_u - local.set $4 - loop $while-continue|3 - i32.const 1 - local.get $9 - local.get $1 - i64.sub - local.get $1 - local.get $3 - i64.add - local.tee $7 - local.get $9 - i64.sub - i64.gt_u - local.get $7 - local.get $9 - i64.lt_u - select - i32.const 0 - local.get $5 - local.get $1 - i64.sub - local.get $3 - i64.ge_u - i32.const 0 - local.get $1 - local.get $9 - i64.lt_u - select - select - if - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.get $3 - i64.add - local.set $1 - br $while-continue|3 - end - end - local.get $0 - local.get $4 - i32.store16 - local.get $8 + local.get $9 + call $~lib/util/number/grisuRound + local.get $6 return end br $while-continue|0 end end - local.get $10 + local.get $8 i64.extend_i32_s - local.set $1 - loop $while-continue|4 + local.set $12 + loop $while-continue|2 local.get $5 i64.const 10 i64.mul local.set $5 - local.get $7 + local.get $1 i64.const 10 i64.mul local.tee $3 - local.get $1 + local.get $12 i64.shr_u - local.tee $7 - local.get $8 + local.tee $1 + local.get $6 i64.extend_i32_s i64.or i64.const 0 i64.ne if local.get $0 - local.get $8 + local.get $6 i32.const 1 i32.shl i32.add - local.get $7 + local.get $1 i32.wrap_i64 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 - local.get $8 + local.get $6 i32.const 1 i32.add - local.set $8 + local.set $6 end - local.get $4 + local.get $7 i32.const 1 i32.sub - local.set $4 + local.set $7 local.get $3 - local.get $12 + local.get $11 i64.and - local.tee $7 + local.tee $1 local.get $5 i64.ge_u - br_if $while-continue|4 + br_if $while-continue|2 end - local.get $4 + local.get $7 global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $7 - local.set $1 + local.get $0 + local.get $6 + local.get $5 + local.get $1 + local.get $10 local.get $9 i32.const 0 - local.get $4 + local.get $7 i32.sub i32.const 2 i32.shl @@ -1630,234 +1662,211 @@ i32.add i64.load32_u i64.mul - local.set $3 - local.get $0 - local.get $8 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.tee $0 - i32.load16_u - local.set $4 - loop $while-continue|6 - i32.const 1 - local.get $3 - local.get $1 - i64.sub - local.get $1 - local.get $11 - i64.add - local.tee $7 - local.get $3 - i64.sub - i64.gt_u - local.get $7 - local.get $3 - i64.lt_u - select - i32.const 0 - local.get $5 - local.get $1 - i64.sub - local.get $11 - i64.ge_u - i32.const 0 - local.get $1 - local.get $3 - i64.lt_u - select - select - if - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.get $11 - i64.add - local.set $1 - br $while-continue|6 - end - end - local.get $0 - local.get $4 - i32.store16 - local.get $8 + call $~lib/util/number/grisuRound + local.get $6 ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $0 + local.get $1 + i32.lt_u + if local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 + i32.const 7 + i32.and local.get $0 - local.get $1 - i32.lt_u + i32.const 7 + i32.and + i32.eq if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + return end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $2 + i32.const 1 + i32.sub + local.set $2 local.get $0 - local.tee $2 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $1 - local.get $2 local.get $3 + local.get $4 i32.load8_u i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 + br $while-continue|0 end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 - local.get $4 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u + i32.add + local.set $1 + br $while-continue|1 + end + end + end + loop $while-continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + local.get $2 + i32.eqz if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 + return end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|3 end end - loop $while-continue|5 - local.get $4 + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u if - local.get $4 - i32.const 1 - i32.sub - local.tee $4 local.get $0 + local.get $2 + i32.const 8 + i32.sub + local.tee $2 i32.add local.get $1 - local.get $4 + local.get $2 i32.add - i32.load8_u - i32.store8 - br $while-continue|5 + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end + end + ) + (func $~lib/util/number/genExponent (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.const 0 + i32.lt_s + local.tee $2 + if + i32.const 0 + local.get $1 + i32.sub + local.set $1 end + local.get $1 + local.get $1 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.tee $1 + call $~lib/util/number/utoa32_core + local.get $0 + i32.const 45 + i32.const 43 + local.get $2 + select + i32.store16 + local.get $1 ) (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -1943,7 +1952,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $0 i32.const 46 i32.store16 @@ -1972,7 +1981,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $0 i32.const 3014704 i32.store @@ -2009,36 +2018,12 @@ i32.const 101 i32.store16 offset=2 local.get $0 - local.tee $1 i32.const 4 i32.add local.get $3 i32.const 1 i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $2 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $1 - i32.const 45 - i32.const 43 - local.get $2 - select - i32.store16 offset=4 - local.get $0 + call $~lib/util/number/genExponent i32.const 2 i32.add else @@ -2054,7 +2039,7 @@ local.tee $2 i32.const 2 i32.sub - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $0 i32.const 46 i32.store16 offset=2 @@ -2065,36 +2050,12 @@ i32.const 101 i32.store16 offset=2 local.get $0 - local.tee $2 i32.const 4 i32.add local.get $3 i32.const 1 i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $3 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $2 - i32.const 45 - i32.const 43 - local.get $3 - select - i32.store16 offset=4 - local.get $0 + call $~lib/util/number/genExponent local.get $1 i32.add i32.const 2 @@ -2104,124 +2065,6 @@ end end ) - (func $~lib/util/number/dtoa_core (param $0 i32) (result i32) - (local $1 i64) - (local $2 i64) - (local $3 i64) - (local $4 f64) - i32.const -4 - global.set $~lib/util/number/_K - i32.const 1808 - i64.load - global.set $~lib/util/number/_frc_pow - i32.const 2240 - i32.load16_s - global.set $~lib/util/number/_exp_pow - local.get $0 - local.get $0 - global.get $~lib/util/number/_frc_pow - local.tee $2 - i64.const 32 - i64.shr_u - local.tee $3 - i64.const 2147483648 - i64.mul - local.get $2 - i64.const 4294967295 - i64.and - local.tee $2 - i64.const 2147483648 - i64.mul - i64.const 0 - i64.add - local.tee $1 - i64.const 32 - i64.shr_u - i64.add - local.get $1 - i64.const 4294967295 - i64.and - i64.const 0 - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - global.get $~lib/util/number/_exp_pow - local.tee $0 - i32.const 1 - i32.add - local.get $3 - i64.const 2147483648 - i64.mul - local.get $2 - i64.const 2147483648 - i64.mul - local.get $2 - i64.const 1024 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $1 - i64.const 32 - i64.shr_u - i64.add - local.get $3 - i64.const 1024 - i64.mul - local.get $1 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - i64.const 1 - i64.sub - local.tee $1 - local.get $0 - i32.const 1 - i32.add - local.get $1 - local.get $3 - i64.const 2147483647 - i64.mul - local.get $2 - i64.const 2147483647 - i64.mul - local.get $2 - i64.const 4294966784 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $1 - i64.const 32 - i64.shr_u - i64.add - local.get $3 - i64.const 4294966784 - i64.mul - local.get $1 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - i64.const 1 - i64.add - i64.sub - call $~lib/util/number/genDigits - global.get $~lib/util/number/_K - call $~lib/util/number/prettify - ) (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2292,7 +2135,7 @@ local.get $1 i32.add local.get $3 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 call $~lib/rt/pure/__retain ) @@ -2314,22 +2157,24 @@ (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) + (local $5 i64) + (local $6 i32) i32.const 1 call $~lib/util/number/decimalCount32 - local.tee $0 + local.tee $1 i32.const 1 i32.shl i32.const 1 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $0 i32.const 1 - local.get $0 - call $~lib/util/number/utoa_simple local.get $1 + call $~lib/util/number/utoa32_core + local.get $0 call $~lib/rt/pure/__retain - local.tee $3 + local.tee $4 i32.const 1232 call $~lib/string/String.__eq i32.eqz @@ -2341,36 +2186,81 @@ call $~lib/builtins/abort unreachable end + i32.const 56 + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.set $1 + i64.const -9223372036854774784 + global.set $~lib/util/number/_frc_plus + i64.const 9223372036854775296 + global.set $~lib/util/number/_frc_minus + i32.const -63 + global.set $~lib/util/number/_exp + i32.const -4 + global.set $~lib/util/number/_K + i32.const 1808 + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 2240 + i32.load16_s + global.set $~lib/util/number/_exp_pow + global.get $~lib/util/number/_exp_pow + local.set $0 + local.get $1 + local.get $1 + i64.const -9223372036854775808 + global.get $~lib/util/number/_frc_pow + local.tee $3 + call $~lib/util/number/umul64f + i32.const -63 + local.get $0 + call $~lib/util/number/umul64e + global.get $~lib/util/number/_frc_plus + local.get $3 + call $~lib/util/number/umul64f + i64.const 1 + i64.sub + local.tee $5 + global.get $~lib/util/number/_exp + local.get $0 + call $~lib/util/number/umul64e + local.get $5 + global.get $~lib/util/number/_frc_minus + local.get $3 + call $~lib/util/number/umul64f + i64.const 1 + i64.add + i64.sub + call $~lib/util/number/genDigits + global.get $~lib/util/number/_K + call $~lib/util/number/prettify + local.tee $0 + local.set $2 block $__inlined_func$~lib/util/number/dtoa - i32.const 56 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $0 - call $~lib/util/number/dtoa_core - local.tee $1 + local.get $0 i32.const 28 i32.eq if - local.get $0 + local.get $1 call $~lib/rt/pure/__retain - local.set $1 + local.set $0 br $__inlined_func$~lib/util/number/dtoa end - local.get $0 local.get $1 + local.get $2 call $~lib/string/String#substring - local.set $1 + local.set $0 call $~lib/rt/tlsf/maybeInitialize - local.get $0 + local.get $1 i32.const 16 i32.sub local.set $2 - local.get $0 + local.get $1 i32.const 15 i32.and i32.eqz i32.const 0 - local.get $0 + local.get $1 select if (result i32) local.get $2 @@ -2394,7 +2284,7 @@ if i32.const 0 i32.const 1040 - i32.const 581 + i32.const 573 i32.const 3 call $~lib/builtins/abort unreachable @@ -2402,7 +2292,7 @@ local.get $2 call $~lib/rt/tlsf/freeBlock end - local.get $1 + local.get $0 i32.const 2400 call $~lib/string/String.__eq i32.eqz @@ -2414,9 +2304,9 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release ) (func $~start diff --git a/tests/compiler/resolve-ternary.untouched.wat b/tests/compiler/resolve-ternary.untouched.wat index 4cc9ba29ab..620343f366 100644 --- a/tests/compiler/resolve-ternary.untouched.wat +++ b/tests/compiler/resolve-ternary.untouched.wat @@ -1,18 +1,22 @@ (module (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_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (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_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) + (type $i64_i32_=>_none (func (param i64 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 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))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $f64_=>_i32 (func (param f64) (result i32))) (type $f64_i32_=>_i32 (func (param f64 i32) (result i32))) + (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 16) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00") @@ -59,6 +63,69 @@ (export "__collect" (func $~lib/rt/pure/__collect)) (export "__rtti_base" (global $~lib/rt/__rtti_base)) (start $~start) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -67,9 +134,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -82,7 +146,7 @@ if i32.const 0 i32.const 32 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -109,7 +173,7 @@ if i32.const 0 i32.const 32 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -163,7 +227,7 @@ if i32.const 0 i32.const 32 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -188,77 +252,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -275,6 +297,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -286,8 +314,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -295,7 +321,7 @@ if i32.const 0 i32.const 32 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -312,28 +338,18 @@ if i32.const 0 i32.const 32 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -344,44 +360,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -389,30 +395,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 32 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -431,22 +433,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -472,7 +474,7 @@ if i32.const 0 i32.const 32 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -484,18 +486,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 32 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -549,27 +551,15 @@ if i32.const 0 i32.const 32 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -584,24 +574,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -611,31 +587,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -643,8 +603,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -670,24 +628,22 @@ if i32.const 0 i32.const 32 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -695,7 +651,7 @@ if i32.const 0 i32.const 32 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -703,16 +659,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -728,7 +684,7 @@ if i32.const 0 i32.const 32 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -737,8 +693,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -749,49 +705,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -804,10 +756,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -857,73 +805,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -936,11 +857,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -960,7 +881,7 @@ if i32.const 80 i32.const 32 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -986,9 +907,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1056,31 +974,24 @@ if i32.const 0 i32.const 32 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1093,79 +1004,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 32 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1202,9 +1082,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1218,12 +1096,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1233,7 +1111,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1270,7 +1148,7 @@ if i32.const 0 i32.const 32 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1321,29 +1199,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1363,7 +1221,7 @@ if i32.const 0 i32.const 32 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1410,7 +1268,7 @@ if i32.const 0 i32.const 32 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1431,7 +1289,7 @@ if i32.const 0 i32.const 32 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1452,7 +1310,7 @@ if i32.const 0 i32.const 32 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -1754,13 +1612,20 @@ i32.store16 end ) + (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 0 + i32.const 1 + i32.ge_s + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa32_lut + ) (func $~lib/util/number/itoa32 (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 i32.eqz if @@ -1790,19 +1655,9 @@ call $~lib/rt/tlsf/__alloc local.set $3 local.get $3 - local.set $6 local.get $0 - local.set $5 local.get $2 - local.set $4 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $6 - local.get $5 - local.get $4 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core local.get $1 if local.get $3 @@ -2037,57 +1892,291 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i64) - (local $11 i32) - (local $12 i32) - (local $13 i64) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i32) - (local $25 i32) - (local $26 i32) - (local $27 i32) - (local $28 i64) - i32.const 0 + (func $~lib/util/number/normalizedBoundaries (param $0 i64) (param $1 i32) + (local $2 i64) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i64.const 1 + i64.shl + i64.const 1 + i64.add + local.set $2 + local.get $1 + i32.const 1 + i32.sub + local.set $3 + local.get $2 + i64.clz + i32.wrap_i64 + local.set $4 + local.get $2 + local.get $4 + i64.extend_i32_s + i64.shl + local.set $2 + local.get $3 local.get $4 i32.sub - local.set $7 - i64.const 1 - local.get $7 + local.set $3 + i32.const 1 + local.get $0 + i64.const 4503599627370496 + i64.eq + i32.add + local.set $5 + local.get $2 + global.set $~lib/util/number/_frc_plus + local.get $0 + local.get $5 i64.extend_i32_s i64.shl - local.set $8 - local.get $8 i64.const 1 i64.sub - local.set $9 - local.get $3 local.get $1 - i64.sub - local.set $10 - local.get $4 - local.set $11 + local.get $5 + i32.sub local.get $3 - local.get $7 + i32.sub i64.extend_i32_s - i64.shr_u - i32.wrap_i64 - local.set $12 + i64.shl + global.set $~lib/util/number/_frc_minus local.get $3 - local.get $9 - i64.and + global.set $~lib/util/number/_exp + ) + (func $~lib/util/number/getCachedPower (param $0 i32) + (local $1 f64) + (local $2 i32) + (local $3 i32) + i32.const -61 + local.get $0 + i32.sub + f64.convert_i32_s + f64.const 0.30102999566398114 + f64.mul + f64.const 347 + f64.add + local.set $1 + local.get $1 + i32.trunc_f64_s + local.set $2 + local.get $2 + local.get $2 + f64.convert_i32_s + local.get $1 + f64.ne + i32.add + local.set $2 + local.get $2 + i32.const 3 + i32.shr_s + i32.const 1 + i32.add + local.set $3 + i32.const 348 + local.get $3 + i32.const 3 + i32.shl + i32.sub + global.set $~lib/util/number/_K + i32.const 848 + local.get $3 + i32.const 3 + i32.shl + i32.add + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 1544 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow + ) + (func $~lib/util/number/umul64f (param $0 i64) (param $1 i64) (result i64) + (local $2 i64) + (local $3 i64) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i64) + (local $8 i64) + local.get $0 + i64.const 4294967295 + i64.and + local.set $2 + local.get $1 + i64.const 4294967295 + i64.and + local.set $3 + local.get $0 + i64.const 32 + i64.shr_u + local.set $4 + local.get $1 + i64.const 32 + i64.shr_u + local.set $5 + local.get $2 + local.get $3 + i64.mul + local.set $6 + local.get $4 + local.get $3 + i64.mul + local.get $6 + i64.const 32 + i64.shr_u + i64.add + local.set $7 + local.get $2 + local.get $5 + i64.mul + local.get $7 + i64.const 4294967295 + i64.and + i64.add + local.set $8 + local.get $8 + i64.const 2147483647 + i64.add + local.set $8 + local.get $7 + i64.const 32 + i64.shr_u + local.set $7 + local.get $8 + i64.const 32 + i64.shr_u + local.set $8 + local.get $4 + local.get $5 + i64.mul + local.get $7 + i64.add + local.get $8 + i64.add + ) + (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.add + i32.const 64 + i32.add + ) + (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.set $6 + local.get $6 + i32.load16_u + local.set $7 + loop $while-continue|1 + local.get $3 + local.get $5 + i64.lt_u + if (result i32) + local.get $2 + local.get $3 + i64.sub + local.get $4 + i64.ge_u + else + i32.const 0 + end + if (result i32) + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.lt_u + if (result i32) + i32.const 1 + else + local.get $5 + local.get $3 + i64.sub + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.sub + i64.gt_u + end + else + i32.const 0 + end + local.set $8 + local.get $8 + if + local.get $7 + i32.const 1 + i32.sub + local.set $7 + local.get $3 + local.get $4 + i64.add + local.set $3 + br $while-continue|1 + end + end + local.get $6 + local.get $7 + i32.store16 + ) + (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (local $7 i32) + (local $8 i64) + (local $9 i64) + (local $10 i64) + (local $11 i32) + (local $12 i32) + (local $13 i64) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local $19 i64) + (local $20 i64) + i32.const 0 + local.get $4 + i32.sub + local.set $7 + i64.const 1 + local.get $7 + i64.extend_i32_s + i64.shl + local.set $8 + local.get $8 + i64.const 1 + i64.sub + local.set $9 + local.get $3 + local.get $1 + i64.sub + local.set $10 + local.get $4 + local.set $11 + local.get $3 + local.get $7 + i64.extend_i32_s + i64.shr_u + i32.wrap_i64 + local.set $12 + local.get $3 + local.get $9 + i64.and local.set $13 local.get $12 call $~lib/util/number/decimalCount32 @@ -2299,13 +2388,9 @@ i32.add global.set $~lib/util/number/_K local.get $0 - local.set $24 local.get $15 - local.set $18 local.get $5 - local.set $23 local.get $19 - local.set $22 i32.const 1720 local.get $14 i32.const 2 @@ -2315,79 +2400,15 @@ local.get $7 i64.extend_i32_s i64.shl - local.set $21 local.get $10 - local.set $20 - local.get $24 - local.get $18 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.set $25 - local.get $25 - i32.load16_u - local.set $26 - loop $while-continue|3 - local.get $22 - local.get $20 - i64.lt_u - if (result i32) - local.get $23 - local.get $22 - i64.sub - local.get $21 - i64.ge_u - else - i32.const 0 - end - if (result i32) - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.lt_u - if (result i32) - i32.const 1 - else - local.get $20 - local.get $22 - i64.sub - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.sub - i64.gt_u - end - else - i32.const 0 - end - local.set $27 - local.get $27 - if - local.get $26 - i32.const 1 - i32.sub - local.set $26 - local.get $22 - local.get $21 - i64.add - local.set $22 - br $while-continue|3 - end - end - local.get $25 - local.get $26 - i32.store16 + call $~lib/util/number/grisuRound local.get $15 return end br $while-continue|0 end end - loop $while-continue|4 + loop $while-continue|2 i32.const 1 local.set $16 local.get $16 @@ -2404,8 +2425,8 @@ local.get $7 i64.extend_i32_s i64.shr_u - local.set $23 - local.get $23 + local.set $20 + local.get $20 local.get $15 i64.extend_i32_s i64.or @@ -2414,16 +2435,16 @@ if local.get $0 local.get $15 - local.tee $26 + local.tee $18 i32.const 1 i32.add local.set $15 - local.get $26 + local.get $18 i32.const 1 i32.shl i32.add i32.const 48 - local.get $23 + local.get $20 i32.wrap_i64 i32.const 65535 i32.and @@ -2458,92 +2479,129 @@ i64.mul local.set $10 local.get $0 - local.set $18 local.get $15 - local.set $27 local.get $5 - local.set $28 local.get $13 - local.set $22 local.get $8 - local.set $21 local.get $10 - local.set $20 - local.get $18 - local.get $27 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.set $26 - local.get $26 - i32.load16_u - local.set $25 - loop $while-continue|6 - local.get $22 - local.get $20 - i64.lt_u - if (result i32) - local.get $28 - local.get $22 - i64.sub - local.get $21 - i64.ge_u - else - i32.const 0 - end - if (result i32) - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.lt_u - if (result i32) - i32.const 1 - else - local.get $20 - local.get $22 - i64.sub - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.sub - i64.gt_u - end - else - i32.const 0 - end - local.set $24 - local.get $24 - if - local.get $25 - i32.const 1 - i32.sub - local.set $25 - local.get $22 - local.get $21 - i64.add - local.set $22 - br $while-continue|6 - end - end - local.get $26 - local.get $25 - i32.store16 + call $~lib/util/number/grisuRound local.get $15 return end - br $while-continue|4 + br $while-continue|2 end end unreachable ) - (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) + (func $~lib/util/number/grisu2 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (local $3 i64) (local $4 i32) - (local $5 i32) + (local $5 i64) + (local $6 i64) + (local $7 i32) + (local $8 i64) + (local $9 i32) + (local $10 i64) + (local $11 i32) + (local $12 i64) + (local $13 i32) + (local $14 i64) + (local $15 i64) + local.get $0 + i64.reinterpret_f64 + local.set $3 + local.get $3 + i64.const 9218868437227405312 + i64.and + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.set $4 + local.get $3 + i64.const 4503599627370495 + i64.and + local.set $5 + local.get $4 + i32.const 0 + i32.ne + i64.extend_i32_u + i64.const 52 + i64.shl + local.get $5 + i64.add + local.set $6 + local.get $4 + i32.const 1 + local.get $4 + select + i32.const 1023 + i32.const 52 + i32.add + i32.sub + local.set $4 + local.get $6 + local.get $4 + call $~lib/util/number/normalizedBoundaries + global.get $~lib/util/number/_exp + call $~lib/util/number/getCachedPower + local.get $6 + i64.clz + i32.wrap_i64 + local.set $7 + local.get $6 + local.get $7 + i64.extend_i32_s + i64.shl + local.set $6 + local.get $4 + local.get $7 + i32.sub + local.set $4 + global.get $~lib/util/number/_frc_pow + local.set $8 + global.get $~lib/util/number/_exp_pow + local.set $9 + local.get $6 + local.get $8 + call $~lib/util/number/umul64f + local.set $10 + local.get $4 + local.get $9 + call $~lib/util/number/umul64e + local.set $11 + global.get $~lib/util/number/_frc_plus + local.get $8 + call $~lib/util/number/umul64f + i64.const 1 + i64.sub + local.set $12 + global.get $~lib/util/number/_exp + local.get $9 + call $~lib/util/number/umul64e + local.set $13 + global.get $~lib/util/number/_frc_minus + local.get $8 + call $~lib/util/number/umul64f + i64.const 1 + i64.add + local.set $14 + local.get $12 + local.get $14 + i64.sub + local.set $15 + local.get $1 + local.get $10 + local.get $11 + local.get $12 + local.get $13 + local.get $15 + local.get $2 + call $~lib/util/number/genDigits + ) + (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) (local $6 i32) loop $while-continue|0 local.get $2 @@ -3564,248 +3622,269 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if local.get $0 - local.set $5 local.get $1 - local.set $4 local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if i32.const 0 - i32.const 1 + i32.const 2 i32.lt_s drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.tee $7 + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 i32.const 1 i32.add - local.set $5 - local.get $7 + local.set $0 local.get $4 - local.tee $7 + local.get $1 + local.tee $4 i32.const 1 i32.add - local.set $4 - local.get $7 + local.set $1 + local.get $4 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 + br $while-continue|0 end end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end + end + ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) + (func $~lib/util/number/genExponent (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.set $2 + local.get $2 + if + i32.const 0 + local.get $1 + i32.sub + local.set $1 end + local.get $1 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.set $3 + local.get $0 + local.get $1 + local.get $3 + call $~lib/util/number/utoa32_core + local.get $0 + i32.const 45 + i32.const 43 + local.get $2 + select + i32.store16 + local.get $3 ) (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $11 i32) local.get $2 i32.eqz if @@ -3988,48 +4067,10 @@ local.get $0 i32.const 4 i32.add - local.set $5 local.get $3 i32.const 1 i32.sub - local.set $6 - local.get $6 - i32.const 0 - i32.lt_s - local.set $4 - local.get $4 - if - i32.const 0 - local.get $6 - i32.sub - local.set $6 - end - local.get $6 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.set $7 - local.get $5 - local.set $10 - local.get $6 - local.set $9 - local.get $7 - local.set $8 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $10 - local.get $9 - local.get $8 - call $~lib/util/number/utoa32_lut - local.get $5 - i32.const 45 - i32.const 43 - local.get $4 - select - i32.store16 - local.get $7 + call $~lib/util/number/genExponent local.set $1 local.get $1 i32.const 2 @@ -4039,14 +4080,14 @@ local.get $1 i32.const 1 i32.shl - local.set $7 + local.set $4 local.get $0 i32.const 4 i32.add local.get $0 i32.const 2 i32.add - local.get $7 + local.get $4 i32.const 2 i32.sub call $~lib/memory/memory.copy @@ -4054,58 +4095,20 @@ i32.const 46 i32.store16 offset=2 local.get $0 - local.get $7 + local.get $4 i32.add i32.const 101 i32.store16 offset=2 local.get $1 local.get $0 - local.get $7 + local.get $4 i32.add i32.const 4 i32.add - local.set $9 local.get $3 i32.const 1 i32.sub - local.set $8 - local.get $8 - i32.const 0 - i32.lt_s - local.set $4 - local.get $4 - if - i32.const 0 - local.get $8 - i32.sub - local.set $8 - end - local.get $8 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.set $5 - local.get $9 - local.set $11 - local.get $8 - local.set $6 - local.get $5 - local.set $10 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $11 - local.get $6 - local.get $10 - call $~lib/util/number/utoa32_lut - local.get $9 - i32.const 45 - i32.const 43 - local.get $4 - select - i32.store16 - local.get $5 + call $~lib/util/number/genExponent i32.add local.set $1 local.get $1 @@ -4124,31 +4127,6 @@ (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i64) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i64) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i64) - (local $25 i64) - (local $26 i32) - (local $27 i64) - (local $28 i32) local.get $1 f64.const 0 f64.lt @@ -4163,387 +4141,22 @@ i32.store16 end local.get $1 - local.set $5 local.get $0 - local.set $4 local.get $2 + call $~lib/util/number/grisu2 local.set $3 - local.get $5 - i64.reinterpret_f64 - local.set $6 - local.get $6 - i64.const 9218868437227405312 - i64.and - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.set $7 - local.get $6 - i64.const 4503599627370495 - i64.and - local.set $8 - local.get $7 - i32.const 0 - i32.ne - i64.extend_i32_u - i64.const 52 - i64.shl - local.get $8 - i64.add - local.set $9 - local.get $7 - i32.const 1 - local.get $7 - select - i32.const 1023 - i32.const 52 - i32.add - i32.sub - local.set $7 - local.get $9 - local.set $11 - local.get $7 - local.set $10 - local.get $11 - i64.const 1 - i64.shl - i64.const 1 - i64.add - local.set $12 - local.get $10 - i32.const 1 - i32.sub - local.set $13 - local.get $12 - i64.clz - i32.wrap_i64 - local.set $14 - local.get $12 - local.get $14 - i64.extend_i32_s - i64.shl - local.set $12 - local.get $13 - local.get $14 - i32.sub - local.set $13 - i32.const 1 - local.get $11 - i64.const 4503599627370496 - i64.eq - i32.add - local.set $15 - local.get $12 - global.set $~lib/util/number/_frc_plus - local.get $11 - local.get $15 - i64.extend_i32_s - i64.shl - i64.const 1 - i64.sub - local.get $10 - local.get $15 - i32.sub - local.get $13 - i32.sub - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_minus - local.get $13 - global.set $~lib/util/number/_exp - global.get $~lib/util/number/_exp - local.set $10 - i32.const -61 - local.get $10 - i32.sub - f64.convert_i32_s - f64.const 0.30102999566398114 - f64.mul - f64.const 347 - f64.add - local.set $16 - local.get $16 - i32.trunc_f64_s - local.set $15 - local.get $15 - local.get $15 - f64.convert_i32_s - local.get $16 - f64.ne - i32.add - local.set $15 - local.get $15 - i32.const 3 - i32.shr_s - i32.const 1 - i32.add - local.set $14 - i32.const 348 - local.get $14 - i32.const 3 - i32.shl - i32.sub - global.set $~lib/util/number/_K - i32.const 848 - local.get $14 - i32.const 3 - i32.shl - i32.add - i64.load - global.set $~lib/util/number/_frc_pow - i32.const 1544 - local.get $14 - i32.const 1 - i32.shl - i32.add - i32.load16_s - global.set $~lib/util/number/_exp_pow - local.get $9 - i64.clz - i32.wrap_i64 - local.set $14 - local.get $9 - local.get $14 - i64.extend_i32_s - i64.shl - local.set $9 - local.get $7 - local.get $14 - i32.sub - local.set $7 - global.get $~lib/util/number/_frc_pow - local.set $12 - global.get $~lib/util/number/_exp_pow - local.set $15 - local.get $9 - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $18 - local.get $11 - i64.const 4294967295 - i64.and - local.set $19 - local.get $17 - i64.const 32 - i64.shr_u - local.set $20 - local.get $11 - i64.const 32 - i64.shr_u - local.set $21 - local.get $18 - local.get $19 - i64.mul - local.set $22 - local.get $20 - local.get $19 - i64.mul - local.get $22 - i64.const 32 - i64.shr_u - i64.add - local.set $23 - local.get $18 - local.get $21 - i64.mul - local.get $23 - i64.const 4294967295 - i64.and - i64.add - local.set $24 - local.get $24 - i64.const 2147483647 - i64.add - local.set $24 - local.get $23 - i64.const 32 - i64.shr_u - local.set $23 - local.get $24 - i64.const 32 - i64.shr_u - local.set $24 - local.get $20 - local.get $21 - i64.mul - local.get $23 - i64.add - local.get $24 - i64.add - local.set $24 - local.get $7 - local.set $10 - local.get $15 - local.set $13 - local.get $10 - local.get $13 - i32.add - i32.const 64 - i32.add - local.set $10 - global.get $~lib/util/number/_frc_plus - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $23 - local.get $11 - i64.const 4294967295 - i64.and - local.set $22 - local.get $17 - i64.const 32 - i64.shr_u - local.set $21 - local.get $11 - i64.const 32 - i64.shr_u - local.set $20 - local.get $23 - local.get $22 - i64.mul - local.set $19 - local.get $21 - local.get $22 - i64.mul - local.get $19 - i64.const 32 - i64.shr_u - i64.add - local.set $18 - local.get $23 - local.get $20 - i64.mul - local.get $18 - i64.const 4294967295 - i64.and - i64.add - local.set $25 - local.get $25 - i64.const 2147483647 - i64.add - local.set $25 - local.get $18 - i64.const 32 - i64.shr_u - local.set $18 - local.get $25 - i64.const 32 - i64.shr_u - local.set $25 - local.get $21 - local.get $20 - i64.mul - local.get $18 - i64.add - local.get $25 - i64.add - i64.const 1 - i64.sub - local.set $25 - global.get $~lib/util/number/_exp - local.set $26 - local.get $15 - local.set $13 - local.get $26 - local.get $13 - i32.add - i32.const 64 - i32.add - local.set $26 - global.get $~lib/util/number/_frc_minus - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $18 - local.get $11 - i64.const 4294967295 - i64.and - local.set $19 - local.get $17 - i64.const 32 - i64.shr_u - local.set $20 - local.get $11 - i64.const 32 - i64.shr_u - local.set $21 - local.get $18 - local.get $19 - i64.mul - local.set $22 - local.get $20 - local.get $19 - i64.mul - local.get $22 - i64.const 32 - i64.shr_u - i64.add - local.set $23 - local.get $18 - local.get $21 - i64.mul - local.get $23 - i64.const 4294967295 - i64.and - i64.add - local.set $27 - local.get $27 - i64.const 2147483647 - i64.add - local.set $27 - local.get $23 - i64.const 32 - i64.shr_u - local.set $23 - local.get $27 - i64.const 32 - i64.shr_u - local.set $27 - local.get $20 - local.get $21 - i64.mul - local.get $23 - i64.add - local.get $27 - i64.add - i64.const 1 - i64.add - local.set $27 - local.get $25 - local.get $27 - i64.sub - local.set $23 - local.get $4 - local.get $24 - local.get $10 - local.get $25 - local.get $26 - local.get $23 - local.get $3 - call $~lib/util/number/genDigits - local.set $28 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $28 + local.get $3 local.get $2 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.set $28 - local.get $28 + local.set $3 + local.get $3 local.get $2 i32.add ) @@ -4695,7 +4308,7 @@ if i32.const 0 i32.const 32 - i32.const 581 + i32.const 573 i32.const 3 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index 6d400f4597..f7e83839d2 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -118,25 +118,19 @@ (local $3 i32) (local $4 i32) (local $5 i32) - block $__inlined_func$~lib/util/number/itoa32 - local.get $0 - i32.eqz - if - i32.const 1040 - local.set $2 - br $__inlined_func$~lib/util/number/itoa32 - end + local.get $0 + if local.get $0 i32.const 31 i32.shr_u - local.tee $3 + local.tee $2 if i32.const 0 local.get $0 i32.sub local.set $0 end - local.get $3 + local.get $2 local.get $0 i32.const 10 i32.ge_u @@ -178,42 +172,48 @@ i32.lt_u select i32.add - local.tee $4 + local.tee $3 i32.const 1 i32.shl i32.const 1 call $~lib/rt/stub/__alloc - local.tee $2 - local.set $5 + local.tee $1 + 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.get $5 + local.set $0 local.get $4 + local.get $3 i32.const 1 i32.sub - local.tee $4 + local.tee $3 i32.const 1 i32.shl i32.add - local.get $0 - i32.const 10 - i32.rem_u + local.get $5 i32.const 48 i32.add i32.store16 - local.tee $0 + local.get $0 br_if $do-continue|0 end - local.get $3 + local.get $2 if - local.get $2 + local.get $1 i32.const 45 i32.store16 end + else + i32.const 1040 + local.set $1 end - local.get $2 + local.get $1 ) (func $~lib/string/String#get:length (param $0 i32) (result i32) local.get $0 diff --git a/tests/compiler/resolve-unary.untouched.wat b/tests/compiler/resolve-unary.untouched.wat index 4aa886e204..b3fcdb5245 100644 --- a/tests/compiler/resolve-unary.untouched.wat +++ b/tests/compiler/resolve-unary.untouched.wat @@ -2,8 +2,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (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 (func (param i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -340,6 +340,16 @@ i32.store16 end ) + (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 0 + i32.const 1 + i32.ge_s + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa32_lut + ) (func $~lib/rt/stub/__retain (param $0 i32) (result i32) local.get $0 ) @@ -347,9 +357,6 @@ (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 i32.eqz if @@ -379,19 +386,9 @@ call $~lib/rt/stub/__alloc local.set $3 local.get $3 - local.set $6 local.get $0 - local.set $5 local.get $2 - local.set $4 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $6 - local.get $5 - local.get $4 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core local.get $1 if local.get $3 diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index aaed61f712..6e20b71c31 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -2,9 +2,9 @@ (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result 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 $none_=>_none (func)) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -36,6 +36,58 @@ (global $~lib/rt/pure/END (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -50,7 +102,7 @@ if i32.const 0 i32.const 1136 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -72,7 +124,7 @@ if i32.const 0 i32.const 1136 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -91,23 +143,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -115,72 +167,56 @@ if i32.const 0 i32.const 1136 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -188,7 +224,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -211,7 +247,7 @@ if i32.const 0 i32.const 1136 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -225,22 +261,16 @@ if i32.const 0 i32.const 1136 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -249,7 +279,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -258,7 +288,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -269,16 +299,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -298,7 +322,7 @@ if i32.const 0 i32.const 1136 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -331,8 +355,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -353,7 +377,7 @@ if i32.const 0 i32.const 1136 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -363,17 +387,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1136 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -402,13 +426,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -416,21 +440,15 @@ if i32.const 0 i32.const 1136 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -445,37 +463,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -499,7 +508,7 @@ if i32.const 0 i32.const 1136 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -516,7 +525,7 @@ if i32.const 0 i32.const 1136 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -544,7 +553,7 @@ if i32.const 0 i32.const 1136 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -596,7 +605,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -617,7 +626,8 @@ unreachable end i32.const 1664 - local.tee $0 + local.set $2 + i32.const 1664 i32.const 0 i32.store i32.const 3232 @@ -628,35 +638,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1664 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1664 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -676,7 +677,7 @@ i32.const 1664 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) local.get $0 @@ -685,7 +686,7 @@ if i32.const 1184 i32.const 1136 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -758,17 +759,14 @@ if i32.const 0 i32.const 1136 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const -1 local.get $1 i32.shl @@ -776,16 +774,10 @@ local.tee $1 if (result i32) local.get $0 + local.get $2 local.get $1 i32.ctz - local.get $2 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -801,31 +793,22 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1136 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end @@ -843,7 +826,7 @@ if i32.const 0 i32.const 1136 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -886,20 +869,9 @@ i32.and i32.store local.get $1 - i32.const 16 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 + call $~lib/rt/tlsf/GETRIGHT local.get $1 - i32.load - i32.const -4 - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const -3 i32.and @@ -914,7 +886,7 @@ if i32.const 0 i32.const 1136 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -938,15 +910,16 @@ local.tee $3 i32.eqz if - i32.const 16 memory.size local.tee $3 i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -971,9 +944,7 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 - local.get $5 + local.tee $5 local.get $3 local.get $5 i32.gt_s @@ -1006,7 +977,7 @@ if i32.const 0 i32.const 1136 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1022,7 +993,7 @@ if i32.const 0 i32.const 1136 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -1055,161 +1026,171 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (local $2 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 4 - i32.sub - local.tee $2 - i32.const 0 - i32.store8 offset=3 - local.get $1 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 offset=1 - local.get $0 - i32.const 0 - i32.store8 offset=2 - local.get $2 - i32.const 0 - i32.store8 offset=2 - local.get $2 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 offset=3 - local.get $2 - i32.const 0 - i32.store8 - local.get $1 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $2 - i32.add - local.tee $0 - i32.const 0 - i32.store - local.get $0 - local.get $1 - local.get $2 - i32.sub - i32.const -4 - i32.and - local.tee $2 - i32.add - i32.const 28 - i32.sub - local.tee $1 - i32.const 0 - i32.store offset=24 - local.get $2 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $2 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $1 - i32.const 0 - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $0 - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $1 - i32.add - local.set $0 - local.get $2 + local.get $1 + i32.eqz + if + return + end + local.get $0 + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 4 + i32.sub + local.tee $2 + i32.const 0 + i32.store8 offset=3 + local.get $1 + i32.const 2 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store8 offset=1 + local.get $0 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=1 + local.get $1 + i32.const 6 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store8 offset=3 + local.get $2 + i32.const 0 + i32.store8 + local.get $1 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $2 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $0 + local.get $1 + local.get $2 + i32.sub + i32.const -4 + i32.and + local.tee $2 + i32.add + i32.const 28 + i32.sub + local.tee $1 + i32.const 0 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + i32.const 0 + i32.store offset=24 + local.get $1 + i32.const 0 + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $1 + i32.add + local.set $0 + local.get $2 + local.get $1 + i32.sub + local.set $1 + loop $while-continue|0 local.get $1 - i32.sub - local.set $1 - loop $while-continue|0 + i32.const 32 + i32.ge_u + if + local.get $0 + i64.const 0 + i64.store + local.get $0 + i64.const 0 + i64.store offset=8 + local.get $0 + i64.const 0 + i64.store offset=16 + local.get $0 + i64.const 0 + i64.store offset=24 local.get $1 i32.const 32 - i32.ge_u - if - local.get $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i64.const 0 - i64.store offset=16 - local.get $0 - i64.const 0 - i64.store offset=24 - local.get $1 - i32.const 32 - i32.sub - local.set $1 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $while-continue|0 - end + i32.sub + local.set $1 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 end end ) @@ -1310,184 +1291,186 @@ if i32.const 0 i32.const 1136 - i32.const 581 + i32.const 573 i32.const 3 call $~lib/builtins/abort unreachable end local.get $1 ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $0 + local.get $1 + i32.lt_u + if local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 + i32.const 7 + i32.and local.get $0 - local.get $1 - i32.lt_u + i32.const 7 + i32.and + i32.eq if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + return end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $2 + i32.const 1 + i32.sub + local.set $2 local.get $0 - local.tee $2 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $1 - local.get $2 local.get $3 + local.get $4 i32.load8_u i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 + br $while-continue|0 end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 - local.get $4 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and if - local.get $4 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $4 - local.get $0 + local.tee $2 i32.add local.get $1 - local.get $4 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) @@ -1529,13 +1512,7 @@ return end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.tee $6 i32.load local.tee $4 @@ -1559,10 +1536,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 @@ -1592,7 +1569,7 @@ i32.const 16 i32.add local.get $2 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $1 i32.const 1652 i32.ge_u @@ -1648,7 +1625,7 @@ local.get $4 local.get $2 i32.sub - call $~lib/memory/memory.fill + call $~lib/util/memory/memset local.get $1 local.get $3 i32.ne @@ -1700,64 +1677,65 @@ (local $2 i32) (local $3 i32) (local $4 i32) - block $__inlined_func$~lib/string/String#concat (result i32) - local.get $0 - i32.const 1424 - local.get $0 - select - local.set $2 + local.get $0 + i32.const 1424 + local.get $0 + select + local.set $2 + local.get $1 + call $~lib/rt/pure/__retain + local.tee $1 + i32.eqz + if local.get $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.eqz + i32.const 1424 + i32.ne if - local.get $0 - i32.const 1424 - i32.ne - if - local.get $0 - call $~lib/rt/pure/__release - end - i32.const 1424 - local.set $0 + local.get $1 + call $~lib/rt/pure/__release end + i32.const 1424 + local.set $1 + end + block $__inlined_func$~lib/string/String#concat local.get $2 call $~lib/string/String#get:length i32.const 1 i32.shl local.tee $3 - local.get $0 + local.get $1 call $~lib/string/String#get:length i32.const 1 i32.shl local.tee $4 i32.add - local.tee $1 + local.tee $0 i32.eqz if - local.get $0 - call $~lib/rt/pure/__release i32.const 1344 + local.set $0 + local.get $1 + call $~lib/rt/pure/__release br $__inlined_func$~lib/string/String#concat end - local.get $1 + local.get $0 i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 local.get $2 local.get $3 - call $~lib/memory/memory.copy - local.get $1 + call $~lib/util/memory/memmove + local.get $0 local.get $3 i32.add - local.get $0 + local.get $1 local.get $4 - call $~lib/memory/memory.copy - local.get $0 - call $~lib/rt/pure/__release + call $~lib/util/memory/memmove local.get $1 + call $~lib/rt/pure/__release end + local.get $0 ) (func $start:retain-release-sanity (local $0 i32) @@ -1771,7 +1749,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 i32.const 12 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 3 call $~lib/rt/tlsf/__alloc @@ -1851,7 +1829,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 i32.const 0 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 5 call $~lib/rt/tlsf/__alloc @@ -1904,7 +1882,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 i32.const 0 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 4 call $~lib/rt/tlsf/__alloc @@ -1956,21 +1934,21 @@ local.get $3 local.get $3 i32.load offset=12 - local.tee $5 + local.tee $2 i32.const 1 i32.add - local.tee $2 + local.tee $5 call $~lib/array/ensureSize local.get $3 i32.load offset=4 - local.get $5 + local.get $2 i32.const 2 i32.shl i32.add i32.const 1344 i32.store local.get $3 - local.get $2 + local.get $5 i32.store offset=12 local.get $0 i32.const 1 @@ -2012,10 +1990,11 @@ local.tee $3 i32.const 0 i32.store + local.get $2 + local.set $1 local.get $3 local.tee $0 local.get $2 - local.tee $1 i32.load local.tee $4 i32.ne @@ -2476,7 +2455,7 @@ local.get $2 local.get $1 local.get $3 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $1 if local.get $1 diff --git a/tests/compiler/retain-release-sanity.untouched.wat b/tests/compiler/retain-release-sanity.untouched.wat index f26dd06d7d..2c66da19ce 100644 --- a/tests/compiler/retain-release-sanity.untouched.wat +++ b/tests/compiler/retain-release-sanity.untouched.wat @@ -1,8 +1,8 @@ (module (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_i32 (func (param i32) (result 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_i32_=>_i32 (func (param i32 i32 i32) (result i32))) @@ -42,6 +42,69 @@ (global $~lib/heap/__heap_base i32 (i32.const 644)) (export "memory" (memory $0)) (start $~start) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -50,9 +113,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -65,7 +125,7 @@ if i32.const 0 i32.const 128 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -92,7 +152,7 @@ if i32.const 0 i32.const 128 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -146,7 +206,7 @@ if i32.const 0 i32.const 128 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -171,77 +231,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -258,6 +276,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -269,8 +293,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -278,7 +300,7 @@ if i32.const 0 i32.const 128 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -295,28 +317,18 @@ if i32.const 0 i32.const 128 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -327,44 +339,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -372,30 +374,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 128 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -414,22 +412,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -455,7 +453,7 @@ if i32.const 0 i32.const 128 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -467,18 +465,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 128 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -532,27 +530,15 @@ if i32.const 0 i32.const 128 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -567,24 +553,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -594,31 +566,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -626,8 +582,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -653,24 +607,22 @@ if i32.const 0 i32.const 128 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -678,7 +630,7 @@ if i32.const 0 i32.const 128 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -686,16 +638,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -711,7 +663,7 @@ if i32.const 0 i32.const 128 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -720,8 +672,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -732,49 +684,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -787,10 +735,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -840,73 +784,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -919,11 +836,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -943,7 +860,7 @@ if i32.const 176 i32.const 128 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -969,9 +886,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1039,31 +953,24 @@ if i32.const 0 i32.const 128 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1076,79 +983,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 128 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1185,9 +1061,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1201,12 +1075,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1216,7 +1090,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1253,7 +1127,7 @@ if i32.const 0 i32.const 128 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1304,29 +1178,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1346,7 +1200,7 @@ if i32.const 0 i32.const 128 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1393,7 +1247,7 @@ if i32.const 0 i32.const 128 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1414,7 +1268,7 @@ if i32.const 0 i32.const 128 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1435,7 +1289,7 @@ if i32.const 0 i32.const 128 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -1470,219 +1324,214 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + (local $6 i64) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - i32.const 4 - i32.sub - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - local.get $4 - i32.store8 offset=3 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=1 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - i32.const 28 - i32.sub - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=24 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=16 - local.get $6 - local.get $8 - i32.store offset=20 - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=4 - local.get $6 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=12 - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add + i32.const 0 + i32.const 1 + i32.gt_s + drop + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.set $3 + local.get $0 + local.get $1 + i32.store8 + local.get $3 + local.get $1 + i32.store8 offset=3 + local.get $2 + i32.const 2 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store8 offset=1 + local.get $0 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=1 + local.get $2 + i32.const 6 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store8 offset=3 + local.get $3 + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $5 + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.set $3 + local.get $0 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=16 + local.get $3 + local.get $5 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=12 + local.get $0 + local.get $5 + i32.store offset=16 + local.get $0 + local.get $5 + i32.store offset=20 + local.get $0 + local.get $5 + i32.store offset=24 + local.get $3 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=12 + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $5 + i64.extend_i32_u + local.get $5 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $6 + loop $while-continue|0 + local.get $2 + i32.const 32 + i32.ge_u local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 + if + local.get $0 + local.get $6 + i64.store + local.get $0 + local.get $6 + i64.store offset=8 + local.get $0 + local.get $6 + i64.store offset=16 + local.get $0 + local.get $6 + i64.store offset=24 + local.get $2 i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 end end ) + (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memset + ) (func $~lib/rt/pure/increment (param $0 i32) (local $1 i32) local.get $0 @@ -1880,7 +1729,7 @@ if i32.const 0 i32.const 128 - i32.const 581 + i32.const 573 i32.const 3 call $~lib/builtins/abort unreachable @@ -2911,238 +2760,233 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if local.get $0 - local.set $5 local.get $1 - local.set $4 local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if i32.const 0 - i32.const 1 + i32.const 2 i32.lt_s drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.tee $7 + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 i32.const 1 i32.add - local.set $5 - local.get $7 + local.set $0 local.get $4 - local.tee $7 + local.get $1 + local.tee $4 i32.const 1 i32.add - local.set $4 - local.get $7 + local.set $1 + local.get $4 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 + br $while-continue|0 end end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 @@ -3193,22 +3037,12 @@ return end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $5 local.get $5 - i32.const 16 - i32.add - local.get $5 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $6 local.get $6 - i32.load - local.set $7 - local.get $7 i32.const 1 i32.and if @@ -3219,25 +3053,25 @@ i32.and i32.const 16 i32.add - local.get $7 + local.get $6 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $5 - local.get $5 + local.set $7 + local.get $7 local.get $3 i32.ge_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $4 i32.const 3 i32.and - local.get $5 + local.get $7 i32.or i32.store local.get $1 diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index a73cfa0150..d0b82842d8 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -1,11 +1,13 @@ (module - (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_i32 (func (result 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))) + (type $none_=>_none (func)) + (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 1024) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") @@ -18,6 +20,58 @@ (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "_start" (func $~start)) (export "memory" (memory $0)) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -32,7 +86,7 @@ if i32.const 0 i32.const 1040 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -54,7 +108,7 @@ if i32.const 0 i32.const 1040 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -73,23 +127,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -97,72 +151,56 @@ if i32.const 0 i32.const 1040 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -170,7 +208,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -193,7 +231,7 @@ if i32.const 0 i32.const 1040 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -207,22 +245,16 @@ if i32.const 0 i32.const 1040 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -231,7 +263,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -240,7 +272,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -251,16 +283,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -280,7 +306,7 @@ if i32.const 0 i32.const 1040 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -313,8 +339,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -335,7 +361,7 @@ if i32.const 0 i32.const 1040 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -345,17 +371,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1040 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -384,13 +410,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -398,21 +424,15 @@ if i32.const 0 i32.const 1040 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -427,37 +447,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -481,7 +492,7 @@ if i32.const 0 i32.const 1040 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -498,7 +509,7 @@ if i32.const 0 i32.const 1040 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -526,7 +537,7 @@ if i32.const 0 i32.const 1040 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -578,7 +589,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -599,7 +610,8 @@ unreachable end i32.const 1184 - local.tee $0 + local.set $2 + i32.const 1184 i32.const 0 i32.store i32.const 2752 @@ -610,35 +622,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1184 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1184 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -658,24 +661,23 @@ i32.const 1184 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 - i32.load offset=4 + i32.const 0 + call $~lib/rt/tlsf/GETSL i32.const -2 i32.and local.tee $2 if (result i32) local.get $0 + i32.const 0 local.get $2 i32.ctz - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -687,31 +689,22 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1040 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end @@ -725,7 +718,7 @@ if i32.const 0 i32.const 1040 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -744,15 +737,16 @@ local.tee $1 i32.eqz if - i32.const 16 memory.size - local.tee $2 + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl i32.const 65551 @@ -761,18 +755,16 @@ i32.and i32.const 16 i32.shr_u - local.set $1 - local.get $2 + local.tee $2 local.get $1 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -781,7 +773,7 @@ end end local.get $0 - local.get $2 + local.get $1 i32.const 16 i32.shl memory.size @@ -795,7 +787,7 @@ if i32.const 0 i32.const 1040 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -811,7 +803,7 @@ if i32.const 0 i32.const 1040 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -866,20 +858,9 @@ i32.and i32.store local.get $1 - i32.const 16 - i32.add - local.tee $0 + call $~lib/rt/tlsf/GETRIGHT 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 + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const -3 i32.and diff --git a/tests/compiler/retain-return.untouched.wat b/tests/compiler/retain-return.untouched.wat index b4dcef0dd6..bf5f9fa200 100644 --- a/tests/compiler/retain-return.untouched.wat +++ b/tests/compiler/retain-return.untouched.wat @@ -1,7 +1,7 @@ (module (type $none_=>_i32 (func (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 $i32_=>_none (func (param i32))) (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) @@ -32,6 +32,69 @@ (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "_start" (func $~start)) (export "memory" (memory $0)) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -40,9 +103,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -55,7 +115,7 @@ if i32.const 0 i32.const 32 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -82,7 +142,7 @@ if i32.const 0 i32.const 32 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -136,7 +196,7 @@ if i32.const 0 i32.const 32 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -161,77 +221,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -248,6 +266,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -259,8 +283,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -268,7 +290,7 @@ if i32.const 0 i32.const 32 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -285,28 +307,18 @@ if i32.const 0 i32.const 32 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -317,44 +329,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -362,30 +364,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 32 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -404,22 +402,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -445,7 +443,7 @@ if i32.const 0 i32.const 32 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -457,18 +455,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 32 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -522,27 +520,15 @@ if i32.const 0 i32.const 32 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -557,24 +543,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -584,31 +556,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -616,8 +572,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -643,24 +597,22 @@ if i32.const 0 i32.const 32 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -668,7 +620,7 @@ if i32.const 0 i32.const 32 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -676,16 +628,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -701,7 +653,7 @@ if i32.const 0 i32.const 32 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -710,8 +662,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -722,49 +674,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -777,10 +725,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -830,73 +774,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -909,11 +826,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -933,7 +850,7 @@ if i32.const 80 i32.const 32 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -959,9 +876,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1029,31 +943,24 @@ if i32.const 0 i32.const 32 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1066,79 +973,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 32 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1175,9 +1051,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1191,12 +1065,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1206,7 +1080,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1243,7 +1117,7 @@ if i32.const 0 i32.const 32 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1294,29 +1168,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1336,7 +1190,7 @@ if i32.const 0 i32.const 32 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1383,7 +1237,7 @@ if i32.const 0 i32.const 32 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1404,7 +1258,7 @@ if i32.const 0 i32.const 32 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1425,7 +1279,7 @@ if i32.const 0 i32.const 32 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/rt/stub-realloc.optimized.wat b/tests/compiler/rt/stub-realloc.optimized.wat index 9fe92e6df9..6ffa78dcce 100644 --- a/tests/compiler/rt/stub-realloc.optimized.wat +++ b/tests/compiler/rt/stub-realloc.optimized.wat @@ -125,176 +125,178 @@ global.get $~lib/rt/stub/startOffset global.set $~lib/rt/stub/offset ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $0 + local.get $1 + i32.lt_u + if local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 + i32.const 7 + i32.and local.get $0 - local.get $1 - i32.lt_u + i32.const 7 + i32.and + i32.eq if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + return end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $2 + i32.const 1 + i32.sub + local.set $2 local.get $0 - local.tee $2 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $1 - local.get $2 local.get $3 + local.get $4 i32.load8_u i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 + br $while-continue|0 end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 - local.get $4 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and if - local.get $4 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $4 - local.get $0 + local.tee $2 i32.add local.get $1 - local.get $4 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 end end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 + end + end + end + loop $while-continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end end end ) @@ -385,7 +387,7 @@ local.get $0 local.get $3 i32.load offset=12 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.tee $0 i32.const 16 diff --git a/tests/compiler/rt/stub-realloc.untouched.wat b/tests/compiler/rt/stub-realloc.untouched.wat index 17b224bc59..3532e5e988 100644 --- a/tests/compiler/rt/stub-realloc.untouched.wat +++ b/tests/compiler/rt/stub-realloc.untouched.wat @@ -1174,238 +1174,233 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if local.get $0 - local.set $5 local.get $1 - local.set $4 local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if i32.const 0 - i32.const 1 + i32.const 2 i32.lt_s drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.tee $7 + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 i32.const 1 i32.add - local.set $5 - local.get $7 + local.set $0 local.get $4 - local.tee $7 + local.get $1 + local.tee $4 i32.const 1 i32.add - local.set $4 - local.get $7 + local.set $1 + local.get $4 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 + br $while-continue|0 end end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) (func $~lib/rt/stub/__realloc (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index fa32ef6903..861f9fccc9 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -1,13 +1,13 @@ (module + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (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 (func (param i32 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 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1024) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") @@ -23,6 +23,58 @@ (export "__release" (func $~lib/rt/pure/__release)) (export "__collect" (func $~lib/rt/pure/__collect)) (export "__rtti_base" (global $~lib/rt/__rtti_base)) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -37,7 +89,7 @@ if i32.const 0 i32.const 1040 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -59,7 +111,7 @@ if i32.const 0 i32.const 1040 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -78,23 +130,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -102,72 +154,56 @@ if i32.const 0 i32.const 1040 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -175,7 +211,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -198,7 +234,7 @@ if i32.const 0 i32.const 1040 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -212,22 +248,16 @@ if i32.const 0 i32.const 1040 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -236,7 +266,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -245,7 +275,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -256,16 +286,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -285,7 +309,7 @@ if i32.const 0 i32.const 1040 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -318,8 +342,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -340,7 +364,7 @@ if i32.const 0 i32.const 1040 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -350,17 +374,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1040 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -389,13 +413,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -403,21 +427,15 @@ if i32.const 0 i32.const 1040 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -432,37 +450,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -486,7 +495,7 @@ if i32.const 0 i32.const 1040 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -503,7 +512,7 @@ if i32.const 0 i32.const 1040 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -531,7 +540,7 @@ if i32.const 0 i32.const 1040 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -583,7 +592,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -604,7 +613,8 @@ unreachable end i32.const 1216 - local.tee $0 + local.set $2 + i32.const 1216 i32.const 0 i32.store i32.const 2784 @@ -615,35 +625,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1216 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1216 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -663,7 +664,7 @@ i32.const 1216 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -721,17 +722,14 @@ if i32.const 0 i32.const 1040 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const -1 local.get $1 i32.shl @@ -739,16 +737,10 @@ local.tee $1 if (result i32) local.get $0 + local.get $2 local.get $1 i32.ctz - local.get $2 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -764,111 +756,27 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1040 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 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 15 - i32.and - if - i32.const 0 - i32.const 1040 - i32.const 365 - 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 32 - 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 16 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 16 - 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 16 - 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) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -877,37 +785,38 @@ if i32.const 0 i32.const 1040 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + local.tee $3 i32.const 1073741808 i32.ge_u if i32.const 1088 i32.const 1040 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable end local.get $0 - local.get $1 + local.get $3 i32.const 15 i32.add i32.const -16 i32.and - local.tee $3 + local.tee $1 i32.const 16 - local.get $3 + local.get $1 i32.const 16 i32.gt_u select local.tee $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if i32.const 1 @@ -917,18 +826,19 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if - i32.const 16 memory.size - local.tee $3 + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -953,10 +863,8 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 - local.get $5 - local.get $3 + local.tee $5 + local.get $1 local.get $5 i32.gt_s select @@ -973,7 +881,7 @@ end end local.get $0 - local.get $3 + local.get $1 i32.const 16 i32.shl memory.size @@ -983,19 +891,19 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if i32.const 0 i32.const 1040 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable end end end - local.get $3 + local.get $1 i32.load i32.const -4 i32.and @@ -1004,28 +912,84 @@ if i32.const 0 i32.const 1040 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 0 i32.store offset=4 - local.get $3 + local.get $1 local.get $2 i32.store offset=8 - local.get $3 local.get $1 + local.get $3 i32.store offset=12 local.get $0 - local.get $3 + local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 + local.get $1 + i32.load + local.set $2 local.get $4 - call $~lib/rt/tlsf/prepareBlock - local.get $3 + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1040 + i32.const 357 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const -4 + i32.and + local.get $4 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $4 + local.get $2 + i32.const 2 + i32.and + i32.or + i32.store + local.get $4 + local.get $1 + i32.const 16 + i32.add + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + call $~lib/rt/tlsf/GETRIGHT + local.get $1 + call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $1 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize diff --git a/tests/compiler/runtime-full.untouched.wat b/tests/compiler/runtime-full.untouched.wat index d7ab098ac5..dea3a4a0d6 100644 --- a/tests/compiler/runtime-full.untouched.wat +++ b/tests/compiler/runtime-full.untouched.wat @@ -1,12 +1,12 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result 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_=>_none (func)) (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -27,6 +27,69 @@ (export "__release" (func $~lib/rt/pure/__release)) (export "__collect" (func $~lib/rt/pure/__collect)) (export "__rtti_base" (global $~lib/rt/__rtti_base)) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -35,9 +98,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -50,7 +110,7 @@ if i32.const 0 i32.const 32 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -77,7 +137,7 @@ if i32.const 0 i32.const 32 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -131,7 +191,7 @@ if i32.const 0 i32.const 32 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -156,77 +216,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -243,6 +261,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -254,8 +278,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -263,7 +285,7 @@ if i32.const 0 i32.const 32 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -280,28 +302,18 @@ if i32.const 0 i32.const 32 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -312,44 +324,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -357,30 +359,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 32 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -399,22 +397,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -440,7 +438,7 @@ if i32.const 0 i32.const 32 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -452,18 +450,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 32 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -517,27 +515,15 @@ if i32.const 0 i32.const 32 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -552,24 +538,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -579,31 +551,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -611,8 +567,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -638,24 +592,22 @@ if i32.const 0 i32.const 32 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -663,7 +615,7 @@ if i32.const 0 i32.const 32 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -671,16 +623,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -696,7 +648,7 @@ if i32.const 0 i32.const 32 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -705,8 +657,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -717,49 +669,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -772,10 +720,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -825,73 +769,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -904,11 +821,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -928,7 +845,7 @@ if i32.const 80 i32.const 32 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -954,9 +871,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1024,31 +938,24 @@ if i32.const 0 i32.const 32 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1061,79 +968,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 32 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1170,9 +1046,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1186,12 +1060,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1201,7 +1075,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1238,7 +1112,7 @@ if i32.const 0 i32.const 32 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1289,29 +1163,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1331,7 +1185,7 @@ if i32.const 0 i32.const 32 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1378,7 +1232,7 @@ if i32.const 0 i32.const 32 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1399,7 +1253,7 @@ if i32.const 0 i32.const 32 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1420,7 +1274,7 @@ if i32.const 0 i32.const 32 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index ddd2247e86..7c124d991d 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -1,13 +1,13 @@ (module (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result 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 (func (param i32 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 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -75,6 +75,58 @@ i32.add i32.load ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -89,7 +141,7 @@ if i32.const 0 i32.const 1392 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -111,7 +163,7 @@ if i32.const 0 i32.const 1392 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -130,23 +182,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -154,72 +206,56 @@ if i32.const 0 i32.const 1392 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -227,7 +263,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -250,7 +286,7 @@ if i32.const 0 i32.const 1392 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -264,22 +300,16 @@ if i32.const 0 i32.const 1392 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -288,7 +318,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -297,7 +327,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -308,16 +338,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -337,7 +361,7 @@ if i32.const 0 i32.const 1392 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -370,8 +394,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -392,7 +416,7 @@ if i32.const 0 i32.const 1392 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -402,17 +426,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1392 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -441,13 +465,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -455,21 +479,15 @@ if i32.const 0 i32.const 1392 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -484,37 +502,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -538,7 +547,7 @@ if i32.const 0 i32.const 1392 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -555,7 +564,7 @@ if i32.const 0 i32.const 1392 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -583,7 +592,7 @@ if i32.const 0 i32.const 1392 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -635,7 +644,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -656,7 +665,8 @@ unreachable end i32.const 1536 - local.tee $0 + local.set $2 + i32.const 1536 i32.const 0 i32.store i32.const 3104 @@ -667,35 +677,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1536 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1536 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -715,7 +716,7 @@ i32.const 1536 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -773,17 +774,14 @@ if i32.const 0 i32.const 1392 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const -1 local.get $1 i32.shl @@ -791,16 +789,10 @@ local.tee $1 if (result i32) local.get $0 + local.get $2 local.get $1 i32.ctz - local.get $2 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -816,111 +808,27 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1392 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 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 15 - i32.and - if - i32.const 0 - i32.const 1392 - i32.const 365 - 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 32 - 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 16 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 16 - 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 16 - 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) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -929,37 +837,38 @@ if i32.const 0 i32.const 1392 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + local.tee $3 i32.const 1073741808 i32.ge_u if i32.const 1440 i32.const 1392 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable end local.get $0 - local.get $1 + local.get $3 i32.const 15 i32.add i32.const -16 i32.and - local.tee $3 + local.tee $1 i32.const 16 - local.get $3 + local.get $1 i32.const 16 i32.gt_u select local.tee $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if i32.const 1 @@ -969,18 +878,19 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if - i32.const 16 memory.size - local.tee $3 + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -1005,10 +915,8 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 - local.get $5 - local.get $3 + local.tee $5 + local.get $1 local.get $5 i32.gt_s select @@ -1025,7 +933,7 @@ end end local.get $0 - local.get $3 + local.get $1 i32.const 16 i32.shl memory.size @@ -1035,19 +943,19 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if i32.const 0 i32.const 1392 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable end end end - local.get $3 + local.get $1 i32.load i32.const -4 i32.and @@ -1056,30 +964,86 @@ if i32.const 0 i32.const 1392 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 0 i32.store offset=4 - local.get $3 + local.get $1 local.get $2 i32.store offset=8 - local.get $3 local.get $1 + local.get $3 i32.store offset=12 local.get $0 - local.get $3 + local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 + local.get $1 + i32.load + local.set $2 local.get $4 - call $~lib/rt/tlsf/prepareBlock - local.get $3 + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1392 + i32.const 357 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const -4 + i32.and + local.get $4 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $4 + local.get $2 + i32.const 2 + i32.and + i32.or + i32.store + local.get $4 + local.get $1 + i32.const 16 + i32.add + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + call $~lib/rt/tlsf/GETRIGHT + local.get $1 + call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $1 call $~lib/rt/rtrace/onalloc - local.get $3 + local.get $1 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 86d15dc5a3..37788fe843 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -1,11 +1,11 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 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_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) @@ -114,6 +114,69 @@ drop local.get $2 ) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -122,9 +185,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -137,7 +197,7 @@ if i32.const 0 i32.const 384 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -164,7 +224,7 @@ if i32.const 0 i32.const 384 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -218,7 +278,7 @@ if i32.const 0 i32.const 384 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -243,77 +303,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -330,6 +348,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -341,8 +365,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -350,7 +372,7 @@ if i32.const 0 i32.const 384 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -367,28 +389,18 @@ if i32.const 0 i32.const 384 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -399,44 +411,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -444,30 +446,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 384 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -486,22 +484,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -527,7 +525,7 @@ if i32.const 0 i32.const 384 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -539,18 +537,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 384 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -604,27 +602,15 @@ if i32.const 0 i32.const 384 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -639,24 +625,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -666,31 +638,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -698,8 +654,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -725,24 +679,22 @@ if i32.const 0 i32.const 384 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -750,7 +702,7 @@ if i32.const 0 i32.const 384 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -758,16 +710,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -783,7 +735,7 @@ if i32.const 0 i32.const 384 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -792,8 +744,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -804,49 +756,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -859,10 +807,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -912,73 +856,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -991,11 +908,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -1015,7 +932,7 @@ if i32.const 432 i32.const 384 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -1041,9 +958,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1111,31 +1025,24 @@ if i32.const 0 i32.const 384 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1148,79 +1055,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 384 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1257,9 +1133,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1273,12 +1147,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1288,7 +1162,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1325,7 +1199,7 @@ if i32.const 0 i32.const 384 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1376,29 +1250,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1418,7 +1272,7 @@ if i32.const 0 i32.const 384 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1465,7 +1319,7 @@ if i32.const 0 i32.const 384 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1486,7 +1340,7 @@ if i32.const 0 i32.const 384 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1507,7 +1361,7 @@ if i32.const 0 i32.const 384 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -2566,238 +2420,233 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if local.get $0 - local.set $5 local.get $1 - local.set $4 local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if i32.const 0 - i32.const 1 + i32.const 2 i32.lt_s drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.tee $7 + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 i32.const 1 i32.add - local.set $5 - local.get $7 + local.set $0 local.get $4 - local.tee $7 + local.get $1 + local.tee $4 i32.const 1 i32.add - local.set $4 - local.get $7 + local.set $1 + local.get $4 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 + br $while-continue|0 end end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) (func $~lib/rt/__allocBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index d1cec40ab1..c2db4f8379 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -6,20 +6,23 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) - (type $none_=>_i32 (func (result i32))) (type $none_=>_f64 (func (result f64))) (type $none_=>_none (func)) - (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) + (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) (type $i64_=>_none (func (param i64))) + (type $none_=>_i32 (func (result i32))) (type $i32_i32_f64_=>_i32 (func (param i32 i32 f64) (result i32))) (type $i32_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i64_=>_i32 (func (param i64) (result i32))) (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) + (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (type $i64_=>_i64 (func (param i64) (result i64))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_i32_=>_f32 (func (param i32 i32 i32) (result f32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) @@ -232,8 +235,8 @@ (data (i32.const 9664) " \00\00\00\01\00\00\00\00\00\00\00 \00\00\00p$\00\00\b0$\00\00\00\00\00\00\d0$\00\00\10%\00\000%\00\00P%\00\00\90%") (data (i32.const 9716) "\01") (data (i32.const 9732) "\01") - (table $0 57 funcref) - (elem (i32.const 1) $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|2 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|16 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0) + (table $0 56 funcref) + (elem (i32.const 1) $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|2 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|16 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) @@ -253,6 +256,58 @@ (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "_start" (func $~start)) (export "memory" (memory $0)) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -267,7 +322,7 @@ if i32.const 0 i32.const 1136 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -289,7 +344,7 @@ if i32.const 0 i32.const 1136 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -308,23 +363,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -332,72 +387,56 @@ if i32.const 0 i32.const 1136 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -405,7 +444,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -428,7 +467,7 @@ if i32.const 0 i32.const 1136 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -442,22 +481,16 @@ if i32.const 0 i32.const 1136 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -466,7 +499,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -475,7 +508,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -486,16 +519,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -515,7 +542,7 @@ if i32.const 0 i32.const 1136 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -548,8 +575,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -570,7 +597,7 @@ if i32.const 0 i32.const 1136 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -580,17 +607,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1136 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -619,13 +646,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -633,21 +660,15 @@ if i32.const 0 i32.const 1136 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -662,37 +683,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -716,7 +728,7 @@ if i32.const 0 i32.const 1136 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -733,7 +745,7 @@ if i32.const 0 i32.const 1136 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -761,7 +773,7 @@ if i32.const 0 i32.const 1136 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -813,7 +825,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -834,7 +846,8 @@ unreachable end i32.const 9744 - local.tee $0 + local.set $2 + i32.const 9744 i32.const 0 i32.store i32.const 11312 @@ -845,35 +858,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 9744 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 9744 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -893,7 +897,7 @@ i32.const 9744 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) local.get $0 @@ -902,7 +906,7 @@ if i32.const 1184 i32.const 1136 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -975,17 +979,14 @@ if i32.const 0 i32.const 1136 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const -1 local.get $1 i32.shl @@ -993,16 +994,10 @@ local.tee $1 if (result i32) local.get $0 + local.get $2 local.get $1 i32.ctz - local.get $2 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -1018,31 +1013,22 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1136 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end @@ -1060,7 +1046,7 @@ if i32.const 0 i32.const 1136 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1103,20 +1089,9 @@ i32.and i32.store local.get $1 - i32.const 16 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 + call $~lib/rt/tlsf/GETRIGHT local.get $1 - i32.load - i32.const -4 - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const -3 i32.and @@ -1131,7 +1106,7 @@ if i32.const 0 i32.const 1136 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1154,15 +1129,16 @@ local.tee $3 i32.eqz if - i32.const 16 memory.size local.tee $3 i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -1187,9 +1163,7 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 - local.get $5 + local.tee $5 local.get $3 local.get $5 i32.gt_s @@ -1222,7 +1196,7 @@ if i32.const 0 i32.const 1136 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1238,7 +1212,7 @@ if i32.const 0 i32.const 1136 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -1271,176 +1245,185 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) - (local $5 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $2 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.tee $3 - local.get $1 - i32.store8 offset=3 - local.get $2 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - local.get $1 - i32.store8 offset=1 - local.get $0 - local.get $1 - i32.store8 offset=2 - local.get $3 - local.get $1 - i32.store8 offset=2 - local.get $3 - local.get $1 - i32.store8 offset=1 - local.get $2 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - local.get $1 - i32.store8 offset=3 - local.get $3 - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $5 - i32.add - local.tee $3 - local.get $1 - i32.const 255 - i32.and - i32.const 16843009 - i32.mul - local.tee $0 - i32.store - local.get $3 - local.get $2 - local.get $5 - i32.sub - i32.const -4 - i32.and - local.tee $2 - i32.add - i32.const 28 - i32.sub - local.tee $1 - local.get $0 - i32.store offset=24 - local.get $2 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $3 - local.get $0 - i32.store offset=4 - local.get $3 - local.get $0 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=16 - local.get $1 - local.get $0 - i32.store offset=20 - local.get $2 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $3 - local.get $0 - i32.store offset=12 - local.get $3 - local.get $0 - i32.store offset=16 - local.get $3 - local.get $0 - i32.store offset=20 - local.get $3 - local.get $0 - i32.store offset=24 - local.get $1 - local.get $0 - i32.store - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - local.get $0 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=12 - local.get $3 - local.get $3 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.tee $3 + local.get $1 + i32.store8 offset=3 + local.get $2 + i32.const 2 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store8 offset=1 + local.get $0 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=1 + local.get $2 + i32.const 6 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store8 offset=3 + local.get $3 + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $3 + i32.add + local.tee $0 + local.get $1 + i32.const 255 + i32.and + i32.const 16843009 + i32.mul + local.tee $1 + i32.store + local.get $0 + local.get $2 + local.get $3 + i32.sub + i32.const -4 + i32.and + local.tee $3 + i32.add + i32.const 28 + i32.sub + local.tee $2 + local.get $1 + i32.store offset=24 + local.get $3 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + i32.store offset=8 + local.get $2 + local.get $1 + i32.store offset=16 + local.get $2 + local.get $1 + i32.store offset=20 + local.get $3 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=16 + local.get $0 + local.get $1 + i32.store offset=20 + local.get $0 + local.get $1 + i32.store offset=24 + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + local.get $1 + i32.store offset=8 + local.get $2 + local.get $1 + i32.store offset=12 + local.get $0 + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $2 + i32.add + local.set $0 + local.get $3 + local.get $2 + i32.sub + local.set $2 + local.get $1 + i64.extend_i32_u + local.get $1 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $4 + loop $while-continue|0 local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $0 - i64.extend_i32_u - local.get $0 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $4 - loop $while-continue|0 + i32.const 32 + i32.ge_u + if + local.get $0 + local.get $4 + i64.store + local.get $0 + local.get $4 + i64.store offset=8 + local.get $0 + local.get $4 + i64.store offset=16 + local.get $0 + local.get $4 + i64.store offset=24 local.get $2 i32.const 32 - i32.ge_u - if - local.get $1 - local.get $4 - i64.store - local.get $1 - local.get $4 - i64.store offset=8 - local.get $1 - local.get $4 - i64.store offset=16 - local.get $1 - local.get $4 - i64.store offset=24 - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 end end ) @@ -1532,7 +1515,7 @@ local.tee $1 i32.const 0 local.get $4 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 3 call $~lib/rt/tlsf/__alloc @@ -1588,182 +1571,185 @@ i32.store local.get $1 ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $0 + local.get $1 + i32.lt_u + if local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 + i32.const 7 + i32.and local.get $0 - local.get $1 - i32.lt_u + i32.const 7 + i32.and + i32.eq if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + return end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $2 + i32.const 1 + i32.sub + local.set $2 local.get $0 - local.tee $2 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $1 - local.get $2 local.get $3 + local.get $4 i32.load8_u i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 + br $while-continue|0 end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 - local.get $4 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and if - local.get $4 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $4 + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 + local.get $2 + i32.const 8 + i32.sub + local.tee $2 i32.add local.get $1 - local.get $4 + local.get $2 i32.add - i32.load8_u - i32.store8 - br $while-continue|5 + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) (func $~lib/rt/__allocArray (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 16 local.get $2 call $~lib/rt/tlsf/__alloc @@ -1771,28 +1757,26 @@ local.get $0 local.get $1 i32.shl - local.tee $1 - local.set $5 - local.get $1 + local.tee $5 + local.tee $6 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $4 + local.set $1 local.get $3 if - local.get $4 + local.get $1 local.get $3 - local.get $5 - call $~lib/memory/memory.copy + local.get $6 + call $~lib/util/memory/memmove end - local.get $4 - local.tee $3 + local.get $1 call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $3 + local.get $1 i32.store offset=4 local.get $2 - local.get $1 + local.get $5 i32.store offset=8 local.get $2 local.get $0 @@ -1861,7 +1845,7 @@ local.get $3 local.get $2 i32.sub - call $~lib/memory/memory.fill + call $~lib/util/memory/memset end local.get $0 call $~lib/rt/pure/__retain @@ -2114,7 +2098,7 @@ if i32.const 0 i32.const 1136 - i32.const 581 + i32.const 573 i32.const 3 call $~lib/builtins/abort unreachable @@ -2160,13 +2144,7 @@ return end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.tee $6 i32.load local.tee $4 @@ -2190,10 +2168,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 @@ -2223,7 +2201,7 @@ i32.const 16 i32.add local.get $2 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $1 i32.const 9744 i32.ge_u @@ -2280,7 +2258,7 @@ local.get $4 local.get $2 i32.sub - call $~lib/memory/memory.fill + call $~lib/util/memory/memset local.get $1 local.get $3 i32.ne @@ -2391,7 +2369,7 @@ i32.const 2 i32.shl local.tee $0 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $0 local.get $5 i32.add @@ -2400,12 +2378,13 @@ local.get $4 i32.const 2 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 ) (func $~lib/array/Array#copyWithin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $3 local.get $0 i32.load offset=12 @@ -2414,10 +2393,10 @@ local.get $4 i32.lt_s select - local.set $3 + local.set $5 local.get $0 i32.load offset=4 - local.tee $5 + local.tee $6 local.get $1 i32.const 0 i32.lt_s @@ -2439,11 +2418,11 @@ i32.lt_s select end - local.tee $1 + local.tee $3 i32.const 2 i32.shl i32.add - local.get $5 + local.get $6 local.get $2 i32.const 0 i32.lt_s @@ -2451,9 +2430,9 @@ local.get $2 local.get $4 i32.add - local.tee $2 + local.tee $1 i32.const 0 - local.get $2 + local.get $1 i32.const 0 i32.gt_s select @@ -2465,36 +2444,36 @@ i32.lt_s select end - local.tee $2 + local.tee $1 i32.const 2 i32.shl i32.add - local.get $3 + local.get $5 i32.const 0 i32.lt_s if (result i32) - local.get $3 local.get $4 + local.get $5 i32.add - local.tee $3 + local.tee $2 i32.const 0 - local.get $3 + local.get $2 i32.const 0 i32.gt_s select else - local.get $3 + local.get $5 local.get $4 - local.get $3 + local.get $5 local.get $4 i32.lt_s select end - local.get $2 + local.get $1 i32.sub local.tee $2 local.get $4 - local.get $1 + local.get $3 i32.sub local.tee $1 local.get $2 @@ -2503,7 +2482,7 @@ select i32.const 2 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $0 call $~lib/rt/pure/__retain ) @@ -2528,7 +2507,7 @@ i32.sub i32.const 2 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $3 local.get $1 i32.store @@ -2666,7 +2645,7 @@ local.get $2 i32.const 2 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $3 local.get $1 local.get $2 @@ -2685,7 +2664,7 @@ i32.sub i32.const 2 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove end local.get $0 local.get $3 @@ -2757,7 +2736,7 @@ local.get $2 i32.const 2 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $3 local.get $1 local.get $2 @@ -2776,7 +2755,7 @@ i32.sub i32.const 2 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove end local.get $0 local.get $3 @@ -2875,7 +2854,7 @@ local.get $1 i32.const 2 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $3 local.get $1 local.get $2 @@ -2894,7 +2873,7 @@ i32.sub i32.const 2 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove end local.get $0 local.get $3 @@ -3747,7 +3726,7 @@ if i32.const 0 i32.const 5040 - i32.const 1404 + i32.const 1381 i32.const 5 call $~lib/builtins/abort unreachable @@ -3773,7 +3752,7 @@ local.tee $5 i32.const 0 local.get $2 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset local.get $1 i32.const 1 i32.sub @@ -4053,7 +4032,7 @@ local.tee $5 i32.const 0 local.get $2 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset local.get $1 i32.const 1 i32.sub @@ -4354,7 +4333,7 @@ local.tee $5 i32.const 0 local.get $3 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset local.get $1 i32.const 1 i32.sub @@ -4941,89 +4920,6 @@ call $~lib/rt/pure/__release end ) - (func $std/array/createReverseOrderedNestedArray (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 8 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - i32.const 0 - i32.const 8 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 12 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $2 - i32.const 0 - i32.store - local.get $2 - i32.const 0 - i32.store offset=4 - local.get $2 - i32.const 0 - i32.store offset=8 - local.get $2 - i32.const 0 - i32.store offset=12 - local.get $0 - local.set $1 - local.get $0 - local.get $2 - i32.load - local.tee $4 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $4 - call $~lib/rt/pure/__release - end - local.get $2 - local.get $1 - i32.store - local.get $2 - local.get $0 - i32.store offset=4 - local.get $2 - i32.const 8 - i32.store offset=8 - local.get $2 - 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 $0 - i32.const 0 - i32.const 1 - local.get $3 - i32.sub - call $~lib/array/Array#__set - local.get $2 - local.get $3 - local.get $0 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - ) (func $start:std/array~anonymous|47 (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 @@ -5203,109 +5099,25 @@ local.get $3 call $~lib/rt/pure/__release local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const 1 - end - i32.eqz - if - i32.const 0 - i32.const 1296 - i32.const 887 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - 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 2048 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - i32.const 0 - i32.const 2048 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 14 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $2 - i32.const 0 - i32.store - local.get $2 - i32.const 0 - i32.store offset=4 - local.get $2 - i32.const 0 - i32.store offset=8 - local.get $2 - i32.const 0 - i32.store offset=12 - local.get $0 - local.set $1 - local.get $0 - local.get $2 - i32.load - local.tee $4 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $4 - call $~lib/rt/pure/__release - end - local.get $2 - local.get $1 - i32.store - local.get $2 - local.get $0 - i32.store offset=4 - local.get $2 - i32.const 2048 - i32.store offset=8 - local.get $2 - 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 13 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 511 - local.get $3 - i32.sub - i32.store - local.get $2 - local.get $3 - local.get $0 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end end + i32.const 1 end - local.get $2 + i32.eqz + if + i32.const 0 + i32.const 1296 + i32.const 887 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $5 + call $~lib/rt/pure/__release ) (func $start:std/array~anonymous|48 (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -5486,64 +5298,65 @@ (local $2 i32) (local $3 i32) (local $4 i32) - block $__inlined_func$~lib/string/String#concat (result i32) - local.get $0 - i32.const 6176 - local.get $0 - select - local.set $2 + local.get $0 + i32.const 6176 + local.get $0 + select + local.set $2 + local.get $1 + call $~lib/rt/pure/__retain + local.tee $1 + i32.eqz + if local.get $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.eqz + i32.const 6176 + i32.ne if - local.get $0 - i32.const 6176 - i32.ne - if - local.get $0 - call $~lib/rt/pure/__release - end - i32.const 6176 - local.set $0 + local.get $1 + call $~lib/rt/pure/__release end + i32.const 6176 + local.set $1 + end + block $__inlined_func$~lib/string/String#concat local.get $2 call $~lib/string/String#get:length i32.const 1 i32.shl local.tee $3 - local.get $0 + local.get $1 call $~lib/string/String#get:length i32.const 1 i32.shl local.tee $4 i32.add - local.tee $1 + local.tee $0 i32.eqz if - local.get $0 - call $~lib/rt/pure/__release i32.const 6064 + local.set $0 + local.get $1 + call $~lib/rt/pure/__release br $__inlined_func$~lib/string/String#concat end - local.get $1 + local.get $0 i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 local.get $2 local.get $3 - call $~lib/memory/memory.copy - local.get $1 + call $~lib/util/memory/memmove + local.get $0 local.get $3 i32.add - local.get $0 + local.get $1 local.get $4 - call $~lib/memory/memory.copy - local.get $0 - call $~lib/rt/pure/__release + call $~lib/util/memory/memmove local.get $1 + call $~lib/rt/pure/__release end + local.get $0 ) (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -5615,7 +5428,7 @@ local.get $1 i32.add local.get $3 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 call $~lib/rt/pure/__retain ) @@ -5690,7 +5503,7 @@ local.get $6 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.get $6 i32.add @@ -5706,7 +5519,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.get $4 i32.add @@ -5740,7 +5553,7 @@ local.get $0 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $7 local.get $0 local.get $2 @@ -5799,7 +5612,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -5858,7 +5671,7 @@ local.tee $2 local.get $0 local.get $3 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core local.get $1 if local.get $2 @@ -5913,7 +5726,7 @@ local.get $1 i32.add local.tee $0 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core local.get $0 ) (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -5984,7 +5797,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $3 local.get $5 i32.add @@ -6048,7 +5861,7 @@ local.tee $2 local.get $0 local.get $1 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core local.get $2 call $~lib/rt/pure/__retain ) @@ -6076,7 +5889,7 @@ local.get $2 call $~lib/util/number/decimalCount32 local.tee $0 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core local.get $0 ) (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -6147,7 +5960,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $3 local.get $5 i32.add @@ -6192,14 +6005,121 @@ local.get $1 call $~lib/util/string/joinIntegerArray ) + (func $~lib/util/number/umul64f (param $0 i64) (param $1 i64) (result i64) + (local $2 i64) + (local $3 i64) + local.get $1 + i64.const 4294967295 + i64.and + local.tee $2 + local.get $0 + i64.const 32 + i64.shr_u + local.tee $3 + i64.mul + local.get $2 + local.get $0 + i64.const 4294967295 + i64.and + local.tee $2 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.set $0 + local.get $3 + local.get $1 + i64.const 32 + i64.shr_u + local.tee $1 + i64.mul + local.get $0 + i64.const 32 + i64.shr_u + i64.add + local.get $1 + local.get $2 + i64.mul + local.get $0 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + i64.add + ) + (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.add + i32.const -64 + i32.sub + ) + (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) + local.get $0 + local.get $1 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.tee $0 + i32.load16_u + local.set $1 + loop $while-continue|1 + i32.const 1 + local.get $5 + local.get $3 + i64.sub + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.sub + i64.gt_u + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.lt_u + select + i32.const 0 + local.get $2 + local.get $3 + i64.sub + local.get $4 + i64.ge_u + i32.const 0 + local.get $3 + local.get $5 + i64.lt_u + select + select + if + local.get $1 + i32.const 1 + i32.sub + local.set $1 + local.get $3 + local.get $4 + i64.add + local.set $3 + br $while-continue|1 + end + end + local.get $0 + local.get $1 + i32.store16 + ) (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) - (local $8 i64) + (local $8 i32) (local $9 i64) - (local $10 i32) + (local $10 i64) (local $11 i64) (local $12 i64) - (local $13 i64) local.get $3 local.get $1 i64.sub @@ -6209,25 +6129,25 @@ i32.const 0 local.get $4 i32.sub - local.tee $10 + local.tee $8 i64.extend_i32_s i64.shl - local.tee $11 + local.tee $10 i64.const 1 i64.sub - local.tee $12 + local.tee $11 i64.and - local.set $8 + local.set $1 local.get $3 - local.get $10 + local.get $8 i64.extend_i32_s i64.shr_u i32.wrap_i64 - local.tee $7 + local.tee $2 call $~lib/util/number/decimalCount32 - local.set $4 + local.set $7 loop $while-continue|0 - local.get $4 + local.get $7 i32.const 0 i32.gt_s if @@ -6242,116 +6162,116 @@ block $case3|1 block $case2|1 block $case1|1 - local.get $4 - local.tee $2 + local.get $7 + local.tee $4 i32.const 10 i32.ne if - local.get $2 + local.get $4 i32.const 1 i32.sub br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 end - local.get $7 + local.get $2 i32.const 1000000000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 1000000000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 100000000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 100000000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 10000000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 10000000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 1000000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 1000000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 100000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 100000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 10000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 10000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 1000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 1000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 100 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 100 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 10 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 10 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 - local.set $2 + local.get $2 + local.set $4 i32.const 0 - local.set $7 + local.set $2 br $break|1 end i32.const 0 - local.set $2 + local.set $4 end - local.get $2 + local.get $4 local.get $6 i32.or if @@ -6360,7 +6280,7 @@ i32.const 1 i32.shl i32.add - local.get $2 + local.get $4 i32.const 65535 i32.and i32.const 48 @@ -6371,110 +6291,61 @@ i32.add local.set $6 end - local.get $4 + local.get $7 i32.const 1 i32.sub - local.set $4 - local.get $8 - local.get $7 + local.set $7 + local.get $1 + local.get $2 i64.extend_i32_u - local.get $10 + local.get $8 i64.extend_i32_s i64.shl i64.add - local.tee $1 + local.tee $3 local.get $5 i64.le_u if - local.get $4 + local.get $7 global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $4 - i32.const 2 - i32.shl - i32.const 7768 - i32.add - i64.load32_u - local.get $10 - i64.extend_i32_s - i64.shl - local.set $3 local.get $0 local.get $6 - i32.const 1 - i32.sub - i32.const 1 + local.get $5 + local.get $3 + local.get $7 + i32.const 2 i32.shl + i32.const 7768 i32.add - local.tee $2 - i32.load16_u - local.set $4 - loop $while-continue|3 - i32.const 1 - local.get $9 - local.get $1 - i64.sub - local.get $1 - local.get $3 - i64.add - local.get $9 - i64.sub - i64.gt_u - local.get $1 - local.get $3 - i64.add - local.get $9 - i64.lt_u - select - i32.const 0 - local.get $5 - local.get $1 - i64.sub - local.get $3 - i64.ge_u - i32.const 0 - local.get $1 - local.get $9 - i64.lt_u - select - select - if - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.get $3 - i64.add - local.set $1 - br $while-continue|3 - end - end - local.get $2 - local.get $4 - i32.store16 + i64.load32_u + local.get $8 + i64.extend_i32_s + i64.shl + local.get $9 + call $~lib/util/number/grisuRound local.get $6 return end br $while-continue|0 end end - local.get $10 + local.get $8 i64.extend_i32_s - local.set $13 - loop $while-continue|4 (result i32) + local.set $3 + loop $while-continue|2 (result i32) local.get $5 i64.const 10 i64.mul local.set $5 - local.get $8 + local.get $1 i64.const 10 i64.mul - local.tee $3 - local.get $13 - i64.shr_u local.tee $1 + local.get $3 + i64.shr_u + local.tee $12 local.get $6 i64.extend_i32_s i64.or @@ -6483,41 +6354,45 @@ if local.get $0 local.get $6 + local.tee $2 i32.const 1 i32.shl i32.add - local.get $1 + local.get $12 i32.wrap_i64 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 - local.get $6 + local.get $2 i32.const 1 i32.add local.set $6 end - local.get $4 + local.get $7 i32.const 1 i32.sub - local.set $4 - local.get $3 - local.get $12 + local.set $7 + local.get $1 + local.get $11 i64.and - local.tee $8 + local.tee $1 local.get $5 i64.ge_u - br_if $while-continue|4 - local.get $4 + br_if $while-continue|2 + local.get $7 global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $8 - local.set $1 + local.get $0 + local.get $6 + local.get $5 + local.get $1 + local.get $10 local.get $9 i32.const 0 - local.get $4 + local.get $7 i32.sub i32.const 2 i32.shl @@ -6525,64 +6400,185 @@ i32.add i64.load32_u i64.mul - local.set $3 - local.get $0 - local.get $6 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_u - local.set $4 - loop $while-continue|6 - i32.const 1 - local.get $3 - local.get $1 - i64.sub - local.get $1 - local.get $11 - i64.add - local.get $3 - i64.sub - i64.gt_u - local.get $1 - local.get $11 - i64.add - local.get $3 - i64.lt_u - select - i32.const 0 - local.get $5 - local.get $1 - i64.sub - local.get $11 - i64.ge_u - i32.const 0 - local.get $1 - local.get $3 - i64.lt_u - select - select - if - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.get $11 - i64.add - local.set $1 - br $while-continue|6 - end - end - local.get $2 - local.get $4 - i32.store16 + call $~lib/util/number/grisuRound local.get $6 end ) + (func $~lib/util/number/grisu2 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i64) + (local $5 i32) + (local $6 i64) + (local $7 i32) + local.get $0 + i64.reinterpret_f64 + local.tee $4 + i64.const 9218868437227405312 + i64.and + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.tee $5 + i32.const 0 + i32.ne + i64.extend_i32_u + i64.const 52 + i64.shl + local.get $4 + i64.const 4503599627370495 + i64.and + i64.add + local.tee $4 + i64.const 1 + i64.shl + i64.const 1 + i64.add + local.tee $6 + i64.clz + i32.wrap_i64 + local.set $3 + local.get $6 + local.get $3 + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_plus + local.get $5 + i32.const 1 + local.get $5 + select + i32.const 1075 + i32.sub + local.tee $5 + i32.const 1 + i32.sub + local.get $3 + i32.sub + local.set $3 + local.get $4 + local.get $4 + i64.const 4503599627370496 + i64.eq + i32.const 1 + i32.add + local.tee $7 + i64.extend_i32_s + i64.shl + i64.const 1 + i64.sub + local.get $5 + local.get $7 + i32.sub + local.get $3 + i32.sub + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_minus + local.get $3 + global.set $~lib/util/number/_exp + i32.const 348 + i32.const -61 + global.get $~lib/util/number/_exp + i32.sub + f64.convert_i32_s + f64.const 0.30102999566398114 + f64.mul + f64.const 347 + f64.add + local.tee $0 + i32.trunc_f64_s + local.tee $3 + local.get $3 + f64.convert_i32_s + local.get $0 + f64.ne + i32.add + i32.const 3 + i32.shr_s + i32.const 1 + i32.add + local.tee $3 + i32.const 3 + i32.shl + local.tee $7 + i32.sub + global.set $~lib/util/number/_K + local.get $7 + i32.const 6896 + i32.add + i64.load + global.set $~lib/util/number/_frc_pow + local.get $3 + i32.const 1 + i32.shl + i32.const 7592 + i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow + global.get $~lib/util/number/_exp_pow + local.set $3 + local.get $1 + local.get $4 + local.get $4 + i64.clz + i32.wrap_i64 + local.tee $1 + i64.extend_i32_s + i64.shl + global.get $~lib/util/number/_frc_pow + local.tee $4 + call $~lib/util/number/umul64f + local.get $5 + local.get $1 + i32.sub + local.get $3 + call $~lib/util/number/umul64e + global.get $~lib/util/number/_frc_plus + local.get $4 + call $~lib/util/number/umul64f + i64.const 1 + i64.sub + local.tee $6 + global.get $~lib/util/number/_exp + local.get $3 + call $~lib/util/number/umul64e + local.get $6 + global.get $~lib/util/number/_frc_minus + local.get $4 + call $~lib/util/number/umul64f + i64.const 1 + i64.add + i64.sub + local.get $2 + call $~lib/util/number/genDigits + ) + (func $~lib/util/number/genExponent (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.const 0 + i32.lt_s + local.tee $2 + if + i32.const 0 + local.get $1 + i32.sub + local.set $1 + end + local.get $1 + local.get $1 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.tee $1 + call $~lib/util/number/utoa32_core + local.get $0 + i32.const 45 + i32.const 43 + local.get $2 + select + i32.store16 + local.get $1 + ) (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 @@ -6667,7 +6663,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $0 i32.const 46 i32.store16 @@ -6696,7 +6692,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $0 i32.const 3014704 i32.store @@ -6733,36 +6729,12 @@ i32.const 101 i32.store16 offset=2 local.get $0 - local.tee $1 i32.const 4 i32.add local.get $3 i32.const 1 i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $2 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $1 - i32.const 45 - i32.const 43 - local.get $2 - select - i32.store16 offset=4 - local.get $0 + call $~lib/util/number/genExponent i32.const 2 i32.add else @@ -6778,7 +6750,7 @@ local.tee $2 i32.const 2 i32.sub - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $0 i32.const 46 i32.store16 offset=2 @@ -6789,36 +6761,12 @@ i32.const 101 i32.store16 offset=2 local.get $0 - local.tee $2 i32.const 4 i32.add local.get $3 i32.const 1 i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $3 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $2 - i32.const 45 - i32.const 43 - local.get $3 - select - i32.store16 offset=4 - local.get $0 + call $~lib/util/number/genExponent local.get $1 i32.add i32.const 2 @@ -6829,294 +6777,33 @@ end ) (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) - (local $2 i64) - (local $3 i64) - (local $4 i32) - (local $5 i64) - (local $6 i32) - (local $7 i64) - (local $8 i32) - (local $9 i32) - (local $10 i64) + (local $2 i32) local.get $1 f64.const 0 f64.lt - local.tee $8 - if (result f64) - local.get $0 - i32.const 45 - i32.store16 - local.get $1 - f64.neg - else - local.get $1 - end - i64.reinterpret_f64 - local.tee $3 - i64.const 9218868437227405312 - i64.and - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.tee $6 - i32.const 0 - i32.ne - i64.extend_i32_u - i64.const 52 - i64.shl - local.get $3 - i64.const 4503599627370495 - i64.and - i64.add - local.tee $2 - i64.const 1 - i64.shl - i64.const 1 - i64.add - local.tee $3 - local.get $3 - i64.clz - i32.wrap_i64 - local.tee $4 - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_plus - local.get $6 - i32.const 1 - local.get $6 - select - i32.const 1075 - i32.sub - local.tee $6 - i32.const 1 - i32.sub - local.get $4 - i32.sub - local.set $4 - local.get $2 - local.get $2 - i64.const 4503599627370496 - i64.eq - i32.const 1 - i32.add - local.tee $9 - i64.extend_i32_s - i64.shl - i64.const 1 - i64.sub - local.get $6 - local.get $9 - i32.sub - local.get $4 - i32.sub - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_minus - local.get $4 - global.set $~lib/util/number/_exp - i32.const 348 - i32.const -61 - global.get $~lib/util/number/_exp - i32.sub - f64.convert_i32_s - f64.const 0.30102999566398114 - f64.mul - f64.const 347 - f64.add - local.tee $1 - i32.trunc_f64_s - local.tee $4 - local.get $4 - f64.convert_i32_s - local.get $1 - f64.ne - i32.add - i32.const 3 - i32.shr_s - i32.const 1 - i32.add - local.tee $4 - i32.const 3 - i32.shl - local.tee $9 - i32.sub - global.set $~lib/util/number/_K - local.get $9 - i32.const 6896 - i32.add - i64.load - global.set $~lib/util/number/_frc_pow - local.get $4 - i32.const 1 - i32.shl - i32.const 7592 - i32.add - i32.load16_s - global.set $~lib/util/number/_exp_pow - global.get $~lib/util/number/_frc_pow - local.tee $3 - i64.const 4294967295 - i64.and - local.set $5 - local.get $0 - local.get $8 - i32.const 1 - i32.shl - i32.add - local.get $0 - local.get $2 - local.get $2 - i64.clz - i32.wrap_i64 - local.tee $0 - i64.extend_i32_s - i64.shl - local.tee $2 - i64.const 32 - i64.shr_u - local.tee $7 - local.get $3 - i64.const 32 - i64.shr_u - local.tee $10 - i64.mul - local.get $5 - local.get $7 - i64.mul - local.get $2 - i64.const 4294967295 - i64.and - local.tee $2 - local.get $5 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $5 - i64.const 32 - i64.shr_u - i64.add - local.get $2 - local.get $10 - i64.mul - local.get $5 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - global.get $~lib/util/number/_exp_pow - local.tee $4 - local.get $6 - local.get $0 - i32.sub - i32.add - i32.const -64 - i32.sub - global.get $~lib/util/number/_frc_plus - local.tee $2 - i64.const 32 - i64.shr_u - local.tee $5 - local.get $3 - i64.const 32 - i64.shr_u - local.tee $7 - i64.mul - local.get $3 - i64.const 4294967295 - i64.and - local.tee $10 - local.get $5 - i64.mul - local.get $2 - i64.const 4294967295 - i64.and local.tee $2 - local.get $10 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $5 - i64.const 32 - i64.shr_u - i64.add + if + local.get $0 + i32.const 45 + i32.store16 + local.get $1 + f64.neg + local.set $1 + end + local.get $0 local.get $2 - local.get $7 - i64.mul - local.get $5 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - i64.const 1 - i64.sub - local.tee $2 - local.get $4 - global.get $~lib/util/number/_exp + i32.const 1 + i32.shl i32.add - i32.const -64 - i32.sub - local.get $2 - global.get $~lib/util/number/_frc_minus - local.tee $2 - i64.const 32 - i64.shr_u - local.tee $5 - local.get $3 - i64.const 32 - i64.shr_u - local.tee $7 - i64.mul - local.get $3 - i64.const 4294967295 - i64.and - local.tee $3 - local.get $5 - i64.mul + local.get $1 + local.get $0 local.get $2 - i64.const 4294967295 - i64.and - local.tee $2 - local.get $3 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $3 - i64.const 32 - i64.shr_u - i64.add + call $~lib/util/number/grisu2 local.get $2 - local.get $7 - i64.mul - local.get $3 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - i64.const 1 - i64.add - i64.sub - local.get $8 - call $~lib/util/number/genDigits - local.get $8 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.get $8 + local.get $2 i32.add ) (func $~lib/util/number/dtoa_stream (param $0 i32) (param $1 i32) (param $2 f64) (result i32) @@ -7320,7 +7007,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.get $5 i32.add @@ -7752,7 +7439,7 @@ local.get $0 local.get $2 local.get $1 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core local.get $1 ) (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) @@ -7821,7 +7508,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.get $4 i32.add @@ -7888,7 +7575,7 @@ local.get $0 local.get $2 local.get $1 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core local.get $1 ) (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) @@ -7959,7 +7646,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.get $4 i32.add @@ -8042,7 +7729,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_core (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -8104,14 +7791,14 @@ local.get $0 local.get $3 local.get $1 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core else local.get $0 local.get $2 local.get $2 call $~lib/util/number/decimalCount64High local.tee $1 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa64_core end local.get $1 ) @@ -8159,7 +7846,7 @@ local.tee $0 local.get $1 local.get $2 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core else local.get $4 call $~lib/util/number/decimalCount64High @@ -8171,7 +7858,7 @@ local.tee $0 local.get $4 local.get $1 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa64_core end local.get $0 call $~lib/rt/pure/__retain @@ -8222,7 +7909,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.get $5 i32.add @@ -8312,7 +7999,7 @@ local.get $1 local.get $3 local.get $0 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core else local.get $1 local.get $2 @@ -8321,7 +8008,7 @@ local.get $0 i32.add local.tee $0 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa64_core end local.get $0 ) @@ -8382,7 +8069,7 @@ local.tee $1 local.get $2 local.get $4 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core else local.get $3 call $~lib/util/number/decimalCount64High @@ -8396,7 +8083,7 @@ local.tee $1 local.get $3 local.get $2 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa64_core end local.get $0 if @@ -8453,7 +8140,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.get $5 i32.add @@ -8689,7 +8376,7 @@ local.get $0 local.get $2 local.get $1 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core local.get $1 ) (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) @@ -8758,7 +8445,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.get $4 i32.add @@ -9389,7 +9076,7 @@ local.get $2 i32.load offset=8 local.tee $2 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.get $4 i32.add @@ -9493,7 +9180,7 @@ local.get $4 i32.load offset=8 local.tee $4 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $4 local.get $5 i32.add @@ -9546,10 +9233,10 @@ (local $11 i32) (local $12 i32) (local $13 i32) - (local $14 f32) - (local $15 f64) - (local $16 i32) - (local $17 i32) + (local $14 i32) + (local $15 i32) + (local $16 f32) + (local $17 f64) (local $18 i32) (local $19 i32) (local $20 i32) @@ -9603,52 +9290,52 @@ i32.const 5 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $1 + local.set $2 i32.const 1 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 i32.const 0 i32.const 1 - call $~lib/memory/memory.fill - local.get $1 + call $~lib/util/memory/memset + local.get $2 i32.eqz if i32.const 12 i32.const 2 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $1 + local.set $2 end - local.get $1 + local.get $2 i32.const 0 i32.store - local.get $1 + local.get $2 i32.const 0 i32.store offset=4 - local.get $1 + local.get $2 i32.const 0 i32.store offset=8 - local.get $2 - local.tee $0 local.get $1 + local.tee $0 + local.get $2 i32.load - local.tee $4 + local.tee $5 i32.ne if local.get $0 call $~lib/rt/pure/__retain local.set $0 - local.get $4 + local.get $5 call $~lib/rt/pure/__release end - local.get $1 + local.get $2 local.get $0 i32.store - local.get $1 local.get $2 - i32.store offset=4 local.get $1 + i32.store offset=4 + local.get $2 i32.const 1 i32.store offset=8 global.get $std/array/arr @@ -9662,7 +9349,7 @@ unreachable end call $~lib/rt/pure/__release - local.get $1 + local.get $2 call $~lib/rt/pure/__release i32.const 5 i32.const 0 @@ -9755,7 +9442,7 @@ i32.const 1632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $5 call $std/array/isArraysEqual i32.eqz if @@ -9779,7 +9466,7 @@ i32.const 1664 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $9 call $std/array/isArraysEqual i32.eqz if @@ -9798,10 +9485,10 @@ 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 + local.get $9 + call $~lib/rt/pure/__release i32.const 5 i32.const 2 i32.const 7 @@ -9896,7 +9583,7 @@ i32.const 1888 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $5 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9921,7 +9608,7 @@ i32.const 1936 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9941,10 +9628,10 @@ 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 + local.get $9 + call $~lib/rt/pure/__release global.get $std/array/arr i32.load offset=12 if @@ -10216,27 +9903,27 @@ i32.store offset=4 local.get $0 i32.load offset=12 - local.tee $2 + local.tee $1 i32.const 0 i32.gt_s if local.get $0 i32.load offset=4 - local.tee $1 - local.get $2 + local.tee $3 + local.get $1 i32.const 2 i32.shl i32.add - local.set $2 + local.set $1 loop $do-continue|0 - local.get $1 + local.get $3 i32.load call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.const 4 i32.add - local.tee $1 - local.get $2 + local.tee $3 + local.get $1 i32.lt_u br_if $do-continue|0 end @@ -10310,7 +9997,7 @@ i32.const 2032 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $5 call $~lib/array/Array#concat call $~lib/rt/pure/__release global.get $std/array/arr @@ -10540,7 +10227,7 @@ 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 $2 call $~lib/rt/pure/__release @@ -10588,14 +10275,14 @@ i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $4 + local.tee $5 i32.const 5 i32.const 2 i32.const 3 i32.const 2208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10621,14 +10308,14 @@ i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $16 + local.tee $14 i32.const 5 i32.const 2 i32.const 3 i32.const 2304 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $7 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10692,7 +10379,7 @@ i32.const 2496 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10717,14 +10404,14 @@ i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $11 + local.tee $12 i32.const 5 i32.const 2 i32.const 3 i32.const 2592 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $15 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10756,7 +10443,7 @@ i32.const 2688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $17 + local.tee $18 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10781,14 +10468,14 @@ i32.const -2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $18 + local.tee $19 i32.const 5 i32.const 2 i32.const 3 i32.const 2784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $20 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10813,7 +10500,7 @@ i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $12 + local.tee $13 i32.const 5 i32.const 2 i32.const 3 @@ -10937,13 +10624,13 @@ 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 - local.get $16 + local.get $9 call $~lib/rt/pure/__release - local.get $20 + local.get $14 + call $~lib/rt/pure/__release + local.get $7 call $~lib/rt/pure/__release local.get $25 call $~lib/rt/pure/__release @@ -10951,21 +10638,21 @@ call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release - local.get $9 + local.get $10 call $~lib/rt/pure/__release - local.get $11 + local.get $12 call $~lib/rt/pure/__release - local.get $13 + local.get $15 call $~lib/rt/pure/__release local.get $30 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 $12 + local.get $20 + call $~lib/rt/pure/__release + local.get $13 call $~lib/rt/pure/__release local.get $21 call $~lib/rt/pure/__release @@ -11180,10 +10867,10 @@ local.tee $2 i32.const 2 i32.shl - local.tee $4 - call $~lib/memory/memory.copy + local.tee $5 + call $~lib/util/memory/memmove local.get $0 - local.get $4 + local.get $5 i32.add i32.const 0 i32.store @@ -11356,45 +11043,45 @@ unreachable end global.get $std/array/arr - local.tee $1 + local.tee $0 i32.load offset=12 - local.tee $2 + local.tee $1 if - local.get $1 + local.get $0 i32.load offset=4 - local.set $0 - local.get $1 + local.set $2 + local.get $0 i32.load offset=4 - local.get $2 + local.get $1 i32.const 1 i32.sub i32.const 2 i32.shl i32.add - local.set $1 + local.set $3 loop $while-continue|0 - local.get $0 - local.get $1 + local.get $2 + local.get $3 i32.lt_u if - local.get $0 - i32.load - local.set $2 - local.get $0 - local.get $1 + local.get $2 i32.load - i32.store - local.get $1 + local.set $0 local.get $2 + local.get $3 + i32.load i32.store + local.get $3 local.get $0 + i32.store + local.get $2 i32.const 4 i32.add - local.set $0 - local.get $1 + local.set $2 + local.get $3 i32.const 4 i32.sub - local.set $1 + local.set $3 br $while-continue|0 end end @@ -11632,36 +11319,36 @@ i32.const 3216 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 - local.set $4 + local.tee $0 + local.set $5 i32.const 0 - local.set $0 + local.set $2 block $__inlined_func$~lib/array/Array#indexOf - local.get $1 + local.get $0 i32.load offset=12 - local.tee $2 + local.tee $1 if (result i32) i32.const 0 - local.get $2 + local.get $1 i32.ge_s else i32.const 1 end if i32.const -1 - local.set $0 + local.set $2 br $__inlined_func$~lib/array/Array#indexOf end - local.get $4 + local.get $5 i32.load offset=4 local.set $3 loop $while-continue|022 - local.get $0 local.get $2 + local.get $1 i32.lt_s if local.get $3 - local.get $0 + local.get $2 i32.const 2 i32.shl i32.add @@ -11669,17 +11356,17 @@ f32.const nan:0x400000 f32.eq br_if $__inlined_func$~lib/array/Array#indexOf - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $while-continue|022 end end i32.const -1 - local.set $0 + local.set $2 end - local.get $0 + local.get $2 i32.const -1 i32.ne if @@ -11696,12 +11383,12 @@ i32.const 3248 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 - local.set $5 + local.tee $1 + local.set $9 i32.const 0 - local.set $0 + local.set $2 block $__inlined_func$~lib/array/Array#indexOf - local.get $2 + local.get $1 i32.load offset=12 local.tee $3 if (result i32) @@ -11713,19 +11400,19 @@ end if i32.const -1 - local.set $0 + local.set $2 br $__inlined_func$~lib/array/Array#indexOf end - local.get $5 + local.get $9 i32.load offset=4 - local.set $4 + local.set $5 loop $while-continue|023 - local.get $0 + local.get $2 local.get $3 i32.lt_s if - local.get $4 - local.get $0 + local.get $5 + local.get $2 i32.const 3 i32.shl i32.add @@ -11733,17 +11420,17 @@ f64.const nan:0x8000000000000 f64.eq br_if $__inlined_func$~lib/array/Array#indexOf - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $while-continue|023 end end i32.const -1 - local.set $0 + local.set $2 end - local.get $0 + local.get $2 i32.const -1 i32.ne if @@ -11754,9 +11441,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 global.get $std/array/arr i32.const 44 @@ -11896,7 +11583,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 @@ -11904,7 +11591,7 @@ i32.const 3280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $1 i32.load offset=12 local.tee $3 if (result i32) @@ -11916,37 +11603,37 @@ end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $2 + local.get $1 i32.load offset=4 - local.set $5 + local.set $9 loop $while-continue|024 - local.get $0 + local.get $2 local.get $3 i32.lt_s if i32.const 1 - local.get $5 - local.get $0 + local.get $9 + local.get $2 i32.const 2 i32.shl i32.add f32.load - local.tee $14 + local.tee $16 f32.const nan:0x400000 f32.eq if (result i32) i32.const 1 else - local.get $14 - local.get $14 + local.get $16 + local.get $16 f32.ne end 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|024 end end @@ -11963,7 +11650,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $1 + local.set $2 i32.const 0 i32.const 1 i32.const 3 @@ -11973,10 +11660,10 @@ call $~lib/rt/pure/__retain local.tee $3 i32.load offset=12 - local.tee $4 + local.tee $5 if (result i32) i32.const 0 - local.get $4 + local.get $5 i32.ge_s else i32.const 1 @@ -11985,35 +11672,35 @@ drop local.get $3 i32.load offset=4 - local.set $16 + local.set $14 loop $while-continue|025 - local.get $1 - local.get $4 + local.get $2 + local.get $5 i32.lt_s if i32.const 1 - local.get $16 - local.get $1 + local.get $14 + local.get $2 i32.const 3 i32.shl i32.add f64.load - local.tee $15 + local.tee $17 f64.const nan:0x8000000000000 f64.eq if (result i32) i32.const 1 else - local.get $15 - local.get $15 + local.get $17 + local.get $17 f64.ne end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $while-continue|025 end end @@ -12083,7 +11770,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release @@ -12104,7 +11791,7 @@ i32.const 3392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $5 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12123,7 +11810,7 @@ i32.const 3440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $7 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12174,7 +11861,7 @@ i32.const 3520 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12199,14 +11886,14 @@ i32.const 2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $11 + local.tee $12 i32.const 3 i32.const 2 i32.const 3 i32.const 3616 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $15 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12225,7 +11912,7 @@ i32.const 3648 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $17 + local.tee $18 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12250,14 +11937,14 @@ i32.const 2 i32.const 2 call $~lib/array/Array#splice - local.tee $18 + local.tee $19 i32.const 2 i32.const 2 i32.const 3 i32.const 3728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $20 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12276,7 +11963,7 @@ i32.const 3760 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $13 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12801,7 +12488,7 @@ local.tee $2 i32.const 1 call $~lib/array/Array#splice - local.tee $20 + local.tee $14 i32.load offset=12 if i32.const 0 @@ -12827,7 +12514,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $9 i32.load offset=4 local.tee $0 i32.const 1 @@ -12851,11 +12538,11 @@ i32.store offset=16 local.get $2 call $~lib/rt/pure/__release - local.get $16 + local.get $9 i32.const 2 call $~lib/array/Array#splice local.set $25 - local.get $20 + local.get $14 call $~lib/rt/pure/__release local.get $25 i32.load offset=12 @@ -12899,7 +12586,7 @@ call $~lib/builtins/abort unreachable end - local.get $16 + local.get $9 i32.load offset=12 i32.const 3 i32.ne @@ -12911,7 +12598,7 @@ call $~lib/builtins/abort unreachable end - local.get $16 + local.get $9 i32.const 0 call $~lib/array/Array#__get local.tee $57 @@ -12926,7 +12613,7 @@ call $~lib/builtins/abort unreachable end - local.get $16 + local.get $9 i32.const 1 call $~lib/array/Array#__get local.tee $58 @@ -12941,7 +12628,7 @@ call $~lib/builtins/abort unreachable end - local.get $16 + local.get $9 i32.const 2 call $~lib/array/Array#__get local.tee $59 @@ -12962,7 +12649,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $14 i32.load offset=4 local.tee $0 i32.const 1 @@ -12975,7 +12662,7 @@ i32.const 2 call $std/array/Ref#constructor i32.store offset=8 - local.get $20 + local.get $14 call $~lib/array/Array#splice local.tee $30 i32.load offset=12 @@ -13014,7 +12701,7 @@ call $~lib/builtins/abort unreachable end - local.get $20 + local.get $14 i32.load offset=12 i32.const 2 i32.ne @@ -13026,7 +12713,7 @@ call $~lib/builtins/abort unreachable end - local.get $20 + local.get $14 i32.const 0 call $~lib/array/Array#__get local.tee $60 @@ -13038,7 +12725,7 @@ call $~lib/builtins/abort unreachable end - local.get $20 + local.get $14 i32.const 1 call $~lib/array/Array#__get local.tee $2 @@ -13067,27 +12754,27 @@ 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 + 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 $11 + local.get $10 call $~lib/rt/pure/__release - local.get $13 + local.get $12 call $~lib/rt/pure/__release - local.get $17 + local.get $15 call $~lib/rt/pure/__release local.get $18 call $~lib/rt/pure/__release local.get $19 call $~lib/rt/pure/__release - local.get $12 + local.get $20 + call $~lib/rt/pure/__release + local.get $13 call $~lib/rt/pure/__release local.get $21 call $~lib/rt/pure/__release @@ -13637,17 +13324,17 @@ unreachable end loop $for-loop|0 - local.get $7 + local.get $4 i32.const 100 i32.lt_s if global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $7 + local.get $4 i32.const 1 i32.add - local.set $7 + local.set $4 br $for-loop|0 end end @@ -13664,11 +13351,11 @@ i32.const 3 call $~lib/array/Array#push i32.const 0 - local.set $1 + local.set $2 global.get $std/array/arr - local.tee $2 + local.tee $1 i32.load offset=12 - local.tee $3 + local.tee $4 i32.const 2 i32.const 9 i32.const 0 @@ -13676,38 +13363,38 @@ call $~lib/rt/pure/__retain local.tee $0 i32.load offset=4 - local.set $4 + local.set $3 loop $for-loop|043 - local.get $1 - local.get $3 local.get $2 + local.get $4 + local.get $1 i32.load offset=12 local.tee $5 - local.get $3 + local.get $4 local.get $5 i32.lt_s select i32.lt_s if - local.get $1 + local.get $2 i32.const 2 i32.shl local.tee $5 - local.get $2 + local.get $1 i32.load offset=4 i32.add i32.load local.set $7 - local.get $4 + local.get $3 local.get $5 i32.add local.get $7 f32.convert_i32_s f32.store - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|043 end end @@ -14258,41 +13945,41 @@ i32.const 5280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $2 i32.load offset=12 local.tee $5 i32.const 1 i32.le_s if - local.get $3 + local.get $2 call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end - local.get $3 + local.get $2 i32.load offset=4 - local.set $4 + local.set $3 local.get $5 i32.const 2 i32.eq if - local.get $4 + local.get $3 f32.load offset=4 - local.tee $14 - local.get $4 + local.tee $16 + local.get $3 f32.load local.tee $34 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if - local.get $4 + local.get $3 local.get $34 f32.store offset=4 - local.get $4 - local.get $14 + local.get $3 + local.get $16 f32.store end - local.get $3 + local.get $2 call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end @@ -14301,20 +13988,20 @@ i32.lt_s if i32.const 0 - local.set $2 + local.set $4 loop $for-loop|00 - local.get $2 + local.get $4 local.get $5 i32.lt_s if + local.get $3 local.get $4 - local.get $2 i32.const 2 i32.shl i32.add f32.load - local.set $14 - local.get $2 + local.set $16 + local.get $4 i32.const 1 i32.sub local.set $0 @@ -14323,8 +14010,8 @@ i32.const 0 i32.ge_s if - local.get $14 - local.get $4 + local.get $16 + local.get $3 local.get $0 i32.const 2 i32.shl @@ -14340,7 +14027,7 @@ i32.const 1 i32.sub local.set $0 - local.get $4 + local.get $3 local.get $1 i32.const 1 i32.add @@ -14353,28 +14040,28 @@ end end end - local.get $4 + local.get $3 local.get $0 i32.const 1 i32.add i32.const 2 i32.shl i32.add - local.get $14 + local.get $16 f32.store - local.get $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|00 end end else - local.get $4 + local.get $3 local.get $5 call $~lib/util/sort/weakHeapSort end - local.get $3 + local.get $2 call $~lib/rt/pure/__retain end call $~lib/rt/pure/__release @@ -14387,57 +14074,57 @@ call $~lib/rt/pure/__retain local.set $7 i32.const 0 - local.set $1 + local.set $3 block $folding-inner0 - local.get $3 + local.get $2 i32.load offset=12 - local.tee $2 + local.tee $1 local.get $7 i32.load offset=12 i32.ne br_if $folding-inner0 i32.const 1 - local.get $3 + local.get $2 local.get $7 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop loop $for-loop|001 + local.get $3 local.get $1 - local.get $2 i32.lt_s if + local.get $2 local.get $3 - local.get $1 call $~lib/array/Array#__get - local.tee $14 - local.get $14 + local.tee $16 + local.get $16 f32.ne if (result i32) local.get $7 - local.get $1 + local.get $3 call $~lib/array/Array#__get - local.tee $14 - local.get $14 + local.tee $16 + local.get $16 f32.ne else i32.const 0 end i32.eqz if + local.get $2 local.get $3 - local.get $1 call $~lib/array/Array#__get local.get $7 - local.get $1 + local.get $3 call $~lib/array/Array#__get f32.ne br_if $folding-inner0 end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|001 end end @@ -14462,17 +14149,17 @@ i32.const 5376 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $3 i32.load offset=12 local.tee $6 i32.const 1 i32.le_s if - local.get $4 + local.get $3 call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end - local.get $4 + local.get $3 i32.load offset=4 local.set $5 local.get $6 @@ -14481,7 +14168,7 @@ if local.get $5 f64.load offset=8 - local.tee $15 + local.tee $17 local.get $5 f64.load local.tee $35 @@ -14493,10 +14180,10 @@ local.get $35 f64.store offset=8 local.get $5 - local.get $15 + local.get $17 f64.store end - local.get $4 + local.get $3 call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end @@ -14505,20 +14192,20 @@ i32.lt_s if i32.const 0 - local.set $2 + local.set $4 loop $for-loop|02 - local.get $2 + local.get $4 local.get $6 i32.lt_s if local.get $5 - local.get $2 + local.get $4 i32.const 3 i32.shl i32.add f64.load - local.set $15 - local.get $2 + local.set $17 + local.get $4 i32.const 1 i32.sub local.set $0 @@ -14527,7 +14214,7 @@ i32.const 0 i32.ge_s if - local.get $15 + local.get $17 local.get $5 local.get $0 i32.const 3 @@ -14564,12 +14251,12 @@ i32.const 3 i32.shl i32.add - local.get $15 + local.get $17 f64.store - local.get $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|02 end end @@ -14578,7 +14265,7 @@ local.get $6 call $~lib/util/sort/weakHeapSort end - local.get $4 + local.get $3 call $~lib/rt/pure/__retain end call $~lib/rt/pure/__release @@ -14589,59 +14276,59 @@ i32.const 5456 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 local.set $1 + i32.const 0 + local.set $0 block $folding-inner01 - local.get $4 + local.get $3 i32.load offset=12 local.tee $5 - local.get $2 + local.get $1 i32.load offset=12 i32.ne br_if $folding-inner01 i32.const 1 - local.get $2 - local.get $4 + local.get $1 + local.get $3 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop loop $for-loop|025 - local.get $1 + local.get $0 local.get $5 i32.lt_s if - local.get $4 - local.get $1 + local.get $3 + local.get $0 call $~lib/array/Array#__get - local.tee $15 - local.get $15 + local.tee $17 + local.get $17 f64.ne if (result i32) - local.get $2 local.get $1 + local.get $0 call $~lib/array/Array#__get - local.tee $15 - local.get $15 + local.tee $17 + local.get $17 f64.ne else i32.const 0 end i32.eqz if - local.get $4 - local.get $1 + local.get $3 + local.get $0 call $~lib/array/Array#__get - local.get $2 local.get $1 + local.get $0 call $~lib/array/Array#__get f64.ne br_if $folding-inner01 end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|025 end end @@ -14665,11 +14352,11 @@ i32.const 5536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $17 + local.tee $18 i32.const 46 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $17 + local.get $18 i32.const 5 i32.const 2 i32.const 3 @@ -14694,11 +14381,11 @@ i32.const 5632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $19 i32.const 47 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $18 + local.get $19 i32.const 5 i32.const 2 i32.const 7 @@ -14723,14 +14410,14 @@ i32.const 5728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $19 + local.set $20 i32.const 1 i32.const 2 i32.const 3 i32.const 5744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 + local.set $4 i32.const 2 i32.const 2 i32.const 3 @@ -14757,23 +14444,23 @@ local.set $8 i32.const 128 call $std/array/createReverseOrderedArray - local.set $9 + local.set $10 i32.const 1024 call $std/array/createReverseOrderedArray - local.set $11 + local.set $12 i32.const 10000 call $std/array/createReverseOrderedArray - local.set $13 + local.set $15 i32.const 512 call $std/array/createRandomOrderedArray - local.set $12 - local.get $19 - i32.const 48 + local.set $13 + local.get $20 + i32.const 46 call $std/array/assertSorted - local.get $1 - i32.const 48 + local.get $4 + i32.const 46 call $std/array/assertSorted - local.get $1 + local.get $4 i32.const 1 i32.const 2 i32.const 3 @@ -14793,7 +14480,7 @@ unreachable end local.get $5 - i32.const 48 + i32.const 46 call $std/array/assertSorted local.get $5 i32.const 2 @@ -14815,7 +14502,7 @@ unreachable end local.get $6 - i32.const 48 + i32.const 46 call $std/array/assertSorted local.get $6 local.get $0 @@ -14831,7 +14518,7 @@ unreachable end local.get $8 - i32.const 48 + i32.const 46 call $std/array/assertSorted local.get $8 local.get $0 @@ -14846,10 +14533,10 @@ call $~lib/builtins/abort unreachable end - local.get $9 - i32.const 48 + local.get $10 + i32.const 46 call $std/array/assertSorted - local.get $9 + local.get $10 local.get $0 i32.const 4 call $std/array/isArraysEqual @@ -14862,10 +14549,10 @@ call $~lib/builtins/abort unreachable end - local.get $11 - i32.const 48 + local.get $12 + i32.const 46 call $std/array/assertSorted - local.get $11 + local.get $12 local.get $0 i32.const 4 call $std/array/isArraysEqual @@ -14878,10 +14565,10 @@ call $~lib/builtins/abort unreachable end - local.get $13 - i32.const 48 + local.get $15 + i32.const 46 call $std/array/assertSorted - local.get $13 + local.get $15 local.get $0 i32.const 4 call $std/array/isArraysEqual @@ -14894,28 +14581,28 @@ call $~lib/builtins/abort unreachable end - local.get $12 - i32.const 48 + local.get $13 + i32.const 46 call $std/array/assertSorted - local.get $3 + local.get $2 call $~lib/rt/pure/__release local.get $7 call $~lib/rt/pure/__release - local.get $4 + local.get $3 call $~lib/rt/pure/__release - local.get $2 + local.get $1 call $~lib/rt/pure/__release - local.get $17 + local.get $18 call $~lib/rt/pure/__release local.get $21 call $~lib/rt/pure/__release - local.get $18 + local.get $19 call $~lib/rt/pure/__release local.get $22 call $~lib/rt/pure/__release - local.get $19 + local.get $20 call $~lib/rt/pure/__release - local.get $1 + local.get $4 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release @@ -14925,13 +14612,13 @@ call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release - local.get $9 + local.get $10 call $~lib/rt/pure/__release - local.get $11 + local.get $12 call $~lib/rt/pure/__release - local.get $13 + local.get $15 call $~lib/rt/pure/__release - local.get $12 + local.get $13 call $~lib/rt/pure/__release local.get $23 call $~lib/rt/pure/__release @@ -14944,32 +14631,183 @@ call $std/array/createRandomOrderedArray local.set $1 local.get $0 - i32.const 49 + i32.const 48 call $std/array/assertSorted local.get $0 - i32.const 50 + i32.const 49 call $std/array/assertSorted local.get $1 - i32.const 51 + i32.const 50 call $std/array/assertSorted local.get $1 - i32.const 52 + i32.const 51 call $std/array/assertSorted local.get $0 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - call $std/array/createReverseOrderedNestedArray + i32.const 0 + local.set $3 + i32.const 8 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $1 + i32.const 0 + i32.const 8 + call $~lib/util/memory/memset + i32.const 16 + i32.const 12 + call $~lib/rt/tlsf/__alloc + 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 + local.get $1 local.tee $0 - i32.const 53 - call $std/array/assertSorted<~lib/array/Array> + 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|053 + local.get $3 + 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 $3 + i32.sub + call $~lib/array/Array#__set + local.get $4 + local.get $3 + local.get $0 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $0 + call $~lib/rt/pure/__release + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|053 + end + end + local.get $4 + i32.const 52 + call $std/array/assertSorted<~lib/array/Array> + local.get $4 call $~lib/rt/pure/__release - call $std/array/createReverseOrderedElementsArray + i32.const 0 + local.set $3 + i32.const 2048 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $1 + i32.const 0 + i32.const 2048 + call $~lib/util/memory/memset + i32.const 16 + i32.const 14 + call $~lib/rt/tlsf/__alloc + 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 + local.get $1 local.tee $0 - i32.const 54 - call $std/array/assertSorted<~lib/array/Array> + 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|054 + local.get $3 + i32.const 512 + i32.lt_s + if + i32.const 4 + i32.const 13 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 511 + local.get $3 + i32.sub + i32.store + local.get $4 + local.get $3 + local.get $0 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $0 + call $~lib/rt/pure/__release + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|054 + end + end + local.get $4 + i32.const 53 + call $std/array/assertSorted<~lib/array/Array> + local.get $4 call $~lib/rt/pure/__release i32.const 7 i32.const 2 @@ -14987,50 +14825,50 @@ local.set $7 block $__inlined_func$std/array/isSorted<~lib/string/String | null> (result i32) i32.const 1 - local.set $1 + local.set $3 local.get $5 - i32.const 55 + i32.const 54 call $~lib/array/Array<~lib/array/Array>#sort local.tee $0 - local.set $2 + local.set $1 local.get $0 i32.load offset=12 local.set $6 - loop $for-loop|03 - local.get $1 + loop $for-loop|011 + local.get $3 local.get $6 i32.lt_s if - local.get $2 local.get $1 + local.get $3 i32.const 1 i32.sub call $~lib/array/Array#__get - local.tee $3 - local.get $2 + local.tee $4 local.get $1 + local.get $3 call $~lib/array/Array#__get - local.tee $4 + local.tee $2 call $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 i32.const 0 i32.gt_s if - local.get $3 - call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isSorted<~lib/string/String | null> - end - local.get $3 - call $~lib/rt/pure/__release + end local.get $4 call $~lib/rt/pure/__release - local.get $1 + local.get $2 + call $~lib/rt/pure/__release + local.get $3 i32.const 1 i32.add - local.set $1 - br $for-loop|03 + local.set $3 + br $for-loop|011 end end i32.const 1 @@ -15048,11 +14886,11 @@ call $~lib/rt/pure/__release block $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> (result i32) i32.const 0 - local.set $1 + local.set $2 i32.const 0 local.get $5 i32.load offset=12 - local.tee $3 + local.tee $4 local.get $7 i32.load offset=12 i32.ne @@ -15064,38 +14902,38 @@ i32.eq br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop - loop $for-loop|04 - local.get $1 - local.get $3 + loop $for-loop|012 + local.get $2 + local.get $4 i32.lt_s if local.get $5 - local.get $1 + local.get $2 call $~lib/array/Array#__get local.tee $0 local.get $7 - local.get $1 + local.get $2 call $~lib/array/Array#__get - local.tee $2 + local.tee $1 call $~lib/string/String.__eq i32.eqz if local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $1 call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> end local.get $0 call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release local.get $1 + call $~lib/rt/pure/__release + local.get $2 i32.const 1 i32.add - local.set $1 - br $for-loop|04 + local.set $2 + br $for-loop|012 end end i32.const 1 @@ -15110,63 +14948,62 @@ unreachable end i32.const 0 - local.set $1 + local.set $4 i32.const 1600 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $0 + local.tee $2 i32.const 0 i32.const 1600 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 16 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $2 + local.tee $1 i32.const 0 i32.store - local.get $2 + local.get $1 i32.const 0 i32.store offset=4 - local.get $2 + local.get $1 i32.const 0 i32.store offset=8 - local.get $2 + local.get $1 i32.const 0 i32.store offset=12 - local.get $0 - local.set $3 - local.get $0 local.get $2 + local.tee $0 + local.get $1 i32.load - local.tee $4 + local.tee $3 i32.ne if - local.get $3 + local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $4 + local.set $0 + local.get $3 call $~lib/rt/pure/__release end - local.get $2 - local.get $3 + local.get $1 + local.get $0 i32.store + local.get $1 local.get $2 - local.get $0 i32.store offset=4 - local.get $2 + local.get $1 i32.const 1600 i32.store offset=8 - local.get $2 + local.get $1 i32.const 400 i32.store offset=12 - loop $for-loop|09 - local.get $1 + loop $for-loop|0013 + local.get $4 i32.const 400 i32.lt_s if - local.get $1 - local.set $3 + local.get $4 + local.set $2 call $~lib/math/NativeMath.random f64.const 32 f64.mul @@ -15190,7 +15027,7 @@ f64.mul f64.floor i32.trunc_f64_s - local.tee $1 + local.tee $4 i32.const 5088 call $~lib/string/String#get:length i32.ge_u @@ -15199,36 +15036,36 @@ i32.const 2 i32.const 1 call $~lib/rt/tlsf/__alloc - local.tee $4 - local.get $1 + local.tee $3 + local.get $4 i32.const 1 i32.shl i32.const 5088 i32.add i32.load16_u i32.store16 - local.get $4 + local.get $3 call $~lib/rt/pure/__retain end - local.set $1 + local.set $4 local.get $0 - local.tee $4 + local.tee $3 local.get $0 - local.get $1 + local.get $4 call $~lib/string/String.__concat - local.tee $9 + local.tee $10 local.tee $0 i32.ne if local.get $0 call $~lib/rt/pure/__retain local.set $0 - local.get $4 + local.get $3 call $~lib/rt/pure/__release end - local.get $1 + local.get $4 call $~lib/rt/pure/__release - local.get $9 + local.get $10 call $~lib/rt/pure/__release local.get $6 i32.const 1 @@ -15237,27 +15074,27 @@ br $for-loop|01 end end + local.get $1 local.get $2 - local.get $3 local.get $0 call $~lib/array/Array<~lib/array/Array>#__set local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $1 - br $for-loop|09 + local.set $4 + br $for-loop|0013 end end - local.get $2 - i32.const 56 + local.get $1 + i32.const 55 call $std/array/assertSorted<~lib/array/Array> local.get $5 call $~lib/rt/pure/__release local.get $7 call $~lib/rt/pure/__release - local.get $2 + local.get $1 call $~lib/rt/pure/__release i32.const 2 i32.const 0 @@ -15270,7 +15107,7 @@ local.get $0 i32.load offset=12 call $~lib/util/string/joinBooleanArray - local.tee $4 + local.tee $3 i32.const 6336 call $~lib/string/String.__eq i32.eqz @@ -15330,10 +15167,10 @@ i32.const 6544 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $10 i32.const 6576 call $~lib/array/Array#join - local.tee $11 + local.tee $12 i32.const 6608 call $~lib/string/String.__eq i32.eqz @@ -15356,7 +15193,7 @@ local.get $1 i32.load offset=12 call $~lib/util/string/joinFloatArray - local.tee $13 + local.tee $15 i32.const 7824 call $~lib/string/String.__eq i32.eqz @@ -15374,10 +15211,10 @@ i32.const 7952 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $17 + local.tee $18 i32.const 6064 call $~lib/array/Array<~lib/string/String | null>#join - local.tee $18 + local.tee $19 i32.const 7920 call $~lib/string/String.__eq i32.eqz @@ -15395,22 +15232,22 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $4 i32.load offset=4 - local.tee $3 + local.tee $2 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $3 + local.get $2 i32.const 0 i32.store offset=4 - local.get $3 + local.get $2 i32.const 0 call $std/array/Ref#constructor i32.store offset=8 - local.get $2 + local.get $4 call $~lib/array/Array#join - local.tee $19 + local.tee $20 i32.const 8032 call $~lib/string/String.__eq i32.eqz @@ -15428,19 +15265,19 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $2 i32.load offset=4 - local.tee $12 + local.tee $13 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $12 + local.get $13 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $3 + local.get $2 call $~lib/array/Array#join - local.tee $12 + local.tee $13 i32.const 8112 call $~lib/string/String.__eq i32.eqz @@ -15454,7 +15291,7 @@ end local.get $0 call $~lib/rt/pure/__release - local.get $4 + local.get $3 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release @@ -15464,25 +15301,25 @@ call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release - local.get $9 + local.get $10 call $~lib/rt/pure/__release - local.get $11 + 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 $17 + local.get $15 call $~lib/rt/pure/__release local.get $18 call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release local.get $19 call $~lib/rt/pure/__release - local.get $3 + local.get $4 call $~lib/rt/pure/__release - local.get $12 + local.get $20 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $13 call $~lib/rt/pure/__release i32.const 0 i32.const 2 @@ -15490,14 +15327,14 @@ i32.const 8192 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $3 + local.set $2 i32.const 1 i32.const 2 i32.const 3 i32.const 8208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $4 + local.set $3 i32.const 2 i32.const 2 i32.const 3 @@ -15512,7 +15349,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.set $7 - local.get $3 + local.get $2 i32.const 6304 call $~lib/array/Array#join local.tee $0 @@ -15528,11 +15365,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 6304 call $~lib/array/Array#join local.tee $0 - local.set $17 + local.set $18 local.get $0 i32.const 7920 call $~lib/string/String.__eq @@ -15549,7 +15386,7 @@ i32.const 6304 call $~lib/array/Array#join local.tee $0 - local.set $18 + local.set $19 local.get $0 i32.const 8304 call $~lib/string/String.__eq @@ -15566,7 +15403,7 @@ i32.const 6304 call $~lib/array/Array#join local.tee $0 - local.set $19 + local.set $20 local.get $0 i32.const 8336 call $~lib/string/String.__eq @@ -15591,7 +15428,7 @@ i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $0 - local.set $12 + local.set $13 local.get $0 i32.const 8400 call $~lib/string/String.__eq @@ -15635,9 +15472,9 @@ i32.const 8512 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $10 i32.load offset=4 - local.get $9 + local.get $10 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $0 @@ -15660,9 +15497,9 @@ i32.const 8624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $11 + local.tee $12 i32.load offset=4 - local.get $11 + local.get $12 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $0 @@ -15776,7 +15613,7 @@ call $~lib/rt/pure/__retain local.tee $1 i32.load offset=4 - local.tee $2 + local.tee $4 i32.const 2 i32.const 0 i32.const 6 @@ -15784,7 +15621,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $2 + local.get $4 i32.const 2 i32.const 0 i32.const 6 @@ -15797,9 +15634,9 @@ local.get $1 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $2 + local.tee $4 local.set $33 - local.get $2 + local.get $4 i32.const 9072 call $~lib/string/String.__eq i32.eqz @@ -15817,7 +15654,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $4 i32.load offset=4 i32.const 1 i32.const 2 @@ -15836,9 +15673,9 @@ i32.store local.get $29 i32.store - local.get $2 + local.get $4 i32.load offset=4 - local.get $2 + local.get $4 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> local.tee $28 @@ -15855,34 +15692,34 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 call $~lib/rt/pure/__release - local.get $4 + local.get $3 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release local.get $7 call $~lib/rt/pure/__release 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 $6 call $~lib/rt/pure/__release - local.get $12 + local.get $13 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release local.get $21 call $~lib/rt/pure/__release - local.get $9 + local.get $10 call $~lib/rt/pure/__release local.get $22 call $~lib/rt/pure/__release - local.get $11 + local.get $12 call $~lib/rt/pure/__release local.get $23 call $~lib/rt/pure/__release @@ -15910,7 +15747,7 @@ call $~lib/rt/pure/__retain local.tee $5 i32.load offset=4 - local.tee $3 + local.tee $2 i32.const 1 i32.const 2 i32.const 3 @@ -15918,7 +15755,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $3 + local.get $2 i32.const 3 i32.const 2 i32.const 3 @@ -15926,7 +15763,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $3 + local.get $2 i32.const 3 i32.const 2 i32.const 3 @@ -15934,7 +15771,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=8 - local.get $3 + local.get $2 i32.const 3 i32.const 2 i32.const 3 @@ -15957,14 +15794,14 @@ unreachable end loop $for-loop|1 - local.get $10 + local.get $11 i32.const 10 i32.lt_s if local.get $7 - local.get $10 + local.get $11 call $~lib/array/Array#__get - local.get $10 + local.get $11 i32.ne if i32.const 0 @@ -15974,10 +15811,10 @@ call $~lib/builtins/abort unreachable end - local.get $10 + local.get $11 i32.const 1 i32.add - local.set $10 + local.set $11 br $for-loop|1 end end @@ -15989,7 +15826,7 @@ call $~lib/rt/pure/__retain local.tee $6 i32.load offset=4 - local.tee $3 + local.tee $2 i32.const 1 i32.const 2 i32.const 15 @@ -15997,7 +15834,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $3 + local.get $2 i32.const 3 i32.const 2 i32.const 15 @@ -16005,7 +15842,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $3 + local.get $2 i32.const 3 i32.const 2 i32.const 15 @@ -16013,7 +15850,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=8 - local.get $3 + local.get $2 i32.const 1 i32.const 2 i32.const 15 @@ -16023,15 +15860,15 @@ i32.store offset=12 local.get $6 call $~lib/array/Array<~lib/array/Array<~lib/string/String | null>>#flat - local.set $3 + local.set $2 i32.const 8 i32.const 2 i32.const 15 i32.const 9680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $4 - local.get $3 + local.set $3 + local.get $2 i32.load offset=12 i32.const 8 i32.ne @@ -16044,21 +15881,21 @@ unreachable end i32.const 0 - local.set $10 + local.set $11 loop $for-loop|2 - local.get $10 - local.get $4 + local.get $11 + local.get $3 i32.load offset=12 i32.lt_s if - local.get $3 - local.get $10 + local.get $2 + local.get $11 call $~lib/array/Array#__get local.tee $8 - local.get $4 - local.get $10 + local.get $3 + local.get $11 call $~lib/array/Array#__get - local.tee $9 + local.tee $10 call $~lib/string/String.__eq i32.eqz if @@ -16071,12 +15908,12 @@ end 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 i32.const 1 i32.add - local.set $10 + local.set $11 br $for-loop|2 end end @@ -16086,7 +15923,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $11 i32.load offset=4 local.tee $8 i32.const 0 @@ -16104,7 +15941,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $10 + local.get $11 call $~lib/array/Array<~lib/array/Array>#flat local.tee $8 i32.load offset=12 @@ -16116,15 +15953,15 @@ call $~lib/builtins/abort unreachable end - local.get $10 + local.get $11 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release - local.get $16 + local.get $9 call $~lib/rt/pure/__release local.get $25 call $~lib/rt/pure/__release - local.get $20 + local.get $14 call $~lib/rt/pure/__release local.get $30 call $~lib/rt/pure/__release @@ -16132,7 +15969,7 @@ call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $4 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release @@ -16140,9 +15977,9 @@ call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release - local.get $4 + local.get $3 call $~lib/rt/pure/__release ) (func $~start diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 4c07bd984a..c600c063d5 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -2,31 +2,36 @@ (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_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (type $i64_=>_i32 (func (param i64) (result 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 $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_i32_=>_f32 (func (param i32 i32 i32) (result f32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) + (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) (type $i64_=>_none (func (param i64))) - (type $none_=>_i32 (func (result i32))) + (type $i64_i32_=>_none (func (param i64 i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) (type $i32_i32_f64_=>_i32 (func (param i32 i32 f64) (result i32))) (type $i32_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $f64_=>_i32 (func (param f64) (result i32))) + (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) (type $i64_=>_i64 (func (param i64) (result i64))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) + (type $f64_=>_f64 (func (param f64) (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -230,8 +235,8 @@ (data (i32.const 9056) " \00\00\00\01\00\00\00\00\00\00\00 \00\00\00\10\"\00\00P\"\00\00\00\00\00\00p\"\00\00\b0\"\00\00\d0\"\00\00\f0\"\00\000#\00\00") (data (i32.const 9104) "\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 9120) "\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00") - (table $0 57 funcref) - (elem (i32.const 1) $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|4 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|18 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|30 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|34 $start:std/array~anonymous|35 $start:std/array~anonymous|36 $start:std/array~anonymous|37 $start:std/array~anonymous|38 $start:std/array~anonymous|39 $start:std/array~anonymous|40 $start:std/array~anonymous|41 $start:std/array~anonymous|42 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0) + (table $0 56 funcref) + (elem (i32.const 1) $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|4 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|18 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|30 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|34 $start:std/array~anonymous|35 $start:std/array~anonymous|36 $start:std/array~anonymous|37 $start:std/array~anonymous|38 $start:std/array~anonymous|39 $start:std/array~anonymous|40 $start:std/array~anonymous|41 $start:std/array~anonymous|42 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) @@ -261,6 +266,69 @@ (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "_start" (func $~start)) (export "memory" (memory $0)) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -269,9 +337,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -284,7 +349,7 @@ if i32.const 0 i32.const 128 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -311,7 +376,7 @@ if i32.const 0 i32.const 128 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -365,7 +430,7 @@ if i32.const 0 i32.const 128 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -390,77 +455,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -477,6 +500,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -488,8 +517,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -497,7 +524,7 @@ if i32.const 0 i32.const 128 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -514,28 +541,18 @@ if i32.const 0 i32.const 128 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -546,44 +563,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -591,30 +598,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 128 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -633,22 +636,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -674,7 +677,7 @@ if i32.const 0 i32.const 128 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -686,18 +689,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 128 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -751,27 +754,15 @@ if i32.const 0 i32.const 128 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -786,24 +777,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -813,31 +790,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -845,8 +806,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -872,24 +831,22 @@ if i32.const 0 i32.const 128 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -897,7 +854,7 @@ if i32.const 0 i32.const 128 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -905,16 +862,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -930,7 +887,7 @@ if i32.const 0 i32.const 128 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -939,8 +896,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -951,49 +908,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -1006,10 +959,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -1059,73 +1008,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -1138,11 +1060,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -1162,7 +1084,7 @@ if i32.const 176 i32.const 128 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -1188,9 +1110,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1258,31 +1177,24 @@ if i32.const 0 i32.const 128 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1295,79 +1207,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 128 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1404,9 +1285,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1420,12 +1299,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1435,7 +1314,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1472,7 +1351,7 @@ if i32.const 0 i32.const 128 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1523,29 +1402,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1565,7 +1424,7 @@ if i32.const 0 i32.const 128 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1612,7 +1471,7 @@ if i32.const 0 i32.const 128 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1633,7 +1492,7 @@ if i32.const 0 i32.const 128 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1654,7 +1513,7 @@ if i32.const 0 i32.const 128 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -1689,343 +1548,338 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + (local $6 i64) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - i32.const 4 - i32.sub - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - local.get $4 - i32.store8 offset=3 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=1 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - i32.const 28 - i32.sub - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=24 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=16 - local.get $6 - local.get $8 - i32.store offset=20 - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=4 - local.get $6 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=12 - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) - (func $~lib/rt/pure/increment (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - local.get $1 + i32.const 0 i32.const 1 - i32.add - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - i32.eq + i32.gt_s + drop + local.get $2 i32.eqz if - i32.const 0 - i32.const 240 - i32.const 109 - i32.const 3 - call $~lib/builtins/abort - unreachable + return end local.get $0 - local.get $1 - i32.const 1 + local.get $2 i32.add - i32.store offset=4 - i32.const 1 - drop - local.get $0 - call $~lib/rt/rtrace/onincrement - i32.const 1 - drop - local.get $0 - i32.load - i32.const 1 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 240 - i32.const 112 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (param $0 i32) (result i32) + i32.const 4 + i32.sub + local.set $3 local.get $0 - global.get $~lib/heap/__heap_base - i32.gt_u + local.get $1 + i32.store8 + local.get $3 + local.get $1 + i32.store8 offset=3 + local.get $2 + i32.const 2 + i32.le_u if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/increment + return end local.get $0 - ) - (func $~lib/rt/pure/__release (param $0 i32) + local.get $1 + i32.store8 offset=1 local.get $0 - global.get $~lib/heap/__heap_base - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (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 $6 i32) local.get $1 - i32.const 1073741808 - i32.const 2 - i32.shr_u - i32.gt_u + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=1 + local.get $2 + i32.const 6 + i32.le_u if - i32.const 32 - i32.const 80 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable + return end + local.get $0 local.get $1 - i32.const 2 - i32.shl - local.set $2 - local.get $2 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $3 + i32.store8 offset=3 local.get $3 - i32.const 0 + local.get $1 + i32.store8 local.get $2 - call $~lib/memory/memory.fill - local.get $0 - i32.eqz + i32.const 8 + i32.le_u if - i32.const 16 - i32.const 3 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $0 + return end - local.get $0 i32.const 0 - i32.store local.get $0 - i32.const 0 - i32.store offset=4 + i32.sub + i32.const 3 + i32.and + local.set $4 local.get $0 - i32.const 0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $5 + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.set $3 + local.get $0 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=16 + local.get $3 + local.get $5 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=12 + local.get $0 + local.get $5 + i32.store offset=16 + local.get $0 + local.get $5 + i32.store offset=20 + local.get $0 + local.get $5 + i32.store offset=24 + local.get $3 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=12 + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $5 + i64.extend_i32_u + local.get $5 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $6 + loop $while-continue|0 + local.get $2 + i32.const 32 + i32.ge_u + local.set $7 + local.get $7 + if + local.get $0 + local.get $6 + i64.store + local.get $0 + local.get $6 + i64.store offset=8 + local.get $0 + local.get $6 + i64.store offset=16 + local.get $0 + local.get $6 + i64.store offset=24 + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 + end + end + ) + (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memset + ) + (func $~lib/rt/pure/increment (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + i32.const 268435455 + i32.const -1 + i32.xor + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const 268435455 + i32.const -1 + i32.xor + i32.and + i32.eq + i32.eqz + if + i32.const 0 + i32.const 240 + i32.const 109 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + i32.const 1 + drop + local.get $0 + call $~lib/rt/rtrace/onincrement + i32.const 1 + drop + local.get $0 + i32.load + i32.const 1 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 240 + i32.const 112 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (param $0 i32) (result i32) + local.get $0 + global.get $~lib/heap/__heap_base + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/increment + end + local.get $0 + ) + (func $~lib/rt/pure/__release (param $0 i32) + local.get $0 + global.get $~lib/heap/__heap_base + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (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 $6 i32) + local.get $1 + i32.const 1073741808 + i32.const 2 + i32.shr_u + i32.gt_u + if + i32.const 32 + i32.const 80 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.set $2 + local.get $2 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $3 + local.get $3 + i32.const 0 + local.get $2 + call $~lib/memory/memory.fill + local.get $0 + i32.eqz + if + i32.const 16 + i32.const 3 + call $~lib/rt/tlsf/__alloc + 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 @@ -3278,251 +3132,246 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if local.get $0 - local.set $5 local.get $1 - local.set $4 local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if i32.const 0 - i32.const 1 + i32.const 2 i32.lt_s drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.tee $7 + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 i32.const 1 i32.add - local.set $5 - local.get $7 + local.set $0 local.get $4 - local.tee $7 + local.get $1 + local.tee $4 i32.const 1 i32.add - local.set $4 - local.get $7 + local.set $1 + local.get $4 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + br $while-continue|0 end end - loop $while-continue|5 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 - i32.const 1 + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 i32.sub - local.tee $3 + local.set $2 + local.get $0 + i32.const 8 i32.add - local.get $4 - local.get $3 + local.set $0 + local.get $1 + i32.const 8 i32.add - i32.load8_u - i32.store8 - br $while-continue|5 + local.set $1 + br $while-continue|1 end end end - end - ) - (func $~lib/rt/__allocBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 - call $~lib/rt/tlsf/__alloc - local.set $3 - local.get $2 - if - local.get $3 - local.get $2 - local.get $0 - call $~lib/memory/memory.copy - end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 + local.get $3 + if + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 + end + end + end + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end + end + ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) + (func $~lib/rt/__allocBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + local.get $1 + call $~lib/rt/tlsf/__alloc + local.set $3 + local.get $2 + if + local.get $3 + local.get $2 + local.get $0 + call $~lib/memory/memory.copy + end local.get $3 ) (func $~lib/rt/__allocArray (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) @@ -4047,7 +3896,7 @@ if i32.const 0 i32.const 128 - i32.const 581 + i32.const 573 i32.const 3 call $~lib/builtins/abort unreachable @@ -4104,22 +3953,12 @@ return end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $5 local.get $5 - i32.const 16 - i32.add - local.get $5 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $6 local.get $6 - i32.load - local.set $7 - local.get $7 i32.const 1 i32.and if @@ -4130,25 +3969,25 @@ i32.and i32.const 16 i32.add - local.get $7 + local.get $6 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $5 - local.get $5 + local.set $7 + local.get $7 local.get $3 i32.ge_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $4 i32.const 3 i32.and - local.get $5 + local.get $7 i32.or i32.store local.get $1 @@ -7178,7 +7017,7 @@ if i32.const 0 i32.const 4032 - i32.const 1404 + i32.const 1381 i32.const 5 call $~lib/builtins/abort unreachable @@ -7569,14 +7408,29 @@ local.get $12 f32.store ) + (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 0 + drop + local.get $1 + i32.const 256 + i32.lt_s + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/sort/insertionSort + else + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/sort/weakHeapSort + end + ) (func $~lib/array/Array#sort (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f32) (local $5 f32) - (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 i32.load offset=12 local.set $2 @@ -7622,27 +7476,9 @@ return end local.get $3 - local.set $8 local.get $2 - local.set $7 local.get $1 - local.set $6 - i32.const 0 - drop - local.get $7 - i32.const 256 - i32.lt_s - if - local.get $8 - local.get $7 - local.get $6 - call $~lib/util/sort/insertionSort - else - local.get $8 - local.get $7 - local.get $6 - call $~lib/util/sort/weakHeapSort - end + call $~lib/util/sort/SORT local.get $0 call $~lib/rt/pure/__retain ) @@ -7679,6 +7515,18 @@ i32.lt_s i32.sub ) + (func $~lib/util/sort/COMPARATOR (result i32) + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + i32.const 44 + return + ) (func $~lib/array/Array#sort@varargs (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 @@ -7688,18 +7536,7 @@ end unreachable end - block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - i32.const 44 - br $~lib/util/sort/COMPARATOR|inlined.0 - end + call $~lib/util/sort/COMPARATOR local.set $1 end local.get $0 @@ -8194,14 +8031,29 @@ local.get $12 f64.store ) + (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 0 + drop + local.get $1 + i32.const 256 + i32.lt_s + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/sort/insertionSort + else + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/sort/weakHeapSort + end + ) (func $~lib/array/Array#sort (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f64) (local $5 f64) - (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 i32.load offset=12 local.set $2 @@ -8247,27 +8099,9 @@ return end local.get $3 - local.set $8 local.get $2 - local.set $7 local.get $1 - local.set $6 - i32.const 0 - drop - local.get $7 - i32.const 256 - i32.lt_s - if - local.get $8 - local.get $7 - local.get $6 - call $~lib/util/sort/insertionSort - else - local.get $8 - local.get $7 - local.get $6 - call $~lib/util/sort/weakHeapSort - end + call $~lib/util/sort/SORT local.get $0 call $~lib/rt/pure/__retain ) @@ -8304,6 +8138,18 @@ i64.lt_s i32.sub ) + (func $~lib/util/sort/COMPARATOR (result i32) + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 45 + return + ) (func $~lib/array/Array#sort@varargs (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 @@ -8313,18 +8159,7 @@ end unreachable end - block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 45 - br $~lib/util/sort/COMPARATOR|inlined.0 - end + call $~lib/util/sort/COMPARATOR local.set $1 end local.get $0 @@ -8854,12 +8689,29 @@ local.get $12 i32.store ) + (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 0 + drop + local.get $1 + i32.const 256 + i32.lt_s + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/sort/insertionSort + else + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/sort/weakHeapSort + end + ) (func $~lib/array/Array#sort (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 $0 i32.load offset=12 local.set $2 @@ -8905,27 +8757,9 @@ return end local.get $3 - local.set $6 local.get $2 - local.set $5 local.get $1 - local.set $4 - i32.const 0 - drop - local.get $5 - i32.const 256 - i32.lt_s - if - local.get $6 - local.get $5 - local.get $4 - call $~lib/util/sort/insertionSort - else - local.get $6 - local.get $5 - local.get $4 - call $~lib/util/sort/weakHeapSort - end + call $~lib/util/sort/SORT local.get $0 call $~lib/rt/pure/__retain ) @@ -8934,6 +8768,21 @@ local.get $1 i32.sub ) + (func $~lib/util/sort/COMPARATOR (result i32) + i32.const 1 + drop + i32.const 1 + if (result i32) + i32.const 4 + i32.const 4 + i32.le_u + else + i32.const 0 + end + drop + i32.const 46 + return + ) (func $~lib/array/Array#sort@varargs (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 @@ -8943,21 +8792,7 @@ end unreachable end - block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) - i32.const 1 - drop - i32.const 1 - if (result i32) - i32.const 4 - i32.const 4 - i32.le_u - else - i32.const 0 - end - drop - i32.const 46 - br $~lib/util/sort/COMPARATOR|inlined.0 - end + call $~lib/util/sort/COMPARATOR local.set $1 end local.get $0 @@ -9343,12 +9178,29 @@ local.get $12 i32.store ) + (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 0 + drop + local.get $1 + i32.const 256 + i32.lt_s + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/sort/insertionSort + else + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/sort/weakHeapSort + end + ) (func $~lib/array/Array#sort (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 $0 i32.load offset=12 local.set $2 @@ -9394,27 +9246,9 @@ return end local.get $3 - local.set $6 local.get $2 - local.set $5 local.get $1 - local.set $4 - i32.const 0 - drop - local.get $5 - i32.const 256 - i32.lt_s - if - local.get $6 - local.get $5 - local.get $4 - call $~lib/util/sort/insertionSort - else - local.get $6 - local.get $5 - local.get $4 - call $~lib/util/sort/weakHeapSort - end + call $~lib/util/sort/SORT local.get $0 call $~lib/rt/pure/__retain ) @@ -9427,6 +9261,21 @@ i32.lt_u i32.sub ) + (func $~lib/util/sort/COMPARATOR (result i32) + i32.const 1 + drop + i32.const 0 + if (result i32) + i32.const 4 + i32.const 4 + i32.le_u + else + i32.const 0 + end + drop + i32.const 47 + return + ) (func $~lib/array/Array#sort@varargs (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 @@ -9436,21 +9285,7 @@ end unreachable end - block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) - i32.const 1 - drop - i32.const 0 - if (result i32) - i32.const 4 - i32.const 4 - i32.le_u - else - i32.const 0 - end - drop - i32.const 47 - br $~lib/util/sort/COMPARATOR|inlined.0 - end + call $~lib/util/sort/COMPARATOR local.set $1 end local.get $0 @@ -9577,11 +9412,6 @@ end local.get $1 ) - (func $~lib/util/sort/COMPARATOR~anonymous|1 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.sub - ) (func $std/array/isSorted (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -9667,21 +9497,7 @@ call $~lib/rt/pure/__retain local.set $0 local.get $0 - block $~lib/util/sort/COMPARATOR|inlined.1 (result i32) - i32.const 1 - drop - i32.const 1 - if (result i32) - i32.const 4 - i32.const 4 - i32.le_u - else - i32.const 0 - end - drop - i32.const 48 - br $~lib/util/sort/COMPARATOR|inlined.1 - end + call $~lib/util/sort/COMPARATOR call $std/array/assertSorted local.get $0 call $~lib/rt/pure/__release @@ -10024,6 +9840,14 @@ end end ) + (func $~lib/util/sort/SORT<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 1 + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/sort/insertionSort<~lib/array/Array> + ) (func $~lib/array/Array<~lib/array/Array>#sort (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -10083,17 +9907,9 @@ return end local.get $3 - local.set $5 local.get $2 - local.set $4 local.get $1 - local.set $6 - i32.const 1 - drop - local.get $5 - local.get $4 - local.get $6 - call $~lib/util/sort/insertionSort<~lib/array/Array> + call $~lib/util/sort/SORT<~lib/array/Array> local.get $0 call $~lib/rt/pure/__retain ) @@ -10566,6 +10382,14 @@ end end ) + (func $~lib/util/sort/SORT> (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 1 + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/sort/insertionSort> + ) (func $~lib/array/Array>#sort (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -10625,17 +10449,9 @@ return end local.get $3 - local.set $5 local.get $2 - local.set $4 local.get $1 - local.set $6 - i32.const 1 - drop - local.get $5 - local.get $4 - local.get $6 - call $~lib/util/sort/insertionSort> + call $~lib/util/sort/SORT> local.get $0 call $~lib/rt/pure/__retain ) @@ -10880,6 +10696,14 @@ end end ) + (func $~lib/util/sort/SORT<~lib/string/String | null> (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 1 + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/sort/insertionSort<~lib/string/String | null> + ) (func $~lib/array/Array<~lib/string/String | null>#sort (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -10939,17 +10763,9 @@ return end local.get $3 - local.set $5 local.get $2 - local.set $4 local.get $1 - local.set $6 - i32.const 1 - drop - local.get $5 - local.get $4 - local.get $6 - call $~lib/util/sort/insertionSort<~lib/string/String | null> + call $~lib/util/sort/SORT<~lib/string/String | null> local.get $0 call $~lib/rt/pure/__retain ) @@ -11324,6 +11140,16 @@ call $~lib/rt/pure/__release local.get $2 ) + (func $~lib/util/sort/COMPARATOR<~lib/string/String | null> (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 54 + return + ) (func $std/array/assertSorted<~lib/string/String | null>@varargs (param $0 i32) (param $1 i32) block $1of1 block $0of1 @@ -11335,16 +11161,7 @@ end unreachable end - block $~lib/util/sort/COMPARATOR<~lib/string/String | null>|inlined.0 (result i32) - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 55 - br $~lib/util/sort/COMPARATOR<~lib/string/String | null>|inlined.0 - end + call $~lib/util/sort/COMPARATOR<~lib/string/String | null> local.set $1 end local.get $0 @@ -11622,6 +11439,10 @@ i32.store offset=12 local.get $0 ) + (func $~lib/math/NativeMath.floor (param $0 f64) (result f64) + local.get $0 + f64.floor + ) (func $~lib/string/String#charAt (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 @@ -11751,11 +11572,10 @@ (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 f64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) i32.const 5056 local.set $1 i32.const 0 @@ -11774,30 +11594,28 @@ call $~lib/string/String#get:length f64.convert_i32_s f64.mul - local.set $4 - local.get $4 - f64.floor + call $~lib/math/NativeMath.floor i32.trunc_f64_s call $~lib/string/String#charAt - local.tee $5 + local.tee $4 call $~lib/string/String.__concat + local.tee $5 local.tee $6 - local.tee $7 local.get $1 - local.tee $8 + local.tee $7 i32.ne if - local.get $7 + local.get $6 call $~lib/rt/pure/__retain - local.set $7 - local.get $8 + local.set $6 + local.get $7 call $~lib/rt/pure/__release end - local.get $7 + local.get $6 local.set $1 - local.get $5 + local.get $4 call $~lib/rt/pure/__release - local.get $6 + local.get $5 call $~lib/rt/pure/__release local.get $2 i32.const 1 @@ -12017,6 +11835,14 @@ end end ) + (func $~lib/util/sort/SORT<~lib/string/String> (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 1 + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/sort/insertionSort<~lib/string/String> + ) (func $~lib/array/Array<~lib/string/String>#sort (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -12076,17 +11902,9 @@ return end local.get $3 - local.set $5 local.get $2 - local.set $4 local.get $1 - local.set $6 - i32.const 1 - drop - local.get $5 - local.get $4 - local.get $6 - call $~lib/util/sort/insertionSort<~lib/string/String> + call $~lib/util/sort/SORT<~lib/string/String> local.get $0 call $~lib/rt/pure/__retain ) @@ -12339,6 +12157,16 @@ call $~lib/rt/pure/__release local.get $2 ) + (func $~lib/util/sort/COMPARATOR<~lib/string/String> (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 55 + return + ) (func $std/array/assertSorted<~lib/string/String>@varargs (param $0 i32) (param $1 i32) block $1of1 block $0of1 @@ -12350,16 +12178,7 @@ end unreachable end - block $~lib/util/sort/COMPARATOR<~lib/string/String>|inlined.0 (result i32) - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 56 - br $~lib/util/sort/COMPARATOR<~lib/string/String>|inlined.0 - end + call $~lib/util/sort/COMPARATOR<~lib/string/String> local.set $1 end local.get $0 @@ -12868,13 +12687,20 @@ i32.store16 end ) + (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 0 + i32.const 1 + i32.ge_s + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa32_lut + ) (func $~lib/util/number/itoa32 (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 i32.eqz if @@ -12904,19 +12730,9 @@ call $~lib/rt/tlsf/__alloc local.set $3 local.get $3 - local.set $6 local.get $0 - local.set $5 local.get $2 - local.set $4 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $6 - local.get $5 - local.get $4 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core local.get $1 if local.get $3 @@ -12943,9 +12759,6 @@ (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) local.get $0 local.get $1 i32.const 1 @@ -13010,19 +12823,9 @@ i32.add local.set $4 local.get $0 - local.set $7 local.get $2 - local.set $6 local.get $4 - local.set $5 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $7 - local.get $6 - local.get $5 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core local.get $4 ) (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -13198,9 +13001,6 @@ (func $~lib/util/number/utoa32 (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 i32.eqz if @@ -13217,19 +13017,9 @@ call $~lib/rt/tlsf/__alloc local.set $2 local.get $2 - local.set $5 local.get $0 - local.set $4 local.get $1 - local.set $3 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core local.get $2 call $~lib/rt/pure/__retain ) @@ -13250,9 +13040,6 @@ (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) local.get $0 local.get $1 i32.const 1 @@ -13293,19 +13080,9 @@ i32.add local.set $4 local.get $0 - local.set $7 local.get $2 - local.set $6 local.get $4 - local.set $5 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $7 - local.get $6 - local.get $5 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core local.get $4 ) (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -13478,90 +13255,324 @@ local.get $4 return ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i64) - (local $11 i32) - (local $12 i32) - (local $13 i64) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i32) - (local $25 i32) - (local $26 i32) - (local $27 i32) - (local $28 i64) - i32.const 0 + (func $~lib/util/number/normalizedBoundaries (param $0 i64) (param $1 i32) + (local $2 i64) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i64.const 1 + i64.shl + i64.const 1 + i64.add + local.set $2 + local.get $1 + i32.const 1 + i32.sub + local.set $3 + local.get $2 + i64.clz + i32.wrap_i64 + local.set $4 + local.get $2 + local.get $4 + i64.extend_i32_s + i64.shl + local.set $2 + local.get $3 local.get $4 i32.sub - local.set $7 - i64.const 1 - local.get $7 + local.set $3 + i32.const 1 + local.get $0 + i64.const 4503599627370496 + i64.eq + i32.add + local.set $5 + local.get $2 + global.set $~lib/util/number/_frc_plus + local.get $0 + local.get $5 i64.extend_i32_s i64.shl - local.set $8 - local.get $8 i64.const 1 i64.sub - local.set $9 - local.get $3 local.get $1 - i64.sub - local.set $10 - local.get $4 - local.set $11 + local.get $5 + i32.sub local.get $3 - local.get $7 + i32.sub i64.extend_i32_s - i64.shr_u - i32.wrap_i64 - local.set $12 + i64.shl + global.set $~lib/util/number/_frc_minus local.get $3 - local.get $9 + global.set $~lib/util/number/_exp + ) + (func $~lib/util/number/getCachedPower (param $0 i32) + (local $1 f64) + (local $2 i32) + (local $3 i32) + i32.const -61 + local.get $0 + i32.sub + f64.convert_i32_s + f64.const 0.30102999566398114 + f64.mul + f64.const 347 + f64.add + local.set $1 + local.get $1 + i32.trunc_f64_s + local.set $2 + local.get $2 + local.get $2 + f64.convert_i32_s + local.get $1 + f64.ne + i32.add + local.set $2 + local.get $2 + i32.const 3 + i32.shr_s + i32.const 1 + i32.add + local.set $3 + i32.const 348 + local.get $3 + i32.const 3 + i32.shl + i32.sub + global.set $~lib/util/number/_K + i32.const 6288 + local.get $3 + i32.const 3 + i32.shl + i32.add + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 6984 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow + ) + (func $~lib/util/number/umul64f (param $0 i64) (param $1 i64) (result i64) + (local $2 i64) + (local $3 i64) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i64) + (local $8 i64) + local.get $0 + i64.const 4294967295 i64.and - local.set $13 - local.get $12 - call $~lib/util/number/decimalCount32 - local.set $14 + local.set $2 + local.get $1 + i64.const 4294967295 + i64.and + local.set $3 + local.get $0 + i64.const 32 + i64.shr_u + local.set $4 + local.get $1 + i64.const 32 + i64.shr_u + local.set $5 + local.get $2 + local.get $3 + i64.mul + local.set $6 + local.get $4 + local.get $3 + i64.mul local.get $6 - local.set $15 - loop $while-continue|0 - local.get $14 - i32.const 0 - i32.gt_s - local.set $16 - local.get $16 - if - block $break|1 - block $case10|1 - block $case9|1 - block $case8|1 - block $case7|1 - block $case6|1 - block $case5|1 - block $case4|1 - block $case3|1 - block $case2|1 - block $case1|1 - block $case0|1 - local.get $14 - local.set $18 - local.get $18 - i32.const 10 - i32.eq - br_if $case0|1 - local.get $18 - i32.const 9 + i64.const 32 + i64.shr_u + i64.add + local.set $7 + local.get $2 + local.get $5 + i64.mul + local.get $7 + i64.const 4294967295 + i64.and + i64.add + local.set $8 + local.get $8 + i64.const 2147483647 + i64.add + local.set $8 + local.get $7 + i64.const 32 + i64.shr_u + local.set $7 + local.get $8 + i64.const 32 + i64.shr_u + local.set $8 + local.get $4 + local.get $5 + i64.mul + local.get $7 + i64.add + local.get $8 + i64.add + ) + (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.add + i32.const 64 + i32.add + ) + (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.set $6 + local.get $6 + i32.load16_u + local.set $7 + loop $while-continue|1 + local.get $3 + local.get $5 + i64.lt_u + if (result i32) + local.get $2 + local.get $3 + i64.sub + local.get $4 + i64.ge_u + else + i32.const 0 + end + if (result i32) + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.lt_u + if (result i32) + i32.const 1 + else + local.get $5 + local.get $3 + i64.sub + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.sub + i64.gt_u + end + else + i32.const 0 + end + local.set $8 + local.get $8 + if + local.get $7 + i32.const 1 + i32.sub + local.set $7 + local.get $3 + local.get $4 + i64.add + local.set $3 + br $while-continue|1 + end + end + local.get $6 + local.get $7 + i32.store16 + ) + (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (local $7 i32) + (local $8 i64) + (local $9 i64) + (local $10 i64) + (local $11 i32) + (local $12 i32) + (local $13 i64) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local $19 i64) + (local $20 i64) + i32.const 0 + local.get $4 + i32.sub + local.set $7 + i64.const 1 + local.get $7 + i64.extend_i32_s + i64.shl + local.set $8 + local.get $8 + i64.const 1 + i64.sub + local.set $9 + local.get $3 + local.get $1 + i64.sub + local.set $10 + local.get $4 + local.set $11 + local.get $3 + local.get $7 + i64.extend_i32_s + i64.shr_u + i32.wrap_i64 + local.set $12 + local.get $3 + local.get $9 + i64.and + local.set $13 + local.get $12 + call $~lib/util/number/decimalCount32 + local.set $14 + local.get $6 + local.set $15 + loop $while-continue|0 + local.get $14 + i32.const 0 + i32.gt_s + local.set $16 + local.get $16 + if + block $break|1 + block $case10|1 + block $case9|1 + block $case8|1 + block $case7|1 + block $case6|1 + block $case5|1 + block $case4|1 + block $case3|1 + block $case2|1 + block $case1|1 + block $case0|1 + local.get $14 + local.set $18 + local.get $18 + i32.const 10 + i32.eq + br_if $case0|1 + local.get $18 + i32.const 9 i32.eq br_if $case1|1 local.get $18 @@ -13740,13 +13751,9 @@ i32.add global.set $~lib/util/number/_K local.get $0 - local.set $24 local.get $15 - local.set $18 local.get $5 - local.set $23 local.get $19 - local.set $22 i32.const 7160 local.get $14 i32.const 2 @@ -13756,79 +13763,15 @@ local.get $7 i64.extend_i32_s i64.shl - local.set $21 local.get $10 - local.set $20 - local.get $24 - local.get $18 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.set $25 - local.get $25 - i32.load16_u - local.set $26 - loop $while-continue|3 - local.get $22 - local.get $20 - i64.lt_u - if (result i32) - local.get $23 - local.get $22 - i64.sub - local.get $21 - i64.ge_u - else - i32.const 0 - end - if (result i32) - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.lt_u - if (result i32) - i32.const 1 - else - local.get $20 - local.get $22 - i64.sub - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.sub - i64.gt_u - end - else - i32.const 0 - end - local.set $27 - local.get $27 - if - local.get $26 - i32.const 1 - i32.sub - local.set $26 - local.get $22 - local.get $21 - i64.add - local.set $22 - br $while-continue|3 - end - end - local.get $25 - local.get $26 - i32.store16 + call $~lib/util/number/grisuRound local.get $15 return end br $while-continue|0 end end - loop $while-continue|4 + loop $while-continue|2 i32.const 1 local.set $16 local.get $16 @@ -13845,8 +13788,8 @@ local.get $7 i64.extend_i32_s i64.shr_u - local.set $23 - local.get $23 + local.set $20 + local.get $20 local.get $15 i64.extend_i32_s i64.or @@ -13855,16 +13798,16 @@ if local.get $0 local.get $15 - local.tee $26 + local.tee $18 i32.const 1 i32.add local.set $15 - local.get $26 + local.get $18 i32.const 1 i32.shl i32.add i32.const 48 - local.get $23 + local.get $20 i32.wrap_i64 i32.const 65535 i32.and @@ -13899,125 +13842,188 @@ i64.mul local.set $10 local.get $0 - local.set $18 local.get $15 - local.set $27 local.get $5 - local.set $28 local.get $13 - local.set $22 local.get $8 - local.set $21 local.get $10 - local.set $20 - local.get $18 - local.get $27 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.set $26 - local.get $26 - i32.load16_u - local.set $25 - loop $while-continue|6 - local.get $22 - local.get $20 - i64.lt_u - if (result i32) - local.get $28 - local.get $22 - i64.sub - local.get $21 - i64.ge_u - else - i32.const 0 - end - if (result i32) - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.lt_u - if (result i32) - i32.const 1 - else - local.get $20 - local.get $22 - i64.sub - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.sub - i64.gt_u - end - else - i32.const 0 - end - local.set $24 - local.get $24 - if - local.get $25 - i32.const 1 - i32.sub - local.set $25 - local.get $22 - local.get $21 - i64.add - local.set $22 - br $while-continue|6 - end - end - local.get $26 - local.get $25 - i32.store16 + call $~lib/util/number/grisuRound local.get $15 return end - br $while-continue|4 + br $while-continue|2 end end unreachable ) - (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) + (func $~lib/util/number/grisu2 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (local $3 i64) (local $4 i32) - (local $5 i32) - (local $6 i32) + (local $5 i64) + (local $6 i64) (local $7 i32) - (local $8 i32) + (local $8 i64) (local $9 i32) - (local $10 i32) + (local $10 i64) (local $11 i32) - local.get $2 - i32.eqz - if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 46 - i32.const 48 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 2 - i32.add - return - end - local.get $1 - local.get $2 - i32.add + (local $12 i64) + (local $13 i32) + (local $14 i64) + (local $15 i64) + local.get $0 + i64.reinterpret_f64 local.set $3 - local.get $1 local.get $3 - i32.le_s - if (result i32) + i64.const 9218868437227405312 + i64.and + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.set $4 + local.get $3 + i64.const 4503599627370495 + i64.and + local.set $5 + local.get $4 + i32.const 0 + i32.ne + i64.extend_i32_u + i64.const 52 + i64.shl + local.get $5 + i64.add + local.set $6 + local.get $4 + i32.const 1 + local.get $4 + select + i32.const 1023 + i32.const 52 + i32.add + i32.sub + local.set $4 + local.get $6 + local.get $4 + call $~lib/util/number/normalizedBoundaries + global.get $~lib/util/number/_exp + call $~lib/util/number/getCachedPower + local.get $6 + i64.clz + i32.wrap_i64 + local.set $7 + local.get $6 + local.get $7 + i64.extend_i32_s + i64.shl + local.set $6 + local.get $4 + local.get $7 + i32.sub + local.set $4 + global.get $~lib/util/number/_frc_pow + local.set $8 + global.get $~lib/util/number/_exp_pow + local.set $9 + local.get $6 + local.get $8 + call $~lib/util/number/umul64f + local.set $10 + local.get $4 + local.get $9 + call $~lib/util/number/umul64e + local.set $11 + global.get $~lib/util/number/_frc_plus + local.get $8 + call $~lib/util/number/umul64f + i64.const 1 + i64.sub + local.set $12 + global.get $~lib/util/number/_exp + local.get $9 + call $~lib/util/number/umul64e + local.set $13 + global.get $~lib/util/number/_frc_minus + local.get $8 + call $~lib/util/number/umul64f + i64.const 1 + i64.add + local.set $14 + local.get $12 + local.get $14 + i64.sub + local.set $15 + local.get $1 + local.get $10 + local.get $11 + local.get $12 + local.get $13 + local.get $15 + local.get $2 + call $~lib/util/number/genDigits + ) + (func $~lib/util/number/genExponent (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.set $2 + local.get $2 + if + i32.const 0 + local.get $1 + i32.sub + local.set $1 + end + local.get $1 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.set $3 + local.get $0 + local.get $1 + local.get $3 + call $~lib/util/number/utoa32_core + local.get $0 + i32.const 45 + i32.const 43 + local.get $2 + select + i32.store16 + local.get $3 + ) + (func $~lib/util/number/prettify (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 + i32.eqz + if + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 46 + i32.const 48 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 2 + i32.add + return + end + local.get $1 + local.get $2 + i32.add + local.set $3 + local.get $1 + local.get $3 + i32.le_s + if (result i32) local.get $3 i32.const 21 i32.le_s @@ -14155,580 +14161,114 @@ i32.const 1 i32.add local.set $5 - br $for-loop|1 - end - end - local.get $1 - local.get $4 - i32.add - return - else - local.get $1 - i32.const 1 - i32.eq - if - local.get $0 - i32.const 101 - i32.store16 offset=2 - local.get $0 - i32.const 4 - i32.add - local.set $5 - local.get $3 - i32.const 1 - i32.sub - local.set $6 - local.get $6 - i32.const 0 - i32.lt_s - local.set $4 - local.get $4 - if - i32.const 0 - local.get $6 - i32.sub - local.set $6 - end - local.get $6 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.set $7 - local.get $5 - local.set $10 - local.get $6 - local.set $9 - local.get $7 - local.set $8 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $10 - local.get $9 - local.get $8 - call $~lib/util/number/utoa32_lut - local.get $5 - i32.const 45 - i32.const 43 - local.get $4 - select - i32.store16 - local.get $7 - local.set $1 - local.get $1 - i32.const 2 - i32.add - return - else - local.get $1 - i32.const 1 - i32.shl - local.set $7 - local.get $0 - i32.const 4 - i32.add - local.get $0 - i32.const 2 - i32.add - local.get $7 - i32.const 2 - i32.sub - call $~lib/memory/memory.copy - local.get $0 - i32.const 46 - i32.store16 offset=2 - local.get $0 - local.get $7 - i32.add - i32.const 101 - i32.store16 offset=2 - local.get $1 - local.get $0 - local.get $7 - i32.add - i32.const 4 - i32.add - local.set $9 - local.get $3 - i32.const 1 - i32.sub - local.set $8 - local.get $8 - i32.const 0 - i32.lt_s - local.set $4 - local.get $4 - if - i32.const 0 - local.get $8 - i32.sub - local.set $8 - end - local.get $8 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.set $5 - local.get $9 - local.set $11 - local.get $8 - local.set $6 - local.get $5 - local.set $10 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $11 - local.get $6 - local.get $10 - call $~lib/util/number/utoa32_lut - local.get $9 - i32.const 45 - i32.const 43 - local.get $4 - select - i32.store16 - local.get $5 - i32.add - local.set $1 - local.get $1 - i32.const 2 - i32.add - return - end - unreachable - end - unreachable - end - unreachable - end - unreachable - ) - (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i64) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i64) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i64) - (local $25 i64) - (local $26 i32) - (local $27 i64) - (local $28 i32) - local.get $1 - f64.const 0 - f64.lt - local.set $2 - local.get $2 - if - local.get $1 - f64.neg - local.set $1 - local.get $0 - i32.const 45 - i32.store16 - end - local.get $1 - local.set $5 - local.get $0 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - i64.reinterpret_f64 - local.set $6 - local.get $6 - i64.const 9218868437227405312 - i64.and - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.set $7 - local.get $6 - i64.const 4503599627370495 - i64.and - local.set $8 - local.get $7 - i32.const 0 - i32.ne - i64.extend_i32_u - i64.const 52 - i64.shl - local.get $8 - i64.add - local.set $9 - local.get $7 - i32.const 1 - local.get $7 - select - i32.const 1023 - i32.const 52 - i32.add - i32.sub - local.set $7 - local.get $9 - local.set $11 - local.get $7 - local.set $10 - local.get $11 - i64.const 1 - i64.shl - i64.const 1 - i64.add - local.set $12 - local.get $10 - i32.const 1 - i32.sub - local.set $13 - local.get $12 - i64.clz - i32.wrap_i64 - local.set $14 - local.get $12 - local.get $14 - i64.extend_i32_s - i64.shl - local.set $12 - local.get $13 - local.get $14 - i32.sub - local.set $13 - i32.const 1 - local.get $11 - i64.const 4503599627370496 - i64.eq - i32.add - local.set $15 - local.get $12 - global.set $~lib/util/number/_frc_plus - local.get $11 - local.get $15 - i64.extend_i32_s - i64.shl - i64.const 1 - i64.sub - local.get $10 - local.get $15 - i32.sub - local.get $13 - i32.sub - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_minus - local.get $13 - global.set $~lib/util/number/_exp - global.get $~lib/util/number/_exp - local.set $10 - i32.const -61 - local.get $10 - i32.sub - f64.convert_i32_s - f64.const 0.30102999566398114 - f64.mul - f64.const 347 - f64.add - local.set $16 - local.get $16 - i32.trunc_f64_s - local.set $15 - local.get $15 - local.get $15 - f64.convert_i32_s - local.get $16 - f64.ne - i32.add - local.set $15 - local.get $15 - i32.const 3 - i32.shr_s - i32.const 1 - i32.add - local.set $14 - i32.const 348 - local.get $14 - i32.const 3 - i32.shl - i32.sub - global.set $~lib/util/number/_K - i32.const 6288 - local.get $14 - i32.const 3 - i32.shl - i32.add - i64.load - global.set $~lib/util/number/_frc_pow - i32.const 6984 - local.get $14 - i32.const 1 - i32.shl - i32.add - i32.load16_s - global.set $~lib/util/number/_exp_pow - local.get $9 - i64.clz - i32.wrap_i64 - local.set $14 - local.get $9 - local.get $14 - i64.extend_i32_s - i64.shl - local.set $9 - local.get $7 - local.get $14 - i32.sub - local.set $7 - global.get $~lib/util/number/_frc_pow - local.set $12 - global.get $~lib/util/number/_exp_pow - local.set $15 - local.get $9 - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $18 - local.get $11 - i64.const 4294967295 - i64.and - local.set $19 - local.get $17 - i64.const 32 - i64.shr_u - local.set $20 - local.get $11 - i64.const 32 - i64.shr_u - local.set $21 - local.get $18 - local.get $19 - i64.mul - local.set $22 - local.get $20 - local.get $19 - i64.mul - local.get $22 - i64.const 32 - i64.shr_u - i64.add - local.set $23 - local.get $18 - local.get $21 - i64.mul - local.get $23 - i64.const 4294967295 - i64.and - i64.add - local.set $24 - local.get $24 - i64.const 2147483647 - i64.add - local.set $24 - local.get $23 - i64.const 32 - i64.shr_u - local.set $23 - local.get $24 - i64.const 32 - i64.shr_u - local.set $24 - local.get $20 - local.get $21 - i64.mul - local.get $23 - i64.add - local.get $24 - i64.add - local.set $24 - local.get $7 - local.set $10 - local.get $15 - local.set $13 - local.get $10 - local.get $13 - i32.add - i32.const 64 - i32.add - local.set $10 - global.get $~lib/util/number/_frc_plus - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $23 - local.get $11 - i64.const 4294967295 - i64.and - local.set $22 - local.get $17 - i64.const 32 - i64.shr_u - local.set $21 - local.get $11 - i64.const 32 - i64.shr_u - local.set $20 - local.get $23 - local.get $22 - i64.mul - local.set $19 - local.get $21 - local.get $22 - i64.mul - local.get $19 - i64.const 32 - i64.shr_u - i64.add - local.set $18 - local.get $23 - local.get $20 - i64.mul - local.get $18 - i64.const 4294967295 - i64.and - i64.add - local.set $25 - local.get $25 - i64.const 2147483647 - i64.add - local.set $25 - local.get $18 - i64.const 32 - i64.shr_u - local.set $18 - local.get $25 - i64.const 32 - i64.shr_u - local.set $25 - local.get $21 - local.get $20 - i64.mul - local.get $18 - i64.add - local.get $25 - i64.add - i64.const 1 - i64.sub - local.set $25 - global.get $~lib/util/number/_exp - local.set $26 - local.get $15 - local.set $13 - local.get $26 - local.get $13 - i32.add - i32.const 64 - i32.add - local.set $26 - global.get $~lib/util/number/_frc_minus - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $18 - local.get $11 - i64.const 4294967295 - i64.and - local.set $19 - local.get $17 - i64.const 32 - i64.shr_u - local.set $20 - local.get $11 - i64.const 32 - i64.shr_u - local.set $21 - local.get $18 - local.get $19 - i64.mul - local.set $22 - local.get $20 - local.get $19 - i64.mul - local.get $22 - i64.const 32 - i64.shr_u - i64.add - local.set $23 - local.get $18 - local.get $21 - i64.mul - local.get $23 - i64.const 4294967295 - i64.and - i64.add - local.set $27 - local.get $27 - i64.const 2147483647 - i64.add - local.set $27 - local.get $23 - i64.const 32 - i64.shr_u - local.set $23 - local.get $27 - i64.const 32 - i64.shr_u - local.set $27 - local.get $20 - local.get $21 - i64.mul - local.get $23 - i64.add - local.get $27 - i64.add - i64.const 1 - i64.add - local.set $27 - local.get $25 - local.get $27 - i64.sub - local.set $23 - local.get $4 - local.get $24 - local.get $10 - local.get $25 - local.get $26 - local.get $23 - local.get $3 - call $~lib/util/number/genDigits - local.set $28 + br $for-loop|1 + end + end + local.get $1 + local.get $4 + i32.add + return + else + local.get $1 + i32.const 1 + i32.eq + if + local.get $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + i32.const 4 + i32.add + local.get $3 + i32.const 1 + i32.sub + call $~lib/util/number/genExponent + local.set $1 + local.get $1 + i32.const 2 + i32.add + return + else + local.get $1 + i32.const 1 + i32.shl + local.set $4 + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $4 + i32.const 2 + i32.sub + call $~lib/memory/memory.copy + local.get $0 + i32.const 46 + i32.store16 offset=2 + local.get $0 + local.get $4 + i32.add + i32.const 101 + i32.store16 offset=2 + local.get $1 + local.get $0 + local.get $4 + i32.add + i32.const 4 + i32.add + local.get $3 + i32.const 1 + i32.sub + call $~lib/util/number/genExponent + i32.add + local.set $1 + local.get $1 + i32.const 2 + i32.add + return + end + unreachable + end + unreachable + end + unreachable + end + unreachable + ) + (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + f64.const 0 + f64.lt + local.set $2 + local.get $2 + if + local.get $1 + f64.neg + local.set $1 + local.get $0 + i32.const 45 + i32.store16 + end + local.get $1 + local.get $0 + local.get $2 + call $~lib/util/number/grisu2 + local.set $3 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $28 + local.get $3 local.get $2 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.set $28 - local.get $28 + local.set $3 + local.get $3 local.get $2 i32.add ) @@ -15832,9 +15372,6 @@ (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) local.get $0 local.get $1 i32.const 1 @@ -15915,23 +15452,13 @@ i32.add local.set $4 local.get $0 - local.set $7 local.get $2 i32.const 24 i32.shl i32.const 24 i32.shr_s - local.set $6 local.get $4 - local.set $5 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $7 - local.get $6 - local.get $5 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core local.get $4 ) (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -16128,9 +15655,6 @@ (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) local.get $0 local.get $1 i32.const 1 @@ -16177,21 +15701,11 @@ i32.add local.set $4 local.get $0 - local.set $7 local.get $2 i32.const 65535 i32.and - local.set $6 local.get $4 - local.set $5 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $7 - local.get $6 - local.get $5 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core local.get $4 ) (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -16551,14 +16065,20 @@ local.get $2 call $~lib/util/number/utoa32_lut ) + (func $~lib/util/number/utoa64_core (param $0 i32) (param $1 i64) (param $2 i32) + i32.const 0 + i32.const 1 + i32.ge_s + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa64_lut + ) (func $~lib/util/number/utoa64 (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i64) local.get $0 i64.const 0 i64.ne @@ -16585,19 +16105,9 @@ call $~lib/rt/tlsf/__alloc local.set $1 local.get $1 - local.set $6 local.get $2 - local.set $5 local.get $3 - local.set $4 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $6 - local.get $5 - local.get $4 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core else local.get $0 call $~lib/util/number/decimalCount64High @@ -16609,19 +16119,9 @@ call $~lib/rt/tlsf/__alloc local.set $1 local.get $1 - local.set $5 local.get $0 - local.set $7 local.get $3 - local.set $4 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $5 - local.get $7 - local.get $4 - call $~lib/util/number/utoa64_lut + call $~lib/util/number/utoa64_core end local.get $1 call $~lib/rt/pure/__retain @@ -16644,10 +16144,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) local.get $0 local.get $1 i32.const 1 @@ -16696,19 +16192,9 @@ i32.add local.set $4 local.get $0 - local.set $8 local.get $5 - local.set $7 local.get $4 - local.set $6 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $8 - local.get $7 - local.get $6 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core else local.get $4 local.get $2 @@ -16716,19 +16202,9 @@ i32.add local.set $4 local.get $0 - local.set $7 local.get $2 - local.set $9 local.get $4 - local.set $6 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $7 - local.get $9 - local.get $6 - call $~lib/util/number/utoa64_lut + call $~lib/util/number/utoa64_core end local.get $4 ) @@ -16912,10 +16388,6 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i64) local.get $0 i64.const 0 i64.ne @@ -16956,19 +16428,9 @@ call $~lib/rt/tlsf/__alloc local.set $2 local.get $2 - local.set $7 local.get $3 - local.set $6 local.get $4 - local.set $5 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $7 - local.get $6 - local.get $5 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core else local.get $0 call $~lib/util/number/decimalCount64High @@ -16982,19 +16444,9 @@ call $~lib/rt/tlsf/__alloc local.set $2 local.get $2 - local.set $6 local.get $0 - local.set $8 local.get $4 - local.set $5 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $6 - local.get $8 - local.get $5 - call $~lib/util/number/utoa64_lut + call $~lib/util/number/utoa64_core end local.get $1 if @@ -17023,10 +16475,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) local.get $0 local.get $1 i32.const 1 @@ -17099,19 +16547,9 @@ i32.add local.set $4 local.get $0 - local.set $8 local.get $5 - local.set $7 local.get $4 - local.set $6 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $8 - local.get $7 - local.get $6 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core else local.get $4 local.get $2 @@ -17119,19 +16557,9 @@ i32.add local.set $4 local.get $0 - local.set $7 local.get $2 - local.set $9 local.get $4 - local.set $6 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $7 - local.get $9 - local.get $6 - call $~lib/util/number/utoa64_lut + call $~lib/util/number/utoa64_core end local.get $4 ) @@ -17587,9 +17015,6 @@ (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) local.get $0 local.get $1 i32.const 1 @@ -17636,21 +17061,11 @@ i32.add local.set $4 local.get $0 - local.set $7 local.get $2 i32.const 255 i32.and - local.set $6 local.get $4 - local.set $5 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $7 - local.get $6 - local.get $5 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core local.get $4 ) (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -24059,16 +23474,16 @@ call $std/array/createRandomOrderedArray local.set $29 local.get $31 - i32.const 49 + i32.const 48 call $std/array/assertSorted local.get $31 - i32.const 50 + i32.const 49 call $std/array/assertSorted local.get $29 - i32.const 51 + i32.const 50 call $std/array/assertSorted local.get $29 - i32.const 52 + i32.const 51 call $std/array/assertSorted local.get $31 call $~lib/rt/pure/__release @@ -24078,7 +23493,7 @@ call $std/array/createReverseOrderedNestedArray local.set $29 local.get $29 - i32.const 53 + i32.const 52 call $std/array/assertSorted<~lib/array/Array> local.get $29 call $~lib/rt/pure/__release @@ -24086,7 +23501,7 @@ call $std/array/createReverseOrderedElementsArray local.set $29 local.get $29 - i32.const 54 + i32.const 53 call $std/array/assertSorted> local.get $29 call $~lib/rt/pure/__release diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index ac4432de51..a5806b24c9 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1,13 +1,13 @@ (module (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_=>_none (func (param i32 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 (func (param i32 i32 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 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -27,6 +27,58 @@ (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "memory" (memory $0)) (start $~start) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -41,7 +93,7 @@ if i32.const 0 i32.const 1152 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -63,7 +115,7 @@ if i32.const 0 i32.const 1152 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -82,23 +134,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -106,72 +158,56 @@ if i32.const 0 i32.const 1152 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -179,7 +215,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -202,7 +238,7 @@ if i32.const 0 i32.const 1152 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -216,22 +252,16 @@ if i32.const 0 i32.const 1152 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -240,7 +270,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -249,7 +279,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -260,16 +290,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -289,7 +313,7 @@ if i32.const 0 i32.const 1152 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -322,8 +346,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -344,7 +368,7 @@ if i32.const 0 i32.const 1152 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -354,17 +378,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1152 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -393,13 +417,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -407,21 +431,15 @@ if i32.const 0 i32.const 1152 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -436,37 +454,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -490,7 +499,7 @@ if i32.const 0 i32.const 1152 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -507,7 +516,7 @@ if i32.const 0 i32.const 1152 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -535,7 +544,7 @@ if i32.const 0 i32.const 1152 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -587,7 +596,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -608,7 +617,8 @@ unreachable end i32.const 1440 - local.tee $0 + local.set $2 + i32.const 1440 i32.const 0 i32.store i32.const 3008 @@ -619,35 +629,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1440 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1440 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -667,7 +668,7 @@ i32.const 1440 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -725,17 +726,14 @@ if i32.const 0 i32.const 1152 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const -1 local.get $1 i32.shl @@ -743,16 +741,10 @@ local.tee $1 if (result i32) local.get $0 + local.get $2 local.get $1 i32.ctz - local.get $2 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -768,151 +760,68 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1152 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end end ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - local.get $1 - i32.load - local.set $3 - local.get $2 - i32.const 15 - i32.and + (local $5 i32) + global.get $~lib/rt/tlsf/collectLock if i32.const 0 i32.const 1152 - i32.const 365 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable end + local.get $1 + local.tee $3 + i32.const 1073741808 + i32.ge_u + if + i32.const 1200 + i32.const 1152 + i32.const 453 + i32.const 30 + call $~lib/builtins/abort + unreachable + end + local.get $0 local.get $3 - i32.const -4 + i32.const 15 + i32.add + i32.const -16 i32.and - local.get $2 - i32.sub + local.tee $1 + i32.const 16 + local.get $1 + i32.const 16 + i32.gt_u + select local.tee $4 - i32.const 32 - 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 16 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 16 - 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 16 - 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) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - global.get $~lib/rt/tlsf/collectLock - if - i32.const 0 - i32.const 1152 - i32.const 501 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1073741808 - i32.ge_u - if - i32.const 1200 - i32.const 1152 - i32.const 461 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $3 - i32.const 16 - local.get $3 - i32.const 16 - i32.gt_u - select - local.tee $4 - call $~lib/rt/tlsf/searchBlock - local.tee $3 - i32.eqz + call $~lib/rt/tlsf/searchBlock + local.tee $1 + i32.eqz if i32.const 1 global.set $~lib/rt/tlsf/collectLock @@ -921,18 +830,19 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if - i32.const 16 memory.size - local.tee $3 + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -957,10 +867,8 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 - local.get $5 - local.get $3 + local.tee $5 + local.get $1 local.get $5 i32.gt_s select @@ -977,7 +885,7 @@ end end local.get $0 - local.get $3 + local.get $1 i32.const 16 i32.shl memory.size @@ -987,19 +895,19 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if i32.const 0 i32.const 1152 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable end end end - local.get $3 + local.get $1 i32.load i32.const -4 i32.and @@ -1008,194 +916,260 @@ if i32.const 0 i32.const 1152 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 0 i32.store offset=4 - local.get $3 + local.get $1 local.get $2 i32.store offset=8 - local.get $3 local.get $1 + local.get $3 i32.store offset=12 local.get $0 - local.get $3 + local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $4 - call $~lib/rt/tlsf/prepareBlock - local.get $3 - call $~lib/rt/rtrace/onalloc - local.get $3 - ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) - (local $2 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 4 - i32.sub - local.tee $2 - i32.const 0 - i32.store8 offset=3 - local.get $1 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 offset=1 - local.get $0 - i32.const 0 - i32.store8 offset=2 - local.get $2 - i32.const 0 - i32.store8 offset=2 - local.get $2 + i32.load + local.set $2 + local.get $4 + i32.const 15 + i32.and + if i32.const 0 - i32.store8 offset=1 + i32.const 1152 + i32.const 357 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const -4 + i32.and + local.get $4 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if local.get $1 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 offset=3 + local.get $4 local.get $2 - i32.const 0 - i32.store8 - local.get $1 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - local.get $0 - i32.sub - i32.const 3 + i32.const 2 i32.and - local.tee $2 - i32.add - local.tee $0 - i32.const 0 + i32.or i32.store - local.get $0 + local.get $4 local.get $1 - local.get $2 - i32.sub - i32.const -4 - i32.and - local.tee $2 + i32.const 16 + i32.add i32.add - i32.const 28 + local.tee $2 + local.get $3 + i32.const 16 i32.sub - local.tee $1 - i32.const 0 - i32.store offset=24 - local.get $2 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store offset=4 + i32.const 1 + i32.or + i32.store local.get $0 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 local.get $2 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 + call $~lib/rt/tlsf/insertBlock + else local.get $1 - i32.const 0 + local.get $2 + i32.const -2 + i32.and i32.store local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 + call $~lib/rt/tlsf/GETRIGHT local.get $1 - i32.const 0 - i32.store offset=12 - local.get $0 - local.get $0 - i32.const 4 + call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -3 i32.and - i32.const 24 - i32.add - local.tee $1 - i32.add - local.set $0 - local.get $2 + i32.store + end + local.get $1 + call $~lib/rt/rtrace/onalloc + local.get $1 + ) + (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + local.get $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + ) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $1 + i32.eqz + if + return + end + local.get $0 + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 4 + i32.sub + local.tee $2 + i32.const 0 + i32.store8 offset=3 + local.get $1 + i32.const 2 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store8 offset=1 + local.get $0 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=1 + local.get $1 + i32.const 6 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store8 offset=3 + local.get $2 + i32.const 0 + i32.store8 + local.get $1 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $2 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $0 + local.get $1 + local.get $2 + i32.sub + i32.const -4 + i32.and + local.tee $2 + i32.add + i32.const 28 + i32.sub + local.tee $1 + i32.const 0 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + i32.const 0 + i32.store offset=24 + local.get $1 + i32.const 0 + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $1 + i32.add + local.set $0 + local.get $2 + local.get $1 + i32.sub + local.set $1 + loop $while-continue|0 local.get $1 - i32.sub - local.set $1 - loop $while-continue|0 + i32.const 32 + i32.ge_u + if + local.get $0 + i64.const 0 + i64.store + local.get $0 + i64.const 0 + i64.store offset=8 + local.get $0 + i64.const 0 + i64.store offset=16 + local.get $0 + i64.const 0 + i64.store offset=24 local.get $1 i32.const 32 - i32.ge_u - if - local.get $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i64.const 0 - i64.store offset=16 - local.get $0 - i64.const 0 - i64.store offset=24 - local.get $1 - i32.const 32 - i32.sub - local.set $1 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $while-continue|0 - end + i32.sub + local.set $1 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 end end ) @@ -1250,177 +1224,179 @@ end local.get $0 ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $0 + local.get $1 + i32.lt_u + if local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 + i32.const 7 + i32.and local.get $0 - local.get $1 - i32.lt_u + i32.const 7 + i32.and + i32.eq if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + return end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $2 + i32.const 1 + i32.sub + local.set $2 local.get $0 - local.tee $2 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $1 - local.get $2 local.get $3 + local.get $4 i32.load8_u i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 + br $while-continue|0 end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 - local.get $4 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and if - local.get $4 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $4 - local.get $0 + local.tee $2 i32.add local.get $1 - local.get $4 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) (func $~lib/arraybuffer/ArrayBuffer#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -1489,7 +1465,7 @@ local.get $1 i32.add local.get $2 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $3 call $~lib/rt/pure/__retain ) @@ -1529,7 +1505,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 local.get $3 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset local.get $0 i32.eqz if @@ -1591,7 +1567,7 @@ call $~lib/rt/tlsf/__alloc local.tee $1 i32.const 8 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset local.get $1 call $~lib/rt/pure/__retain local.tee $9 @@ -1806,7 +1782,7 @@ local.tee $0 i32.const 1376 i32.const 8 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $1 local.get $0 call $~lib/rt/pure/__retain @@ -1834,14 +1810,13 @@ local.tee $1 i32.const 16 i32.sub + local.tee $0 i32.load offset=12 local.tee $5 i32.const 1073741808 i32.gt_u local.get $5 - local.get $1 - i32.const 16 - i32.sub + local.get $0 i32.load offset=12 i32.gt_u i32.or diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index c71239ab12..2a9c52fe3e 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -2,9 +2,9 @@ (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_i32_=>_none (func (param 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))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -34,6 +34,69 @@ (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "memory" (memory $0)) (start $~start) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -42,9 +105,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -57,7 +117,7 @@ if i32.const 0 i32.const 144 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -84,7 +144,7 @@ if i32.const 0 i32.const 144 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -138,7 +198,7 @@ if i32.const 0 i32.const 144 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -163,77 +223,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -250,6 +268,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -261,8 +285,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -270,7 +292,7 @@ if i32.const 0 i32.const 144 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -287,28 +309,18 @@ if i32.const 0 i32.const 144 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -319,44 +331,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -364,30 +366,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 144 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -406,22 +404,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -447,7 +445,7 @@ if i32.const 0 i32.const 144 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -459,18 +457,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 144 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -524,27 +522,15 @@ if i32.const 0 i32.const 144 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -559,24 +545,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -586,31 +558,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -618,8 +574,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -645,24 +599,22 @@ if i32.const 0 i32.const 144 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -670,7 +622,7 @@ if i32.const 0 i32.const 144 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -678,16 +630,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -703,7 +655,7 @@ if i32.const 0 i32.const 144 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -712,8 +664,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -724,49 +676,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -779,10 +727,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -832,73 +776,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -911,11 +828,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -935,7 +852,7 @@ if i32.const 192 i32.const 144 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -961,9 +878,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1031,31 +945,24 @@ if i32.const 0 i32.const 144 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1068,79 +975,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 144 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1177,9 +1053,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1193,12 +1067,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1208,7 +1082,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1245,7 +1119,7 @@ if i32.const 0 i32.const 144 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1296,29 +1170,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1338,7 +1192,7 @@ if i32.const 0 i32.const 144 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1385,7 +1239,7 @@ if i32.const 0 i32.const 144 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1406,7 +1260,7 @@ if i32.const 0 i32.const 144 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1427,7 +1281,7 @@ if i32.const 0 i32.const 144 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -1462,219 +1316,214 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + (local $6 i64) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - i32.const 4 - i32.sub - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - local.get $4 - i32.store8 offset=3 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=1 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - i32.const 28 - i32.sub - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=24 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=16 - local.get $6 - local.get $8 - i32.store offset=20 - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=4 - local.get $6 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=12 - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add + i32.const 0 + i32.const 1 + i32.gt_s + drop + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.set $3 + local.get $0 + local.get $1 + i32.store8 + local.get $3 + local.get $1 + i32.store8 offset=3 + local.get $2 + i32.const 2 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store8 offset=1 + local.get $0 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=1 + local.get $2 + i32.const 6 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store8 offset=3 + local.get $3 + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $5 + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.set $3 + local.get $0 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=16 + local.get $3 + local.get $5 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=12 + local.get $0 + local.get $5 + i32.store offset=16 + local.get $0 + local.get $5 + i32.store offset=20 + local.get $0 + local.get $5 + i32.store offset=24 + local.get $3 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=12 + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $5 + i64.extend_i32_u + local.get $5 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $6 + loop $while-continue|0 + local.get $2 + i32.const 32 + i32.ge_u local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 + if + local.get $0 + local.get $6 + i64.store + local.get $0 + local.get $6 + i64.store offset=8 + local.get $0 + local.get $6 + i64.store offset=16 + local.get $0 + local.get $6 + i64.store offset=24 + local.get $2 i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 end end ) + (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memset + ) (func $~lib/rt/pure/increment (param $0 i32) (local $1 i32) local.get $0 @@ -2794,238 +2643,233 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if local.get $0 - local.set $5 local.get $1 - local.set $4 local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if i32.const 0 - i32.const 1 + i32.const 2 i32.lt_s drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.tee $7 + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 i32.const 1 i32.add - local.set $5 - local.get $7 + local.set $0 local.get $4 - local.tee $7 + local.get $1 + local.tee $4 i32.const 1 i32.add - local.set $4 - local.get $7 + local.set $1 + local.get $4 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 + br $while-continue|0 end end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) (func $~lib/arraybuffer/ArrayBuffer#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index f112291106..bf9ffa45f9 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -6,9 +6,9 @@ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_f32_i32_=>_none (func (param i32 f32 i32))) (type $i32_f64_i32_=>_none (func (param i32 f64 i32))) (type $none_=>_i32 (func (result i32))) @@ -35,6 +35,58 @@ (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "memory" (memory $0)) (start $~start) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -49,7 +101,7 @@ if i32.const 0 i32.const 1152 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -71,7 +123,7 @@ if i32.const 0 i32.const 1152 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -90,23 +142,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -114,72 +166,56 @@ if i32.const 0 i32.const 1152 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -187,7 +223,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -210,7 +246,7 @@ if i32.const 0 i32.const 1152 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -224,22 +260,16 @@ if i32.const 0 i32.const 1152 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -248,7 +278,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -257,7 +287,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -268,16 +298,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -297,7 +321,7 @@ if i32.const 0 i32.const 1152 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -330,8 +354,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -352,7 +376,7 @@ if i32.const 0 i32.const 1152 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -362,17 +386,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1152 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -401,13 +425,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -415,21 +439,15 @@ if i32.const 0 i32.const 1152 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -444,37 +462,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -498,7 +507,7 @@ if i32.const 0 i32.const 1152 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -515,7 +524,7 @@ if i32.const 0 i32.const 1152 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -543,7 +552,7 @@ if i32.const 0 i32.const 1152 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -595,7 +604,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -616,7 +625,8 @@ unreachable end i32.const 1520 - local.tee $0 + local.set $2 + i32.const 1520 i32.const 0 i32.store i32.const 3088 @@ -627,35 +637,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1520 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1520 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -675,7 +676,7 @@ i32.const 1520 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -733,17 +734,14 @@ if i32.const 0 i32.const 1152 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const -1 local.get $1 i32.shl @@ -751,16 +749,10 @@ local.tee $1 if (result i32) local.get $0 + local.get $2 local.get $1 i32.ctz - local.get $2 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -776,111 +768,27 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1152 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 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 15 - i32.and - if - i32.const 0 - i32.const 1152 - i32.const 365 - 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 32 - 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 16 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 16 - 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 16 - 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) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -889,37 +797,38 @@ if i32.const 0 i32.const 1152 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + local.tee $3 i32.const 1073741808 i32.ge_u if i32.const 1200 i32.const 1152 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable end local.get $0 - local.get $1 + local.get $3 i32.const 15 i32.add i32.const -16 i32.and - local.tee $3 + local.tee $1 i32.const 16 - local.get $3 + local.get $1 i32.const 16 i32.gt_u select local.tee $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if i32.const 1 @@ -929,18 +838,19 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if - i32.const 16 memory.size - local.tee $3 + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -965,10 +875,8 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 - local.get $5 - local.get $3 + local.tee $5 + local.get $1 local.get $5 i32.gt_s select @@ -985,7 +893,7 @@ end end local.get $0 - local.get $3 + local.get $1 i32.const 16 i32.shl memory.size @@ -995,19 +903,19 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if i32.const 0 i32.const 1152 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable end end end - local.get $3 + local.get $1 i32.load i32.const -4 i32.and @@ -1016,30 +924,86 @@ if i32.const 0 i32.const 1152 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 0 i32.store offset=4 - local.get $3 + local.get $1 local.get $2 i32.store offset=8 - local.get $3 local.get $1 + local.get $3 i32.store offset=12 local.get $0 - local.get $3 + local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 + local.get $1 + i32.load + local.set $2 local.get $4 - call $~lib/rt/tlsf/prepareBlock - local.get $3 + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1152 + i32.const 357 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const -4 + i32.and + local.get $4 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $4 + local.get $2 + i32.const 2 + i32.and + i32.or + i32.store + local.get $4 + local.get $1 + i32.const 16 + i32.add + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + call $~lib/rt/tlsf/GETRIGHT + local.get $1 + call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $1 call $~lib/rt/rtrace/onalloc - local.get $3 + local.get $1 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index e579146b4f..a535d138f8 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -42,6 +42,69 @@ (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "memory" (memory $0)) (start $~start) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -50,9 +113,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -65,7 +125,7 @@ if i32.const 0 i32.const 144 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -92,7 +152,7 @@ if i32.const 0 i32.const 144 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -146,7 +206,7 @@ if i32.const 0 i32.const 144 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -171,77 +231,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -258,6 +276,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -269,8 +293,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -278,7 +300,7 @@ if i32.const 0 i32.const 144 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -295,28 +317,18 @@ if i32.const 0 i32.const 144 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -327,44 +339,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -372,30 +374,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 144 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -414,22 +412,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -455,7 +453,7 @@ if i32.const 0 i32.const 144 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -467,18 +465,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 144 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -532,27 +530,15 @@ if i32.const 0 i32.const 144 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -567,24 +553,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -594,31 +566,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -626,8 +582,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -653,24 +607,22 @@ if i32.const 0 i32.const 144 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -678,7 +630,7 @@ if i32.const 0 i32.const 144 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -686,16 +638,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -711,7 +663,7 @@ if i32.const 0 i32.const 144 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -720,8 +672,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -732,49 +684,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -787,10 +735,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -840,73 +784,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 - if + local.set $5 + local.get $5 + if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -919,11 +836,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -943,7 +860,7 @@ if i32.const 192 i32.const 144 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -969,9 +886,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1039,31 +953,24 @@ if i32.const 0 i32.const 144 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1076,79 +983,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 144 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1185,9 +1061,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1201,12 +1075,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1216,7 +1090,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1253,7 +1127,7 @@ if i32.const 0 i32.const 144 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1304,29 +1178,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1346,7 +1200,7 @@ if i32.const 0 i32.const 144 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1393,7 +1247,7 @@ if i32.const 0 i32.const 144 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1414,7 +1268,7 @@ if i32.const 0 i32.const 144 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1435,7 +1289,7 @@ if i32.const 0 i32.const 144 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -1470,219 +1324,214 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + (local $6 i64) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 + i32.const 0 + i32.const 1 + i32.gt_s + drop + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.set $3 + local.get $0 + local.get $1 + i32.store8 + local.get $3 + local.get $1 + i32.store8 offset=3 + local.get $2 + i32.const 2 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store8 offset=1 + local.get $0 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=1 + local.get $2 + i32.const 6 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store8 offset=3 + local.get $3 + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $5 + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.set $3 + local.get $0 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=16 + local.get $3 + local.get $5 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=12 + local.get $0 + local.get $5 + i32.store offset=16 + local.get $0 + local.get $5 + i32.store offset=20 + local.get $0 + local.get $5 + i32.store offset=24 + local.get $3 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=12 + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $5 + i64.extend_i32_u + local.get $5 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $6 + loop $while-continue|0 local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - i32.const 4 - i32.sub - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - local.get $4 - i32.store8 offset=3 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=1 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and + i32.const 32 + i32.ge_u local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - i32.const 28 - i32.sub - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=24 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=16 - local.get $6 - local.get $8 - i32.store offset=20 - local.get $3 - i32.const 24 - i32.le_u if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=4 - local.get $6 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=12 - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 + local.get $0 + local.get $6 + i64.store + local.get $0 + local.get $6 + i64.store offset=8 + local.get $0 + local.get $6 + i64.store offset=16 + local.get $0 + local.get $6 + i64.store offset=24 + local.get $2 i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 end end ) + (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memset + ) (func $~lib/rt/pure/increment (param $0 i32) (local $1 i32) local.get $0 diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index fbe749fb7e..fc37c040b9 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -1,6 +1,7 @@ (module (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i32_i32_i64_=>_i64 (func (param i32 i32 i32 i32 i64) (result i64))) (type $none_=>_f64 (func (result f64))) (type $i32_i32_i32_i32_i32_i32_f64_=>_f64 (func (param i32 i32 i32 i32 i32 i32 f64) (result f64))) (import "Date" "UTC" (func $~lib/bindings/Date/UTC (param i32 i32 i32 i32 i32 i32 f64) (result f64))) @@ -12,6 +13,18 @@ (global $std/date/date (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) + (func $~lib/date/Date.UTC (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i64) (result i64) + local.get $0 + local.get $1 + local.get $2 + local.get $3 + i32.const 0 + i32.const 0 + local.get $4 + f64.convert_i64_s + call $~lib/bindings/Date/UTC + i64.trunc_f64_s + ) (func $start:std/date (local $0 i32) (local $1 i32) @@ -20,11 +33,8 @@ i32.const 0 i32.const 1 i32.const 0 - i32.const 0 - i32.const 0 - f64.const 0 - call $~lib/bindings/Date/UTC - i64.trunc_f64_s + i64.const 0 + call $~lib/date/Date.UTC i64.eqz i32.eqz if @@ -39,11 +49,8 @@ i32.const 0 i32.const 1 i32.const 0 - i32.const 0 - i32.const 0 - f64.const 0 - call $~lib/bindings/Date/UTC - i64.trunc_f64_s + i64.const 0 + call $~lib/date/Date.UTC i64.eqz i32.eqz if @@ -58,11 +65,8 @@ i32.const 10 i32.const 10 i32.const 11 - i32.const 0 - i32.const 0 - f64.const 1 - call $~lib/bindings/Date/UTC - i64.trunc_f64_s + i64.const 1 + call $~lib/date/Date.UTC global.set $std/date/creationTime global.get $std/date/creationTime i64.const 1541847600001 diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index 1455f2e847..563ac7474e 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -5,7 +5,9 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) + (type $none_=>_i64 (func (result i64))) (type $i32_=>_i64 (func (param i32) (result i64))) + (type $i32_i32_i32_i32_i32_i32_i64_=>_i64 (func (param i32 i32 i32 i32 i32 i32 i64) (result i64))) (type $i32_i64_=>_i64 (func (param i32 i64) (result i64))) (type $none_=>_f64 (func (result f64))) (type $i32_i32_i32_i32_i32_i32_f64_=>_f64 (func (param i32 i32 i32 i32 i32 i32 f64) (result f64))) @@ -22,6 +24,22 @@ (global $~lib/heap/__heap_base i32 (i32.const 56)) (export "memory" (memory $0)) (start $~start) + (func $~lib/date/Date.UTC (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i64) (result i64) + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $4 + local.get $5 + local.get $6 + f64.convert_i64_s + call $~lib/bindings/Date/UTC + i64.trunc_f64_s + ) + (func $~lib/date/Date.now (result i64) + call $~lib/bindings/Date/now + i64.trunc_f64_s + ) (func $~lib/rt/stub/maybeGrowMemory (param $0 i32) (local $1 i32) (local $2 i32) @@ -163,37 +181,14 @@ local.get $1 ) (func $start:std/date - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i64) i32.const 1970 - local.set $2 i32.const 0 - local.set $1 i32.const 1 - local.set $0 i32.const 0 - local.set $3 i32.const 0 - local.set $4 i32.const 0 - local.set $5 i64.const 0 - local.set $6 - local.get $2 - local.get $1 - local.get $0 - local.get $3 - local.get $4 - local.get $5 - local.get $6 - f64.convert_i64_s - call $~lib/bindings/Date/UTC - i64.trunc_f64_s + call $~lib/date/Date.UTC i64.const 0 i64.eq i32.eqz @@ -206,29 +201,13 @@ unreachable end i32.const 1970 - local.set $5 i32.const 0 - local.set $4 i32.const 1 - local.set $3 i32.const 0 - local.set $2 i32.const 0 - local.set $1 i32.const 0 - local.set $0 i64.const 0 - local.set $6 - local.get $5 - local.get $4 - local.get $3 - local.get $2 - local.get $1 - local.get $0 - local.get $6 - f64.convert_i64_s - call $~lib/bindings/Date/UTC - i64.trunc_f64_s + call $~lib/date/Date.UTC i64.const 0 i64.eq i32.eqz @@ -241,29 +220,13 @@ unreachable end i32.const 2018 - local.set $5 i32.const 10 - local.set $4 i32.const 10 - local.set $3 i32.const 11 - local.set $2 i32.const 0 - local.set $1 i32.const 0 - local.set $0 i64.const 1 - local.set $6 - local.get $5 - local.get $4 - local.get $3 - local.get $2 - local.get $1 - local.get $0 - local.get $6 - f64.convert_i64_s - call $~lib/bindings/Date/UTC - i64.trunc_f64_s + call $~lib/date/Date.UTC global.set $std/date/creationTime global.get $std/date/creationTime i64.const 1541847600001 @@ -277,8 +240,7 @@ call $~lib/builtins/abort unreachable end - call $~lib/bindings/Date/now - i64.trunc_f64_s + call $~lib/date/Date.now global.get $std/date/creationTime i64.gt_s i32.eqz diff --git a/tests/compiler/std/hash.optimized.wat b/tests/compiler/std/hash.optimized.wat index fa88fcc653..8bc6279039 100644 --- a/tests/compiler/std/hash.optimized.wat +++ b/tests/compiler/std/hash.optimized.wat @@ -8,7 +8,7 @@ (data (i32.const 1104) "\06\00\00\00\01\00\00\00\01\00\00\00\06\00\00\00a\00b\00c") (export "memory" (memory $0)) (start $~start) - (func $~lib/util/hash/hashStr (param $0 i32) + (func $~lib/util/hash/HASH<~lib/string/String | null> (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -50,14 +50,14 @@ ) (func $~start i32.const 0 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String | null> i32.const 1040 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String | null> i32.const 1056 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String | null> i32.const 1088 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String | null> i32.const 1120 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String | null> ) ) diff --git a/tests/compiler/std/hash.untouched.wat b/tests/compiler/std/hash.untouched.wat index 542717b87e..3dd078bb7d 100644 --- a/tests/compiler/std/hash.untouched.wat +++ b/tests/compiler/std/hash.untouched.wat @@ -3,6 +3,8 @@ (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i64_=>_i32 (func (param i64) (result i32))) + (type $f32_=>_i32 (func (param f32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) (memory $0 1) (data (i32.const 16) "\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00") (data (i32.const 32) "\02\00\00\00\01\00\00\00\01\00\00\00\02\00\00\00a\00") @@ -76,9 +78,39 @@ call $~lib/rt/stub/__release local.get $3 ) + (func $~lib/util/hash/HASH<~lib/string/String | null> (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/rt/stub/__retain + local.set $0 + i32.const 1 + drop + local.get $0 + call $~lib/util/hash/hashStr + local.set $1 + local.get $0 + call $~lib/rt/stub/__release + local.get $1 + return + ) (func $std/hash/check (param $0 i32) (result i32) i32.const 1 ) + (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/rt/stub/__retain + local.set $0 + i32.const 1 + drop + local.get $0 + call $~lib/util/hash/hashStr + local.set $1 + local.get $0 + call $~lib/rt/stub/__release + local.get $1 + return + ) (func $~lib/util/hash/hash32 (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 @@ -121,6 +153,22 @@ local.set $1 local.get $1 ) + (func $~lib/util/hash/HASH (param $0 f32) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + return + ) (func $~lib/util/hash/hash64 (param $0 i64) (result i32) (local $1 i32) (local $2 i32) @@ -209,349 +257,93 @@ local.set $3 local.get $3 ) + (func $~lib/util/hash/HASH (param $0 f64) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + return + ) (func $start:std/hash - (local $0 i32) - (local $1 i32) - (local $2 f32) - (local $3 f64) - block $~lib/util/hash/HASH<~lib/string/String | null>|inlined.0 (result i32) - i32.const 0 - call $~lib/rt/stub/__retain - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String | null>|inlined.0 - end + i32.const 0 + call $~lib/util/hash/HASH<~lib/string/String | null> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.0 (result i32) - i32.const 32 - local.set $1 - i32.const 1 - drop - local.get $1 - call $~lib/util/hash/hashStr - local.set $0 - local.get $1 - call $~lib/rt/stub/__release - local.get $0 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.0 - end + i32.const 32 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.1 (result i32) - i32.const 48 - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.1 - end + i32.const 48 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.2 (result i32) - i32.const 80 - local.set $1 - i32.const 1 - drop - local.get $1 - call $~lib/util/hash/hashStr - local.set $0 - local.get $1 - call $~lib/rt/stub/__release - local.get $0 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.2 - end + i32.const 80 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH<~lib/string/String>|inlined.3 (result i32) - i32.const 112 - local.set $0 - i32.const 1 - drop - local.get $0 - call $~lib/util/hash/hashStr - local.set $1 - local.get $0 - call $~lib/rt/stub/__release - local.get $1 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.3 - end + i32.const 112 + call $~lib/util/hash/HASH<~lib/string/String> call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.0 (result i32) - f32.const 0 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + f32.const 0 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.1 (result i32) - f32.const 1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end + f32.const 1 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.2 (result i32) - f32.const 1.100000023841858 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + f32.const 1.100000023841858 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.3 (result i32) - f32.const 0 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + f32.const 0 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.4 (result i32) - f32.const inf - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end + f32.const inf + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.5 (result i32) - f32.const nan:0x400000 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.5 - end + f32.const nan:0x400000 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.0 (result i32) - f64.const 0 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + f64.const 0 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.1 (result i32) - f64.const 1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end + f64.const 1 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.2 (result i32) - f64.const 1.1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + f64.const 1.1 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.3 (result i32) - f64.const 0 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + f64.const 0 + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.4 (result i32) - f64.const inf - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.4 - end + f64.const inf + call $~lib/util/hash/HASH call $std/hash/check drop - block $~lib/util/hash/HASH|inlined.5 (result i32) - f64.const nan:0x8000000000000 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.5 - end + f64.const nan:0x8000000000000 + call $~lib/util/hash/HASH call $std/hash/check drop ) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 45fa556b7b..9ca06f54bf 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -6,6 +6,7 @@ (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))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) @@ -13,7 +14,6 @@ (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i32_i64_=>_none (func (param i32 i64))) (type $i32_f32_=>_none (func (param i32 f32))) @@ -44,6 +44,58 @@ (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -58,7 +110,7 @@ if i32.const 0 i32.const 1040 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -80,7 +132,7 @@ if i32.const 0 i32.const 1040 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -99,23 +151,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -123,72 +175,56 @@ if i32.const 0 i32.const 1040 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -196,7 +232,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -219,7 +255,7 @@ if i32.const 0 i32.const 1040 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -233,22 +269,16 @@ if i32.const 0 i32.const 1040 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -257,7 +287,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -266,7 +296,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -277,16 +307,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -306,7 +330,7 @@ if i32.const 0 i32.const 1040 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -339,8 +363,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -361,7 +385,7 @@ if i32.const 0 i32.const 1040 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -371,17 +395,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1040 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -410,13 +434,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -424,21 +448,15 @@ if i32.const 0 i32.const 1040 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -453,37 +471,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -507,7 +516,7 @@ if i32.const 0 i32.const 1040 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -524,7 +533,7 @@ if i32.const 0 i32.const 1040 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -552,7 +561,7 @@ if i32.const 0 i32.const 1040 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -604,7 +613,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -625,7 +634,8 @@ unreachable end i32.const 1568 - local.tee $0 + local.set $2 + i32.const 1568 i32.const 0 i32.store i32.const 3136 @@ -636,35 +646,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1568 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1568 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -684,7 +685,7 @@ i32.const 1568 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) local.get $0 @@ -693,7 +694,7 @@ if i32.const 1088 i32.const 1040 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -766,17 +767,14 @@ if i32.const 0 i32.const 1040 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const -1 local.get $1 i32.shl @@ -784,16 +782,10 @@ local.tee $1 if (result i32) local.get $0 + local.get $2 local.get $1 i32.ctz - local.get $2 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -809,31 +801,22 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1040 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end @@ -851,7 +834,7 @@ if i32.const 0 i32.const 1040 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -894,20 +877,9 @@ i32.and i32.store local.get $1 - i32.const 16 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 + call $~lib/rt/tlsf/GETRIGHT local.get $1 - i32.load - i32.const -4 - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const -3 i32.and @@ -922,7 +894,7 @@ if i32.const 0 i32.const 1040 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -945,15 +917,16 @@ local.tee $3 i32.eqz if - i32.const 16 memory.size local.tee $3 i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -978,9 +951,7 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 - local.get $5 + local.tee $5 local.get $3 local.get $5 i32.gt_s @@ -1013,7 +984,7 @@ if i32.const 0 i32.const 1040 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1029,7 +1000,7 @@ if i32.const 0 i32.const 1040 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -1113,161 +1084,171 @@ end local.get $0 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (local $2 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 4 - i32.sub - local.tee $2 - i32.const 0 - i32.store8 offset=3 - local.get $1 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 offset=1 - local.get $0 - i32.const 0 - i32.store8 offset=2 - local.get $2 - i32.const 0 - i32.store8 offset=2 - local.get $2 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 offset=3 - local.get $2 - i32.const 0 - i32.store8 - local.get $1 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $2 - i32.add - local.tee $0 - i32.const 0 - i32.store - local.get $0 - local.get $1 - local.get $2 - i32.sub - i32.const -4 - i32.and - local.tee $2 - i32.add - i32.const 28 - i32.sub - local.tee $1 - i32.const 0 - i32.store offset=24 - local.get $2 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $2 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $1 - i32.const 0 - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $0 - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $1 - i32.add - local.set $0 - local.get $2 + local.get $1 + i32.eqz + if + return + end + local.get $0 + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 4 + i32.sub + local.tee $2 + i32.const 0 + i32.store8 offset=3 + local.get $1 + i32.const 2 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store8 offset=1 + local.get $0 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=1 + local.get $1 + i32.const 6 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store8 offset=3 + local.get $2 + i32.const 0 + i32.store8 + local.get $1 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $2 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $0 + local.get $1 + local.get $2 + i32.sub + i32.const -4 + i32.and + local.tee $2 + i32.add + i32.const 28 + i32.sub + local.tee $1 + i32.const 0 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + i32.const 0 + i32.store offset=24 + local.get $1 + i32.const 0 + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $1 + i32.add + local.set $0 + local.get $2 + local.get $1 + i32.sub + local.set $1 + loop $while-continue|0 local.get $1 - i32.sub - local.set $1 - loop $while-continue|0 + i32.const 32 + i32.ge_u + if + local.get $0 + i64.const 0 + i64.store + local.get $0 + i64.const 0 + i64.store offset=8 + local.get $0 + i64.const 0 + i64.store offset=16 + local.get $0 + i64.const 0 + i64.store offset=24 local.get $1 i32.const 32 - i32.ge_u - if - local.get $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i64.const 0 - i64.store offset=16 - local.get $0 - i64.const 0 - i64.store offset=24 - local.get $1 - i32.const 32 - i32.sub - local.set $1 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $while-continue|0 - end + i32.sub + local.set $1 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 end end ) @@ -1289,7 +1270,7 @@ call $~lib/rt/tlsf/__alloc local.tee $1 local.get $0 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset local.get $1 call $~lib/rt/pure/__retain ) @@ -1344,6 +1325,14 @@ i32.const 16777619 i32.mul ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/util/hash/hash8 + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load @@ -1391,11 +1380,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -1411,21 +1396,21 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $4 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $6 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $2 local.get $0 i32.load offset=8 local.tee $3 @@ -1434,49 +1419,48 @@ i32.const 12 i32.mul i32.add - local.set $8 - local.get $4 - local.set $5 + local.set $7 + local.get $2 + local.set $4 loop $while-continue|0 local.get $3 - local.get $8 + local.get $7 i32.ne if local.get $3 - local.tee $2 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $5 - local.get $2 + local.get $4 + local.get $3 i32.load8_s i32.store8 - local.get $5 - local.get $2 + local.get $4 + local.get $3 i32.load offset=4 i32.store offset=4 + local.get $4 local.get $5 - local.get $6 - local.get $2 + local.get $3 i32.load8_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $8 i32.load i32.store offset=8 - local.get $2 - local.get $5 + local.get $8 + local.get $4 i32.store - local.get $5 + local.get $4 i32.const 12 i32.add - local.set $5 + local.set $4 end local.get $3 i32.const 12 @@ -1485,54 +1469,51 @@ br $while-continue|0 end end - local.get $6 + local.get $5 local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $5 + local.tee $4 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $5 + local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $0 local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $4 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $7 + local.get $0 + local.get $6 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $6 + local.get $5 call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -1542,11 +1523,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH local.tee $4 call $~lib/map/Map#find local.tee $3 @@ -1633,18 +1610,14 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz if i32.const 1360 i32.const 1424 - i32.const 111 + i32.const 109 i32.const 17 call $~lib/builtins/abort unreachable @@ -1652,177 +1625,179 @@ local.get $0 i32.load offset=4 ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $0 + local.get $1 + i32.lt_u + if local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 + i32.const 7 + i32.and local.get $0 - local.get $1 - i32.lt_u + i32.const 7 + i32.and + i32.eq if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + return end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $2 + i32.const 1 + i32.sub + local.set $2 local.get $0 - local.tee $2 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $1 - local.get $2 local.get $3 + local.get $4 i32.load8_u i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 + br $while-continue|0 end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 - local.get $4 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and if - local.get $4 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $4 - local.get $0 + local.tee $2 i32.add local.get $1 - local.get $4 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) @@ -1864,13 +1839,7 @@ return end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.tee $6 i32.load local.tee $4 @@ -1927,7 +1896,7 @@ i32.const 16 i32.add local.get $2 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $1 i32.const 1556 i32.ge_u @@ -2004,7 +1973,7 @@ if i32.const 0 i32.const 1040 - i32.const 581 + i32.const 573 i32.const 3 call $~lib/builtins/abort unreachable @@ -2023,7 +1992,7 @@ local.get $2 local.get $5 i32.sub - call $~lib/memory/memory.fill + call $~lib/util/memory/memset local.get $1 local.get $3 i32.ne @@ -2119,7 +2088,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 local.get $8 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 4 call $~lib/rt/tlsf/__alloc @@ -2225,7 +2194,7 @@ call $~lib/rt/tlsf/__alloc local.tee $1 local.get $4 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 5 call $~lib/rt/tlsf/__alloc @@ -2465,21 +2434,21 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $4 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $6 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $2 local.get $0 i32.load offset=8 local.tee $3 @@ -2488,49 +2457,48 @@ i32.const 3 i32.shl i32.add - local.set $8 - local.get $4 - local.set $5 + local.set $7 + local.get $2 + local.set $4 loop $while-continue|0 local.get $3 - local.get $8 + local.get $7 i32.ne if local.get $3 - local.tee $2 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $5 - local.get $2 + local.get $4 + local.get $3 i32.load8_s i32.store8 - local.get $5 - local.get $2 + local.get $4 + local.get $3 i32.load8_s offset=1 i32.store8 offset=1 + local.get $4 local.get $5 - local.get $6 - local.get $2 + local.get $3 i32.load8_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $8 i32.load i32.store offset=4 - local.get $2 - local.get $5 + local.get $8 + local.get $4 i32.store - local.get $5 + local.get $4 i32.const 8 i32.add - local.set $5 + local.set $4 end local.get $3 i32.const 8 @@ -2539,54 +2507,51 @@ br $while-continue|0 end end - local.get $6 + local.get $5 local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $5 + local.tee $4 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $5 + local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $0 local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $4 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $7 + local.get $0 + local.get $6 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $6 + local.get $5 call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -2595,11 +2560,7 @@ (local $5 i32) local.get $1 local.tee $3 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH local.set $4 local.get $0 i32.load @@ -2805,21 +2766,21 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $4 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $6 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $2 local.get $0 i32.load offset=8 local.tee $3 @@ -2828,32 +2789,31 @@ i32.const 12 i32.mul i32.add - local.set $8 - local.get $4 - local.set $5 + local.set $7 + local.get $2 + local.set $4 loop $while-continue|0 local.get $3 - local.get $8 + local.get $7 i32.ne if local.get $3 - local.tee $2 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $5 - local.get $2 + local.get $4 + local.get $3 i32.load i32.store - local.get $5 - local.get $2 + local.get $4 + local.get $3 i32.load offset=4 i32.store offset=4 + local.get $4 local.get $5 - local.get $6 - local.get $2 + local.get $3 i32.load call $~lib/util/hash/hash32 local.get $1 @@ -2861,16 +2821,16 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $8 i32.load i32.store offset=8 - local.get $2 - local.get $5 + local.get $8 + local.get $4 i32.store - local.get $5 + local.get $4 i32.const 12 i32.add - local.set $5 + local.set $4 end local.get $3 i32.const 12 @@ -2879,65 +2839,64 @@ br $while-continue|0 end end - local.get $6 + local.get $5 local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $5 + local.tee $4 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $5 + local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $0 local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $4 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $7 + local.get $0 + local.get $6 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $6 + local.get $5 call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - local.get $1 local.get $1 call $~lib/util/hash/hash32 - local.tee $4 + local.tee $3 + local.set $4 + local.get $0 + local.get $1 + local.get $3 call $~lib/map/Map#find local.tee $3 if @@ -3024,11 +2983,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $1 i32.eqz @@ -3627,21 +3582,21 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $4 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $6 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $2 local.get $0 i32.load offset=8 local.tee $3 @@ -3650,32 +3605,31 @@ i32.const 12 i32.mul i32.add - local.set $8 - local.get $4 - local.set $5 + local.set $7 + local.get $2 + local.set $4 loop $while-continue|0 local.get $3 - local.get $8 + local.get $7 i32.ne if local.get $3 - local.tee $2 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $5 - local.get $2 + local.get $4 + local.get $3 i32.load8_u i32.store8 - local.get $5 - local.get $2 + local.get $4 + local.get $3 i32.load offset=4 i32.store offset=4 + local.get $4 local.get $5 - local.get $6 - local.get $2 + local.get $3 i32.load8_u call $~lib/util/hash/hash8 local.get $1 @@ -3683,16 +3637,16 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $8 i32.load i32.store offset=8 - local.get $2 - local.get $5 + local.get $8 + local.get $4 i32.store - local.get $5 + local.get $4 i32.const 12 i32.add - local.set $5 + local.set $4 end local.get $3 i32.const 12 @@ -3701,67 +3655,66 @@ br $while-continue|0 end end - local.get $6 + local.get $5 local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $5 + local.tee $4 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $5 + local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $0 local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $4 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $7 + local.get $0 + local.get $6 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $6 + local.get $5 call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - local.get $1 local.get $1 i32.const 255 i32.and call $~lib/util/hash/hash8 - local.tee $4 + local.tee $3 + local.set $4 + local.get $0 + local.get $1 + local.get $3 call $~lib/map/Map#find local.tee $3 if @@ -3856,7 +3809,7 @@ if i32.const 1360 i32.const 1424 - i32.const 111 + i32.const 109 i32.const 17 call $~lib/builtins/abort unreachable @@ -3895,7 +3848,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 local.get $8 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 9 call $~lib/rt/tlsf/__alloc @@ -3987,21 +3940,21 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $4 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $6 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $2 local.get $0 i32.load offset=8 local.tee $3 @@ -4010,32 +3963,31 @@ i32.const 3 i32.shl i32.add - local.set $8 - local.get $4 - local.set $5 + local.set $7 + local.get $2 + local.set $4 loop $while-continue|0 local.get $3 - local.get $8 + local.get $7 i32.ne if local.get $3 - local.tee $2 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $5 - local.get $2 + local.get $4 + local.get $3 i32.load8_u i32.store8 - local.get $5 - local.get $2 + local.get $4 + local.get $3 i32.load8_u offset=1 i32.store8 offset=1 + local.get $4 local.get $5 - local.get $6 - local.get $2 + local.get $3 i32.load8_u call $~lib/util/hash/hash8 local.get $1 @@ -4043,16 +3995,16 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $8 i32.load i32.store offset=4 - local.get $2 - local.get $5 + local.get $8 + local.get $4 i32.store - local.get $5 + local.get $4 i32.const 8 i32.add - local.set $5 + local.set $4 end local.get $3 i32.const 8 @@ -4061,54 +4013,51 @@ br $while-continue|0 end end - local.get $6 + local.get $5 local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $5 + local.tee $4 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $5 + local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $0 local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $4 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $7 + local.get $0 + local.get $6 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $6 + local.get $5 call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -4819,6 +4768,14 @@ i32.const 16777619 i32.mul ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load @@ -4866,11 +4823,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -4886,21 +4839,21 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $4 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $6 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $2 local.get $0 i32.load offset=8 local.tee $3 @@ -4909,49 +4862,48 @@ i32.const 12 i32.mul i32.add - local.set $8 - local.get $4 - local.set $5 + local.set $7 + local.get $2 + local.set $4 loop $while-continue|0 local.get $3 - local.get $8 + local.get $7 i32.ne if local.get $3 - local.tee $2 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $5 - local.get $2 + local.get $4 + local.get $3 i32.load16_s i32.store16 - local.get $5 - local.get $2 + local.get $4 + local.get $3 i32.load offset=4 i32.store offset=4 + local.get $4 local.get $5 - local.get $6 - local.get $2 + local.get $3 i32.load16_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $8 i32.load i32.store offset=8 - local.get $2 - local.get $5 + local.get $8 + local.get $4 i32.store - local.get $5 + local.get $4 i32.const 12 i32.add - local.set $5 + local.set $4 end local.get $3 i32.const 12 @@ -4960,54 +4912,51 @@ br $while-continue|0 end end - local.get $6 + local.get $5 local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $5 + local.tee $4 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $5 + local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $0 local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $4 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $7 + local.get $0 + local.get $6 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $6 + local.get $5 call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -5017,11 +4966,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.tee $4 call $~lib/map/Map#find local.tee $3 @@ -5108,18 +5053,14 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz if i32.const 1360 i32.const 1424 - i32.const 111 + i32.const 109 i32.const 17 call $~lib/builtins/abort unreachable @@ -5213,7 +5154,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 local.get $5 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 12 call $~lib/rt/tlsf/__alloc @@ -5305,21 +5246,21 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $4 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $6 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $2 local.get $0 i32.load offset=8 local.tee $3 @@ -5328,49 +5269,48 @@ i32.const 3 i32.shl i32.add - local.set $8 - local.get $4 - local.set $5 + local.set $7 + local.get $2 + local.set $4 loop $while-continue|0 local.get $3 - local.get $8 + local.get $7 i32.ne if local.get $3 - local.tee $2 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $5 - local.get $2 + local.get $4 + local.get $3 i32.load16_s i32.store16 - local.get $5 - local.get $2 + local.get $4 + local.get $3 i32.load16_s offset=2 i32.store16 offset=2 + local.get $4 local.get $5 - local.get $6 - local.get $2 + local.get $3 i32.load16_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $8 i32.load i32.store offset=4 - local.get $2 - local.get $5 + local.get $8 + local.get $4 i32.store - local.get $5 + local.get $4 i32.const 8 i32.add - local.set $5 + local.set $4 end local.get $3 i32.const 8 @@ -5379,54 +5319,51 @@ br $while-continue|0 end end - local.get $6 + local.get $5 local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $5 + local.tee $4 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $5 + local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $0 local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $4 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $7 + local.get $0 + local.get $6 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $6 + local.get $5 call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -5435,11 +5372,7 @@ (local $5 i32) local.get $1 local.tee $3 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.set $4 local.get $0 i32.load @@ -5567,11 +5500,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $1 i32.eqz @@ -6172,21 +6101,21 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $4 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $6 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $2 local.get $0 i32.load offset=8 local.tee $3 @@ -6195,32 +6124,31 @@ i32.const 12 i32.mul i32.add - local.set $8 - local.get $4 - local.set $5 + local.set $7 + local.get $2 + local.set $4 loop $while-continue|0 local.get $3 - local.get $8 + local.get $7 i32.ne if local.get $3 - local.tee $2 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $5 - local.get $2 + local.get $4 + local.get $3 i32.load16_u i32.store16 - local.get $5 - local.get $2 + local.get $4 + local.get $3 i32.load offset=4 i32.store offset=4 + local.get $4 local.get $5 - local.get $6 - local.get $2 + local.get $3 i32.load16_u call $~lib/util/hash/hash16 local.get $1 @@ -6228,16 +6156,16 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $8 i32.load i32.store offset=8 - local.get $2 - local.get $5 + local.get $8 + local.get $4 i32.store - local.get $5 + local.get $4 i32.const 12 i32.add - local.set $5 + local.set $4 end local.get $3 i32.const 12 @@ -6246,67 +6174,66 @@ br $while-continue|0 end end - local.get $6 + local.get $5 local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $5 + local.tee $4 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $5 + local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $0 local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $4 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $7 + local.get $0 + local.get $6 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $6 + local.get $5 call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - local.get $1 local.get $1 i32.const 65535 i32.and call $~lib/util/hash/hash16 - local.tee $4 + local.tee $3 + local.set $4 + local.get $0 + local.get $1 + local.get $3 call $~lib/map/Map#find local.tee $3 if @@ -6401,7 +6328,7 @@ if i32.const 1360 i32.const 1424 - i32.const 111 + i32.const 109 i32.const 17 call $~lib/builtins/abort unreachable @@ -6445,7 +6372,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 local.get $5 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 15 call $~lib/rt/tlsf/__alloc @@ -6537,21 +6464,21 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $4 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $6 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $2 local.get $0 i32.load offset=8 local.tee $3 @@ -6560,32 +6487,31 @@ i32.const 3 i32.shl i32.add - local.set $8 - local.get $4 - local.set $5 + local.set $7 + local.get $2 + local.set $4 loop $while-continue|0 local.get $3 - local.get $8 + local.get $7 i32.ne if local.get $3 - local.tee $2 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $5 - local.get $2 + local.get $4 + local.get $3 i32.load16_u i32.store16 - local.get $5 - local.get $2 + local.get $4 + local.get $3 i32.load16_u offset=2 i32.store16 offset=2 + local.get $4 local.get $5 - local.get $6 - local.get $2 + local.get $3 i32.load16_u call $~lib/util/hash/hash16 local.get $1 @@ -6593,16 +6519,16 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $8 i32.load i32.store offset=4 - local.get $2 - local.get $5 + local.get $8 + local.get $4 i32.store - local.get $5 + local.get $4 i32.const 8 i32.add - local.set $5 + local.set $4 end local.get $3 i32.const 8 @@ -6611,54 +6537,51 @@ br $while-continue|0 end end - local.get $6 + local.get $5 local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $5 + local.tee $4 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $5 + local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $0 local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $4 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $7 + local.get $0 + local.get $6 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $6 + local.get $5 call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -7376,7 +7299,7 @@ if i32.const 1360 i32.const 1424 - i32.const 111 + i32.const 109 i32.const 17 call $~lib/builtins/abort unreachable @@ -7618,7 +7541,7 @@ local.tee $6 call $~lib/array/Array#constructor local.set $1 - loop $for-loop|01 + loop $for-loop|00 local.get $4 local.get $6 i32.lt_s @@ -7648,7 +7571,7 @@ i32.const 1 i32.add local.set $4 - br $for-loop|01 + br $for-loop|00 end end local.get $1 @@ -7941,7 +7864,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 local.get $5 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 18 call $~lib/rt/tlsf/__alloc @@ -8647,21 +8570,21 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $4 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $6 i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $2 local.get $0 i32.load offset=8 local.tee $3 @@ -8670,32 +8593,31 @@ i32.const 4 i32.shl i32.add - local.set $8 - local.get $4 - local.set $5 + local.set $7 + local.get $2 + local.set $4 loop $while-continue|0 local.get $3 - local.get $8 + local.get $7 i32.ne if local.get $3 - local.tee $2 i32.load offset=12 i32.const 1 i32.and i32.eqz if - local.get $5 - local.get $2 + local.get $4 + local.get $3 i64.load i64.store - local.get $5 - local.get $2 + local.get $4 + local.get $3 i32.load offset=8 i32.store offset=8 + local.get $4 local.get $5 - local.get $6 - local.get $2 + local.get $3 i64.load call $~lib/util/hash/hash64 local.get $1 @@ -8703,16 +8625,16 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $8 i32.load i32.store offset=12 - local.get $2 - local.get $5 + local.get $8 + local.get $4 i32.store - local.get $5 + local.get $4 i32.const 16 i32.add - local.set $5 + local.set $4 end local.get $3 i32.const 16 @@ -8721,65 +8643,64 @@ br $while-continue|0 end end - local.get $6 + local.get $5 local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $5 + local.tee $4 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $5 + local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $0 local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $4 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $7 + local.get $0 + local.get $6 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $6 + local.get $5 call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - local.get $1 local.get $1 call $~lib/util/hash/hash64 - local.tee $4 + local.tee $3 + local.set $4 + local.get $0 + local.get $1 + local.get $3 call $~lib/map/Map#find local.tee $3 if @@ -8872,7 +8793,7 @@ if i32.const 1360 i32.const 1424 - i32.const 111 + i32.const 109 i32.const 17 call $~lib/builtins/abort unreachable @@ -8966,7 +8887,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 local.get $5 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 21 call $~lib/rt/tlsf/__alloc @@ -9164,21 +9085,21 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $4 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $6 i32.const 24 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $2 local.get $0 i32.load offset=8 local.tee $3 @@ -9187,32 +9108,31 @@ i32.const 24 i32.mul i32.add - local.set $8 - local.get $4 - local.set $5 + local.set $7 + local.get $2 + local.set $4 loop $while-continue|0 local.get $3 - local.get $8 + local.get $7 i32.ne if local.get $3 - local.tee $2 i32.load offset=16 i32.const 1 i32.and i32.eqz if - local.get $5 - local.get $2 + local.get $4 + local.get $3 i64.load i64.store - local.get $5 - local.get $2 + local.get $4 + local.get $3 i64.load offset=8 i64.store offset=8 + local.get $4 local.get $5 - local.get $6 - local.get $2 + local.get $3 i64.load call $~lib/util/hash/hash64 local.get $1 @@ -9220,16 +9140,16 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $8 i32.load i32.store offset=16 - local.get $2 - local.get $5 + local.get $8 + local.get $4 i32.store - local.get $5 + local.get $4 i32.const 24 i32.add - local.set $5 + local.set $4 end local.get $3 i32.const 24 @@ -9238,54 +9158,51 @@ br $while-continue|0 end end - local.get $6 + local.get $5 local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $5 + local.tee $4 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $5 + local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $0 local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $4 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $7 + local.get $0 + local.get $6 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $6 + local.get $5 call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (result i32) @@ -9983,7 +9900,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 local.get $5 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 24 call $~lib/rt/tlsf/__alloc @@ -10599,21 +10516,21 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $4 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $6 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $2 local.get $0 i32.load offset=8 local.tee $3 @@ -10622,32 +10539,31 @@ i32.const 12 i32.mul i32.add - local.set $8 - local.get $4 - local.set $5 + local.set $7 + local.get $2 + local.set $4 loop $while-continue|0 local.get $3 - local.get $8 + local.get $7 i32.ne if local.get $3 - local.tee $2 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $5 - local.get $2 + local.get $4 + local.get $3 f32.load f32.store - local.get $5 - local.get $2 + local.get $4 + local.get $3 i32.load offset=4 i32.store offset=4 + local.get $4 local.get $5 - local.get $6 - local.get $2 + local.get $3 f32.load i32.reinterpret_f32 call $~lib/util/hash/hash32 @@ -10656,16 +10572,16 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $8 i32.load i32.store offset=8 - local.get $2 - local.get $5 + local.get $8 + local.get $4 i32.store - local.get $5 + local.get $4 i32.const 12 i32.add - local.set $5 + local.set $4 end local.get $3 i32.const 12 @@ -10674,66 +10590,65 @@ br $while-continue|0 end end - local.get $6 + local.get $5 local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $5 + local.tee $4 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $5 + local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $0 local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $4 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $7 + local.get $0 + local.get $6 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $6 + local.get $5 call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - local.get $1 local.get $1 i32.reinterpret_f32 call $~lib/util/hash/hash32 - local.tee $4 + local.tee $3 + local.set $4 + local.get $0 + local.get $1 + local.get $3 call $~lib/map/Map#find local.tee $3 if @@ -10827,7 +10742,7 @@ if i32.const 1360 i32.const 1424 - i32.const 111 + i32.const 109 i32.const 17 call $~lib/builtins/abort unreachable @@ -10872,7 +10787,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 local.get $6 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 27 call $~lib/rt/tlsf/__alloc @@ -10997,21 +10912,21 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $4 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $6 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $2 local.get $0 i32.load offset=8 local.tee $3 @@ -11020,32 +10935,31 @@ i32.const 12 i32.mul i32.add - local.set $8 - local.get $4 - local.set $5 + local.set $7 + local.get $2 + local.set $4 loop $while-continue|0 local.get $3 - local.get $8 + local.get $7 i32.ne if local.get $3 - local.tee $2 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $5 - local.get $2 + local.get $4 + local.get $3 f32.load f32.store - local.get $5 - local.get $2 + local.get $4 + local.get $3 f32.load offset=4 f32.store offset=4 + local.get $4 local.get $5 - local.get $6 - local.get $2 + local.get $3 f32.load i32.reinterpret_f32 call $~lib/util/hash/hash32 @@ -11054,16 +10968,16 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $8 i32.load i32.store offset=8 - local.get $2 - local.get $5 + local.get $8 + local.get $4 i32.store - local.get $5 + local.get $4 i32.const 12 i32.add - local.set $5 + local.set $4 end local.get $3 i32.const 12 @@ -11072,66 +10986,65 @@ br $while-continue|0 end end - local.get $6 + local.get $5 local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $5 + local.tee $4 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $5 + local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $0 local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $4 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $7 + local.get $0 + local.get $6 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $6 + local.get $5 call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 f32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - local.get $1 local.get $1 i32.reinterpret_f32 call $~lib/util/hash/hash32 - local.tee $5 + local.tee $3 + local.set $4 + local.get $0 + local.get $1 + local.get $3 call $~lib/map/Map#find local.tee $3 if @@ -11173,11 +11086,11 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $4 + local.tee $5 i32.const 1 i32.add i32.store offset=16 - local.get $4 + local.get $5 i32.const 12 i32.mul i32.add @@ -11196,7 +11109,7 @@ local.get $3 local.get $0 i32.load - local.get $5 + local.get $4 local.get $0 i32.load offset=4 i32.and @@ -11825,21 +11738,21 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $4 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $6 i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $2 local.get $0 i32.load offset=8 local.tee $3 @@ -11848,32 +11761,31 @@ i32.const 4 i32.shl i32.add - local.set $8 - local.get $4 - local.set $5 + local.set $7 + local.get $2 + local.set $4 loop $while-continue|0 local.get $3 - local.get $8 + local.get $7 i32.ne if local.get $3 - local.tee $2 i32.load offset=12 i32.const 1 i32.and i32.eqz if - local.get $5 - local.get $2 + local.get $4 + local.get $3 f64.load f64.store - local.get $5 - local.get $2 + local.get $4 + local.get $3 i32.load offset=8 i32.store offset=8 + local.get $4 local.get $5 - local.get $6 - local.get $2 + local.get $3 f64.load i64.reinterpret_f64 call $~lib/util/hash/hash64 @@ -11882,16 +11794,16 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $8 i32.load i32.store offset=12 - local.get $2 - local.get $5 + local.get $8 + local.get $4 i32.store - local.get $5 + local.get $4 i32.const 16 i32.add - local.set $5 + local.set $4 end local.get $3 i32.const 16 @@ -11900,66 +11812,65 @@ br $while-continue|0 end end - local.get $6 + local.get $5 local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $5 + local.tee $4 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $5 + local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $0 local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $4 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $7 + local.get $0 + local.get $6 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $6 + local.get $5 call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - local.get $1 local.get $1 i64.reinterpret_f64 call $~lib/util/hash/hash64 - local.tee $4 + local.tee $3 + local.set $4 + local.get $0 + local.get $1 + local.get $3 call $~lib/map/Map#find local.tee $3 if @@ -12053,7 +11964,7 @@ if i32.const 1360 i32.const 1424 - i32.const 111 + i32.const 109 i32.const 17 call $~lib/builtins/abort unreachable @@ -12098,7 +12009,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 local.get $6 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 30 call $~lib/rt/tlsf/__alloc @@ -12223,21 +12134,21 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $4 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $6 i32.const 24 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $2 local.get $0 i32.load offset=8 local.tee $3 @@ -12246,32 +12157,31 @@ i32.const 24 i32.mul i32.add - local.set $8 - local.get $4 - local.set $5 + local.set $7 + local.get $2 + local.set $4 loop $while-continue|0 local.get $3 - local.get $8 + local.get $7 i32.ne if local.get $3 - local.tee $2 i32.load offset=16 i32.const 1 i32.and i32.eqz if - local.get $5 - local.get $2 + local.get $4 + local.get $3 f64.load f64.store - local.get $5 - local.get $2 + local.get $4 + local.get $3 f64.load offset=8 f64.store offset=8 + local.get $4 local.get $5 - local.get $6 - local.get $2 + local.get $3 f64.load i64.reinterpret_f64 call $~lib/util/hash/hash64 @@ -12280,16 +12190,16 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $8 i32.load i32.store offset=16 - local.get $2 - local.get $5 + local.get $8 + local.get $4 i32.store - local.get $5 + local.get $4 i32.const 24 i32.add - local.set $5 + local.set $4 end local.get $3 i32.const 24 @@ -12298,54 +12208,51 @@ br $while-continue|0 end end - local.get $6 + local.get $5 local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $5 + local.tee $4 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $5 + local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $0 local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $4 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $7 + local.get $0 + local.get $6 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $6 + local.get $5 call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 f64) (result i32) diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index cb8759d371..2753f5e867 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -2,6 +2,7 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) @@ -14,16 +15,17 @@ (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) + (type $i64_=>_i32 (func (param i64) (result 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_f64_=>_none (func (param i32 i32 f64))) (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $none_=>_i32 (func (result i32))) (type $i32_f32_f32_=>_i32 (func (param i32 f32 f32) (result i32))) (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) - (type $i64_=>_i32 (func (param i64) (result i32))) + (type $f32_=>_i32 (func (param f32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -50,6 +52,69 @@ (global $~lib/heap/__heap_base i32 (i32.const 548)) (export "memory" (memory $0)) (start $~start) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -58,9 +123,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -73,7 +135,7 @@ if i32.const 0 i32.const 32 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -100,7 +162,7 @@ if i32.const 0 i32.const 32 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -154,7 +216,7 @@ if i32.const 0 i32.const 32 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -179,77 +241,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -266,6 +286,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -277,8 +303,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -286,7 +310,7 @@ if i32.const 0 i32.const 32 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -303,28 +327,18 @@ if i32.const 0 i32.const 32 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -335,44 +349,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -380,30 +384,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 32 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -422,22 +422,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -463,7 +463,7 @@ if i32.const 0 i32.const 32 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -475,18 +475,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 32 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -540,27 +540,15 @@ if i32.const 0 i32.const 32 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -575,24 +563,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -602,31 +576,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -634,8 +592,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -661,24 +617,22 @@ if i32.const 0 i32.const 32 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -686,7 +640,7 @@ if i32.const 0 i32.const 32 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -694,16 +648,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -719,7 +673,7 @@ if i32.const 0 i32.const 32 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -728,8 +682,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -740,49 +694,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -795,10 +745,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -848,73 +794,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -927,11 +846,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -951,7 +870,7 @@ if i32.const 80 i32.const 32 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -977,9 +896,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1047,31 +963,24 @@ if i32.const 0 i32.const 32 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1084,79 +993,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 32 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1193,9 +1071,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1209,12 +1085,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1224,7 +1100,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1261,7 +1137,7 @@ if i32.const 0 i32.const 32 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1312,29 +1188,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1354,7 +1210,7 @@ if i32.const 0 i32.const 32 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1401,7 +1257,7 @@ if i32.const 0 i32.const 32 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1422,7 +1278,7 @@ if i32.const 0 i32.const 32 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1443,7 +1299,7 @@ if i32.const 0 i32.const 32 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -1543,219 +1399,214 @@ end local.get $0 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + (local $6 i64) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - i32.const 4 - i32.sub - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - local.get $4 - i32.store8 offset=3 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=1 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - i32.const 28 - i32.sub - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=24 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=16 - local.get $6 - local.get $8 - i32.store offset=20 - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=4 - local.get $6 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=12 - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add + i32.const 0 + i32.const 1 + i32.gt_s + drop + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.set $3 + local.get $0 + local.get $1 + i32.store8 + local.get $3 + local.get $1 + i32.store8 offset=3 + local.get $2 + i32.const 2 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store8 offset=1 + local.get $0 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=1 + local.get $2 + i32.const 6 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store8 offset=3 + local.get $3 + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $5 + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.set $3 + local.get $0 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=16 + local.get $3 + local.get $5 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=12 + local.get $0 + local.get $5 + i32.store offset=16 + local.get $0 + local.get $5 + i32.store offset=20 + local.get $0 + local.get $5 + i32.store offset=24 + local.get $3 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=12 + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $5 + i64.extend_i32_u + local.get $5 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $6 + loop $while-continue|0 + local.get $2 + i32.const 32 + i32.ge_u local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 + if + local.get $0 + local.get $6 + i64.store + local.get $0 + local.get $6 + i64.store offset=8 + local.get $0 + local.get $6 + i64.store offset=16 + local.get $0 + local.get $6 + i64.store offset=24 + local.get $2 i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 end end ) + (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memset + ) (func $~lib/arraybuffer/ArrayBuffer#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 @@ -1791,9 +1642,28 @@ call $~lib/rt/pure/decrement end ) + (func $~lib/map/ENTRY_ALIGN (result i32) + i32.const 3 + ) + (func $~lib/map/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/map/ENTRY_ALIGN + local.set $0 + i32.const 12 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -1810,16 +1680,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/map/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 48 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -1870,6 +1744,25 @@ i32.const 16777619 i32.mul ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/util/hash/hash8 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -1923,30 +1816,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -1982,7 +1855,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -1992,7 +1865,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -2023,24 +1896,9 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $10 - i32.load8_s - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $10 + i32.load8_s + call $~lib/util/hash/HASH local.get $1 i32.and local.set $12 @@ -2058,12 +1916,12 @@ local.get $8 i32.store local.get $8 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -2123,38 +1981,19 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $3 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -2190,8 +2029,8 @@ local.get $0 i32.load offset=8 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -2200,14 +2039,14 @@ i32.add i32.store offset=16 local.get $6 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store8 - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -2218,7 +2057,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -2226,14 +2065,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -2241,43 +2080,23 @@ ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 352 i32.const 416 - i32.const 111 + i32.const 109 i32.const 17 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -2405,7 +2224,7 @@ if i32.const 0 i32.const 32 - i32.const 581 + i32.const 573 i32.const 3 call $~lib/builtins/abort unreachable @@ -3436,238 +3255,233 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if local.get $0 - local.set $5 local.get $1 - local.set $4 local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if i32.const 0 - i32.const 1 + i32.const 2 i32.lt_s drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.tee $7 + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 i32.const 1 i32.add - local.set $5 - local.get $7 + local.set $0 local.get $4 - local.tee $7 + local.get $1 + local.tee $4 i32.const 1 i32.add - local.set $4 - local.get $7 + local.set $1 + local.get $4 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 + br $while-continue|0 end end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 @@ -3718,22 +3532,12 @@ return end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $5 local.get $5 - i32.const 16 - i32.add - local.get $5 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $6 local.get $6 - i32.load - local.set $7 - local.get $7 i32.const 1 i32.and if @@ -3744,25 +3548,25 @@ i32.and i32.const 16 i32.add - local.get $7 + local.get $6 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $5 - local.get $5 + local.set $7 + local.get $7 local.get $3 i32.ge_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $4 i32.const 3 i32.and - local.get $5 + local.get $7 i32.or i32.store local.get $1 @@ -3973,7 +3777,7 @@ if local.get $1 local.get $5 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -4179,7 +3983,7 @@ if local.get $1 local.get $5 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -4212,9 +4016,28 @@ call $~lib/array/Array#set:length local.get $3 ) + (func $~lib/map/ENTRY_ALIGN (result i32) + i32.const 3 + ) + (func $~lib/map/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/map/ENTRY_ALIGN + local.set $0 + i32.const 8 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -4231,16 +4054,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/map/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 32 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -4284,9 +4111,28 @@ call $~lib/map/Map#clear local.get $0 ) + (func $~lib/map/ENTRY_ALIGN (result i32) + i32.const 3 + ) + (func $~lib/map/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/map/ENTRY_ALIGN + local.set $0 + i32.const 12 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -4303,16 +4149,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/map/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 48 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -4505,7 +4355,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 8 + call $~lib/map/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -4515,7 +4365,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 8 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -4546,24 +4396,9 @@ local.get $10 i32.load8_s offset=1 i32.store8 offset=1 - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $10 - i32.load8_s - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $10 + i32.load8_s + call $~lib/util/hash/HASH local.get $1 i32.and local.set $12 @@ -4581,12 +4416,12 @@ local.get $8 i32.store local.get $8 - i32.const 8 + call $~lib/map/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 8 + call $~lib/map/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -4646,38 +4481,19 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $3 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store8 offset=1 else @@ -4713,8 +4529,8 @@ local.get $0 i32.load offset=8 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -4723,14 +4539,14 @@ i32.add i32.store offset=16 local.get $6 - i32.const 8 + call $~lib/map/ENTRY_SIZE i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store8 - local.get $5 + local.get $4 local.get $2 i32.store8 offset=1 local.get $0 @@ -4741,7 +4557,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -4749,14 +4565,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=4 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -4796,13 +4612,36 @@ local.set $1 local.get $1 local.get $0 - i32.const 24 - i32.shr_u - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $1 + i32.const 24 + i32.shr_u + i32.xor + i32.const 16777619 + i32.mul + local.set $1 + local.get $1 + ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $0 + call $~lib/util/hash/hash32 + return ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -4883,7 +4722,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -4893,7 +4732,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -4924,32 +4763,9 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $10 - i32.load - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end + local.get $10 + i32.load + call $~lib/util/hash/HASH local.get $1 i32.and local.set $12 @@ -4967,12 +4783,12 @@ local.get $8 i32.store local.get $8 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -5032,42 +4848,19 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -5103,8 +4896,8 @@ local.get $0 i32.load offset=8 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -5113,14 +4906,14 @@ i32.add i32.store offset=16 local.get $6 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -5131,7 +4924,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -5139,14 +4932,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -5167,30 +4960,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -5200,8 +4974,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -5216,16 +4990,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -5245,7 +5019,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -5759,9 +5533,28 @@ local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/map/ENTRY_ALIGN (result i32) + i32.const 3 + ) + (func $~lib/map/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/map/ENTRY_ALIGN + local.set $0 + i32.const 12 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -5778,16 +5571,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/map/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 48 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -5831,6 +5628,23 @@ call $~lib/map/Map#clear local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $0 + i32.const 255 + i32.and + call $~lib/util/hash/hash8 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -5882,28 +5696,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -5939,7 +5735,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -5949,7 +5745,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -5980,24 +5776,9 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $10 - i32.load8_u - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $10 + i32.load8_u + call $~lib/util/hash/HASH local.get $1 i32.and local.set $12 @@ -6015,12 +5796,12 @@ local.get $8 i32.store local.get $8 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -6080,36 +5861,19 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $3 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -6145,8 +5909,8 @@ local.get $0 i32.load offset=8 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -6155,14 +5919,14 @@ i32.add i32.store offset=16 local.get $6 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store8 - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -6173,7 +5937,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -6181,56 +5945,38 @@ i32.mul i32.add local.set $6 - local.get $5 - local.get $6 - i32.load - i32.store offset=8 + local.get $4 local.get $6 - local.get $5 - i32.store - local.get $3 - call $~lib/rt/pure/__release - end - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.3 + i32.load + i32.store offset=8 + local.get $6 + local.get $4 + i32.store + local.get $5 + call $~lib/rt/pure/__release end + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 352 i32.const 416 - i32.const 111 + i32.const 109 i32.const 17 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -6410,7 +6156,7 @@ if local.get $1 local.get $5 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -6475,7 +6221,7 @@ if local.get $1 local.get $5 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -6508,9 +6254,28 @@ call $~lib/array/Array#set:length local.get $3 ) + (func $~lib/map/ENTRY_ALIGN (result i32) + i32.const 3 + ) + (func $~lib/map/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/map/ENTRY_ALIGN + local.set $0 + i32.const 8 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -6527,16 +6292,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/map/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 32 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -6696,7 +6465,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 8 + call $~lib/map/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -6706,7 +6475,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 8 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -6737,24 +6506,9 @@ local.get $10 i32.load8_u offset=1 i32.store8 offset=1 - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $10 - i32.load8_u - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $10 + i32.load8_u + call $~lib/util/hash/HASH local.get $1 i32.and local.set $12 @@ -6772,12 +6526,12 @@ local.get $8 i32.store local.get $8 - i32.const 8 + call $~lib/map/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 8 + call $~lib/map/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -6837,36 +6591,19 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $3 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store8 offset=1 else @@ -6902,8 +6639,8 @@ local.get $0 i32.load offset=8 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -6912,14 +6649,14 @@ i32.add i32.store offset=16 local.get $6 - i32.const 8 + call $~lib/map/ENTRY_SIZE i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store8 - local.get $5 + local.get $4 local.get $2 i32.store8 offset=1 local.get $0 @@ -6930,7 +6667,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -6938,14 +6675,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=4 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -6962,28 +6699,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -6993,8 +6713,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -7009,16 +6729,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -7038,7 +6758,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -7530,9 +7250,28 @@ local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/map/ENTRY_ALIGN (result i32) + i32.const 3 + ) + (func $~lib/map/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/map/ENTRY_ALIGN + local.set $0 + i32.const 12 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -7549,16 +7288,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/map/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 48 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -7624,6 +7367,29 @@ local.set $1 local.get $1 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -7677,34 +7443,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -7740,7 +7482,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -7750,7 +7492,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -7781,28 +7523,9 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $10 - i32.load16_s - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $10 + i32.load16_s + call $~lib/util/hash/HASH local.get $1 i32.and local.set $12 @@ -7820,12 +7543,12 @@ local.get $8 i32.store local.get $8 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -7885,42 +7608,19 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -7956,8 +7656,8 @@ local.get $0 i32.load offset=8 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -7966,14 +7666,14 @@ i32.add i32.store offset=16 local.get $6 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store16 - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -7984,7 +7684,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -7992,14 +7692,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -8007,47 +7707,23 @@ ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 352 i32.const 416 - i32.const 111 + i32.const 109 i32.const 17 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -8227,7 +7903,7 @@ if local.get $1 local.get $5 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -8292,7 +7968,7 @@ if local.get $1 local.get $5 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -8325,9 +8001,28 @@ call $~lib/array/Array#set:length local.get $3 ) + (func $~lib/map/ENTRY_ALIGN (result i32) + i32.const 3 + ) + (func $~lib/map/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/map/ENTRY_ALIGN + local.set $0 + i32.const 8 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -8344,16 +8039,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/map/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 32 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -8515,7 +8214,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 8 + call $~lib/map/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -8525,7 +8224,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 8 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -8556,28 +8255,9 @@ local.get $10 i32.load16_s offset=2 i32.store16 offset=2 - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $10 - i32.load16_s - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $10 + i32.load16_s + call $~lib/util/hash/HASH local.get $1 i32.and local.set $12 @@ -8595,12 +8275,12 @@ local.get $8 i32.store local.get $8 - i32.const 8 + call $~lib/map/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 8 + call $~lib/map/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -8660,42 +8340,19 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store16 offset=2 else @@ -8731,8 +8388,8 @@ local.get $0 i32.load offset=8 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -8741,14 +8398,14 @@ i32.add i32.store offset=16 local.get $6 - i32.const 8 + call $~lib/map/ENTRY_SIZE i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store16 - local.get $5 + local.get $4 local.get $2 i32.store16 offset=2 local.get $0 @@ -8759,7 +8416,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -8767,14 +8424,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=4 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -8791,34 +8448,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -8828,8 +8462,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -8844,16 +8478,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -8873,7 +8507,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -9387,9 +9021,28 @@ local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/map/ENTRY_ALIGN (result i32) + i32.const 3 + ) + (func $~lib/map/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/map/ENTRY_ALIGN + local.set $0 + i32.const 12 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -9406,16 +9059,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/map/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 48 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -9459,6 +9116,27 @@ call $~lib/map/Map#clear local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $0 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -9494,48 +9172,26 @@ i32.const 0 end if - local.get $3 - return - end - local.get $3 - i32.load offset=8 - i32.const 1 - i32.const -1 - i32.xor - i32.and - local.set $3 - br $while-continue|0 - end - end - i32.const 0 - ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.0 + local.get $3 + return + end + local.get $3 + i32.load offset=8 + i32.const 1 + i32.const -1 + i32.xor + i32.and + local.set $3 + br $while-continue|0 + end end + i32.const 0 + ) + (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -9571,7 +9227,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -9581,7 +9237,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -9612,28 +9268,9 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $10 - i32.load16_u - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $10 + i32.load16_u + call $~lib/util/hash/HASH local.get $1 i32.and local.set $12 @@ -9651,12 +9288,12 @@ local.get $8 i32.store local.get $8 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -9716,40 +9353,19 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $3 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -9785,8 +9401,8 @@ local.get $0 i32.load offset=8 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -9795,14 +9411,14 @@ i32.add i32.store offset=16 local.get $6 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store16 - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -9813,7 +9429,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -9821,14 +9437,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -9836,45 +9452,23 @@ ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 352 i32.const 416 - i32.const 111 + i32.const 109 i32.const 17 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -10054,7 +9648,7 @@ if local.get $1 local.get $5 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -10119,7 +9713,7 @@ if local.get $1 local.get $5 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -10152,9 +9746,28 @@ call $~lib/array/Array#set:length local.get $3 ) + (func $~lib/map/ENTRY_ALIGN (result i32) + i32.const 3 + ) + (func $~lib/map/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/map/ENTRY_ALIGN + local.set $0 + i32.const 8 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -10171,16 +9784,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/map/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 32 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -10340,7 +9957,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 8 + call $~lib/map/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -10350,7 +9967,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 8 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -10381,28 +9998,9 @@ local.get $10 i32.load16_u offset=2 i32.store16 offset=2 - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $10 - i32.load16_u - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $10 + i32.load16_u + call $~lib/util/hash/HASH local.get $1 i32.and local.set $12 @@ -10420,12 +10018,12 @@ local.get $8 i32.store local.get $8 - i32.const 8 + call $~lib/map/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 8 + call $~lib/map/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -10485,40 +10083,19 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $3 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store16 offset=2 else @@ -10554,8 +10131,8 @@ local.get $0 i32.load offset=8 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -10564,14 +10141,14 @@ i32.add i32.store offset=16 local.get $6 - i32.const 8 + call $~lib/map/ENTRY_SIZE i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store16 - local.get $5 + local.get $4 local.get $2 i32.store16 offset=2 local.get $0 @@ -10582,7 +10159,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -10590,14 +10167,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=4 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -10614,32 +10191,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -10649,8 +10205,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -10665,16 +10221,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -10694,7 +10250,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -11187,81 +10743,33 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 - local.get $1 - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $1 + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 352 i32.const 416 - i32.const 111 + i32.const 109 i32.const 17 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 ) (func $~lib/map/Map#keys (param $0 i32) (result i32) @@ -11296,7 +10804,7 @@ if local.get $1 local.get $5 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -11361,7 +10869,7 @@ if local.get $1 local.get $5 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -11405,34 +10913,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -11442,8 +10927,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -11458,16 +10943,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -11487,7 +10972,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -11955,9 +11440,28 @@ local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/map/ENTRY_ALIGN (result i32) + i32.const 3 + ) + (func $~lib/map/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/map/ENTRY_ALIGN + local.set $0 + i32.const 12 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -11974,16 +11478,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/map/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 48 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -12027,6 +11535,29 @@ call $~lib/map/Map#clear local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $0 + call $~lib/util/hash/hash32 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -12076,34 +11607,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -12139,7 +11646,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -12149,7 +11656,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -12180,32 +11687,9 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $10 - i32.load - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $10 + i32.load + call $~lib/util/hash/HASH local.get $1 i32.and local.set $12 @@ -12223,12 +11707,12 @@ local.get $8 i32.store local.get $8 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -12288,42 +11772,19 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -12359,8 +11820,8 @@ local.get $0 i32.load offset=8 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -12369,14 +11830,14 @@ i32.add i32.store offset=16 local.get $6 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -12387,7 +11848,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -12395,14 +11856,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -12410,47 +11871,23 @@ ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 352 i32.const 416 - i32.const 111 + i32.const 109 i32.const 17 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -12630,7 +12067,7 @@ if local.get $1 local.get $5 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -12695,7 +12132,7 @@ if local.get $1 local.get $5 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -12728,9 +12165,28 @@ call $~lib/array/Array#set:length local.get $3 ) + (func $~lib/map/ENTRY_ALIGN (result i32) + i32.const 3 + ) + (func $~lib/map/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/map/ENTRY_ALIGN + local.set $0 + i32.const 12 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -12747,16 +12203,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/map/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 48 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -12914,7 +12374,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -12924,7 +12384,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -12955,32 +12415,9 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $10 - i32.load - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $10 + i32.load + call $~lib/util/hash/HASH local.get $1 i32.and local.set $12 @@ -12998,12 +12435,12 @@ local.get $8 i32.store local.get $8 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -13063,42 +12500,19 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -13134,8 +12548,8 @@ local.get $0 i32.load offset=8 call $~lib/rt/pure/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -13144,14 +12558,14 @@ i32.add i32.store offset=16 local.get $6 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -13162,7 +12576,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -13170,14 +12584,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -13194,34 +12608,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -13231,8 +12622,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -13247,16 +12638,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -13276,7 +12667,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -13744,9 +13135,28 @@ local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/map/ENTRY_ALIGN (result i32) + i32.const 7 + ) + (func $~lib/map/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/map/ENTRY_ALIGN + local.set $0 + i32.const 16 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -13763,16 +13173,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/map/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 64 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -13904,6 +13318,33 @@ local.set $3 local.get $3 ) + (func $~lib/util/hash/HASH (param $0 i64) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + call $~lib/util/hash/hash64 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -13953,38 +13394,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -14000,9 +13413,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i64) + (local $12 i32) (local $13 i32) - (local $14 i32) local.get $1 i32.const 1 i32.add @@ -14021,7 +13433,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 16 + call $~lib/map/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -14031,7 +13443,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 16 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -14062,59 +13474,32 @@ local.get $10 i32.load offset=8 i32.store offset=8 - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $10 - i64.load - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $10 + i64.load + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $13 + local.set $12 local.get $3 - local.get $13 + local.get $12 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=12 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 - i32.const 16 + call $~lib/map/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 16 + call $~lib/map/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -14123,28 +13508,28 @@ local.get $0 local.tee $11 local.get $3 - local.tee $13 + local.tee $12 local.get $11 i32.load local.tee $9 i32.ne if - local.get $13 + local.get $12 call $~lib/rt/pure/__retain - local.set $13 + local.set $12 local.get $9 call $~lib/rt/pure/__release end - local.get $13 + local.get $12 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.tee $14 + local.tee $13 local.get $5 local.tee $9 - local.get $14 + local.get $13 i32.load offset=8 local.tee $11 i32.ne @@ -14170,51 +13555,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - (local $3 i64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=8 else @@ -14250,24 +13607,24 @@ local.get $0 i32.load offset=8 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=16 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=16 - local.get $7 - i32.const 16 + local.get $6 + call $~lib/map/ENTRY_SIZE i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i64.store - local.get $5 + local.get $4 local.get $2 i32.store offset=8 local.get $0 @@ -14278,74 +13635,46 @@ i32.store offset=20 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=12 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 call $~lib/rt/pure/__retain ) (func $~lib/map/Map#get (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) - (local $3 i32) + (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 352 i32.const 416 - i32.const 111 + i32.const 109 i32.const 17 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=8 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -14525,7 +13854,7 @@ if local.get $1 local.get $5 - i32.const 16 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -14590,7 +13919,7 @@ if local.get $1 local.get $5 - i32.const 16 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -14623,9 +13952,28 @@ call $~lib/array/Array#set:length local.get $3 ) + (func $~lib/map/ENTRY_ALIGN (result i32) + i32.const 7 + ) + (func $~lib/map/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/map/ENTRY_ALIGN + local.set $0 + i32.const 20 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -14642,16 +13990,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/map/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 96 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -14789,9 +14141,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i64) + (local $12 i32) (local $13 i32) - (local $14 i32) local.get $1 i32.const 1 i32.add @@ -14810,7 +14161,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 24 + call $~lib/map/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -14820,7 +14171,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 24 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -14851,59 +14202,32 @@ local.get $10 i64.load offset=8 i64.store offset=8 - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $10 - i64.load - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $10 + i64.load + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $13 + local.set $12 local.get $3 - local.get $13 + local.get $12 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=16 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 - i32.const 24 + call $~lib/map/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 24 + call $~lib/map/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -14912,28 +14236,28 @@ local.get $0 local.tee $11 local.get $3 - local.tee $13 + local.tee $12 local.get $11 i32.load local.tee $9 i32.ne if - local.get $13 + local.get $12 call $~lib/rt/pure/__retain - local.set $13 + local.set $12 local.get $9 call $~lib/rt/pure/__release end - local.get $13 + local.get $12 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.tee $14 + local.tee $13 local.get $5 local.tee $9 - local.get $14 + local.get $13 i32.load offset=8 local.tee $11 i32.ne @@ -14959,51 +14283,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (result i32) - (local $3 i64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i64.store offset=8 else @@ -15039,24 +14335,24 @@ local.get $0 i32.load offset=8 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=16 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=16 - local.get $7 - i32.const 24 + local.get $6 + call $~lib/map/ENTRY_SIZE i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i64.store - local.get $5 + local.get $4 local.get $2 i64.store offset=8 local.get $0 @@ -15067,22 +14363,22 @@ i32.store offset=20 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=16 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -15093,45 +14389,17 @@ i32.load offset=20 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -15141,8 +14409,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=12 i32.const 1 i32.or @@ -15157,17 +14425,17 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=20 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -15186,7 +14454,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -15660,11 +14928,30 @@ local.get $5 call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + call $~lib/rt/pure/__release + ) + (func $~lib/map/ENTRY_ALIGN (result i32) + i32.const 7 + ) + (func $~lib/map/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/map/ENTRY_ALIGN + local.set $0 + i32.const 16 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -15681,16 +14968,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/map/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 64 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -15734,6 +15025,33 @@ call $~lib/map/Map#clear local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i64) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + call $~lib/util/hash/hash64 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -15783,38 +15101,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -15830,9 +15120,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i64) + (local $12 i32) (local $13 i32) - (local $14 i32) local.get $1 i32.const 1 i32.add @@ -15851,7 +15140,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 16 + call $~lib/map/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -15861,7 +15150,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 16 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -15892,59 +15181,32 @@ local.get $10 i32.load offset=8 i32.store offset=8 - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $10 - i64.load - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $10 + i64.load + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $13 + local.set $12 local.get $3 - local.get $13 + local.get $12 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=12 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 - i32.const 16 + call $~lib/map/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 16 + call $~lib/map/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -15953,28 +15215,28 @@ local.get $0 local.tee $11 local.get $3 - local.tee $13 + local.tee $12 local.get $11 i32.load local.tee $9 i32.ne if - local.get $13 + local.get $12 call $~lib/rt/pure/__retain - local.set $13 + local.set $12 local.get $9 call $~lib/rt/pure/__release end - local.get $13 + local.get $12 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.tee $14 + local.tee $13 local.get $5 local.tee $9 - local.get $14 + local.get $13 i32.load offset=8 local.tee $11 i32.ne @@ -16000,51 +15262,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - (local $3 i64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=8 else @@ -16080,24 +15314,24 @@ local.get $0 i32.load offset=8 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=16 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=16 - local.get $7 - i32.const 16 + local.get $6 + call $~lib/map/ENTRY_SIZE i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i64.store - local.get $5 + local.get $4 local.get $2 i32.store offset=8 local.get $0 @@ -16108,74 +15342,46 @@ i32.store offset=20 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=12 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 call $~lib/rt/pure/__retain ) (func $~lib/map/Map#get (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) - (local $3 i32) + (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 352 i32.const 416 - i32.const 111 + i32.const 109 i32.const 17 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=8 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -16355,7 +15561,7 @@ if local.get $1 local.get $5 - i32.const 16 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -16420,7 +15626,7 @@ if local.get $1 local.get $5 - i32.const 16 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -16453,9 +15659,28 @@ call $~lib/array/Array#set:length local.get $3 ) + (func $~lib/map/ENTRY_ALIGN (result i32) + i32.const 7 + ) + (func $~lib/map/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/map/ENTRY_ALIGN + local.set $0 + i32.const 20 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -16472,16 +15697,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/map/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 96 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -16619,9 +15848,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i64) + (local $12 i32) (local $13 i32) - (local $14 i32) local.get $1 i32.const 1 i32.add @@ -16640,7 +15868,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 24 + call $~lib/map/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -16650,7 +15878,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 24 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -16681,59 +15909,32 @@ local.get $10 i64.load offset=8 i64.store offset=8 - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $10 - i64.load - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $10 + i64.load + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $13 + local.set $12 local.get $3 - local.get $13 + local.get $12 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=16 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 - i32.const 24 + call $~lib/map/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 24 + call $~lib/map/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -16742,28 +15943,28 @@ local.get $0 local.tee $11 local.get $3 - local.tee $13 + local.tee $12 local.get $11 i32.load local.tee $9 i32.ne if - local.get $13 + local.get $12 call $~lib/rt/pure/__retain - local.set $13 + local.set $12 local.get $9 call $~lib/rt/pure/__release end - local.get $13 + local.get $12 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.tee $14 + local.tee $13 local.get $5 local.tee $9 - local.get $14 + local.get $13 i32.load offset=8 local.tee $11 i32.ne @@ -16789,51 +15990,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (result i32) - (local $3 i64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i64.store offset=8 else @@ -16869,24 +16042,24 @@ local.get $0 i32.load offset=8 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=16 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=16 - local.get $7 - i32.const 24 + local.get $6 + call $~lib/map/ENTRY_SIZE i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i64.store - local.get $5 + local.get $4 local.get $2 i64.store offset=8 local.get $0 @@ -16897,22 +16070,22 @@ i32.store offset=20 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=16 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -16923,45 +16096,17 @@ i32.load offset=20 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -16971,8 +16116,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=12 i32.const 1 i32.or @@ -16987,17 +16132,17 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=20 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -17016,7 +16161,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -17492,9 +16637,28 @@ local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/map/ENTRY_ALIGN (result i32) + i32.const 3 + ) + (func $~lib/map/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/map/ENTRY_ALIGN + local.set $0 + i32.const 12 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -17511,16 +16675,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/map/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 48 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -17564,6 +16732,22 @@ call $~lib/map/Map#clear local.get $0 ) + (func $~lib/util/hash/HASH (param $0 f32) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -17613,27 +16797,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -17649,9 +16816,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 f32) + (local $12 i32) (local $13 i32) - (local $14 i32) local.get $1 i32.const 1 i32.add @@ -17670,7 +16836,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -17680,7 +16846,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -17711,48 +16877,32 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $10 - f32.load - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $12 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $10 + f32.load + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $13 + local.set $12 local.get $3 - local.get $13 + local.get $12 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=8 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -17761,28 +16911,28 @@ local.get $0 local.tee $11 local.get $3 - local.tee $13 + local.tee $12 local.get $11 i32.load local.tee $9 i32.ne if - local.get $13 + local.get $12 call $~lib/rt/pure/__retain - local.set $13 + local.set $12 local.get $9 call $~lib/rt/pure/__release end - local.get $13 + local.get $12 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.tee $14 + local.tee $13 local.get $5 local.tee $9 - local.get $14 + local.get $13 i32.load offset=8 local.tee $11 i32.ne @@ -17808,40 +16958,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 i32) (result i32) - (local $3 f32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=4 else @@ -17877,24 +17010,24 @@ local.get $0 i32.load offset=8 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=16 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=16 - local.get $7 - i32.const 12 + local.get $6 + call $~lib/map/ENTRY_SIZE i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 f32.store - local.get $5 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -17905,63 +17038,46 @@ i32.store offset=20 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul - i32.add - local.set $7 - local.get $5 - local.get $7 + i32.add + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=8 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 call $~lib/rt/pure/__retain ) (func $~lib/map/Map#get (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) - (local $3 i32) + (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 352 i32.const 416 - i32.const 111 + i32.const 109 i32.const 17 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -18141,7 +17257,7 @@ if local.get $1 local.get $5 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -18206,7 +17322,7 @@ if local.get $1 local.get $5 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -18239,9 +17355,28 @@ call $~lib/array/Array#set:length local.get $3 ) + (func $~lib/map/ENTRY_ALIGN (result i32) + i32.const 3 + ) + (func $~lib/map/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/map/ENTRY_ALIGN + local.set $0 + i32.const 12 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -18258,16 +17393,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/map/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 48 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -18405,9 +17544,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 f32) + (local $12 i32) (local $13 i32) - (local $14 i32) local.get $1 i32.const 1 i32.add @@ -18426,7 +17564,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -18436,7 +17574,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -18467,48 +17605,32 @@ local.get $10 f32.load offset=4 f32.store offset=4 - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $10 - f32.load - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $12 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $10 + f32.load + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $13 + local.set $12 local.get $3 - local.get $13 + local.get $12 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=8 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -18517,28 +17639,28 @@ local.get $0 local.tee $11 local.get $3 - local.tee $13 + local.tee $12 local.get $11 i32.load local.tee $9 i32.ne if - local.get $13 + local.get $12 call $~lib/rt/pure/__retain - local.set $13 + local.set $12 local.get $9 call $~lib/rt/pure/__release end - local.get $13 + local.get $12 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.tee $14 + local.tee $13 local.get $5 local.tee $9 - local.get $14 + local.get $13 i32.load offset=8 local.tee $11 i32.ne @@ -18564,40 +17686,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 f32) (result i32) - (local $3 f32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 f32.store offset=4 else @@ -18633,24 +17738,24 @@ local.get $0 i32.load offset=8 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=16 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=16 - local.get $7 - i32.const 12 + local.get $6 + call $~lib/map/ENTRY_SIZE i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 f32.store - local.get $5 + local.get $4 local.get $2 f32.store offset=4 local.get $0 @@ -18661,22 +17766,22 @@ i32.store offset=20 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=8 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -18687,34 +17792,17 @@ i32.load offset=20 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -18724,8 +17812,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -18740,17 +17828,17 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=20 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -18769,7 +17857,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 @@ -19245,9 +18333,28 @@ local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/map/ENTRY_ALIGN (result i32) + i32.const 7 + ) + (func $~lib/map/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/map/ENTRY_ALIGN + local.set $0 + i32.const 16 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -19264,16 +18371,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/map/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 64 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -19317,6 +18428,26 @@ call $~lib/map/Map#clear local.get $0 ) + (func $~lib/util/hash/HASH (param $0 f64) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -19366,31 +18497,10 @@ i32.const 0 ) (func $~lib/map/Map#has (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -19406,9 +18516,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 f64) + (local $12 i32) (local $13 i32) - (local $14 i32) local.get $1 i32.const 1 i32.add @@ -19427,7 +18536,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 16 + call $~lib/map/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -19437,7 +18546,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 16 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -19468,52 +18577,32 @@ local.get $10 i32.load offset=8 i32.store offset=8 - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $10 - f64.load - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $12 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $10 + f64.load + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $13 + local.set $12 local.get $3 - local.get $13 + local.get $12 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=12 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 - i32.const 16 + call $~lib/map/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 16 + call $~lib/map/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -19522,28 +18611,28 @@ local.get $0 local.tee $11 local.get $3 - local.tee $13 + local.tee $12 local.get $11 i32.load local.tee $9 i32.ne if - local.get $13 + local.get $12 call $~lib/rt/pure/__retain - local.set $13 + local.set $12 local.get $9 call $~lib/rt/pure/__release end - local.get $13 + local.get $12 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.tee $14 + local.tee $13 local.get $5 local.tee $9 - local.get $14 + local.get $13 i32.load offset=8 local.tee $11 i32.ne @@ -19569,44 +18658,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 f64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 i32.store offset=8 else @@ -19642,24 +18710,24 @@ local.get $0 i32.load offset=8 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=16 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=16 - local.get $7 - i32.const 16 + local.get $6 + call $~lib/map/ENTRY_SIZE i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 f64.store - local.get $5 + local.get $4 local.get $2 i32.store offset=8 local.get $0 @@ -19670,67 +18738,46 @@ i32.store offset=20 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=12 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 call $~lib/rt/pure/__retain ) (func $~lib/map/Map#get (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) - (local $3 i32) + (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 352 i32.const 416 - i32.const 111 + i32.const 109 i32.const 17 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=8 ) (func $~lib/map/Map#get:size (param $0 i32) (result i32) @@ -19910,7 +18957,7 @@ if local.get $1 local.get $5 - i32.const 16 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -19975,7 +19022,7 @@ if local.get $1 local.get $5 - i32.const 16 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -20008,9 +19055,28 @@ call $~lib/array/Array#set:length local.get $3 ) + (func $~lib/map/ENTRY_ALIGN (result i32) + i32.const 7 + ) + (func $~lib/map/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/map/ENTRY_ALIGN + local.set $0 + i32.const 20 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -20027,16 +19093,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/map/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 96 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -20174,9 +19244,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 f64) + (local $12 i32) (local $13 i32) - (local $14 i32) local.get $1 i32.const 1 i32.add @@ -20195,7 +19264,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 24 + call $~lib/map/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -20205,7 +19274,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 24 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -20236,52 +19305,32 @@ local.get $10 f64.load offset=8 f64.store offset=8 - block $~lib/util/hash/HASH|inlined.5 (result i32) - local.get $10 - f64.load - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $12 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.5 - end + local.get $10 + f64.load + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $13 + local.set $12 local.get $3 - local.get $13 + local.get $12 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=16 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 - i32.const 24 + call $~lib/map/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 24 + call $~lib/map/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -20290,28 +19339,28 @@ local.get $0 local.tee $11 local.get $3 - local.tee $13 + local.tee $12 local.get $11 i32.load local.tee $9 i32.ne if - local.get $13 + local.get $12 call $~lib/rt/pure/__retain - local.set $13 + local.set $12 local.get $9 call $~lib/rt/pure/__release end - local.get $13 + local.get $12 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.tee $14 + local.tee $13 local.get $5 local.tee $9 - local.get $14 + local.get $13 i32.load offset=8 local.tee $11 i32.ne @@ -20337,44 +19386,23 @@ call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 f64) (result i32) - (local $3 f64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - block $~lib/util/hash/HASH|inlined.4 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $3 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.4 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $5 + local.get $4 local.get $2 f64.store offset=8 else @@ -20410,24 +19438,24 @@ local.get $0 i32.load offset=8 call $~lib/rt/pure/__retain - local.set $6 - local.get $6 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=16 - local.tee $7 + local.tee $6 i32.const 1 i32.add i32.store offset=16 - local.get $7 - i32.const 24 + local.get $6 + call $~lib/map/ENTRY_SIZE i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 f64.store - local.get $5 + local.get $4 local.get $2 f64.store offset=8 local.get $0 @@ -20438,22 +19466,22 @@ i32.store offset=20 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $7 - local.get $5 - local.get $7 + local.set $6 + local.get $4 + local.get $6 i32.load i32.store offset=16 - local.get $7 - local.get $5 - i32.store local.get $6 + local.get $4 + i32.store + local.get $5 call $~lib/rt/pure/__release end local.get $0 @@ -20464,38 +19492,17 @@ i32.load offset=20 ) (func $~lib/map/Map#delete (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.6 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.6 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -20505,8 +19512,8 @@ drop i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=12 i32.const 1 i32.or @@ -20521,17 +19528,17 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=20 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -20550,7 +19557,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end i32.const 1 diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index a73ceeae40..2d35645c2b 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -10,23 +10,28 @@ (type $f32_f32_f32_f32_=>_i32 (func (param f32 f32 f32 f32) (result i32))) (type $f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64) (result i32))) (type $none_=>_none (func)) + (type $f64_=>_i32 (func (param f64) (result i32))) (type $f32_i32_=>_f32 (func (param f32 i32) (result f32))) + (type $f64_=>_f32 (func (param f64) (result f32))) (type $none_=>_f64 (func (result f64))) (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) + (type $f64_f64_i32_=>_f64 (func (param f64 f64 i32) (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i64_=>_none (func (param i64))) (type $i64_i64_i64_i64_i64_=>_none (func (param i64 i64 i64 i64 i64))) (type $f64_=>_none (func (param f64))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i64_=>_i32 (func (param i64) (result i32))) + (type $f32_=>_i32 (func (param f32) (result i32))) + (type $f32_i32_=>_i32 (func (param f32 i32) (result i32))) + (type $f32_i32_i32_=>_i32 (func (param f32 i32 i32) (result i32))) (type $f32_i32_f32_=>_i32 (func (param f32 i32 f32) (result i32))) - (type $f64_=>_i32 (func (param f64) (result i32))) (type $f64_i32_f64_=>_i32 (func (param f64 i32 f64) (result i32))) + (type $f64_i64_i32_=>_i32 (func (param f64 i64 i32) (result i32))) (type $i64_=>_i64 (func (param i64) (result i64))) (type $i64_i32_=>_i64 (func (param i64 i32) (result i64))) - (type $f32_f32_f32_=>_f32 (func (param f32 f32 f32) (result f32))) - (type $f64_f64_i32_=>_f64 (func (param f64 f64 i32) (result f64))) - (type $f64_f64_f64_=>_f64 (func (param f64 f64 f64) (result f64))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) + (type $f64_i32_=>_f32 (func (param f64 i32) (result f32))) (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)) @@ -87,6 +92,17 @@ (global $~lib/math/NativeMath.sincos_cos (mut f64) (f64.const 0)) (export "memory" (memory $0)) (start $~start) + (func $~lib/math/NativeMath.signbit (param $0 f64) (result i32) + local.get $0 + i64.reinterpret_f64 + i64.const 63 + i64.shr_u + i32.wrap_i64 + local.get $0 + local.get $0 + f64.eq + i32.and + ) (func $~lib/math/NativeMath.scalbn (param $0 f64) (param $1 i32) (result f64) local.get $1 i32.const 1023 @@ -164,116 +180,96 @@ f64.reinterpret_i64 f64.mul ) - (func $std/math/ulperr (param $0 f64) (param $1 f64) (param $2 f64) (result f64) + (func $std/math/check (param $0 f64) (param $1 f64) (param $2 f64) (result i32) (local $3 i32) - local.get $1 - local.get $1 - f64.ne - i32.const 0 - local.get $0 local.get $0 - f64.ne - select + local.get $1 + f64.eq if - f64.const 0 + i32.const 1 return end - local.get $0 local.get $1 - f64.eq + local.get $1 + f64.ne if - local.get $0 - i64.reinterpret_f64 - i64.const 63 - i64.shr_u - i32.wrap_i64 local.get $0 local.get $0 - f64.eq - i32.and - i32.const 0 - i32.ne - local.get $1 - i64.reinterpret_f64 - i64.const 63 - i64.shr_u - i32.wrap_i64 + f64.ne + return + end + block $__inlined_func$std/math/ulperr local.get $1 local.get $1 - f64.eq - i32.and + f64.ne i32.const 0 - i32.ne - i32.eq + local.get $0 + local.get $0 + f64.ne + select if - local.get $2 - return + f64.const 0 + local.set $2 + br $__inlined_func$std/math/ulperr end - f64.const inf - return - end - local.get $0 - local.get $0 - f64.sub - f64.const 0 - f64.ne - if (result f64) + local.get $0 local.get $1 - f64.const 0.5 - f64.mul - local.set $1 - f64.const 8988465674311579538646525e283 + f64.eq + if + local.get $0 + call $~lib/math/NativeMath.signbit + local.get $1 + call $~lib/math/NativeMath.signbit + 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 - f64.copysign - else local.get $0 - end - local.get $1 - f64.sub - i32.const 0 - 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 + f64.sub + f64.const 0 + f64.ne + if + local.get $1 + f64.const 0.5 + f64.mul + local.set $1 + f64.const 8988465674311579538646525e283 + local.get $0 + f64.copysign + local.set $0 + end + local.get $0 + local.get $1 + f64.sub + local.get $1 + i64.reinterpret_f64 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + i32.wrap_i64 + local.tee $3 + i32.eqz + if + local.get $3 + i32.const 1 + i32.add + local.set $3 + end + i32.const 0 local.get $3 - i32.const 1 + i32.const -1075 i32.add + i32.sub + call $~lib/math/NativeMath.scalbn + local.get $2 + f64.add + local.set $2 end - i32.const -1075 - i32.add - 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.get $0 - local.get $1 - f64.eq - if - i32.const 1 - return - end - local.get $1 - local.get $1 - f64.ne - if - local.get $0 - local.get $0 - f64.ne - return - end - local.get $0 - local.get $1 local.get $2 - call $std/math/ulperr f64.abs f64.const 1.5 f64.ge @@ -283,6 +279,16 @@ end i32.const 1 ) + (func $~lib/math/NativeMathf.signbit (param $0 f32) (result i32) + local.get $0 + i32.reinterpret_f32 + i32.const 31 + i32.shr_u + local.get $0 + local.get $0 + f32.eq + i32.and + ) (func $~lib/math/NativeMathf.scalbn (param $0 f32) (param $1 i32) (result f32) local.get $1 i32.const 127 @@ -359,113 +365,95 @@ f32.reinterpret_i32 f32.mul ) - (func $std/math/ulperrf (param $0 f32) (param $1 f32) (param $2 f32) (result f32) + (func $std/math/check (param $0 f32) (param $1 f32) (param $2 f32) (result i32) (local $3 i32) - local.get $1 - local.get $1 - f32.ne - i32.const 0 local.get $0 - local.get $0 - f32.ne - select + local.get $1 + f32.eq if - f32.const 0 + i32.const 1 return end - local.get $0 local.get $1 - f32.eq + local.get $1 + f32.ne if - local.get $0 - i32.reinterpret_f32 - i32.const 31 - i32.shr_u local.get $0 local.get $0 - f32.eq - i32.and - i32.const 0 - i32.ne - local.get $1 - i32.reinterpret_f32 - i32.const 31 - i32.shr_u + f32.ne + return + end + block $__inlined_func$std/math/ulperrf local.get $1 local.get $1 - f32.eq - i32.and + f32.ne i32.const 0 - i32.ne - i32.eq + local.get $0 + local.get $0 + f32.ne + select if - local.get $2 - return + f32.const 0 + local.set $2 + br $__inlined_func$std/math/ulperrf end - f32.const inf - return - end - local.get $0 - local.get $0 - f32.sub - f32.const 0 - f32.ne - if (result f32) + local.get $0 local.get $1 - f32.const 0.5 - f32.mul - local.set $1 - f32.const 1701411834604692317316873e14 + f32.eq + if + local.get $0 + call $~lib/math/NativeMathf.signbit + local.get $1 + call $~lib/math/NativeMathf.signbit + 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 - 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 + f32.sub + f32.const 0 + f32.ne + if + local.get $1 + f32.const 0.5 + f32.mul + local.set $1 + f32.const 1701411834604692317316873e14 + local.get $0 + f32.copysign + local.set $0 + end + local.get $0 + local.get $1 + f32.sub + local.get $1 + i32.reinterpret_f32 + i32.const 23 + i32.shr_u + i32.const 255 + i32.and + local.tee $3 + i32.eqz + if + local.get $3 + i32.const 1 + i32.add + local.set $3 + end + i32.const 0 local.get $3 - i32.const 1 + i32.const -150 i32.add + i32.sub + call $~lib/math/NativeMathf.scalbn + local.get $2 + f32.add + local.set $2 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.get $0 - local.get $1 - f32.eq - if - i32.const 1 - return - end - local.get $1 - local.get $1 - f32.ne - if - local.get $0 - local.get $0 - f32.ne - return - end - local.get $0 - local.get $1 local.get $2 - call $std/math/ulperrf f32.abs f32.const 1.5 f32.ge @@ -3280,6 +3268,117 @@ f32.const 0 call $std/math/check ) + (func $~lib/math/cos_kern (param $0 f64) (param $1 f64) (result f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + f64.const 1 + f64.const 0.5 + local.get $0 + local.get $0 + f64.mul + local.tee $2 + f64.mul + local.tee $3 + f64.sub + local.tee $4 + f64.const 1 + local.get $4 + f64.sub + local.get $3 + f64.sub + local.get $2 + local.get $2 + f64.const 0.0416666666666666 + local.get $2 + f64.const -0.001388888888887411 + local.get $2 + f64.const 2.480158728947673e-05 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + local.get $2 + local.get $2 + f64.mul + local.tee $3 + local.get $3 + f64.mul + f64.const -2.7557314351390663e-07 + local.get $2 + f64.const 2.087572321298175e-09 + local.get $2 + f64.const -1.1359647557788195e-11 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + local.get $0 + local.get $1 + f64.mul + f64.sub + f64.add + f64.add + ) + (func $~lib/math/umuldi (param $0 i64) (param $1 i64) (result i64) + (local $2 i64) + (local $3 i64) + (local $4 i64) + local.get $0 + i64.const 4294967295 + i64.and + local.tee $2 + local.get $1 + i64.const 4294967295 + i64.and + local.tee $3 + i64.mul + local.set $4 + local.get $2 + local.get $1 + i64.const 32 + i64.shr_u + local.tee $1 + i64.mul + local.get $3 + local.get $0 + i64.const 32 + i64.shr_u + local.tee $2 + i64.mul + local.get $4 + i64.const 32 + i64.shr_u + i64.add + local.tee $3 + i64.const 4294967295 + i64.and + i64.add + local.set $0 + local.get $1 + local.get $2 + i64.mul + local.get $3 + i64.const 32 + i64.shr_u + i64.add + local.get $0 + i64.const 32 + i64.shr_u + i64.add + global.set $~lib/math/res128_hi + local.get $4 + i64.const 4294967295 + i64.and + local.get $0 + i64.const 32 + i64.shl + i64.add + ) (func $~lib/math/pio2_large_quot (param $0 i64) (result i32) (local $1 i64) (local $2 i64) @@ -3289,10 +3388,7 @@ (local $6 i64) (local $7 i32) (local $8 i64) - (local $9 i64) - (local $10 i64) - (local $11 i64) - (local $12 f64) + (local $9 f64) local.get $0 i64.const 9223372036854775807 i64.and @@ -3310,13 +3406,13 @@ i32.add local.tee $7 i64.load - local.set $6 + local.set $4 local.get $7 i64.load offset=8 local.set $3 local.get $7 i64.load offset=16 - local.set $4 + local.set $2 local.get $1 i64.const 63 i64.and @@ -3324,193 +3420,105 @@ i64.const 0 i64.ne if - local.get $6 + local.get $4 local.get $1 i64.shl local.get $3 i64.const 64 local.get $1 i64.sub - local.tee $2 + local.tee $5 i64.shr_u i64.or - local.set $6 + local.set $4 local.get $3 local.get $1 i64.shl - local.get $4 local.get $2 + local.get $5 i64.shr_u i64.or local.set $3 - local.get $4 + local.get $2 local.get $1 i64.shl local.get $7 i64.load offset=24 - local.get $2 + local.get $5 i64.shr_u i64.or - local.set $4 + local.set $2 end + local.get $2 + i64.const 32 + i64.shr_u local.get $0 i64.const 4503599627370495 i64.and i64.const 4503599627370496 i64.or - local.tee $1 - i64.const 4294967295 - i64.and local.tee $2 - local.get $3 i64.const 32 - i64.shr_u - local.tee $8 - i64.mul - local.get $3 - i64.const 4294967295 - i64.and - local.tee $5 - local.get $2 + i64.shr_s i64.mul - local.tee $9 - i64.const 32 - i64.shr_u - i64.add - local.set $3 - local.get $5 - local.get $1 - i64.const 32 - i64.shr_u local.tee $5 - i64.mul - local.get $3 - i64.const 4294967295 - i64.and - i64.add - local.set $2 - local.get $5 - local.get $8 - i64.mul local.get $3 - i64.const 32 - i64.shr_u - i64.add local.get $2 - i64.const 32 - i64.shr_u + call $~lib/math/umuldi i64.add - global.set $~lib/math/res128_hi + local.tee $1 + local.get $5 + i64.lt_u + i64.extend_i32_u global.get $~lib/math/res128_hi - local.get $1 - local.get $6 - i64.mul - i64.add + local.get $2 local.get $4 - i64.const 32 - i64.shr_u - local.get $1 - i64.const 32 - i64.shr_s i64.mul - local.tee $3 - local.get $9 - i64.const 4294967295 - i64.and - local.get $2 - i64.const 32 - i64.shl - i64.add i64.add - local.tee $1 - local.get $3 - i64.lt_u - i64.extend_i32_u i64.add - local.tee $8 + local.tee $5 i64.const 2 i64.shl local.get $1 i64.const 62 i64.shr_u i64.or - local.tee $6 + local.tee $4 i64.const 63 i64.shr_s - local.tee $4 + local.tee $3 i64.const 1 i64.shr_s - local.get $6 + local.get $4 i64.xor - local.tee $2 + local.tee $6 i64.clz - local.set $3 + local.set $2 + i64.const -3958705157555305932 + local.get $6 local.get $2 - local.get $3 i64.shl - local.get $4 + local.get $3 local.get $1 i64.const 2 i64.shl i64.xor - local.tee $5 + local.tee $1 i64.const 64 - local.get $3 + local.get $2 i64.sub i64.shr_u i64.or - local.tee $1 - i64.const 4294967295 - i64.and - local.set $2 - local.get $1 - i64.const 32 - i64.shr_u - local.tee $9 - i64.const 560513588 - i64.mul - local.get $2 - i64.const 3373259426 - i64.mul - local.get $2 - i64.const 560513588 - i64.mul - local.tee $10 - i64.const 32 - i64.shr_u - i64.add - local.tee $11 - i64.const 4294967295 - i64.and - i64.add - local.set $2 - local.get $9 - i64.const 3373259426 - i64.mul - local.get $11 - i64.const 32 - i64.shr_u - i64.add - local.get $2 - i64.const 32 - i64.shr_u - i64.add - global.set $~lib/math/res128_hi - local.get $10 - i64.const 4294967295 - i64.and - local.get $2 - i64.const 32 - i64.shl - i64.add - local.tee $2 + local.tee $6 + call $~lib/math/umuldi + local.tee $8 f64.const 3.753184150245214e-04 - local.get $1 + local.get $6 f64.convert_i64_u f64.mul f64.const 3.834951969714103e-04 - local.get $5 - local.get $3 + local.get $1 + local.get $2 i64.shl f64.convert_i64_u f64.mul @@ -3520,7 +3528,7 @@ i64.lt_u i64.extend_i32_u global.get $~lib/math/res128_hi - local.tee $5 + local.tee $6 i64.const 11 i64.shr_u i64.add @@ -3528,10 +3536,10 @@ global.set $~lib/math/rempio2_y0 f64.const 5.421010862427522e-20 local.get $1 - local.get $5 + local.get $6 i64.const 53 i64.shl - local.get $2 + local.get $8 i64.const 11 i64.shr_u i64.or @@ -3541,156 +3549,99 @@ global.set $~lib/math/rempio2_y1 global.get $~lib/math/rempio2_y0 i64.const 4372995238176751616 - local.get $3 + local.get $2 i64.const 52 i64.shl i64.sub local.get $0 - local.get $6 + local.get $4 i64.xor i64.const -9223372036854775808 i64.and i64.or f64.reinterpret_i64 - local.tee $12 + local.tee $9 f64.mul global.set $~lib/math/rempio2_y0 global.get $~lib/math/rempio2_y1 - local.get $12 + local.get $9 f64.mul global.set $~lib/math/rempio2_y1 - local.get $8 + local.get $5 i64.const 62 i64.shr_s - local.get $4 + local.get $3 i64.sub i32.wrap_i64 ) - (func $~lib/math/NativeMath.cos (param $0 f64) (result f64) - (local $1 f64) - (local $2 i64) + (func $~lib/math/rempio2 (param $0 f64) (param $1 i64) (param $2 i32) (result i32) (local $3 f64) (local $4 f64) - (local $5 i32) + (local $5 f64) (local $6 i32) - (local $7 f64) - local.get $0 - i64.reinterpret_f64 - local.tee $2 + local.get $1 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $5 - i32.const 31 - i32.shr_u - local.set $6 - local.get $5 i32.const 2147483647 i32.and - local.tee $5 - i32.const 1072243195 - i32.le_u + local.tee $6 + i32.const 1094263291 + i32.lt_u if - local.get $5 - i32.const 1044816030 - i32.lt_u - if - f64.const 1 - return - end - f64.const 1 - f64.const 0.5 + local.get $6 + i32.const 20 + i32.shr_u + local.tee $2 local.get $0 local.get $0 + f64.const 0.6366197723675814 f64.mul - local.tee $3 + f64.nearest + local.tee $5 + f64.const 1.5707963267341256 f64.mul - local.tee $4 - f64.sub - local.tee $1 - f64.const 1 - local.get $1 - f64.sub - local.get $4 f64.sub - local.get $3 - local.get $3 - f64.const 0.0416666666666666 - local.get $3 - f64.const -0.001388888888887411 - local.get $3 - f64.const 2.480158728947673e-05 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - local.get $3 - local.get $3 + local.tee $0 + local.get $5 + f64.const 6.077100506506192e-11 f64.mul local.tee $4 - local.get $4 - f64.mul - f64.const -2.7557314351390663e-07 - local.get $3 - f64.const 2.087572321298175e-09 - local.get $3 - f64.const -1.1359647557788195e-11 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - f64.mul - local.get $0 - f64.const 0 - f64.mul - f64.sub - f64.add - f64.add - return - end - local.get $5 - i32.const 2146435072 - i32.ge_u - if - local.get $0 - local.get $0 f64.sub - return - end - block $~lib/math/rempio2|inlined.0 (result i32) - local.get $2 + local.tee $3 + i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - i32.const 2147483647 + i32.const 20 + i32.shr_u + i32.const 2047 i32.and - local.tee $5 - i32.const 1094263291 - i32.lt_u + i32.sub + i32.const 16 + i32.gt_u if local.get $5 - i32.const 20 - i32.shr_u - local.tee $6 + f64.const 2.0222662487959506e-21 + f64.mul local.get $0 local.get $0 - f64.const 0.6366197723675814 - f64.mul - f64.nearest - local.tee $3 - f64.const 1.5707963267341256 + local.get $5 + f64.const 6.077100506303966e-11 f64.mul + local.tee $4 f64.sub local.tee $0 - local.get $3 - f64.const 6.077100506506192e-11 - f64.mul - local.tee $4 f64.sub - local.tee $1 + local.get $4 + f64.sub + f64.sub + local.set $4 + local.get $2 + local.get $0 + local.get $4 + f64.sub + local.tee $3 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -3700,16 +3651,16 @@ i32.const 2047 i32.and i32.sub - i32.const 16 + i32.const 49 i32.gt_u if - local.get $3 - f64.const 2.0222662487959506e-21 + local.get $5 + f64.const 8.4784276603689e-32 f64.mul local.get $0 local.get $0 - local.get $3 - f64.const 6.077100506303966e-11 + local.get $5 + f64.const 2.0222662487111665e-21 f64.mul local.tee $4 f64.sub @@ -3719,174 +3670,162 @@ f64.sub f64.sub local.set $4 - local.get $6 local.get $0 local.get $4 f64.sub - local.tee $1 - i64.reinterpret_f64 - i64.const 32 - i64.shr_u - i32.wrap_i64 - i32.const 20 - i32.shr_u - i32.const 2047 - i32.and - i32.sub - i32.const 49 - i32.gt_u - if - local.get $3 - f64.const 8.4784276603689e-32 - f64.mul - local.get $0 - local.get $0 - local.get $3 - f64.const 2.0222662487111665e-21 - f64.mul - local.tee $4 - f64.sub - local.tee $0 - f64.sub - local.get $4 - f64.sub - f64.sub - local.set $4 - local.get $0 - local.get $4 - f64.sub - local.set $1 - end + local.set $3 end - local.get $1 - global.set $~lib/math/rempio2_y0 - local.get $0 - local.get $1 - f64.sub - local.get $4 - f64.sub - global.set $~lib/math/rempio2_y1 - local.get $3 - i32.trunc_f64_s - br $~lib/math/rempio2|inlined.0 end - i32.const 0 - local.get $2 - call $~lib/math/pio2_large_quot - local.tee $5 - i32.sub - local.get $5 - local.get $6 - select - end - local.set $6 - global.get $~lib/math/rempio2_y0 - local.set $3 - global.get $~lib/math/rempio2_y1 - local.set $4 - local.get $6 - i32.const 1 - i32.and - if (result f64) local.get $3 - local.get $3 - f64.mul - local.tee $0 - local.get $3 - f64.mul - local.set $1 - local.get $3 - local.get $0 - f64.const 0.5 - local.get $4 - f64.mul - local.get $1 - f64.const 0.00833333333332249 - local.get $0 - f64.const -1.984126982985795e-04 - local.get $0 - f64.const 2.7557313707070068e-06 - f64.mul - f64.add - f64.mul - f64.add - local.get $0 - local.get $0 + global.set $~lib/math/rempio2_y0 local.get $0 - f64.mul - f64.mul - f64.const -2.5050760253406863e-08 - local.get $0 - f64.const 1.58969099521155e-10 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.sub - f64.mul - local.get $4 - f64.sub - local.get $1 - f64.const -0.16666666666666632 - f64.mul - f64.sub - f64.sub - else - f64.const 1 - f64.const 0.5 - local.get $3 local.get $3 - f64.mul - local.tee $0 - f64.mul - local.tee $1 - f64.sub - local.tee $7 - f64.const 1 - local.get $7 f64.sub - local.get $1 + local.get $4 f64.sub + global.set $~lib/math/rempio2_y1 + local.get $5 + i32.trunc_f64_s + return + end + i32.const 0 + local.get $1 + call $~lib/math/pio2_large_quot + local.tee $6 + i32.sub + local.get $6 + local.get $2 + select + ) + (func $~lib/math/sin_kern (param $0 f64) (param $1 f64) (param $2 i32) (result f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + f64.const 0.00833333333332249 + local.get $0 + local.get $0 + f64.mul + local.tee $3 + f64.const -1.984126982985795e-04 + local.get $3 + f64.const 2.7557313707070068e-06 + f64.mul + f64.add + f64.mul + f64.add + local.get $3 + local.get $3 + local.get $3 + f64.mul + f64.mul + f64.const -2.5050760253406863e-08 + local.get $3 + f64.const 1.58969099521155e-10 + f64.mul + f64.add + f64.mul + f64.add + local.set $4 + local.get $0 + local.get $3 + local.get $0 + f64.mul + local.tee $5 + f64.const -0.16666666666666632 + local.get $3 + local.get $4 + f64.mul + f64.add + f64.mul + f64.add + local.get $0 + local.get $3 + f64.const 0.5 + local.get $1 + f64.mul + local.get $5 + local.get $4 + f64.mul + f64.sub + f64.mul + local.get $1 + f64.sub + local.get $5 + f64.const -0.16666666666666632 + f64.mul + f64.sub + f64.sub + local.get $2 + i32.eqz + select + ) + (func $~lib/math/NativeMath.cos (param $0 f64) (result f64) + (local $1 i32) + (local $2 f64) + (local $3 i64) + (local $4 i32) + local.get $0 + i64.reinterpret_f64 + local.tee $3 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $1 + i32.const 31 + i32.shr_u + local.set $4 + local.get $1 + i32.const 2147483647 + i32.and + local.tee $1 + i32.const 1072243195 + i32.le_u + if + local.get $1 + i32.const 1044816030 + i32.lt_u + if + f64.const 1 + return + end + local.get $0 + f64.const 0 + call $~lib/math/cos_kern + return + end + local.get $1 + i32.const 2146435072 + i32.ge_u + if local.get $0 local.get $0 - f64.const 0.0416666666666666 - local.get $0 - f64.const -0.001388888888887411 - local.get $0 - f64.const 2.480158728947673e-05 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - local.get $0 - local.get $0 - f64.mul - local.tee $1 - local.get $1 - f64.mul - f64.const -2.7557314351390663e-07 - local.get $0 - f64.const 2.087572321298175e-09 - local.get $0 - f64.const -1.1359647557788195e-11 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - f64.mul - local.get $3 - local.get $4 - f64.mul f64.sub - f64.add - f64.add + return end + local.get $0 + local.get $3 + local.get $4 + call $~lib/math/rempio2 + local.set $1 + global.get $~lib/math/rempio2_y0 local.set $0 - local.get $6 + global.get $~lib/math/rempio2_y1 + local.set $2 + local.get $1 + i32.const 1 + i32.and + if (result f64) + local.get $0 + local.get $2 + i32.const 1 + call $~lib/math/sin_kern + else + local.get $0 + local.get $2 + call $~lib/math/cos_kern + end + local.set $0 + local.get $1 i32.const 1 i32.add i32.const 2 @@ -3914,278 +3853,264 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.cos (param $0 f32) (result f32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 f64) - (local $5 i64) + (func $~lib/math/cos_kernf (param $0 f64) (result f32) + (local $1 f64) + local.get $0 + local.get $0 + f64.mul + local.tee $0 + local.get $0 + f64.mul + local.set $1 + f64.const 1 + local.get $0 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $1 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $1 + local.get $0 + f64.mul + f64.const -0.001388676377460993 + local.get $0 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + ) + (func $~lib/math/pio2f_large_quot (param $0 f32) (param $1 i32) (result i32) + (local $2 i64) + (local $3 i64) + (local $4 i32) + (local $5 i32) (local $6 i64) (local $7 i64) (local $8 i64) - (local $9 i32) - (local $10 i32) - (local $11 i64) + local.get $1 + i32.const 23 + i32.shr_s + i32.const 152 + i32.sub + local.tee $5 + i32.const 6 + i32.shr_s + i32.const 3 + i32.shl + i32.const 1256 + i32.add + local.tee $4 + i64.load + local.set $6 + local.get $4 + i64.load offset=8 + local.set $3 + local.get $5 + i32.const 63 + i32.and + i64.extend_i32_s + local.tee $2 + i64.const 32 + i64.gt_u + if (result i64) + local.get $3 + local.get $2 + i64.const 32 + i64.sub + i64.shl + local.get $4 + i64.load offset=16 + i64.const 96 + local.get $2 + i64.sub + i64.shr_u + i64.or + else + local.get $3 + i64.const 32 + local.get $2 + i64.sub + i64.shr_u + end + local.set $7 + f64.const 8.515303950216386e-20 local.get $0 - i32.reinterpret_f32 - local.tee $1 - i32.const 31 - i32.shr_u - local.set $10 + f64.promote_f32 + f64.copysign local.get $1 - i32.const 2147483647 + i32.const 8388607 i32.and + i32.const 8388608 + i32.or + i64.extend_i32_s + local.tee $8 + local.get $6 + local.get $2 + i64.shl + local.get $3 + i64.const 64 + local.get $2 + i64.sub + i64.shr_u + i64.or + i64.mul + local.get $7 + local.get $8 + i64.mul + i64.const 32 + i64.shr_u + i64.add local.tee $2 - i32.const 1061752794 - i32.le_u + i64.const 2 + i64.shl + local.tee $3 + f64.convert_i64_s + f64.mul + global.set $~lib/math/rempio2f_y + local.get $2 + i64.const 62 + i64.shr_u + local.get $3 + i64.const 63 + i64.shr_u + i64.add + i32.wrap_i64 + ) + (func $~lib/math/rempio2f (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + local.get $1 + i32.const 1305022427 + i32.lt_u if - local.get $2 - i32.const 964689920 - i32.lt_u - if - f32.const 1 - return - end local.get $0 f64.promote_f32 - local.tee $3 - local.get $3 - f64.mul - local.tee $4 - local.get $4 + local.get $0 + f64.promote_f32 + f64.const 0.6366197723675814 f64.mul - local.set $3 - f64.const 1 - local.get $4 - f64.const -0.499999997251031 + f64.nearest + local.tee $3 + f64.const 1.5707963109016418 f64.mul - f64.add + f64.sub local.get $3 - f64.const 0.04166662332373906 + f64.const 1.5893254773528196e-08 f64.mul - f64.add + f64.sub + global.set $~lib/math/rempio2f_y local.get $3 - local.get $4 - f64.mul - f64.const -0.001388676377460993 - local.get $4 - f64.const 2.439044879627741e-05 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 + i32.trunc_f64_s return end + i32.const 0 + local.get $0 + local.get $1 + call $~lib/math/pio2f_large_quot + local.tee $1 + i32.sub + local.get $1 local.get $2 - i32.const 2139095040 - i32.ge_u - if - local.get $0 + select + ) + (func $~lib/math/sin_kernf (param $0 f64) (result f32) + (local $1 f64) + local.get $0 + local.get $0 + local.get $0 + f64.mul + local.tee $1 + local.get $0 + f64.mul + local.tee $0 + f64.const -0.16666666641626524 + local.get $1 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $0 + local.get $1 + local.get $1 + f64.mul + f64.mul + f64.const -1.9839334836096632e-04 + local.get $1 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + f64.mul + f64.add + f32.demote_f64 + ) + (func $std/math/test_cosf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (local $3 i32) + (local $4 f64) + (local $5 i32) + block $__inlined_func$~lib/math/NativeMathf.cos (result f32) local.get $0 - f32.sub - return - end - block $~lib/math/rempio2f|inlined.0 (result i32) - local.get $2 - i32.const 1305022427 - i32.lt_u + i32.reinterpret_f32 + local.tee $3 + i32.const 31 + i32.shr_u + local.set $5 + local.get $3 + i32.const 2147483647 + i32.and + local.tee $3 + i32.const 1061752794 + i32.le_u if + f32.const 1 + local.get $3 + i32.const 964689920 + i32.lt_u + br_if $__inlined_func$~lib/math/NativeMathf.cos + drop local.get $0 f64.promote_f32 - local.get $0 - f64.promote_f32 - f64.const 0.6366197723675814 - f64.mul - f64.nearest - local.tee $3 - f64.const 1.5707963109016418 - f64.mul - f64.sub - local.get $3 - f64.const 1.5893254773528196e-08 - f64.mul - f64.sub - global.set $~lib/math/rempio2f_y - local.get $3 - i32.trunc_f64_s - br $~lib/math/rempio2f|inlined.0 - end - local.get $2 - i32.const 23 - i32.shr_s - i32.const 152 - i32.sub - local.tee $1 - i32.const 6 - i32.shr_s - i32.const 3 - i32.shl - i32.const 1256 - i32.add - local.tee $9 - i64.load - local.set $6 - local.get $9 - i64.load offset=8 - local.set $7 - local.get $1 - i32.const 63 - i32.and - i64.extend_i32_s - local.tee $5 - i64.const 32 - i64.gt_u - if (result i64) - local.get $7 - local.get $5 - i64.const 32 - i64.sub - i64.shl - local.get $9 - i64.load offset=16 - i64.const 96 - local.get $5 - i64.sub - i64.shr_u - i64.or - else - local.get $7 - i64.const 32 - local.get $5 - i64.sub - i64.shr_u + call $~lib/math/cos_kernf + br $__inlined_func$~lib/math/NativeMathf.cos end - local.set $11 - f64.const 8.515303950216386e-20 local.get $0 - f64.promote_f32 - f64.copysign - local.get $2 - i32.const 8388607 - i32.and - i32.const 8388608 - i32.or - i64.extend_i32_s - local.tee $8 - local.get $6 - local.get $5 - i64.shl - local.get $7 - i64.const 64 - local.get $5 - i64.sub - i64.shr_u - i64.or - i64.mul - local.get $8 - local.get $11 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $6 - i64.const 2 - i64.shl - local.tee $8 - f64.convert_i64_s - f64.mul - global.set $~lib/math/rempio2f_y - i32.const 0 - local.get $6 - i64.const 62 - i64.shr_u - local.get $8 - i64.const 63 - i64.shr_u - i64.add - i32.wrap_i64 - local.tee $1 - i32.sub - local.get $1 - local.get $10 - select - end - local.set $1 - global.get $~lib/math/rempio2f_y - local.set $3 - local.get $1 - i32.const 1 - i32.and - if (result f32) - local.get $3 - local.get $3 - local.get $3 - f64.mul - local.tee $4 - local.get $3 - f64.mul - local.tee $3 - f64.const -0.16666666641626524 - local.get $4 - f64.const 0.008333329385889463 - f64.mul - f64.add - f64.mul - f64.add - local.get $3 - local.get $4 - local.get $4 - f64.mul - f64.mul - f64.const -1.9839334836096632e-04 - local.get $4 - f64.const 2.718311493989822e-06 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 - else + local.get $0 + f32.sub local.get $3 + i32.const 2139095040 + i32.ge_u + br_if $__inlined_func$~lib/math/NativeMathf.cos + drop + local.get $0 local.get $3 - f64.mul - local.tee $4 - local.get $4 - f64.mul + local.get $5 + call $~lib/math/rempio2f local.set $3 - f64.const 1 - local.get $4 - f64.const -0.499999997251031 - f64.mul - f64.add - local.get $3 - f64.const 0.04166662332373906 - f64.mul - f64.add + global.get $~lib/math/rempio2f_y + local.set $4 local.get $3 - local.get $4 - f64.mul - f64.const -0.001388676377460993 - local.get $4 - f64.const 2.439044879627741e-05 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 - end - local.set $0 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - i32.and - if - local.get $0 + i32.const 1 + i32.and + if (result f32) + local.get $4 + call $~lib/math/sin_kernf + else + local.get $4 + call $~lib/math/cos_kernf + end + local.tee $0 f32.neg - local.set $0 + local.get $0 + local.get $3 + i32.const 1 + i32.add + i32.const 2 + i32.and + select end - local.get $0 - ) - (func $std/math/test_cosf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.cos local.get $1 local.get $2 call $std/math/check @@ -4611,6 +4536,16 @@ end local.get $0 ) + (func $~lib/math/expo2 (param $0 f64) (result f64) + local.get $0 + f64.const 1416.0996898839683 + f64.sub + call $~lib/math/NativeMath.exp + f64.const 2247116418577894884661631e283 + f64.mul + f64.const 2247116418577894884661631e283 + f64.mul + ) (func $std/math/test_cosh (param $0 f64) (param $1 f64) (param $2 f64) (result i32) (local $3 f64) (local $4 i32) @@ -4668,13 +4603,7 @@ br $__inlined_func$~lib/math/NativeMath.cosh end local.get $3 - f64.const 1416.0996898839683 - f64.sub - call $~lib/math/NativeMath.exp - f64.const 2247116418577894884661631e283 - f64.mul - f64.const 2247116418577894884661631e283 - f64.mul + call $~lib/math/expo2 end local.get $1 local.get $2 @@ -5070,6 +4999,16 @@ end local.get $0 ) + (func $~lib/math/expo2f (param $0 f32) (result f32) + local.get $0 + f32.const 162.88958740234375 + f32.sub + call $~lib/math/NativeMathf.exp + f32.const 1661534994731144841129758e11 + f32.mul + f32.const 1661534994731144841129758e11 + f32.mul + ) (func $std/math/test_coshf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) (local $3 i32) block $__inlined_func$~lib/math/NativeMathf.cosh (result f32) @@ -5121,13 +5060,7 @@ br $__inlined_func$~lib/math/NativeMathf.cosh end local.get $0 - f32.const 162.88958740234375 - f32.sub - call $~lib/math/NativeMathf.exp - f32.const 1661534994731144841129758e11 - f32.mul - f32.const 1661534994731144841129758e11 - f32.mul + call $~lib/math/expo2f end local.get $1 local.get $2 @@ -5179,7 +5112,7 @@ local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.exp2 (param $0 f64) (result f64) + (func $~lib/util/math/exp2_lut (param $0 f64) (result f64) (local $1 f64) (local $2 i64) (local $3 i32) @@ -5187,209 +5120,207 @@ (local $5 i64) (local $6 i32) (local $7 f64) - block $~lib/util/math/exp2_lut|inlined.0 - local.get $0 - i64.reinterpret_f64 - local.tee $2 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - i32.wrap_i64 - local.tee $3 + local.get $0 + i64.reinterpret_f64 + local.tee $2 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + i32.wrap_i64 + local.tee $3 + i32.const 969 + i32.sub + i32.const 63 + i32.ge_u + if + local.get $3 i32.const 969 i32.sub - i32.const 63 + i32.const -2147483648 + i32.ge_u + if + f64.const 1 + return + end + local.get $3 + i32.const 1033 i32.ge_u if + local.get $2 + i64.const -4503599627370496 + i64.eq + if + f64.const 0 + return + end local.get $3 - i32.const 969 - i32.sub - i32.const -2147483648 + i32.const 2047 i32.ge_u if f64.const 1 - local.set $1 - br $~lib/util/math/exp2_lut|inlined.0 + local.get $0 + f64.add + return end - local.get $3 - i32.const 1033 - i32.ge_u + local.get $2 + i64.const 63 + i64.shr_u + i64.eqz if + f64.const inf + return + else local.get $2 - i64.const -4503599627370496 - i64.eq - br_if $~lib/util/math/exp2_lut|inlined.0 - local.get $3 - i32.const 2047 - i32.ge_u - if - f64.const 1 - local.get $0 - f64.add - local.set $1 - br $~lib/util/math/exp2_lut|inlined.0 - end - local.get $2 - i64.const 63 - i64.shr_u - i64.eqz + i64.const -4570929321408987136 + i64.ge_u if - f64.const inf - local.set $1 - br $~lib/util/math/exp2_lut|inlined.0 - else - local.get $2 - i64.const -4570929321408987136 - i64.ge_u - br_if $~lib/util/math/exp2_lut|inlined.0 + f64.const 0 + return end end - i32.const 0 - local.get $3 - local.get $2 - i64.const 1 - i64.shl - i64.const -9143996093422370816 - i64.gt_u - select - local.set $3 end - local.get $0 - f64.const 52776558133248 - f64.add - local.tee $1 - i64.reinterpret_f64 - local.tee $5 - i64.const 127 - i64.and + i32.const 0 + local.get $3 + local.get $2 i64.const 1 i64.shl - i32.wrap_i64 - i32.const 3 - i32.shl - i32.const 1288 - i32.add - local.tee $6 - i64.load offset=8 - local.get $5 - i64.const 45 - i64.shl - i64.add - local.set $2 - local.get $0 - local.get $1 - f64.const 52776558133248 - f64.sub - f64.sub - local.tee $0 - local.get $0 - f64.mul - local.set $1 - local.get $6 - i64.load - f64.reinterpret_i64 - local.get $0 - f64.const 0.6931471805599453 - f64.mul - f64.add - local.get $1 - f64.const 0.24022650695909065 - local.get $0 - f64.const 0.0555041086686087 - f64.mul - f64.add - f64.mul - f64.add - local.get $1 - local.get $1 - f64.mul - f64.const 0.009618131975721055 - local.get $0 - f64.const 1.3332074570119598e-03 - f64.mul - f64.add - f64.mul - f64.add - local.set $0 - local.get $3 - i32.eqz - if - block $~lib/util/math/specialcase2|inlined.0 (result f64) - local.get $5 - i64.const 2147483648 - i64.and - i64.eqz - if - f64.const 2 - local.get $2 - i64.const 4503599627370496 - i64.sub - f64.reinterpret_i64 - local.tee $1 - local.get $0 - f64.mul - local.get $1 - f64.add - f64.mul - br $~lib/util/math/specialcase2|inlined.0 - end + i64.const -9143996093422370816 + i64.gt_u + select + local.set $3 + end + local.get $0 + f64.const 52776558133248 + f64.add + local.tee $1 + i64.reinterpret_f64 + local.tee $5 + i64.const 127 + i64.and + i64.const 1 + i64.shl + i32.wrap_i64 + i32.const 3 + i32.shl + i32.const 1288 + i32.add + local.tee $6 + i64.load offset=8 + local.get $5 + i64.const 45 + i64.shl + i64.add + local.set $2 + local.get $0 + local.get $1 + f64.const 52776558133248 + f64.sub + f64.sub + local.tee $0 + local.get $0 + f64.mul + local.set $1 + local.get $6 + i64.load + f64.reinterpret_i64 + local.get $0 + f64.const 0.6931471805599453 + f64.mul + f64.add + local.get $1 + f64.const 0.24022650695909065 + local.get $0 + f64.const 0.0555041086686087 + f64.mul + f64.add + f64.mul + f64.add + local.get $1 + local.get $1 + f64.mul + f64.const 0.009618131975721055 + local.get $0 + f64.const 1.3332074570119598e-03 + f64.mul + f64.add + f64.mul + f64.add + local.set $1 + local.get $3 + i32.eqz + if + block $__inlined_func$~lib/util/math/specialcase2 (result f64) + local.get $5 + i64.const 2147483648 + i64.and + i64.eqz + if + f64.const 2 local.get $2 - i64.const 4602678819172646912 - i64.add + i64.const 4503599627370496 + i64.sub f64.reinterpret_i64 - local.tee $4 + local.tee $0 + local.get $1 + f64.mul local.get $0 + f64.add f64.mul - local.get $4 + br $__inlined_func$~lib/util/math/specialcase2 + end + local.get $2 + i64.const 4602678819172646912 + i64.add + f64.reinterpret_i64 + local.tee $4 + local.get $1 + f64.mul + local.get $4 + f64.add + local.tee $0 + f64.const 1 + f64.lt + if + f64.const 1 + local.get $0 f64.add - local.tee $1 + local.tee $7 f64.const 1 - f64.lt - if (result f64) - f64.const 1 - local.get $1 - f64.add - local.tee $7 - f64.const 1 - local.get $7 - f64.sub - local.get $1 - f64.add - local.get $4 - local.get $1 - f64.sub - local.get $4 - local.get $0 - f64.mul - f64.add - f64.add - f64.add - f64.const 1 - f64.sub - else - local.get $1 - end - f64.const 2.2250738585072014e-308 + local.get $7 + f64.sub + local.get $0 + f64.add + local.get $4 + local.get $0 + f64.sub + local.get $4 + local.get $1 f64.mul + f64.add + f64.add + f64.add + f64.const 1 + f64.sub + local.set $0 end - local.set $1 - br $~lib/util/math/exp2_lut|inlined.0 + local.get $0 + f64.const 2.2250738585072014e-308 + f64.mul end - local.get $2 - f64.reinterpret_i64 - local.tee $1 - local.get $0 - f64.mul - local.get $1 - f64.add - local.set $1 + return end + local.get $2 + f64.reinterpret_i64 + local.tee $0 local.get $1 + f64.mul + local.get $0 + f64.add ) (func $std/math/test_exp2 (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 - call $~lib/math/NativeMath.exp2 + call $~lib/util/math/exp2_lut local.get $1 local.get $2 call $std/math/check @@ -5404,105 +5335,104 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.exp2 (param $0 f32) (result f32) + (func $~lib/util/math/exp2f_lut (param $0 f32) (result f32) (local $1 f64) - (local $2 f32) + (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i64) + (local $4 f64) + (local $5 i64) local.get $0 f64.promote_f32 local.set $1 - block $~lib/util/math/exp2f_lut|inlined.0 - local.get $0 - i32.reinterpret_f32 - local.tee $3 - i32.const 20 - i32.shr_u - i32.const 2047 - i32.and - local.tee $4 - i32.const 1072 + local.get $0 + i32.reinterpret_f32 + local.tee $2 + i32.const 20 + i32.shr_u + i32.const 2047 + i32.and + local.tee $3 + i32.const 1072 + i32.ge_u + if + local.get $2 + i32.const -8388608 + i32.eq + if + f32.const 0 + return + end + local.get $3 + i32.const 2040 i32.ge_u if - local.get $3 - i32.const -8388608 - i32.eq - br_if $~lib/util/math/exp2f_lut|inlined.0 - local.get $4 - i32.const 2040 - i32.ge_u - if - local.get $0 - local.get $0 - f32.add - local.set $2 - br $~lib/util/math/exp2f_lut|inlined.0 - end local.get $0 - f32.const 0 - f32.gt - if - local.get $0 - f32.const 1701411834604692317316873e14 - f32.mul - local.set $2 - br $~lib/util/math/exp2f_lut|inlined.0 - end local.get $0 - f32.const -150 - f32.le - br_if $~lib/util/math/exp2f_lut|inlined.0 + f32.add + return + end + local.get $0 + f32.const 0 + f32.gt + if + local.get $0 + f32.const 1701411834604692317316873e14 + f32.mul + return + end + local.get $0 + f32.const -150 + f32.le + if + f32.const 0 + return end - f64.const 0.6931471806916203 - local.get $1 - local.get $1 - f64.const 211106232532992 - f64.add - local.tee $5 - f64.const 211106232532992 - f64.sub - f64.sub - local.tee $1 - f64.mul - f64.const 1 - f64.add - f64.const 0.05550361559341535 - local.get $1 - f64.mul - f64.const 0.2402284522445722 - f64.add - local.get $1 - local.get $1 - f64.mul - f64.mul - f64.add - local.get $5 - i64.reinterpret_f64 - local.tee $6 - i32.wrap_i64 - i32.const 31 - i32.and - i32.const 3 - i32.shl - i32.const 3336 - i32.add - i64.load - local.get $6 - i64.const 47 - i64.shl - i64.add - f64.reinterpret_i64 - f64.mul - f32.demote_f64 - local.set $2 end - local.get $2 + f64.const 0.6931471806916203 + local.get $1 + local.get $1 + f64.const 211106232532992 + f64.add + local.tee $4 + f64.const 211106232532992 + f64.sub + f64.sub + local.tee $1 + f64.mul + f64.const 1 + f64.add + f64.const 0.05550361559341535 + local.get $1 + f64.mul + f64.const 0.2402284522445722 + f64.add + local.get $1 + local.get $1 + f64.mul + f64.mul + f64.add + local.get $4 + i64.reinterpret_f64 + local.tee $5 + i32.wrap_i64 + i32.const 31 + i32.and + i32.const 3 + i32.shl + i32.const 3336 + i32.add + i64.load + local.get $5 + i64.const 47 + i64.shl + i64.add + f64.reinterpret_i64 + f64.mul + f32.demote_f64 ) (func $std/math/test_exp2f (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 - call $~lib/math/NativeMathf.exp2 + call $~lib/util/math/exp2f_lut local.get $1 local.get $2 call $std/math/check @@ -8060,13 +7990,13 @@ (local $2 f64) (local $3 f64) (local $4 i32) - (local $5 f64) + (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i64) - (local $9 f32) - (local $10 i32) - (local $11 i64) + (local $7 i64) + (local $8 f32) + (local $9 i32) + (local $10 i64) + (local $11 f64) local.get $1 f32.abs f32.const 2 @@ -8142,7 +8072,7 @@ local.tee $4 i32.const 2147483647 i32.and - local.set $7 + local.set $6 local.get $4 i32.const 31 i32.shr_u @@ -8161,28 +8091,28 @@ local.get $1 f32.const 0.5 f32.mul - local.tee $9 + local.tee $8 f32.nearest - local.get $9 + local.get $8 f32.ne i32.const 31 i32.shl - local.set $10 + local.set $9 local.get $0 f32.neg local.set $0 end local.get $1 i32.reinterpret_f32 - local.set $6 - local.get $7 + local.set $5 + local.get $6 i32.const 1065353216 i32.eq if (result i32) i32.const 2143289344 i32.const 1065353216 local.get $4 - local.get $6 + local.get $5 i32.const 2147483647 i32.and i32.const 2139095040 @@ -8190,15 +8120,15 @@ i32.or select else - local.get $7 + local.get $6 if (result i32) - local.get $7 + local.get $6 i32.const 2139095040 i32.eq if (result i32) i32.const 0 i32.const 2139095040 - local.get $6 + local.get $5 i32.const 31 i32.shr_u select @@ -8207,33 +8137,34 @@ if (result i32) i32.const 2143289344 else - local.get $0 - f64.promote_f32 - i64.reinterpret_f64 - local.tee $11 - i64.const 4604544271217802189 - i64.sub - i64.const 52 - i64.shr_s - local.set $8 - local.get $11 - local.get $8 - i64.const 52 - i64.shl - i64.sub - f64.reinterpret_i64 - local.tee $2 - f64.const 1 - f64.sub - local.get $2 - f64.const 1 - f64.add - f64.div - local.tee $3 - local.get $3 - f64.mul - local.set $2 - block $~lib/math/exp2f|inlined.0 + block $__inlined_func$~lib/math/exp2f (result f64) + local.get $0 + f64.promote_f32 + i64.reinterpret_f64 + local.tee $10 + i64.const 4604544271217802189 + i64.sub + i64.const 52 + i64.shr_s + local.set $7 + local.get $10 + local.get $7 + i64.const 52 + i64.shl + i64.sub + f64.reinterpret_i64 + local.tee $2 + f64.const 1 + f64.sub + local.get $2 + f64.const 1 + f64.add + f64.div + local.tee $3 + local.get $3 + f64.mul + local.set $2 + f64.const 0 local.get $1 f64.promote_f32 f64.const 2.8853900817779268 @@ -8259,26 +8190,25 @@ f64.mul f64.add f64.mul - local.get $8 + local.get $7 f64.convert_i64_s f64.add f64.mul local.tee $2 f64.const -1022 f64.lt - br_if $~lib/math/exp2f|inlined.0 + br_if $__inlined_func$~lib/math/exp2f + drop + f64.const inf local.get $2 f64.const 1024 f64.ge - if - f64.const inf - local.set $5 - br $~lib/math/exp2f|inlined.0 - end + br_if $__inlined_func$~lib/math/exp2f + drop local.get $2 local.get $2 f64.nearest - local.tee $5 + local.tee $11 f64.sub local.tee $2 local.get $2 @@ -8312,15 +8242,13 @@ f64.mul f64.add i64.reinterpret_f64 - local.get $5 + local.get $11 i64.trunc_f64_s i64.const 52 i64.shl i64.add f64.reinterpret_i64 - local.set $5 end - local.get $5 f32.demote_f64 i32.reinterpret_f32 end @@ -8328,13 +8256,13 @@ else i32.const 2139095040 i32.const 0 - local.get $6 + local.get $5 i32.const 31 i32.shr_u select end end - local.get $10 + local.get $9 i32.or f32.reinterpret_i32 ) @@ -8438,7 +8366,7 @@ if i32.const 0 i32.const 3616 - i32.const 1404 + i32.const 1381 i32.const 5 call $~lib/builtins/abort unreachable @@ -9012,31 +8940,28 @@ call $std/math/check ) (func $~lib/math/NativeMath.sin (param $0 f64) (result f64) - (local $1 f64) - (local $2 i64) - (local $3 f64) - (local $4 f64) - (local $5 i32) - (local $6 i32) - (local $7 f64) + (local $1 i32) + (local $2 f64) + (local $3 i64) + (local $4 i32) local.get $0 i64.reinterpret_f64 - local.tee $2 + local.tee $3 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $5 + local.tee $1 i32.const 31 i32.shr_u - local.set $6 - local.get $5 + local.set $4 + local.get $1 i32.const 2147483647 i32.and - local.tee $5 + local.tee $1 i32.const 1072243195 i32.le_u if - local.get $5 + local.get $1 i32.const 1045430272 i32.lt_u if @@ -9044,42 +8969,12 @@ return end local.get $0 - local.get $0 - local.get $0 - f64.mul - local.tee $3 - local.get $0 - f64.mul - f64.const -0.16666666666666632 - local.get $3 - f64.const 0.00833333333332249 - local.get $3 - f64.const -1.984126982985795e-04 - local.get $3 - f64.const 2.7557313707070068e-06 - f64.mul - f64.add - f64.mul - f64.add - local.get $3 - local.get $3 - local.get $3 - f64.mul - f64.mul - f64.const -2.5050760253406863e-08 - local.get $3 - f64.const 1.58969099521155e-10 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add + f64.const 0 + i32.const 0 + call $~lib/math/sin_kern return end - local.get $5 + local.get $1 i32.const 2146435072 i32.ge_u if @@ -9088,233 +8983,30 @@ f64.sub return end - block $~lib/math/rempio2|inlined.1 (result i32) - local.get $2 - i64.const 32 - i64.shr_u - i32.wrap_i64 - i32.const 2147483647 - i32.and - local.tee $5 - i32.const 1094263291 - i32.lt_u - if - local.get $5 - i32.const 20 - i32.shr_u - local.tee $6 - local.get $0 - local.get $0 - f64.const 0.6366197723675814 - f64.mul - f64.nearest - local.tee $3 - f64.const 1.5707963267341256 - f64.mul - f64.sub - local.tee $0 - local.get $3 - f64.const 6.077100506506192e-11 - f64.mul - local.tee $4 - f64.sub - local.tee $1 - i64.reinterpret_f64 - i64.const 32 - i64.shr_u - i32.wrap_i64 - i32.const 20 - i32.shr_u - i32.const 2047 - i32.and - i32.sub - i32.const 16 - i32.gt_u - if - local.get $3 - f64.const 2.0222662487959506e-21 - f64.mul - local.get $0 - local.get $0 - local.get $3 - f64.const 6.077100506303966e-11 - f64.mul - local.tee $4 - f64.sub - local.tee $0 - f64.sub - local.get $4 - f64.sub - f64.sub - local.set $4 - local.get $6 - local.get $0 - local.get $4 - f64.sub - local.tee $1 - i64.reinterpret_f64 - i64.const 32 - i64.shr_u - i32.wrap_i64 - i32.const 20 - i32.shr_u - i32.const 2047 - i32.and - i32.sub - i32.const 49 - i32.gt_u - if - local.get $3 - f64.const 8.4784276603689e-32 - f64.mul - local.get $0 - local.get $0 - local.get $3 - f64.const 2.0222662487111665e-21 - f64.mul - local.tee $4 - f64.sub - local.tee $0 - f64.sub - local.get $4 - f64.sub - f64.sub - local.set $4 - local.get $0 - local.get $4 - f64.sub - local.set $1 - end - end - local.get $1 - global.set $~lib/math/rempio2_y0 - local.get $0 - local.get $1 - f64.sub - local.get $4 - f64.sub - global.set $~lib/math/rempio2_y1 - local.get $3 - i32.trunc_f64_s - br $~lib/math/rempio2|inlined.1 - end - i32.const 0 - local.get $2 - call $~lib/math/pio2_large_quot - local.tee $5 - i32.sub - local.get $5 - local.get $6 - select - end - local.set $6 + local.get $0 + local.get $3 + local.get $4 + call $~lib/math/rempio2 + local.set $1 global.get $~lib/math/rempio2_y0 - local.set $3 + local.set $0 global.get $~lib/math/rempio2_y1 - local.set $4 - local.get $6 + local.set $2 + local.get $1 i32.const 1 i32.and if (result f64) - f64.const 1 - f64.const 0.5 - local.get $3 - local.get $3 - f64.mul - local.tee $0 - f64.mul - local.tee $1 - f64.sub - local.tee $7 - f64.const 1 - local.get $7 - f64.sub - local.get $1 - f64.sub - local.get $0 - local.get $0 - f64.const 0.0416666666666666 - local.get $0 - f64.const -0.001388888888887411 local.get $0 - f64.const 2.480158728947673e-05 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - local.get $0 - local.get $0 - f64.mul - local.tee $1 - local.get $1 - f64.mul - f64.const -2.7557314351390663e-07 - local.get $0 - f64.const 2.087572321298175e-09 - local.get $0 - f64.const -1.1359647557788195e-11 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - f64.mul - local.get $3 - local.get $4 - f64.mul - f64.sub - f64.add - f64.add + local.get $2 + call $~lib/math/cos_kern else - local.get $3 - local.get $3 - f64.mul - local.tee $0 - local.get $3 - f64.mul - local.set $1 - local.get $3 - local.get $0 - f64.const 0.5 - local.get $4 - f64.mul - local.get $1 - f64.const 0.00833333333332249 - local.get $0 - f64.const -1.984126982985795e-04 - local.get $0 - f64.const 2.7557313707070068e-06 - f64.mul - f64.add - f64.mul - f64.add - local.get $0 - local.get $0 local.get $0 - f64.mul - f64.mul - f64.const -2.5050760253406863e-08 - local.get $0 - f64.const 1.58969099521155e-10 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.sub - f64.mul - local.get $4 - f64.sub - local.get $1 - f64.const -0.16666666666666632 - f64.mul - f64.sub - f64.sub + local.get $2 + i32.const 1 + call $~lib/math/sin_kern end local.set $0 - local.get $6 + local.get $1 i32.const 2 i32.and if @@ -9340,363 +9032,151 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.sin (param $0 f32) (result f32) - (local $1 i32) - (local $2 i32) - (local $3 f64) + (func $std/math/test_sinf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (local $3 i32) (local $4 f64) - (local $5 i64) - (local $6 f64) - (local $7 i64) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i32) - (local $12 i64) + (local $5 i32) local.get $0 i32.reinterpret_f32 - local.tee $1 + local.tee $3 i32.const 31 i32.shr_u - local.set $11 - local.get $1 - i32.const 2147483647 - i32.and - local.tee $2 - i32.const 1061752794 - i32.le_u - if - local.get $2 - i32.const 964689920 - i32.lt_u + local.set $5 + block $__inlined_func$~lib/math/NativeMathf.sin + local.get $3 + i32.const 2147483647 + i32.and + local.tee $3 + i32.const 1061752794 + i32.le_u if + local.get $3 + i32.const 964689920 + i32.lt_u + br_if $__inlined_func$~lib/math/NativeMathf.sin local.get $0 - return + f64.promote_f32 + call $~lib/math/sin_kernf + local.set $0 + br $__inlined_func$~lib/math/NativeMathf.sin end - local.get $0 - f64.promote_f32 - local.tee $4 - local.get $4 - f64.mul - local.tee $6 - local.get $4 - f64.mul - local.set $3 - local.get $4 - local.get $3 - f64.const -0.16666666641626524 - local.get $6 - f64.const 0.008333329385889463 - f64.mul - f64.add - f64.mul - f64.add local.get $3 - local.get $6 - local.get $6 - f64.mul - f64.mul - f64.const -1.9839334836096632e-04 - local.get $6 - f64.const 2.718311493989822e-06 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 - return - end - local.get $2 - i32.const 2139095040 - i32.ge_u - if - local.get $0 - local.get $0 - f32.sub - return - end - block $~lib/math/rempio2f|inlined.1 (result i32) - local.get $2 - i32.const 1305022427 - i32.lt_u + i32.const 2139095040 + i32.ge_u if local.get $0 - f64.promote_f32 local.get $0 - f64.promote_f32 - f64.const 0.6366197723675814 - f64.mul - f64.nearest - local.tee $3 - f64.const 1.5707963109016418 - f64.mul - f64.sub - local.get $3 - f64.const 1.5893254773528196e-08 - f64.mul - f64.sub - global.set $~lib/math/rempio2f_y - local.get $3 - i32.trunc_f64_s - br $~lib/math/rempio2f|inlined.1 + f32.sub + local.set $0 + br $__inlined_func$~lib/math/NativeMathf.sin end - local.get $2 - i32.const 23 - i32.shr_s - i32.const 152 - i32.sub - local.tee $1 - i32.const 6 - i32.shr_s - i32.const 3 - i32.shl - i32.const 1256 - i32.add - local.tee $10 - i64.load - local.set $7 - local.get $10 - i64.load offset=8 - local.set $8 - local.get $1 - i32.const 63 + local.get $0 + local.get $3 + local.get $5 + call $~lib/math/rempio2f + local.set $3 + global.get $~lib/math/rempio2f_y + local.set $4 + local.get $3 + i32.const 1 i32.and - i64.extend_i32_s - local.tee $5 - i64.const 32 - i64.gt_u - if (result i64) - local.get $8 - local.get $5 - i64.const 32 - i64.sub - i64.shl - local.get $10 - i64.load offset=16 - i64.const 96 - local.get $5 - i64.sub - i64.shr_u - i64.or + if (result f32) + local.get $4 + call $~lib/math/cos_kernf else - local.get $8 - i64.const 32 - local.get $5 - i64.sub - i64.shr_u + local.get $4 + call $~lib/math/sin_kernf end - local.set $12 - f64.const 8.515303950216386e-20 + local.tee $0 + f32.neg local.get $0 - f64.promote_f32 - f64.copysign - local.get $2 - i32.const 8388607 + local.get $3 + i32.const 2 i32.and - i32.const 8388608 - i32.or - i64.extend_i32_s - local.tee $9 - local.get $7 - local.get $5 - i64.shl - local.get $8 - i64.const 64 - local.get $5 - i64.sub - i64.shr_u - i64.or - i64.mul - local.get $9 - local.get $12 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $7 - i64.const 2 - i64.shl - local.tee $9 - f64.convert_i64_s - f64.mul - global.set $~lib/math/rempio2f_y - i32.const 0 - local.get $7 - i64.const 62 - i64.shr_u - local.get $9 - i64.const 63 - i64.shr_u - i64.add - i32.wrap_i64 - local.tee $1 - i32.sub - local.get $1 - local.get $11 select - end - local.set $1 - global.get $~lib/math/rempio2f_y - local.set $3 - local.get $1 - i32.const 1 - i32.and - if (result f32) - local.get $3 - local.get $3 - f64.mul - local.tee $4 - local.get $4 - f64.mul - local.set $3 - f64.const 1 - local.get $4 - f64.const -0.499999997251031 - f64.mul - f64.add - local.get $3 - f64.const 0.04166662332373906 - f64.mul - f64.add - local.get $3 - local.get $4 - f64.mul - f64.const -0.001388676377460993 - local.get $4 - f64.const 2.439044879627741e-05 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 - else - local.get $3 - local.get $3 - local.get $3 - f64.mul - local.tee $4 - local.get $3 - f64.mul - local.tee $3 - f64.const -0.16666666641626524 - local.get $4 - f64.const 0.008333329385889463 - f64.mul - f64.add - f64.mul - f64.add - local.get $3 - local.get $4 - local.get $4 - f64.mul - f64.mul - f64.const -1.9839334836096632e-04 - local.get $4 - f64.const 2.718311493989822e-06 - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 - end - local.set $0 - local.get $1 - i32.const 2 - i32.and - if - local.get $0 - f32.neg local.set $0 end local.get $0 - ) - (func $std/math/test_sinf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.sin local.get $1 local.get $2 call $std/math/check ) - (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 + f64.const 2 + local.get $4 + f64.mul + 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 - f64.const 2 - local.get $1 - f64.mul - 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 - f64.add + f64.const 2 + local.get $5 f64.mul - return + local.get $4 + call $~lib/math/expo2 + f64.mul + local.set $3 end - f64.const 2 - local.get $2 - f64.mul - local.get $1 - f64.const 1416.0996898839683 - f64.sub - call $~lib/math/NativeMath.exp - f64.const 2247116418577894884661631e283 - f64.mul - f64.const 2247116418577894884661631e283 - f64.mul - 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 @@ -9710,81 +9190,74 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.sinh (param $0 f32) (result f32) - (local $1 f32) - (local $2 i32) + (func $std/math/test_sinhf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) (local $3 f32) + (local $4 i32) + (local $5 f32) local.get $0 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $2 + local.tee $4 f32.reinterpret_i32 - local.set $1 + local.set $3 f32.const 0.5 local.get $0 f32.copysign - local.set $3 - local.get $2 - i32.const 1118925335 - i32.lt_u - if - local.get $1 - call $~lib/math/NativeMathf.expm1 - local.set $1 - local.get $2 - i32.const 1065353216 + local.set $5 + block $__inlined_func$~lib/math/NativeMathf.sinh + local.get $4 + i32.const 1118925335 i32.lt_u if - local.get $2 - i32.const 964689920 + local.get $3 + call $~lib/math/NativeMathf.expm1 + local.set $3 + local.get $4 + i32.const 1065353216 i32.lt_u if - local.get $0 - return + local.get $4 + i32.const 964689920 + i32.lt_u + br_if $__inlined_func$~lib/math/NativeMathf.sinh + local.get $5 + f32.const 2 + local.get $3 + f32.mul + 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 $5 + local.get $3 + local.get $3 local.get $3 - f32.const 2 - local.get $1 - f32.mul - local.get $1 - local.get $1 - f32.mul - local.get $1 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 + f32.const 2 + local.get $5 + f32.mul local.get $3 - local.get $1 - local.get $1 - local.get $1 - f32.const 1 - f32.add - f32.div - f32.add + call $~lib/math/expo2f f32.mul - return + local.set $0 end - f32.const 2 - local.get $3 - f32.mul - local.get $1 - f32.const 162.88958740234375 - f32.sub - call $~lib/math/NativeMathf.exp - f32.const 1661534994731144841129758e11 - f32.mul - f32.const 1661534994731144841129758e11 - f32.mul - f32.mul - ) - (func $std/math/test_sinhf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 - call $~lib/math/NativeMathf.sinh local.get $1 local.get $2 call $std/math/check @@ -9992,30 +9465,27 @@ f64.add ) (func $~lib/math/NativeMath.tan (param $0 f64) (result f64) - (local $1 f64) + (local $1 i32) (local $2 i64) - (local $3 f64) - (local $4 i32) - (local $5 f64) - (local $6 i32) + (local $3 i32) local.get $0 i64.reinterpret_f64 local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $4 + local.tee $1 i32.const 31 i32.shr_u - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.const 2147483647 i32.and - local.tee $4 + local.tee $1 i32.const 1072243195 i32.le_s if - local.get $4 + local.get $1 i32.const 1044381696 i32.lt_s if @@ -10028,7 +9498,7 @@ call $~lib/math/tan_kern return end - local.get $4 + local.get $1 i32.const 2146435072 i32.ge_s if @@ -10037,130 +9507,15 @@ f64.sub return end - block $~lib/math/rempio2|inlined.2 (result i32) - local.get $2 - i64.const 32 - i64.shr_u - i32.wrap_i64 - i32.const 2147483647 - i32.and - local.tee $4 - i32.const 1094263291 - i32.lt_u - if - local.get $4 - i32.const 20 - i32.shr_u - local.tee $6 - local.get $0 - local.get $0 - f64.const 0.6366197723675814 - f64.mul - f64.nearest - local.tee $5 - f64.const 1.5707963267341256 - f64.mul - f64.sub - local.tee $0 - local.get $5 - f64.const 6.077100506506192e-11 - f64.mul - local.tee $3 - f64.sub - local.tee $1 - i64.reinterpret_f64 - i64.const 32 - i64.shr_u - i32.wrap_i64 - i32.const 20 - i32.shr_u - i32.const 2047 - i32.and - i32.sub - i32.const 16 - i32.gt_u - if - local.get $5 - f64.const 2.0222662487959506e-21 - f64.mul - local.get $0 - local.get $0 - local.get $5 - f64.const 6.077100506303966e-11 - f64.mul - local.tee $3 - f64.sub - local.tee $0 - f64.sub - local.get $3 - f64.sub - f64.sub - local.set $3 - local.get $6 - local.get $0 - local.get $3 - f64.sub - local.tee $1 - i64.reinterpret_f64 - i64.const 32 - i64.shr_u - i32.wrap_i64 - i32.const 20 - i32.shr_u - i32.const 2047 - i32.and - i32.sub - i32.const 49 - i32.gt_u - if - local.get $5 - f64.const 8.4784276603689e-32 - f64.mul - local.get $0 - local.get $0 - local.get $5 - f64.const 2.0222662487111665e-21 - f64.mul - local.tee $3 - f64.sub - local.tee $0 - f64.sub - local.get $3 - f64.sub - f64.sub - local.set $3 - local.get $0 - local.get $3 - f64.sub - local.set $1 - end - end - local.get $1 - global.set $~lib/math/rempio2_y0 - local.get $0 - local.get $1 - f64.sub - local.get $3 - f64.sub - global.set $~lib/math/rempio2_y1 - local.get $5 - i32.trunc_f64_s - br $~lib/math/rempio2|inlined.2 - end - i32.const 0 - local.get $2 - call $~lib/math/pio2_large_quot - local.tee $4 - i32.sub - local.get $4 - local.get $6 - select - end - local.set $6 + local.get $0 + local.get $2 + local.get $3 + call $~lib/math/rempio2 + local.set $1 global.get $~lib/math/rempio2_y0 global.get $~lib/math/rempio2_y1 i32.const 1 - local.get $6 + local.get $1 i32.const 1 i32.and i32.const 1 @@ -10184,241 +9539,37 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.tan (param $0 f32) (result f32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 i64) - (local $7 i64) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i32) - (local $12 i64) + (func $~lib/math/tan_kernf (param $0 f64) (param $1 i32) (result f32) + (local $2 f64) + local.get $0 + local.get $0 local.get $0 - i32.reinterpret_f32 - local.tee $1 - i32.const 31 - i32.shr_u - local.set $11 - local.get $1 - i32.const 2147483647 - i32.and - local.tee $2 - i32.const 1061752794 - i32.le_u - if - local.get $2 - i32.const 964689920 - i32.lt_u - if - local.get $0 - return - end - local.get $0 - f64.promote_f32 - local.tee $5 - local.get $5 - f64.mul - local.tee $4 - local.get $5 - f64.mul - local.set $3 - local.get $5 - local.get $3 - f64.const 0.3333313950307914 - local.get $4 - f64.const 0.13339200271297674 - f64.mul - f64.add - f64.mul - f64.add - local.get $3 - local.get $4 - local.get $4 - f64.mul - local.tee $3 - f64.mul - f64.const 0.05338123784456704 - local.get $4 - f64.const 0.024528318116654728 - f64.mul - f64.add - local.get $3 - f64.const 0.002974357433599673 - local.get $4 - f64.const 0.009465647849436732 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - f32.demote_f64 - return - end - local.get $2 - i32.const 2139095040 - i32.ge_u - if - local.get $0 - local.get $0 - f32.sub - return - end - block $~lib/math/rempio2f|inlined.2 (result i32) - local.get $2 - i32.const 1305022427 - i32.lt_u - if - local.get $0 - f64.promote_f32 - local.get $0 - f64.promote_f32 - f64.const 0.6366197723675814 - f64.mul - f64.nearest - local.tee $3 - f64.const 1.5707963109016418 - f64.mul - f64.sub - local.get $3 - f64.const 1.5893254773528196e-08 - f64.mul - f64.sub - global.set $~lib/math/rempio2f_y - local.get $3 - i32.trunc_f64_s - br $~lib/math/rempio2f|inlined.2 - end - local.get $2 - i32.const 23 - i32.shr_s - i32.const 152 - i32.sub - local.tee $1 - i32.const 6 - i32.shr_s - i32.const 3 - i32.shl - i32.const 1256 - i32.add - local.tee $10 - i64.load - local.set $7 - local.get $10 - i64.load offset=8 - local.set $8 - local.get $1 - i32.const 63 - i32.and - i64.extend_i32_s - local.tee $6 - i64.const 32 - i64.gt_u - if (result i64) - local.get $8 - local.get $6 - i64.const 32 - i64.sub - i64.shl - local.get $10 - i64.load offset=16 - i64.const 96 - local.get $6 - i64.sub - i64.shr_u - i64.or - else - local.get $8 - i64.const 32 - local.get $6 - i64.sub - i64.shr_u - end - local.set $12 - f64.const 8.515303950216386e-20 - local.get $0 - f64.promote_f32 - f64.copysign - local.get $2 - i32.const 8388607 - i32.and - i32.const 8388608 - i32.or - i64.extend_i32_s - local.tee $9 - local.get $7 - local.get $6 - i64.shl - local.get $8 - i64.const 64 - local.get $6 - i64.sub - i64.shr_u - i64.or - i64.mul - local.get $9 - local.get $12 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $7 - i64.const 2 - i64.shl - local.tee $9 - f64.convert_i64_s - f64.mul - global.set $~lib/math/rempio2f_y - i32.const 0 - local.get $7 - i64.const 62 - i64.shr_u - local.get $9 - i64.const 63 - i64.shr_u - i64.add - i32.wrap_i64 - local.tee $1 - i32.sub - local.get $1 - local.get $11 - select - end - global.get $~lib/math/rempio2f_y - local.tee $5 - local.get $5 f64.mul - local.tee $4 - local.get $5 + local.tee $2 + local.get $0 f64.mul - local.set $3 - local.get $5 - local.get $3 + local.tee $0 f64.const 0.3333313950307914 - local.get $4 + local.get $2 f64.const 0.13339200271297674 f64.mul f64.add f64.mul f64.add - local.get $3 - local.get $4 - local.get $4 + local.get $0 + local.get $2 + local.get $2 f64.mul - local.tee $3 + local.tee $0 f64.mul f64.const 0.05338123784456704 - local.get $4 + local.get $2 f64.const 0.024528318116654728 f64.mul f64.add - local.get $3 + local.get $0 f64.const 0.002974357433599673 - local.get $4 + local.get $2 f64.const 0.009465647849436732 f64.mul f64.add @@ -10426,21 +9577,68 @@ f64.add f64.mul f64.add - local.set $3 - i32.const 1 - i32.and + local.set $0 + local.get $1 if f64.const -1 - local.get $3 + local.get $0 f64.div - local.set $3 + local.set $0 end - local.get $3 + local.get $0 f32.demote_f64 ) (func $std/math/test_tanf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.reinterpret_f32 + local.tee $3 + i32.const 31 + i32.shr_u + local.set $4 + block $__inlined_func$~lib/math/NativeMathf.tan + local.get $3 + i32.const 2147483647 + i32.and + local.tee $3 + i32.const 1061752794 + i32.le_u + if + local.get $3 + i32.const 964689920 + i32.lt_u + br_if $__inlined_func$~lib/math/NativeMathf.tan + local.get $0 + f64.promote_f32 + i32.const 0 + call $~lib/math/tan_kernf + local.set $0 + br $__inlined_func$~lib/math/NativeMathf.tan + end + local.get $3 + i32.const 2139095040 + i32.ge_u + if + local.get $0 + local.get $0 + f32.sub + local.set $0 + br $__inlined_func$~lib/math/NativeMathf.tan + end + local.get $0 + local.get $3 + local.get $4 + call $~lib/math/rempio2f + local.set $3 + global.get $~lib/math/rempio2f_y + local.get $3 + i32.const 1 + i32.and + call $~lib/math/tan_kernf + local.set $0 + end local.get $0 - call $~lib/math/NativeMathf.tan local.get $1 local.get $2 call $std/math/check @@ -10640,32 +9838,29 @@ ) (func $~lib/math/NativeMath.sincos (param $0 f64) (local $1 f64) - (local $2 f64) - (local $3 i64) - (local $4 f64) + (local $2 i32) + (local $3 f64) + (local $4 i64) (local $5 i32) - (local $6 i32) - (local $7 f64) - (local $8 f64) - (local $9 f64) + (local $6 f64) local.get $0 i64.reinterpret_f64 - local.tee $3 + local.tee $4 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $5 + local.tee $2 i32.const 31 i32.shr_u - local.set $6 - local.get $5 + local.set $5 + local.get $2 i32.const 2147483647 i32.and - local.tee $5 + local.tee $2 i32.const 1072243195 i32.le_u if - local.get $5 + local.get $2 i32.const 1044816030 i32.lt_u if @@ -10676,95 +9871,17 @@ return end local.get $0 - local.get $0 - local.get $0 - f64.mul - local.tee $2 - local.get $0 - f64.mul - f64.const -0.16666666666666632 - local.get $2 - f64.const 0.00833333333332249 - local.get $2 - f64.const -1.984126982985795e-04 - local.get $2 - f64.const 2.7557313707070068e-06 - f64.mul - f64.add - f64.mul - f64.add - local.get $2 - local.get $2 - local.get $2 - f64.mul - f64.mul - f64.const -2.5050760253406863e-08 - local.get $2 - f64.const 1.58969099521155e-10 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add + f64.const 0 + i32.const 0 + call $~lib/math/sin_kern global.set $~lib/math/NativeMath.sincos_sin - f64.const 1 - f64.const 0.5 - local.get $0 - local.get $0 - f64.mul - local.tee $2 - f64.mul - local.tee $4 - f64.sub - local.tee $1 - f64.const 1 - local.get $1 - f64.sub - local.get $4 - f64.sub - local.get $2 - local.get $2 - f64.const 0.0416666666666666 - local.get $2 - f64.const -0.001388888888887411 - local.get $2 - f64.const 2.480158728947673e-05 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - local.get $2 - local.get $2 - f64.mul - local.tee $4 - local.get $4 - f64.mul - f64.const -2.7557314351390663e-07 - local.get $2 - f64.const 2.087572321298175e-09 - local.get $2 - f64.const -1.1359647557788195e-11 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - f64.mul local.get $0 f64.const 0 - f64.mul - f64.sub - f64.add - f64.add + call $~lib/math/cos_kern global.set $~lib/math/NativeMath.sincos_cos return end - local.get $5 + local.get $2 i32.const 2139095040 i32.ge_u if @@ -10777,251 +9894,48 @@ global.set $~lib/math/NativeMath.sincos_cos return end - block $~lib/math/rempio2|inlined.3 (result i32) - local.get $3 - i64.const 32 - i64.shr_u - i32.wrap_i64 - i32.const 2147483647 - i32.and - local.tee $5 - i32.const 1094263291 - i32.lt_u - if - local.get $5 - i32.const 20 - i32.shr_u - local.tee $6 - local.get $0 - local.get $0 - f64.const 0.6366197723675814 - f64.mul - f64.nearest - local.tee $2 - f64.const 1.5707963267341256 - f64.mul - f64.sub - local.tee $0 - local.get $2 - f64.const 6.077100506506192e-11 - f64.mul - local.tee $4 - f64.sub - local.tee $1 - i64.reinterpret_f64 - i64.const 32 - i64.shr_u - i32.wrap_i64 - i32.const 20 - i32.shr_u - i32.const 2047 - i32.and - i32.sub - i32.const 16 - i32.gt_u - if - local.get $2 - f64.const 2.0222662487959506e-21 - f64.mul - local.get $0 - local.get $0 - local.get $2 - f64.const 6.077100506303966e-11 - f64.mul - local.tee $4 - f64.sub - local.tee $0 - f64.sub - local.get $4 - f64.sub - f64.sub - local.set $4 - local.get $6 - local.get $0 - local.get $4 - f64.sub - local.tee $1 - i64.reinterpret_f64 - i64.const 32 - i64.shr_u - i32.wrap_i64 - i32.const 20 - i32.shr_u - i32.const 2047 - i32.and - i32.sub - i32.const 49 - i32.gt_u - if - local.get $2 - f64.const 8.4784276603689e-32 - f64.mul - local.get $0 - local.get $0 - local.get $2 - f64.const 2.0222662487111665e-21 - f64.mul - local.tee $4 - f64.sub - local.tee $0 - f64.sub - local.get $4 - f64.sub - f64.sub - local.set $4 - local.get $0 - local.get $4 - f64.sub - local.set $1 - end - end - local.get $1 - global.set $~lib/math/rempio2_y0 - local.get $0 - local.get $1 - f64.sub - local.get $4 - f64.sub - global.set $~lib/math/rempio2_y1 - local.get $2 - i32.trunc_f64_s - br $~lib/math/rempio2|inlined.3 - end - i32.const 0 - local.get $3 - call $~lib/math/pio2_large_quot - local.tee $5 - i32.sub - local.get $5 - local.get $6 - select - end - local.set $6 - global.get $~lib/math/rempio2_y0 - local.tee $4 - local.get $4 - f64.mul - local.tee $0 + local.get $0 local.get $4 - f64.mul + local.get $5 + call $~lib/math/rempio2 local.set $2 - local.get $4 - local.get $0 - f64.const 0.5 - global.get $~lib/math/rempio2_y1 + global.get $~lib/math/rempio2_y0 local.tee $1 - f64.mul - local.get $2 - f64.const 0.00833333333332249 - local.get $0 - f64.const -1.984126982985795e-04 - local.get $0 - f64.const 2.7557313707070068e-06 - f64.mul - f64.add - f64.mul - f64.add - local.get $0 - local.get $0 - local.get $0 - f64.mul - f64.mul - f64.const -2.5050760253406863e-08 - local.get $0 - f64.const 1.58969099521155e-10 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.sub - f64.mul - local.get $1 - f64.sub - local.get $2 - f64.const -0.16666666666666632 - f64.mul - f64.sub - f64.sub - local.tee $8 + global.get $~lib/math/rempio2_y1 + local.tee $3 + i32.const 1 + call $~lib/math/sin_kern + local.tee $6 local.set $0 - f64.const 1 - f64.const 0.5 - local.get $4 - local.get $4 - f64.mul - local.tee $2 - f64.mul - local.tee $7 - f64.sub - local.tee $9 - f64.const 1 - local.get $9 - f64.sub - local.get $7 - f64.sub - local.get $2 - local.get $2 - f64.const 0.0416666666666666 - local.get $2 - f64.const -0.001388888888887411 - local.get $2 - f64.const 2.480158728947673e-05 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - local.get $2 - local.get $2 - f64.mul - local.tee $7 - local.get $7 - f64.mul - f64.const -2.7557314351390663e-07 - local.get $2 - f64.const 2.087572321298175e-09 - local.get $2 - f64.const -1.1359647557788195e-11 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - f64.mul - local.get $4 local.get $1 - f64.mul - f64.sub - f64.add - f64.add - local.tee $2 - local.set $4 - local.get $6 + local.get $3 + call $~lib/math/cos_kern + local.tee $1 + local.set $3 + local.get $2 i32.const 1 i32.and if - local.get $8 + local.get $6 f64.neg - local.set $4 - local.get $2 + local.set $3 + local.get $1 local.set $0 end - local.get $6 + local.get $2 i32.const 2 i32.and if (result f64) - local.get $4 + local.get $3 f64.neg - local.set $4 + local.set $3 local.get $0 f64.neg else local.get $0 end global.set $~lib/math/NativeMath.sincos_sin - local.get $4 + local.get $3 global.set $~lib/math/NativeMath.sincos_cos ) (func $std/math/test_sincos (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) @@ -11229,8 +10143,7 @@ (local $4 i64) (local $5 i32) (local $6 i32) - (local $7 f64) - (local $8 f32) + (local $7 f32) f64.const 2.718281828459045 global.get $~lib/bindings/Math/E f64.const 0 @@ -39336,6 +38249,178 @@ call $~lib/builtins/abort unreachable end + f64.const 0 + call $~lib/math/NativeMath.signbit + if + i32.const 0 + i32.const 1040 + i32.const 3127 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + f64.const -0 + call $~lib/math/NativeMath.signbit + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1040 + i32.const 3128 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + f64.const 1 + call $~lib/math/NativeMath.signbit + if + i32.const 0 + i32.const 1040 + i32.const 3129 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + f64.const -1 + call $~lib/math/NativeMath.signbit + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1040 + i32.const 3130 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.signbit + if + i32.const 0 + i32.const 1040 + i32.const 3131 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + f64.const -nan:0x8000000000000 + call $~lib/math/NativeMath.signbit + if + i32.const 0 + i32.const 1040 + i32.const 3132 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + f64.const inf + call $~lib/math/NativeMath.signbit + if + i32.const 0 + i32.const 1040 + i32.const 3133 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + f64.const -inf + call $~lib/math/NativeMath.signbit + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1040 + i32.const 3134 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + f32.const 0 + call $~lib/math/NativeMathf.signbit + if + i32.const 0 + i32.const 1040 + i32.const 3140 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + f32.const -0 + call $~lib/math/NativeMathf.signbit + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1040 + i32.const 3141 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + f32.const 1 + call $~lib/math/NativeMathf.signbit + if + i32.const 0 + i32.const 1040 + i32.const 3142 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + f32.const -1 + call $~lib/math/NativeMathf.signbit + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1040 + i32.const 3143 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + f32.const nan:0x400000 + call $~lib/math/NativeMathf.signbit + if + i32.const 0 + i32.const 1040 + i32.const 3144 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + f32.const -nan:0x400000 + call $~lib/math/NativeMathf.signbit + if + i32.const 0 + i32.const 1040 + i32.const 3145 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + f32.const inf + call $~lib/math/NativeMathf.signbit + if + i32.const 0 + i32.const 1040 + i32.const 3146 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + f32.const -inf + call $~lib/math/NativeMathf.signbit + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1040 + i32.const 3147 + i32.const 1 + call $~lib/builtins/abort + unreachable + end f64.const -8.06684839057968 f64.const 4.535662560676869 f64.const 1.0044767307740567 diff --git a/tests/compiler/std/math.untouched.wat b/tests/compiler/std/math.untouched.wat index 7ee6e66b0b..dde1e95c35 100644 --- a/tests/compiler/std/math.untouched.wat +++ b/tests/compiler/std/math.untouched.wat @@ -1,31 +1,44 @@ (module (type $f64_=>_f64 (func (param f64) (result f64))) + (type $f32_=>_f32 (func (param f32) (result f32))) (type $f32_f32_f32_i32_=>_i32 (func (param f32 f32 f32 i32) (result i32))) (type $f64_f64_f64_i32_=>_i32 (func (param f64 f64 f64 i32) (result i32))) - (type $f32_=>_f32 (func (param f32) (result f32))) (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) + (type $f32_f32_=>_f32 (func (param f32 f32) (result f32))) (type $f32_f32_f32_f32_i32_=>_i32 (func (param f32 f32 f32 f32 i32) (result i32))) (type $f64_f64_f64_f64_i32_=>_i32 (func (param f64 f64 f64 f64 i32) (result i32))) - (type $f32_f32_=>_f32 (func (param f32 f32) (result f32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) (type $none_=>_f64 (func (result f64))) + (type $i32_=>_f64 (func (param i32) (result f64))) + (type $f64_f64_i32_=>_f64 (func (param f64 f64 i32) (result f64))) (type $none_=>_none (func)) - (type $f64_=>_i32 (func (param f64) (result i32))) + (type $i64_=>_none (func (param i64))) + (type $i64_=>_i32 (func (param i64) (result i32))) + (type $f32_=>_i32 (func (param f32) (result i32))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) + (type $i32_=>_f32 (func (param i32) (result f32))) (type $f32_i32_=>_f32 (func (param f32 i32) (result f32))) + (type $f64_=>_f32 (func (param f64) (result f32))) + (type $f64_i32_=>_f32 (func (param f64 i32) (result f32))) (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) + (type $f64_i64_i64_=>_f64 (func (param f64 i64 i64) (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $i64_=>_none (func (param i64))) (type $f64_=>_none (func (param f64))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i64_i64_i64_i64_i64_i32_=>_i32 (func (param i64 i64 i64 i64 i64 i32) (result i32))) - (type $f32_=>_i32 (func (param f32) (result i32))) + (type $f32_i32_=>_i32 (func (param f32 i32) (result i32))) + (type $f32_i32_i32_=>_i32 (func (param f32 i32 i32) (result i32))) (type $f32_i32_f32_f32_i32_=>_i32 (func (param f32 i32 f32 f32 i32) (result i32))) (type $f64_i32_f64_f64_i32_=>_i32 (func (param f64 i32 f64 f64 i32) (result i32))) (type $f64_i64_=>_i32 (func (param f64 i64) (result i32))) + (type $f64_i64_i32_=>_i32 (func (param f64 i64 i32) (result i32))) (type $i64_=>_i64 (func (param i64) (result i64))) (type $i64_i32_=>_i64 (func (param i64 i32) (result i64))) (type $none_=>_f32 (func (result f32))) + (type $i32_f32_=>_f32 (func (param i32 f32) (result f32))) (type $f32_f32_f32_=>_f32 (func (param f32 f32 f32) (result f32))) - (type $f64_f64_i32_=>_f64 (func (param f64 f64 i32) (result f64))) + (type $i32_f64_=>_f64 (func (param i32 f64) (result f64))) + (type $i64_=>_f64 (func (param i64) (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)) @@ -125,6 +138,17 @@ (global $~lib/builtins/f32.MIN_VALUE f32 (f32.const 1.401298464324817e-45)) (export "memory" (memory $0)) (start $~start) + (func $~lib/math/NativeMath.signbit (param $0 f64) (result i32) + local.get $0 + i64.reinterpret_f64 + i64.const 63 + i64.shr_u + i32.wrap_i64 + local.get $0 + local.get $0 + f64.eq + i32.and + ) (func $std/math/eulp (param $0 f64) (result i32) (local $1 i64) (local $2 i32) @@ -244,7 +268,6 @@ f64.mul ) (func $std/math/ulperr (param $0 f64) (param $1 f64) (param $2 f64) (result f64) - (local $3 f64) local.get $0 local.get $0 f64.ne @@ -264,31 +287,9 @@ f64.eq if local.get $0 - local.set $3 - local.get $3 - i64.reinterpret_f64 - i64.const 63 - i64.shr_u - i32.wrap_i64 - local.get $3 - local.get $3 - f64.eq - i32.and - i32.const 0 - i32.ne + call $~lib/math/NativeMath.signbit local.get $1 - local.set $3 - local.get $3 - i64.reinterpret_f64 - i64.const 63 - i64.shr_u - i32.wrap_i64 - local.get $3 - local.get $3 - f64.eq - i32.and - i32.const 0 - i32.ne + call $~lib/math/NativeMath.signbit i32.eq if local.get $2 @@ -361,6 +362,16 @@ end i32.const 1 ) + (func $~lib/math/NativeMathf.signbit (param $0 f32) (result i32) + local.get $0 + i32.reinterpret_f32 + i32.const 31 + i32.shr_u + local.get $0 + local.get $0 + f32.eq + i32.and + ) (func $std/math/eulpf (param $0 f32) (result i32) (local $1 i32) (local $2 i32) @@ -478,7 +489,6 @@ f32.mul ) (func $std/math/ulperrf (param $0 f32) (param $1 f32) (param $2 f32) (result f32) - (local $3 f32) local.get $0 local.get $0 f32.ne @@ -498,29 +508,9 @@ f32.eq if local.get $0 - local.set $3 - local.get $3 - i32.reinterpret_f32 - i32.const 31 - i32.shr_u - local.get $3 - local.get $3 - f32.eq - i32.and - i32.const 0 - i32.ne + call $~lib/math/NativeMathf.signbit local.get $1 - local.set $3 - local.get $3 - i32.reinterpret_f32 - i32.const 31 - i32.shr_u - local.get $3 - local.get $3 - f32.eq - i32.and - i32.const 0 - i32.ne + call $~lib/math/NativeMathf.signbit i32.eq if local.get $2 @@ -615,12 +605,13 @@ local.get $4 call $std/math/check ) - (func $std/math/test_abs (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 f64) + (func $~lib/math/NativeMath.abs (param $0 f64) (result f64) local.get $0 - local.set $4 - local.get $4 f64.abs + ) + (func $std/math/test_abs (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + local.get $0 + call $~lib/math/NativeMath.abs local.get $1 local.get $2 local.get $3 @@ -642,12 +633,13 @@ i32.const 0 end ) - (func $std/math/test_absf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - (local $4 f32) + (func $~lib/math/NativeMathf.abs (param $0 f32) (result f32) local.get $0 - local.set $4 - local.get $4 f32.abs + ) + (func $std/math/test_absf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.abs local.get $1 local.get $2 local.get $3 @@ -1295,9 +1287,9 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.log (param $0 f64) (result f64) - (local $1 f64) - (local $2 i64) + (func $~lib/util/math/log_lut (param $0 f64) (result f64) + (local $1 i64) + (local $2 f64) (local $3 f64) (local $4 f64) (local $5 f64) @@ -1306,411 +1298,417 @@ (local $8 f64) (local $9 f64) (local $10 f64) - (local $11 f64) - (local $12 i32) - (local $13 i64) - (local $14 i32) + (local $11 i32) + (local $12 i64) + (local $13 i32) + (local $14 i64) (local $15 i64) - (local $16 i64) + (local $16 f64) (local $17 f64) (local $18 f64) - i32.const 0 - i32.const 1 - i32.lt_s - drop - block $~lib/util/math/log_lut|inlined.0 (result f64) + (local $19 f64) + (local $20 f64) + (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) + local.get $0 + i64.reinterpret_f64 + local.set $1 + local.get $1 + i64.const 4606619468846596096 + i64.sub + i64.const 4607473789381378048 + i64.const 4606619468846596096 + i64.sub + i64.lt_u + if local.get $0 - local.set $1 - local.get $1 - i64.reinterpret_f64 + f64.const 1 + f64.sub local.set $2 local.get $2 - i64.const 4606619468846596096 - i64.sub - i64.const 4607473789381378048 - i64.const 4606619468846596096 - i64.sub - i64.lt_u - if - local.get $1 - f64.const 1 - f64.sub - local.set $3 - local.get $3 - local.get $3 - f64.mul - local.set $4 - local.get $4 - local.get $3 - f64.mul - local.set $5 - local.get $5 - f64.const 0.3333333333333352 - local.get $3 - f64.const -0.24999999999998432 - f64.mul - f64.add - local.get $4 - f64.const 0.19999999999320328 - f64.mul - f64.add - local.get $5 - f64.const -0.16666666669929706 - local.get $3 - f64.const 0.14285715076560868 - f64.mul - f64.add - local.get $4 - f64.const -0.12499997863982555 - f64.mul - f64.add - local.get $5 - f64.const 0.11110712032936046 - local.get $3 - f64.const -0.10000486757818193 - f64.mul - f64.add - local.get $4 - f64.const 0.09181994006195467 - f64.mul - f64.add - local.get $5 - f64.const -0.08328363062289341 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - f64.mul - local.set $6 - local.get $3 - f64.const 134217728 - f64.mul - local.set $7 - local.get $3 - local.get $7 - f64.add - local.get $7 - f64.sub - local.set $8 - local.get $3 - local.get $8 - f64.sub - local.set $9 - local.get $8 - local.get $8 - f64.mul - f64.const -0.5 - f64.mul - local.set $7 - local.get $3 - local.get $7 - f64.add - local.set $10 - local.get $3 - local.get $10 - f64.sub - local.get $7 - f64.add - local.set $11 - local.get $11 - f64.const -0.5 - local.get $9 - f64.mul - local.get $8 - local.get $3 - f64.add - f64.mul - f64.add - local.set $11 - local.get $6 - local.get $11 - f64.add - local.get $10 - f64.add - br $~lib/util/math/log_lut|inlined.0 - end - local.get $2 - i64.const 48 - i64.shr_u - i32.wrap_i64 - local.set $12 - local.get $12 - i32.const 16 - i32.sub - i32.const 32752 - i32.const 16 - i32.sub - i32.ge_u - if - local.get $2 - i64.const 1 - i64.shl - i64.const 0 - i64.eq - if - f64.const -1 - local.get $1 - local.get $1 - f64.mul - f64.div - br $~lib/util/math/log_lut|inlined.0 - end - local.get $2 - f64.const inf - i64.reinterpret_f64 - i64.eq - if - local.get $1 - br $~lib/util/math/log_lut|inlined.0 - end - local.get $12 - i32.const 32768 - i32.and - if (result i32) - i32.const 1 - else - local.get $12 - i32.const 32752 - i32.and - i32.const 32752 - i32.eq - end - if - local.get $1 - local.get $1 - f64.sub - local.get $1 - local.get $1 - f64.sub - f64.div - br $~lib/util/math/log_lut|inlined.0 - end - local.get $1 - f64.const 4503599627370496 - f64.mul - i64.reinterpret_f64 - local.set $2 - local.get $2 - i64.const 52 - i64.const 52 - i64.shl - i64.sub - local.set $2 - end - local.get $2 - i64.const 4604367669032910848 - i64.sub - local.set $13 - local.get $13 - i64.const 52 - i64.const 7 - i64.sub - i64.shr_u - i64.const 127 - i64.and - i32.wrap_i64 - local.set $14 - local.get $13 - i64.const 52 - i64.shr_s - local.set $15 local.get $2 - local.get $13 - i64.const 4095 - i64.const 52 - i64.shl - i64.and - i64.sub - local.set $16 - i32.const 56 - local.get $14 - i32.const 1 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load - local.set $11 - i32.const 56 - local.get $14 - i32.const 1 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load offset=8 - local.set $10 - local.get $16 - f64.reinterpret_i64 - local.set $9 - i32.const 2104 - local.get $14 - i32.const 1 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load - local.set $8 - i32.const 2104 - local.get $14 - i32.const 1 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load offset=8 - local.set $7 - local.get $9 - local.get $8 - f64.sub - local.get $7 - f64.sub - local.get $11 f64.mul - local.set $6 - local.get $15 - f64.convert_i64_s - local.set $5 - local.get $5 - f64.const 0.6931471805598903 + local.set $3 + local.get $3 + local.get $2 f64.mul - local.get $10 - f64.add local.set $4 local.get $4 - local.get $6 + f64.const 0.3333333333333352 + local.get $2 + f64.const -0.24999999999998432 + f64.mul f64.add - local.set $3 - local.get $4 local.get $3 - f64.sub - local.get $6 - f64.add - local.get $5 - f64.const 5.497923018708371e-14 + f64.const 0.19999999999320328 f64.mul f64.add - local.set $17 - local.get $6 - local.get $6 + local.get $4 + f64.const -0.16666666669929706 + local.get $2 + f64.const 0.14285715076560868 f64.mul - local.set $18 - local.get $17 - local.get $18 - f64.const -0.5000000000000001 + f64.add + local.get $3 + f64.const -0.12499997863982555 f64.mul f64.add - local.get $6 - local.get $18 + local.get $4 + f64.const 0.11110712032936046 + local.get $2 + f64.const -0.10000486757818193 f64.mul - f64.const 0.33333333331825593 - local.get $6 - f64.const -0.2499999999622955 + f64.add + local.get $3 + f64.const 0.09181994006195467 f64.mul f64.add - local.get $18 - f64.const 0.20000304511814496 - local.get $6 - f64.const -0.16667054827627667 + local.get $4 + f64.const -0.08328363062289341 f64.mul f64.add f64.mul f64.add f64.mul f64.add - local.get $3 + f64.mul + local.set $5 + local.get $2 + f64.const 134217728 + f64.mul + local.set $6 + local.get $2 + local.get $6 f64.add - end - return - ) - (func $~lib/math/NativeMath.acosh (param $0 f64) (result f64) - (local $1 i64) - local.get $0 - i64.reinterpret_f64 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - local.set $1 - local.get $1 - i64.const 1023 - i64.const 1 - i64.add - i64.lt_u - if - local.get $0 - f64.const 1 - f64.sub - local.get $0 - f64.const 1 + local.get $6 f64.sub - local.get $0 - f64.const 1 + local.set $7 + local.get $2 + local.get $7 f64.sub + local.set $8 + local.get $7 + local.get $7 f64.mul - f64.const 2 - local.get $0 - f64.const 1 - f64.sub + f64.const -0.5 f64.mul + local.set $6 + local.get $2 + local.get $6 f64.add - f64.sqrt + local.set $9 + local.get $2 + local.get $9 + f64.sub + local.get $6 f64.add - call $~lib/math/NativeMath.log1p - return - end - local.get $1 - i64.const 1023 - i64.const 26 - i64.add - i64.lt_u - if - f64.const 2 - local.get $0 + local.set $10 + local.get $10 + f64.const -0.5 + local.get $8 f64.mul - f64.const 1 - local.get $0 - local.get $0 - local.get $0 + local.get $7 + local.get $2 + f64.add f64.mul - f64.const 1 - f64.sub - f64.sqrt f64.add - f64.div - f64.sub - call $~lib/math/NativeMath.log + local.set $10 + local.get $5 + local.get $10 + f64.add + local.get $9 + f64.add return end - local.get $0 - call $~lib/math/NativeMath.log - f64.const 0.6931471805599453 - f64.add - ) - (func $std/math/test_acosh (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - local.get $0 - call $~lib/math/NativeMath.acosh local.get $1 - local.get $2 - local.get $3 - call $std/math/check - if (result i32) - global.get $std/math/js - i32.eqz + i64.const 48 + i64.shr_u + i32.wrap_i64 + local.set $11 + local.get $11 + i32.const 16 + i32.sub + i32.const 32752 + i32.const 16 + i32.sub + i32.ge_u + if + local.get $1 + i64.const 1 + i64.shl + i64.const 0 + i64.eq + if + f64.const -1 + local.get $0 + local.get $0 + f64.mul + f64.div + return + end + local.get $1 + f64.const inf + i64.reinterpret_f64 + i64.eq + if + local.get $0 + return + end + local.get $11 + i32.const 32768 + i32.and if (result i32) i32.const 1 else - local.get $0 - call $~lib/bindings/Math/acosh - local.get $1 - local.get $2 - local.get $3 - call $std/math/check + local.get $11 + i32.const 32752 + i32.and + i32.const 32752 + i32.eq end - else + if + local.get $0 + local.get $0 + f64.sub + local.get $0 + local.get $0 + f64.sub + f64.div + return + end + local.get $0 + f64.const 4503599627370496 + f64.mul + i64.reinterpret_f64 + local.set $1 + local.get $1 + i64.const 52 + i64.const 52 + i64.shl + i64.sub + local.set $1 + end + local.get $1 + i64.const 4604367669032910848 + i64.sub + local.set $12 + local.get $12 + i64.const 52 + i64.const 7 + i64.sub + i64.shr_u + i64.const 127 + i64.and + i32.wrap_i64 + local.set $13 + local.get $12 + i64.const 52 + i64.shr_s + local.set $14 + local.get $1 + local.get $12 + i64.const 4095 + i64.const 52 + i64.shl + i64.and + i64.sub + local.set $15 + i32.const 56 + local.get $13 + i32.const 1 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load + local.set $16 + i32.const 56 + local.get $13 + i32.const 1 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load offset=8 + local.set $17 + local.get $15 + f64.reinterpret_i64 + local.set $18 + i32.const 2104 + local.get $13 + i32.const 1 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load + local.set $10 + i32.const 2104 + local.get $13 + i32.const 1 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load offset=8 + local.set $9 + local.get $18 + local.get $10 + f64.sub + local.get $9 + f64.sub + local.get $16 + f64.mul + local.set $19 + local.get $14 + f64.convert_i64_s + local.set $20 + local.get $20 + f64.const 0.6931471805598903 + f64.mul + local.get $17 + f64.add + local.set $21 + local.get $21 + local.get $19 + f64.add + local.set $22 + local.get $21 + local.get $22 + f64.sub + local.get $19 + f64.add + local.get $20 + f64.const 5.497923018708371e-14 + f64.mul + f64.add + local.set $23 + local.get $19 + local.get $19 + f64.mul + local.set $24 + local.get $23 + local.get $24 + f64.const -0.5000000000000001 + f64.mul + f64.add + local.get $19 + local.get $24 + f64.mul + f64.const 0.33333333331825593 + local.get $19 + f64.const -0.2499999999622955 + f64.mul + f64.add + local.get $24 + f64.const 0.20000304511814496 + local.get $19 + f64.const -0.16667054827627667 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + local.get $22 + f64.add + ) + (func $~lib/math/NativeMath.log (param $0 f64) (result f64) + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $0 + call $~lib/util/math/log_lut + return + ) + (func $~lib/math/NativeMath.acosh (param $0 f64) (result f64) + (local $1 i64) + local.get $0 + i64.reinterpret_f64 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + local.set $1 + local.get $1 + i64.const 1023 + i64.const 1 + i64.add + i64.lt_u + if + local.get $0 + f64.const 1 + f64.sub + local.get $0 + f64.const 1 + f64.sub + local.get $0 + f64.const 1 + f64.sub + f64.mul + f64.const 2 + local.get $0 + f64.const 1 + f64.sub + f64.mul + f64.add + f64.sqrt + f64.add + call $~lib/math/NativeMath.log1p + return + end + local.get $1 + i64.const 1023 + i64.const 26 + i64.add + i64.lt_u + if + f64.const 2 + local.get $0 + f64.mul + f64.const 1 + local.get $0 + local.get $0 + local.get $0 + f64.mul + f64.const 1 + f64.sub + f64.sqrt + f64.add + f64.div + f64.sub + call $~lib/math/NativeMath.log + return + end + local.get $0 + call $~lib/math/NativeMath.log + f64.const 0.6931471805599453 + f64.add + ) + (func $std/math/test_acosh (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + local.get $0 + call $~lib/math/NativeMath.acosh + local.get $1 + local.get $2 + local.get $3 + call $std/math/check + if (result i32) + global.get $std/math/js + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + call $~lib/bindings/Math/acosh + local.get $1 + local.get $2 + local.get $3 + call $std/math/check + end + else i32.const 0 end ) @@ -1925,175 +1923,174 @@ f32.mul f32.add ) - (func $~lib/math/NativeMathf.log (param $0 f32) (result f32) - (local $1 f32) + (func $~lib/util/math/logf_lut (param $0 f32) (result f32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + (local $6 f64) (local $7 f64) (local $8 f64) (local $9 f64) (local $10 f64) (local $11 f64) (local $12 f64) - (local $13 f64) - i32.const 0 - i32.const 1 - i32.lt_s - drop - block $~lib/util/math/logf_lut|inlined.0 (result f32) - local.get $0 - local.set $1 + local.get $0 + i32.reinterpret_f32 + local.set $1 + local.get $1 + i32.const 8388608 + i32.sub + i32.const 2139095040 + i32.const 8388608 + i32.sub + i32.ge_u + if + local.get $1 + i32.const 1 + i32.shl + i32.const 0 + i32.eq + if + f32.const inf + f32.neg + return + end local.get $1 - i32.reinterpret_f32 - local.set $2 - local.get $2 - i32.const 8388608 - i32.sub i32.const 2139095040 - i32.const 8388608 - i32.sub - i32.ge_u + i32.eq if - local.get $2 + local.get $0 + return + end + local.get $1 + i32.const 31 + i32.shr_u + if (result i32) i32.const 1 - i32.shl - i32.const 0 - i32.eq - if - f32.const inf - f32.neg - br $~lib/util/math/logf_lut|inlined.0 - end - local.get $2 - i32.const 2139095040 - i32.eq - if - local.get $1 - br $~lib/util/math/logf_lut|inlined.0 - end - local.get $2 - i32.const 31 - i32.shr_u - if (result i32) - i32.const 1 - else - local.get $2 - i32.const 1 - i32.shl - i32.const -16777216 - i32.ge_u - end - if - local.get $1 - local.get $1 - f32.sub - local.get $1 - local.get $1 - f32.sub - f32.div - br $~lib/util/math/logf_lut|inlined.0 - end + else local.get $1 - f32.const 8388608 - f32.mul - i32.reinterpret_f32 - local.set $2 - local.get $2 - i32.const 23 - i32.const 23 + i32.const 1 i32.shl - i32.sub - local.set $2 + i32.const -16777216 + i32.ge_u end - local.get $2 - i32.const 1060306944 - i32.sub - local.set $3 - local.get $3 - i32.const 23 - i32.const 4 - i32.sub - i32.shr_u - i32.const 15 - i32.and - local.set $4 - local.get $3 + if + local.get $0 + local.get $0 + f32.sub + local.get $0 + local.get $0 + f32.sub + f32.div + return + end + local.get $0 + f32.const 8388608 + f32.mul + i32.reinterpret_f32 + local.set $1 + local.get $1 i32.const 23 - i32.shr_s - local.set $5 - local.get $2 - local.get $3 - i32.const 511 i32.const 23 i32.shl - i32.and i32.sub - local.set $6 - i32.const 4152 - local.get $4 - i32.const 1 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load - local.set $7 - i32.const 4152 - local.get $4 - i32.const 1 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load offset=8 - local.set $8 - local.get $6 - f32.reinterpret_i32 - f64.promote_f32 - local.set $9 - local.get $9 - local.get $7 - f64.mul - f64.const 1 - f64.sub - local.set $10 - local.get $8 - local.get $5 - f64.convert_i32_s - f64.const 0.6931471805599453 - f64.mul - f64.add - local.set $11 - local.get $10 - local.get $10 - f64.mul - local.set $12 - f64.const 0.333456765744066 - local.get $10 - f64.mul - f64.const -0.4999997485802103 - f64.add - local.set $13 - local.get $13 - f64.const -0.25089342214237154 - local.get $12 - f64.mul - f64.add - local.set $13 - local.get $13 - local.get $12 - f64.mul - local.get $11 - local.get $10 - f64.add - f64.add - local.set $13 - local.get $13 - f32.demote_f64 + local.set $1 end + local.get $1 + i32.const 1060306944 + i32.sub + local.set $2 + local.get $2 + i32.const 23 + i32.const 4 + i32.sub + i32.shr_u + i32.const 15 + i32.and + local.set $3 + local.get $2 + i32.const 23 + i32.shr_s + local.set $4 + local.get $1 + local.get $2 + i32.const 511 + i32.const 23 + i32.shl + i32.and + i32.sub + local.set $5 + i32.const 4152 + local.get $3 + i32.const 1 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load + local.set $6 + i32.const 4152 + local.get $3 + i32.const 1 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load offset=8 + local.set $7 + local.get $5 + f32.reinterpret_i32 + f64.promote_f32 + local.set $8 + local.get $8 + local.get $6 + f64.mul + f64.const 1 + f64.sub + local.set $9 + local.get $7 + local.get $4 + f64.convert_i32_s + f64.const 0.6931471805599453 + f64.mul + f64.add + local.set $10 + local.get $9 + local.get $9 + f64.mul + local.set $11 + f64.const 0.333456765744066 + local.get $9 + f64.mul + f64.const -0.4999997485802103 + f64.add + local.set $12 + local.get $12 + f64.const -0.25089342214237154 + local.get $11 + f64.mul + f64.add + local.set $12 + local.get $12 + local.get $11 + f64.mul + local.get $10 + local.get $9 + f64.add + f64.add + local.set $12 + local.get $12 + f32.demote_f64 + ) + (func $~lib/math/NativeMathf.log (param $0 f32) (result f32) + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $0 + call $~lib/util/math/logf_lut return ) (func $~lib/math/NativeMathf.acosh (param $0 f32) (result f32) @@ -4226,12 +4223,13 @@ local.get $3 call $std/math/check ) - (func $std/math/test_ceil (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 f64) + (func $~lib/math/NativeMath.ceil (param $0 f64) (result f64) local.get $0 - local.set $4 - local.get $4 f64.ceil + ) + (func $std/math/test_ceil (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + local.get $0 + call $~lib/math/NativeMath.ceil local.get $1 local.get $2 local.get $3 @@ -4253,16 +4251,222 @@ i32.const 0 end ) + (func $~lib/math/NativeMathf.ceil (param $0 f32) (result f32) + local.get $0 + f32.ceil + ) (func $std/math/test_ceilf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - (local $4 f32) local.get $0 + call $~lib/math/NativeMathf.ceil + local.get $1 + local.get $2 + local.get $3 + call $std/math/check + ) + (func $~lib/math/cos_kern (param $0 f64) (param $1 f64) (result f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + local.get $0 + local.get $0 + f64.mul + local.set $2 + local.get $2 + local.get $2 + f64.mul + local.set $3 + local.get $2 + f64.const 0.0416666666666666 + local.get $2 + f64.const -0.001388888888887411 + local.get $2 + f64.const 2.480158728947673e-05 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + local.get $3 + local.get $3 + f64.mul + f64.const -2.7557314351390663e-07 + local.get $2 + f64.const 2.087572321298175e-09 + local.get $2 + f64.const -1.1359647557788195e-11 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add local.set $4 + f64.const 0.5 + local.get $2 + f64.mul + local.set $5 + f64.const 1 + local.get $5 + f64.sub + local.set $3 + local.get $3 + f64.const 1 + local.get $3 + f64.sub + local.get $5 + f64.sub + local.get $2 local.get $4 - f32.ceil + f64.mul + local.get $0 + local.get $1 + f64.mul + f64.sub + f64.add + f64.add + ) + (func $~lib/math/umuldi (param $0 i64) (param $1 i64) (result i64) + (local $2 i64) + (local $3 i64) + (local $4 i64) + (local $5 i64) + (local $6 i64) + local.get $0 + i64.const 4294967295 + i64.and + local.set $2 + local.get $1 + i64.const 4294967295 + i64.and + local.set $3 + local.get $0 + i64.const 32 + i64.shr_u + local.set $0 local.get $1 + i64.const 32 + i64.shr_u + local.set $1 local.get $2 local.get $3 - call $std/math/check + i64.mul + local.set $6 + local.get $6 + i64.const 4294967295 + i64.and + local.set $4 + local.get $0 + local.get $3 + i64.mul + local.get $6 + i64.const 32 + i64.shr_u + i64.add + local.set $6 + local.get $6 + i64.const 32 + i64.shr_u + local.set $5 + local.get $2 + local.get $1 + i64.mul + local.get $6 + i64.const 4294967295 + i64.and + i64.add + local.set $6 + local.get $0 + local.get $1 + i64.mul + local.get $5 + i64.add + local.get $6 + i64.const 32 + i64.shr_u + i64.add + global.set $~lib/math/res128_hi + local.get $6 + i64.const 32 + i64.shl + local.get $4 + i64.add + ) + (func $~lib/math/pio2_right (param $0 i64) (param $1 i64) (result i64) + (local $2 i64) + (local $3 i64) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i64) + local.get $1 + i64.clz + local.set $2 + local.get $1 + local.get $2 + i64.shl + local.get $0 + i64.const 64 + local.get $2 + i64.sub + i64.shr_u + i64.or + local.set $1 + local.get $0 + local.get $2 + i64.shl + local.set $0 + i64.const -3958705157555305932 + local.get $1 + call $~lib/math/umuldi + local.set $3 + global.get $~lib/math/res128_hi + local.set $4 + local.get $4 + i64.const 11 + i64.shr_u + local.set $5 + local.get $3 + i64.const 11 + i64.shr_u + local.get $4 + i64.const 53 + i64.shl + i64.or + local.set $6 + f64.const 2.6469779601696886e-23 + i64.const -4267615245585081135 + f64.convert_i64_u + f64.mul + local.get $1 + f64.convert_i64_u + f64.mul + f64.const 2.6469779601696886e-23 + i64.const -3958705157555305932 + f64.convert_i64_u + f64.mul + local.get $0 + f64.convert_i64_u + f64.mul + f64.add + i64.trunc_f64_u + local.set $7 + local.get $5 + local.get $3 + local.get $7 + i64.lt_u + i64.extend_i32_u + i64.add + f64.convert_i64_u + global.set $~lib/math/rempio2_y0 + f64.const 5.421010862427522e-20 + local.get $6 + local.get $7 + i64.add + f64.convert_i64_u + f64.mul + global.set $~lib/math/rempio2_y1 + local.get $2 ) (func $~lib/math/pio2_large_quot (param $0 f64) (param $1 i64) (result i32) (local $2 i64) @@ -4291,15 +4495,7 @@ (local $25 i64) (local $26 i64) (local $27 i64) - (local $28 i64) - (local $29 i64) - (local $30 i64) - (local $31 i64) - (local $32 i64) - (local $33 i64) - (local $34 i64) - (local $35 i64) - (local $36 f64) + (local $28 f64) local.get $1 i64.const 9223372036854775807 i64.and @@ -4383,75 +4579,15 @@ i64.or local.set $14 local.get $7 - local.set $13 local.get $14 - local.set $12 - local.get $13 - i64.const 4294967295 - i64.and + call $~lib/math/umuldi local.set $15 - local.get $12 - i64.const 4294967295 - i64.and - local.set $16 - local.get $13 - i64.const 32 - i64.shr_u - local.set $13 - local.get $12 - i64.const 32 - i64.shr_u - local.set $12 - local.get $15 - local.get $16 - i64.mul - local.set $19 - local.get $19 - i64.const 4294967295 - i64.and - local.set $17 - local.get $13 - local.get $16 - i64.mul - local.get $19 - i64.const 32 - i64.shr_u - i64.add - local.set $19 - local.get $19 - i64.const 32 - i64.shr_u - local.set $18 - local.get $15 - local.get $12 - i64.mul - local.get $19 - i64.const 4294967295 - i64.and - i64.add - local.set $19 - local.get $13 - local.get $12 - i64.mul - local.get $18 - i64.add - local.get $19 - i64.const 32 - i64.shr_u - i64.add - global.set $~lib/math/res128_hi - local.get $19 - i64.const 32 - i64.shl - local.get $17 - i64.add - local.set $20 global.get $~lib/math/res128_hi - local.set $21 + local.set $16 local.get $6 local.get $14 i64.mul - local.set $22 + local.set $17 local.get $8 i64.const 32 i64.shr_u @@ -4459,739 +4595,492 @@ i64.const 32 i64.shr_s i64.mul - local.set $23 - local.get $20 - local.get $23 + local.set $18 + local.get $15 + local.get $18 i64.add - local.set $24 - local.get $22 - local.get $21 + local.set $19 + local.get $17 + local.get $16 i64.add - local.get $24 - local.get $23 + local.get $19 + local.get $18 i64.lt_u i64.extend_i32_u i64.add - local.set $25 - local.get $24 + local.set $20 + local.get $19 i64.const 2 i64.shl - local.set $26 - local.get $25 + local.set $21 + local.get $20 i64.const 2 i64.shl - local.get $24 + local.get $19 i64.const 62 i64.shr_u i64.or - local.set $27 - local.get $27 + local.set $22 + local.get $22 i64.const 63 i64.shr_s - local.set $28 - local.get $28 + local.set $23 + local.get $23 i64.const 1 i64.shr_s - local.set $29 - local.get $25 + local.set $24 + local.get $20 i64.const 62 i64.shr_s - local.get $28 + local.get $23 i64.sub - local.set $30 + local.set $25 i64.const 4372995238176751616 - local.get $26 - local.get $28 + local.get $21 + local.get $23 i64.xor - local.set $13 - local.get $27 - local.get $29 + local.get $22 + local.get $24 i64.xor - local.set $12 - local.get $12 - i64.clz - local.set $19 - local.get $12 - local.get $19 - i64.shl - local.get $13 - i64.const 64 - local.get $19 - i64.sub - i64.shr_u - i64.or - local.set $12 - local.get $13 - local.get $19 - i64.shl - local.set $13 - i64.const -3958705157555305932 - local.set $16 - local.get $12 - local.set $15 - local.get $16 - i64.const 4294967295 - i64.and - local.set $18 - local.get $15 - i64.const 4294967295 - i64.and - local.set $17 - local.get $16 - i64.const 32 - i64.shr_u - local.set $16 - local.get $15 - i64.const 32 - i64.shr_u - local.set $15 - local.get $18 - local.get $17 - i64.mul - local.set $33 - local.get $33 - i64.const 4294967295 - i64.and - local.set $31 - local.get $16 - local.get $17 - i64.mul - local.get $33 - i64.const 32 - i64.shr_u - i64.add - local.set $33 - local.get $33 - i64.const 32 - i64.shr_u - local.set $32 - local.get $18 - local.get $15 - i64.mul - local.get $33 - i64.const 4294967295 - i64.and - i64.add - local.set $33 - local.get $16 - local.get $15 - i64.mul - local.get $32 - i64.add - local.get $33 - i64.const 32 - i64.shr_u - i64.add - global.set $~lib/math/res128_hi - local.get $33 - i64.const 32 - i64.shl - local.get $31 - i64.add - local.set $33 - global.get $~lib/math/res128_hi - local.set $32 - local.get $32 - i64.const 11 - i64.shr_u - local.set $31 - local.get $33 - i64.const 11 - i64.shr_u - local.get $32 - i64.const 53 - i64.shl - i64.or - local.set $17 - f64.const 2.6469779601696886e-23 - i64.const -4267615245585081135 - f64.convert_i64_u - f64.mul - local.get $12 - f64.convert_i64_u - f64.mul - f64.const 2.6469779601696886e-23 - i64.const -3958705157555305932 - f64.convert_i64_u - f64.mul - local.get $13 - f64.convert_i64_u - f64.mul - f64.add - i64.trunc_f64_u - local.set $18 - local.get $31 - local.get $33 - local.get $18 - i64.lt_u - i64.extend_i32_u - i64.add - f64.convert_i64_u - global.set $~lib/math/rempio2_y0 - f64.const 5.421010862427522e-20 - local.get $17 - local.get $18 - i64.add - f64.convert_i64_u - f64.mul - global.set $~lib/math/rempio2_y1 - local.get $19 + call $~lib/math/pio2_right i64.const 52 i64.shl i64.sub - local.set $34 + local.set $26 local.get $1 - local.get $27 + local.get $22 i64.xor i64.const -9223372036854775808 i64.and - local.set $35 - local.get $34 - local.get $35 + local.set $27 + local.get $26 + local.get $27 i64.or f64.reinterpret_i64 - local.set $36 + local.set $28 global.get $~lib/math/rempio2_y0 - local.get $36 + local.get $28 f64.mul global.set $~lib/math/rempio2_y0 global.get $~lib/math/rempio2_y1 - local.get $36 + local.get $28 f64.mul global.set $~lib/math/rempio2_y1 - local.get $30 + local.get $25 i32.wrap_i64 ) - (func $~lib/math/NativeMath.cos (param $0 f64) (result f64) - (local $1 i64) - (local $2 i32) + (func $~lib/math/rempio2 (param $0 f64) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) - (local $4 f64) + (local $4 i32) (local $5 f64) (local $6 f64) (local $7 f64) (local $8 f64) - (local $9 f64) + (local $9 i32) (local $10 i32) - (local $11 i64) - (local $12 i32) + (local $11 f64) + (local $12 f64) (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i32) - (local $18 f64) - (local $19 f64) - local.get $0 - i64.reinterpret_f64 - local.set $1 local.get $1 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $2 - local.get $2 - i32.const 31 - i32.shr_u - local.set $3 - local.get $2 i32.const 2147483647 i32.and - local.set $2 - local.get $2 - i32.const 1072243195 - i32.le_u + local.set $3 + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $3 + i32.const 1073928572 + i32.lt_u if + i32.const 1 + local.set $4 local.get $2 - i32.const 1044816030 - i32.lt_u + i32.eqz if - f64.const 1 - return - end - local.get $0 - local.set $5 - f64.const 0 - local.set $4 - local.get $5 - local.get $5 - f64.mul - local.set $6 - local.get $6 - local.get $6 - f64.mul - local.set $7 - local.get $6 - f64.const 0.0416666666666666 - local.get $6 - f64.const -0.001388888888887411 - local.get $6 - f64.const 2.480158728947673e-05 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - local.get $7 - local.get $7 - f64.mul - f64.const -2.7557314351390663e-07 - local.get $6 - f64.const 2.087572321298175e-09 - local.get $6 - f64.const -1.1359647557788195e-11 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - local.set $8 - f64.const 0.5 + local.get $0 + f64.const 1.5707963267341256 + f64.sub + local.set $5 + local.get $3 + i32.const 1073291771 + i32.ne + if + local.get $5 + f64.const 6.077100506506192e-11 + f64.sub + local.set $6 + local.get $5 + local.get $6 + f64.sub + f64.const 6.077100506506192e-11 + f64.sub + local.set $7 + else + local.get $5 + f64.const 6.077100506303966e-11 + f64.sub + local.set $5 + local.get $5 + f64.const 2.0222662487959506e-21 + f64.sub + local.set $6 + local.get $5 + local.get $6 + f64.sub + f64.const 2.0222662487959506e-21 + f64.sub + local.set $7 + end + else + local.get $0 + f64.const 1.5707963267341256 + f64.add + local.set $5 + local.get $3 + i32.const 1073291771 + i32.ne + if + local.get $5 + f64.const 6.077100506506192e-11 + f64.add + local.set $6 + local.get $5 + local.get $6 + f64.sub + f64.const 6.077100506506192e-11 + f64.add + local.set $7 + else + local.get $5 + f64.const 6.077100506303966e-11 + f64.add + local.set $5 + local.get $5 + f64.const 2.0222662487959506e-21 + f64.add + local.set $6 + local.get $5 + local.get $6 + f64.sub + f64.const 2.0222662487959506e-21 + f64.add + local.set $7 + end + i32.const -1 + local.set $4 + end local.get $6 - f64.mul - local.set $9 - f64.const 1 - local.get $9 - f64.sub - local.set $7 + global.set $~lib/math/rempio2_y0 local.get $7 - f64.const 1 - local.get $7 - f64.sub - local.get $9 - f64.sub - local.get $6 - local.get $8 - f64.mul - local.get $5 + global.set $~lib/math/rempio2_y1 local.get $4 - f64.mul - f64.sub - f64.add - f64.add return end - local.get $2 - i32.const 2146435072 - i32.ge_u + local.get $3 + i32.const 1094263291 + i32.lt_u if local.get $0 + f64.const 0.6366197723675814 + f64.mul + f64.nearest + local.set $7 local.get $0 + local.get $7 + f64.const 1.5707963267341256 + f64.mul f64.sub - return - end - block $~lib/math/rempio2|inlined.0 (result i32) - local.get $0 - local.set $4 - local.get $1 - local.set $11 + local.set $6 + local.get $7 + f64.const 6.077100506506192e-11 + f64.mul + local.set $5 local.get $3 - local.set $10 - local.get $11 + i32.const 20 + i32.shr_u + local.set $4 + local.get $6 + local.get $5 + f64.sub + local.set $8 + local.get $8 + i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - i32.const 2147483647 + local.set $9 + local.get $4 + local.get $9 + i32.const 20 + i32.shr_u + i32.const 2047 i32.and - local.set $12 - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $12 - i32.const 1073928572 - i32.lt_u - if - i32.const 1 - local.set $13 - local.get $10 - i32.eqz - if - local.get $4 - f64.const 1.5707963267341256 - f64.sub - local.set $9 - local.get $12 - i32.const 1073291771 - i32.ne - if - local.get $9 - f64.const 6.077100506506192e-11 - f64.sub - local.set $8 - local.get $9 - local.get $8 - f64.sub - f64.const 6.077100506506192e-11 - f64.sub - local.set $7 - else - local.get $9 - f64.const 6.077100506303966e-11 - f64.sub - local.set $9 - local.get $9 - f64.const 2.0222662487959506e-21 - f64.sub - local.set $8 - local.get $9 - local.get $8 - f64.sub - f64.const 2.0222662487959506e-21 - f64.sub - local.set $7 - end - else - local.get $4 - f64.const 1.5707963267341256 - f64.add - local.set $9 - local.get $12 - i32.const 1073291771 - i32.ne - if - local.get $9 - f64.const 6.077100506506192e-11 - f64.add - local.set $8 - local.get $9 - local.get $8 - f64.sub - f64.const 6.077100506506192e-11 - f64.add - local.set $7 - else - local.get $9 - f64.const 6.077100506303966e-11 - f64.add - local.set $9 - local.get $9 - f64.const 2.0222662487959506e-21 - f64.add - local.set $8 - local.get $9 - local.get $8 - f64.sub - f64.const 2.0222662487959506e-21 - f64.add - local.set $7 - end - i32.const -1 - local.set $13 - end - local.get $8 - global.set $~lib/math/rempio2_y0 - local.get $7 - global.set $~lib/math/rempio2_y1 - local.get $13 - br $~lib/math/rempio2|inlined.0 - end - local.get $12 - i32.const 1094263291 - i32.lt_u + i32.sub + local.set $10 + local.get $10 + i32.const 16 + i32.gt_u if - local.get $4 - f64.const 0.6366197723675814 - f64.mul - f64.nearest - local.set $7 - local.get $4 + local.get $6 + local.set $11 local.get $7 - f64.const 1.5707963267341256 + f64.const 6.077100506303966e-11 f64.mul + local.set $5 + local.get $11 + local.get $5 f64.sub - local.set $8 + local.set $6 local.get $7 - f64.const 6.077100506506192e-11 + f64.const 2.0222662487959506e-21 f64.mul - local.set $9 - local.get $12 - i32.const 20 - i32.shr_u - local.set $13 - local.get $8 - local.get $9 + local.get $11 + local.get $6 f64.sub - local.set $6 + local.get $5 + f64.sub + f64.sub + local.set $5 local.get $6 + local.get $5 + f64.sub + local.set $8 + local.get $8 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $14 - local.get $13 - local.get $14 + local.set $9 + local.get $4 + local.get $9 i32.const 20 i32.shr_u i32.const 2047 i32.and i32.sub - local.set $15 - local.get $15 - i32.const 16 + local.set $10 + local.get $10 + i32.const 49 i32.gt_u if - local.get $8 - local.set $5 - local.get $7 - f64.const 6.077100506303966e-11 - f64.mul - local.set $9 - local.get $5 - local.get $9 - f64.sub - local.set $8 + local.get $6 + local.set $12 local.get $7 - f64.const 2.0222662487959506e-21 + f64.const 2.0222662487111665e-21 f64.mul + local.set $5 + local.get $12 local.get $5 - local.get $8 - f64.sub - local.get $9 - f64.sub - f64.sub - local.set $9 - local.get $8 - local.get $9 f64.sub local.set $6 - local.get $6 - i64.reinterpret_f64 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.set $14 - local.get $13 - local.get $14 - i32.const 20 - i32.shr_u - i32.const 2047 - i32.and - i32.sub - local.set $15 - local.get $15 - i32.const 49 - i32.gt_u - if - local.get $8 - local.set $16 - local.get $7 - f64.const 2.0222662487111665e-21 - f64.mul - local.set $9 - local.get $16 - local.get $9 - f64.sub - local.set $8 - local.get $7 - f64.const 8.4784276603689e-32 - f64.mul - local.get $16 - local.get $8 - f64.sub - local.get $9 - f64.sub - f64.sub - local.set $9 - local.get $8 - local.get $9 - f64.sub - local.set $6 - end - end - local.get $8 - local.get $6 - f64.sub - local.get $9 - f64.sub - local.set $5 - local.get $6 - global.set $~lib/math/rempio2_y0 - local.get $5 - global.set $~lib/math/rempio2_y1 - local.get $7 - i32.trunc_f64_s - br $~lib/math/rempio2|inlined.0 - end - local.get $4 - local.get $11 - call $~lib/math/pio2_large_quot - local.set $15 - i32.const 0 - local.get $15 - i32.sub - local.get $15 - local.get $10 - select - end - local.set $17 - global.get $~lib/math/rempio2_y0 - local.set $18 - global.get $~lib/math/rempio2_y1 - local.set $19 - local.get $17 - i32.const 1 - i32.and - if (result f64) - block $~lib/math/sin_kern|inlined.0 (result f64) - local.get $18 - local.set $7 - local.get $19 - local.set $16 - i32.const 1 - local.set $13 - local.get $7 - local.get $7 - f64.mul - local.set $4 - local.get $4 - local.get $4 - f64.mul - local.set $5 - f64.const 0.00833333333332249 - local.get $4 - f64.const -1.984126982985795e-04 - local.get $4 - f64.const 2.7557313707070068e-06 - f64.mul - f64.add - f64.mul - f64.add - local.get $4 - local.get $5 - f64.mul - f64.const -2.5050760253406863e-08 - local.get $4 - f64.const 1.58969099521155e-10 - f64.mul - f64.add - f64.mul - f64.add - local.set $6 - local.get $4 - local.get $7 - f64.mul - local.set $9 - local.get $13 - i32.eqz - if - local.get $7 - local.get $9 - f64.const -0.16666666666666632 - local.get $4 - local.get $6 - f64.mul - f64.add - f64.mul - f64.add - br $~lib/math/sin_kern|inlined.0 - else local.get $7 - local.get $4 - f64.const 0.5 - local.get $16 + f64.const 8.4784276603689e-32 f64.mul - local.get $9 + local.get $12 local.get $6 - f64.mul f64.sub - f64.mul - local.get $16 + local.get $5 f64.sub - local.get $9 - f64.const -0.16666666666666632 - f64.mul f64.sub + local.set $5 + local.get $6 + local.get $5 f64.sub - br $~lib/math/sin_kern|inlined.0 + local.set $8 end - unreachable end - else - local.get $18 - local.set $16 - local.get $19 - local.set $8 - local.get $16 - local.get $16 - f64.mul - local.set $9 - local.get $9 - local.get $9 - f64.mul - local.set $6 - local.get $9 - f64.const 0.0416666666666666 - local.get $9 - f64.const -0.001388888888887411 - local.get $9 - f64.const 2.480158728947673e-05 - f64.mul - f64.add - f64.mul - f64.add - f64.mul local.get $6 + local.get $8 + f64.sub + local.get $5 + f64.sub + local.set $11 + local.get $8 + global.set $~lib/math/rempio2_y0 + local.get $11 + global.set $~lib/math/rempio2_y1 + local.get $7 + i32.trunc_f64_s + return + end + local.get $0 + local.get $1 + call $~lib/math/pio2_large_quot + local.set $13 + i32.const 0 + local.get $13 + i32.sub + local.get $13 + local.get $2 + select + ) + (func $~lib/math/sin_kern (param $0 f64) (param $1 f64) (param $2 i32) (result f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + local.get $0 + local.get $0 + f64.mul + local.set $3 + local.get $3 + local.get $3 + f64.mul + local.set $4 + f64.const 0.00833333333332249 + local.get $3 + f64.const -1.984126982985795e-04 + local.get $3 + f64.const 2.7557313707070068e-06 + f64.mul + f64.add + f64.mul + f64.add + local.get $3 + local.get $4 + f64.mul + f64.const -2.5050760253406863e-08 + local.get $3 + f64.const 1.58969099521155e-10 + f64.mul + f64.add + f64.mul + f64.add + local.set $5 + local.get $3 + local.get $0 + f64.mul + local.set $6 + local.get $2 + i32.eqz + if + local.get $0 local.get $6 - f64.mul - f64.const -2.7557314351390663e-07 - local.get $9 - f64.const 2.087572321298175e-09 - local.get $9 - f64.const -1.1359647557788195e-11 - f64.mul - f64.add + f64.const -0.16666666666666632 + local.get $3 + local.get $5 f64.mul f64.add f64.mul f64.add - local.set $5 + return + else + local.get $0 + local.get $3 f64.const 0.5 - local.get $9 + local.get $1 f64.mul - local.set $4 - f64.const 1 - local.get $4 - f64.sub - local.set $6 - local.get $6 - f64.const 1 local.get $6 - f64.sub - local.get $4 - f64.sub - local.get $9 local.get $5 f64.mul - local.get $16 - local.get $8 + f64.sub f64.mul + local.get $1 f64.sub - f64.add - f64.add - end - local.set $0 - local.get $17 - i32.const 1 - i32.add - i32.const 2 - i32.and - if (result f64) - local.get $0 - f64.neg - else - local.get $0 + local.get $6 + f64.const -0.16666666666666632 + f64.mul + f64.sub + f64.sub + return end + unreachable ) - (func $std/math/test_cos (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + (func $~lib/math/NativeMath.cos (param $0 f64) (result f64) + (local $1 i64) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f64) + (local $6 f64) local.get $0 - call $~lib/math/NativeMath.cos + i64.reinterpret_f64 + local.set $1 local.get $1 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $2 local.get $2 - local.get $3 - call $std/math/check - if (result i32) + i32.const 31 + i32.shr_u + local.set $3 + local.get $2 + i32.const 2147483647 + i32.and + local.set $2 + local.get $2 + i32.const 1072243195 + i32.le_u + if + local.get $2 + i32.const 1044816030 + i32.lt_u + if + f64.const 1 + return + end + local.get $0 + f64.const 0 + call $~lib/math/cos_kern + return + end + local.get $2 + i32.const 2146435072 + i32.ge_u + if + local.get $0 + local.get $0 + f64.sub + return + end + local.get $0 + local.get $1 + local.get $3 + call $~lib/math/rempio2 + local.set $4 + global.get $~lib/math/rempio2_y0 + local.set $5 + global.get $~lib/math/rempio2_y1 + local.set $6 + local.get $4 + i32.const 1 + i32.and + if (result f64) + local.get $5 + local.get $6 + i32.const 1 + call $~lib/math/sin_kern + else + local.get $5 + local.get $6 + call $~lib/math/cos_kern + end + local.set $0 + local.get $4 + i32.const 1 + i32.add + i32.const 2 + i32.and + if (result f64) + local.get $0 + f64.neg + else + local.get $0 + end + ) + (func $std/math/test_cos (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + local.get $0 + call $~lib/math/NativeMath.cos + local.get $1 + local.get $2 + local.get $3 + call $std/math/check + if (result i32) global.get $std/math/js i32.eqz if (result i32) @@ -5208,33 +5097,244 @@ i32.const 0 end ) + (func $~lib/math/cos_kernf (param $0 f64) (result f32) + (local $1 f64) + (local $2 f64) + (local $3 f64) + local.get $0 + local.get $0 + f64.mul + local.set $1 + local.get $1 + local.get $1 + f64.mul + local.set $2 + f64.const -0.001388676377460993 + local.get $1 + f64.const 2.439044879627741e-05 + f64.mul + f64.add + local.set $3 + f32.const 1 + f64.promote_f32 + local.get $1 + f64.const -0.499999997251031 + f64.mul + f64.add + local.get $2 + f64.const 0.04166662332373906 + f64.mul + f64.add + local.get $2 + local.get $1 + f64.mul + local.get $3 + f64.mul + f64.add + f32.demote_f64 + ) + (func $~lib/math/sin_kernf (param $0 f64) (result f32) + (local $1 f64) + (local $2 f64) + (local $3 f64) + (local $4 f64) + local.get $0 + local.get $0 + f64.mul + local.set $1 + local.get $1 + local.get $1 + f64.mul + local.set $2 + f64.const -1.9839334836096632e-04 + local.get $1 + f64.const 2.718311493989822e-06 + f64.mul + f64.add + local.set $3 + local.get $1 + local.get $0 + f64.mul + local.set $4 + local.get $0 + local.get $4 + f64.const -0.16666666641626524 + local.get $1 + f64.const 0.008333329385889463 + f64.mul + f64.add + f64.mul + f64.add + local.get $4 + local.get $2 + f64.mul + local.get $3 + f64.mul + f64.add + f32.demote_f64 + ) + (func $~lib/math/pio2f_large_quot (param $0 f32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i64) + (local $4 i32) + (local $5 i64) + (local $6 i64) + (local $7 i64) + (local $8 i64) + (local $9 i64) + (local $10 i64) + (local $11 i64) + (local $12 i64) + (local $13 i32) + local.get $1 + i32.const 23 + i32.shr_s + i32.const 152 + i32.sub + local.set $2 + local.get $2 + i32.const 63 + i32.and + i64.extend_i32_s + local.set $3 + i32.const 4600 + local.get $2 + i32.const 6 + i32.shr_s + i32.const 3 + i32.shl + i32.add + local.set $4 + local.get $4 + i64.load + local.set $5 + local.get $4 + i64.load offset=8 + local.set $6 + local.get $3 + i64.const 32 + i64.gt_u + if + local.get $4 + i64.load offset=16 + local.set $8 + local.get $8 + i64.const 96 + local.get $3 + i64.sub + i64.shr_u + local.set $7 + local.get $7 + local.get $6 + local.get $3 + i64.const 32 + i64.sub + i64.shl + i64.or + local.set $7 + else + local.get $6 + i64.const 32 + local.get $3 + i64.sub + i64.shr_u + local.set $7 + end + local.get $6 + i64.const 64 + local.get $3 + i64.sub + i64.shr_u + local.get $5 + local.get $3 + i64.shl + i64.or + local.set $9 + local.get $1 + i32.const 8388607 + i32.and + i32.const 8388608 + i32.or + i64.extend_i32_s + local.set $10 + local.get $10 + local.get $9 + i64.mul + local.get $10 + local.get $7 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.set $11 + local.get $11 + i64.const 2 + i64.shl + local.set $12 + local.get $11 + i64.const 62 + i64.shr_u + local.get $12 + i64.const 63 + i64.shr_u + i64.add + i32.wrap_i64 + local.set $13 + f64.const 8.515303950216386e-20 + local.get $0 + f64.promote_f32 + f64.copysign + local.get $12 + f64.convert_i64_s + f64.mul + global.set $~lib/math/rempio2f_y + local.get $13 + ) + (func $~lib/math/rempio2f (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (local $3 f64) + (local $4 i32) + local.get $1 + i32.const 1305022427 + i32.lt_u + if + local.get $0 + f64.promote_f32 + f64.const 0.6366197723675814 + f64.mul + f64.nearest + local.set $3 + local.get $0 + f64.promote_f32 + local.get $3 + f64.const 1.5707963109016418 + f64.mul + f64.sub + local.get $3 + f64.const 1.5893254773528196e-08 + f64.mul + f64.sub + global.set $~lib/math/rempio2f_y + local.get $3 + i32.trunc_f64_s + return + end + local.get $0 + local.get $1 + call $~lib/math/pio2f_large_quot + local.set $4 + i32.const 0 + local.get $4 + i32.sub + local.get $4 + local.get $2 + select + ) (func $~lib/math/NativeMathf.cos (param $0 f32) (result f32) (local $1 i32) (local $2 i32) - (local $3 f64) + (local $3 i32) (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 i32) - (local $9 i32) - (local $10 f32) - (local $11 i32) - (local $12 f32) - (local $13 i32) - (local $14 i64) - (local $15 i32) - (local $16 i64) - (local $17 i64) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i32) - (local $24 i32) - (local $25 f64) - (local $26 f32) + (local $5 f32) local.get $0 i32.reinterpret_f32 local.set $1 @@ -5259,38 +5359,7 @@ end local.get $0 f64.promote_f32 - local.set $3 - local.get $3 - local.get $3 - f64.mul - local.set $4 - local.get $4 - local.get $4 - f64.mul - local.set $5 - f64.const -0.001388676377460993 - local.get $4 - f64.const 2.439044879627741e-05 - f64.mul - f64.add - local.set $6 - f32.const 1 - f64.promote_f32 - local.get $4 - f64.const -0.499999997251031 - f64.mul - f64.add - local.get $5 - f64.const 0.04166662332373906 - f64.mul - f64.add - local.get $5 - local.get $4 - f64.mul - local.get $6 - f64.mul - f64.add - f32.demote_f64 + call $~lib/math/cos_kernf return end i32.const 0 @@ -5317,38 +5386,7 @@ f64.const 3.141592653589793 f64.sub end - local.set $3 - local.get $3 - local.get $3 - f64.mul - local.set $6 - local.get $6 - local.get $6 - f64.mul - local.set $5 - f64.const -0.001388676377460993 - local.get $6 - f64.const 2.439044879627741e-05 - f64.mul - f64.add - local.set $4 - f32.const 1 - f64.promote_f32 - local.get $6 - f64.const -0.499999997251031 - f64.mul - f64.add - local.get $5 - f64.const 0.04166662332373906 - f64.mul - f64.add - local.get $5 - local.get $6 - f64.mul - local.get $4 - f64.mul - f64.add - f32.demote_f64 + call $~lib/math/cos_kernf f32.neg return else @@ -5358,81 +5396,13 @@ f64.promote_f32 f64.const 1.5707963267948966 f64.add - local.set $3 - local.get $3 - local.get $3 - f64.mul - local.set $4 - local.get $4 - local.get $4 - f64.mul - local.set $5 - f64.const -1.9839334836096632e-04 - local.get $4 - f64.const 2.718311493989822e-06 - f64.mul - f64.add - local.set $6 - local.get $4 - local.get $3 - f64.mul - local.set $7 - local.get $3 - local.get $7 - f64.const -0.16666666641626524 - local.get $4 - f64.const 0.008333329385889463 - f64.mul - f64.add - f64.mul - f64.add - local.get $7 - local.get $5 - f64.mul - local.get $6 - f64.mul - f64.add - f32.demote_f64 + call $~lib/math/sin_kernf else f64.const 1.5707963267948966 local.get $0 f64.promote_f32 f64.sub - local.set $3 - local.get $3 - local.get $3 - f64.mul - local.set $7 - local.get $7 - local.get $7 - f64.mul - local.set $6 - f64.const -1.9839334836096632e-04 - local.get $7 - f64.const 2.718311493989822e-06 - f64.mul - f64.add - local.set $5 - local.get $7 - local.get $3 - f64.mul - local.set $4 - local.get $3 - local.get $4 - f64.const -0.16666666641626524 - local.get $7 - f64.const 0.008333329385889463 - f64.mul - f64.add - f64.mul - f64.add - local.get $4 - local.get $6 - f64.mul - local.get $5 - f64.mul - f64.add - f32.demote_f64 + call $~lib/math/sin_kernf end return end @@ -5458,38 +5428,7 @@ f64.const 6.283185307179586 f64.sub end - local.set $3 - local.get $3 - local.get $3 - f64.mul - local.set $4 - local.get $4 - local.get $4 - f64.mul - local.set $5 - f64.const -0.001388676377460993 - local.get $4 - f64.const 2.439044879627741e-05 - f64.mul - f64.add - local.set $6 - f32.const 1 - f64.promote_f32 - local.get $4 - f64.const -0.499999997251031 - f64.mul - f64.add - local.get $5 - f64.const 0.04166662332373906 - f64.mul - f64.add - local.get $5 - local.get $4 - f64.mul - local.get $6 - f64.mul - f64.add - f32.demote_f64 + call $~lib/math/cos_kernf return else local.get $2 @@ -5499,81 +5438,13 @@ f64.promote_f32 f64.const 4.71238898038469 f64.sub - local.set $7 - local.get $7 - local.get $7 - f64.mul - local.set $6 - local.get $6 - local.get $6 - f64.mul - local.set $5 - f64.const -1.9839334836096632e-04 - local.get $6 - f64.const 2.718311493989822e-06 - f64.mul - f64.add - local.set $4 - local.get $6 - local.get $7 - f64.mul - local.set $3 - local.get $7 - local.get $3 - f64.const -0.16666666641626524 - local.get $6 - f64.const 0.008333329385889463 - f64.mul - f64.add - f64.mul - f64.add - local.get $3 - local.get $5 - f64.mul - local.get $4 - f64.mul - f64.add - f32.demote_f64 + call $~lib/math/sin_kernf else local.get $0 f64.promote_f32 f64.const 4.71238898038469 f64.sub - local.set $7 - local.get $7 - local.get $7 - f64.mul - local.set $3 - local.get $3 - local.get $3 - f64.mul - local.set $4 - f64.const -1.9839334836096632e-04 - local.get $3 - f64.const 2.718311493989822e-06 - f64.mul - f64.add - local.set $5 - local.get $3 - local.get $7 - f64.mul - local.set $6 - local.get $7 - local.get $6 - f64.const -0.16666666641626524 - local.get $3 - f64.const 0.008333329385889463 - f64.mul - f64.add - f64.mul - f64.add - local.get $6 - local.get $4 - f64.mul - local.get $5 - f64.mul - f64.add - f32.demote_f64 + call $~lib/math/sin_kernf end return end @@ -5588,242 +5459,34 @@ f32.sub return end - block $~lib/math/rempio2f|inlined.0 (result i32) - local.get $0 - local.set $10 - local.get $1 - local.set $9 - local.get $2 - local.set $8 - local.get $9 - i32.const 1305022427 - i32.lt_u - if - local.get $10 - f64.promote_f32 - f64.const 0.6366197723675814 - f64.mul - f64.nearest - local.set $6 - local.get $10 - f64.promote_f32 - local.get $6 - f64.const 1.5707963109016418 - f64.mul - f64.sub - local.get $6 - f64.const 1.5893254773528196e-08 - f64.mul - f64.sub - global.set $~lib/math/rempio2f_y - local.get $6 - i32.trunc_f64_s - br $~lib/math/rempio2f|inlined.0 - end - local.get $10 - local.set $12 - local.get $9 - local.set $11 - local.get $11 - i32.const 23 - i32.shr_s - i32.const 152 - i32.sub - local.set $13 - local.get $13 - i32.const 63 - i32.and - i64.extend_i32_s - local.set $14 - i32.const 4600 - local.get $13 - i32.const 6 - i32.shr_s - i32.const 3 - i32.shl - i32.add - local.set $15 - local.get $15 - i64.load - local.set $16 - local.get $15 - i64.load offset=8 - local.set $17 - local.get $14 - i64.const 32 - i64.gt_u - if - local.get $15 - i64.load offset=16 - local.set $19 - local.get $19 - i64.const 96 - local.get $14 - i64.sub - i64.shr_u - local.set $18 - local.get $18 - local.get $17 - local.get $14 - i64.const 32 - i64.sub - i64.shl - i64.or - local.set $18 - else - local.get $17 - i64.const 32 - local.get $14 - i64.sub - i64.shr_u - local.set $18 - end - local.get $17 - i64.const 64 - local.get $14 - i64.sub - i64.shr_u - local.get $16 - local.get $14 - i64.shl - i64.or - local.set $19 - local.get $11 - i32.const 8388607 - i32.and - i32.const 8388608 - i32.or - i64.extend_i32_s - local.set $20 - local.get $20 - local.get $19 - i64.mul - local.get $20 - local.get $18 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.set $21 - local.get $21 - i64.const 2 - i64.shl - local.set $22 - local.get $21 - i64.const 62 - i64.shr_u - local.get $22 - i64.const 63 - i64.shr_u - i64.add - i32.wrap_i64 - local.set $23 - f64.const 8.515303950216386e-20 - local.get $12 - f64.promote_f32 - f64.copysign - local.get $22 - f64.convert_i64_s - f64.mul - global.set $~lib/math/rempio2f_y - local.get $23 - local.set $23 - i32.const 0 - local.get $23 - i32.sub - local.get $23 - local.get $8 - select - end - local.set $24 + local.get $0 + local.get $1 + local.get $2 + call $~lib/math/rempio2f + local.set $3 global.get $~lib/math/rempio2f_y - local.set $25 - local.get $24 + local.set $4 + local.get $3 i32.const 1 i32.and if (result f32) - local.get $25 - local.set $7 - local.get $7 - local.get $7 - f64.mul - local.set $6 - local.get $6 - local.get $6 - f64.mul - local.set $5 - f64.const -1.9839334836096632e-04 - local.get $6 - f64.const 2.718311493989822e-06 - f64.mul - f64.add - local.set $4 - local.get $6 - local.get $7 - f64.mul - local.set $3 - local.get $7 - local.get $3 - f64.const -0.16666666641626524 - local.get $6 - f64.const 0.008333329385889463 - f64.mul - f64.add - f64.mul - f64.add - local.get $3 - local.get $5 - f64.mul local.get $4 - f64.mul - f64.add - f32.demote_f64 + call $~lib/math/sin_kernf else - local.get $25 - local.set $7 - local.get $7 - local.get $7 - f64.mul - local.set $3 - local.get $3 - local.get $3 - f64.mul - local.set $4 - f64.const -0.001388676377460993 - local.get $3 - f64.const 2.439044879627741e-05 - f64.mul - f64.add - local.set $5 - f32.const 1 - f64.promote_f32 - local.get $3 - f64.const -0.499999997251031 - f64.mul - f64.add - local.get $4 - f64.const 0.04166662332373906 - f64.mul - f64.add local.get $4 - local.get $3 - f64.mul - local.get $5 - f64.mul - f64.add - f32.demote_f64 + call $~lib/math/cos_kernf end - local.set $26 - local.get $24 + local.set $5 + local.get $3 i32.const 1 i32.add i32.const 2 i32.and if (result f32) - local.get $26 + local.get $5 f32.neg else - local.get $26 + local.get $5 end ) (func $std/math/test_cosf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -6147,399 +5810,395 @@ local.get $14 f64.mul ) - (func $~lib/math/NativeMath.exp (param $0 f64) (result f64) - (local $1 f64) - (local $2 i64) - (local $3 i32) + (func $~lib/util/math/specialcase (param $0 f64) (param $1 i64) (param $2 i64) (result f64) + (local $3 f64) (local $4 f64) (local $5 f64) - (local $6 i64) + (local $6 f64) (local $7 f64) - (local $8 i32) - (local $9 i64) - (local $10 f64) - (local $11 i64) - (local $12 f64) - (local $13 f64) - (local $14 i64) - (local $15 i64) - (local $16 f64) - (local $17 f64) - (local $18 f64) - (local $19 f64) - (local $20 f64) - (local $21 f64) - i32.const 0 - i32.const 1 - i32.lt_s - drop - block $~lib/util/math/exp_lut|inlined.0 (result f64) - local.get $0 - local.set $1 + local.get $2 + i64.const 2147483648 + i64.and + i64.const 0 + i64.ne + i32.eqz + if local.get $1 - i64.reinterpret_f64 - local.set $2 - local.get $2 + i64.const 1009 i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - i32.wrap_i64 + i64.shl + i64.sub + local.set $1 + local.get $1 + f64.reinterpret_i64 local.set $3 + f64.const 5486124068793688683255936e279 local.get $3 - i32.const 969 - i32.sub - i32.const 63 - i32.ge_u - if - local.get $3 - i32.const 969 - i32.sub - i32.const -2147483648 - i32.ge_u - if - f64.const 1 - br $~lib/util/math/exp_lut|inlined.0 - end - local.get $3 - i32.const 1033 - i32.ge_u - if - local.get $2 - i64.const -4503599627370496 - i64.eq - if - f64.const 0 - br $~lib/util/math/exp_lut|inlined.0 - end - local.get $3 - i32.const 2047 - i32.ge_u - if - f64.const 1 - local.get $1 - f64.add - br $~lib/util/math/exp_lut|inlined.0 - end - f64.const 0 - f64.const inf - local.get $2 - i64.const 63 - i64.shr_u - i64.const 0 - i64.ne - select - br $~lib/util/math/exp_lut|inlined.0 - end - i32.const 0 - local.set $3 - end - f64.const 184.6649652337873 - local.get $1 + local.get $3 + local.get $0 f64.mul - local.set $4 - local.get $4 - f64.const 6755399441055744 f64.add + f64.mul + return + end + local.get $1 + i64.const 1022 + i64.const 52 + i64.shl + i64.add + local.set $1 + local.get $1 + f64.reinterpret_i64 + local.set $3 + local.get $3 + local.get $3 + local.get $0 + f64.mul + f64.add + local.set $4 + local.get $4 + f64.abs + f64.const 1 + f64.lt + if + f64.const 1 + local.get $4 + f64.copysign local.set $5 - local.get $5 - i64.reinterpret_f64 - local.set $6 - local.get $5 - f64.const 6755399441055744 + local.get $3 + local.get $4 f64.sub - local.set $5 - local.get $1 - local.get $5 - f64.const -0.005415212348111709 + local.get $3 + local.get $0 f64.mul f64.add + local.set $6 local.get $5 - f64.const -1.2864023111638346e-14 - f64.mul + local.get $4 f64.add local.set $7 - local.get $6 - i64.const 127 - i64.and - i64.const 1 - i64.shl - i32.wrap_i64 - local.set $8 - local.get $6 - i64.const 52 - i64.const 7 - i64.sub - i64.shl - local.set $9 - i32.const 4632 - local.get $8 - i32.const 3 - i32.shl - i32.add - i64.load - f64.reinterpret_i64 - local.set $10 - i32.const 4632 - local.get $8 - i32.const 3 - i32.shl - i32.add - i64.load offset=8 - local.get $9 - i64.add - local.set $11 - local.get $7 - local.get $7 - f64.mul - local.set $12 - local.get $10 - local.get $7 - f64.add - local.get $12 - f64.const 0.49999999999996786 + local.get $5 local.get $7 - f64.const 0.16666666666665886 - f64.mul + f64.sub + local.get $4 f64.add - f64.mul + local.get $6 f64.add - local.get $12 - local.get $12 - f64.mul - f64.const 0.0416666808410674 + local.set $6 local.get $7 - f64.const 0.008333335853059549 - f64.mul - f64.add - f64.mul + local.get $6 f64.add - local.set $13 - local.get $3 - i32.const 0 - i32.eq + local.get $5 + f64.sub + local.set $4 + local.get $4 + f64.const 0 + f64.eq if - block $~lib/util/math/specialcase|inlined.0 (result f64) - local.get $13 - local.set $16 - local.get $11 - local.set $15 - local.get $6 - local.set $14 - local.get $14 - i64.const 2147483648 - i64.and - i64.const 0 - i64.ne - i32.eqz - if - local.get $15 - i64.const 1009 - i64.const 52 - i64.shl - i64.sub - local.set $15 - local.get $15 - f64.reinterpret_i64 - local.set $17 - f64.const 5486124068793688683255936e279 - local.get $17 - local.get $17 - local.get $16 - f64.mul - f64.add - f64.mul - br $~lib/util/math/specialcase|inlined.0 - end - local.get $15 - i64.const 1022 - i64.const 52 - i64.shl - i64.add - local.set $15 - local.get $15 - f64.reinterpret_i64 - local.set $17 - local.get $17 - local.get $17 - local.get $16 - f64.mul - f64.add - local.set $18 - local.get $18 - f64.abs - f64.const 1 - f64.lt - if - f64.const 1 - local.get $18 - f64.copysign - local.set $19 - local.get $17 - local.get $18 - f64.sub - local.get $17 - local.get $16 - f64.mul - f64.add - local.set $20 - local.get $19 - local.get $18 - f64.add - local.set $21 - local.get $19 - local.get $21 - f64.sub - local.get $18 - f64.add - local.get $20 - f64.add - local.set $20 - local.get $21 - local.get $20 - f64.add - local.get $19 - f64.sub - local.set $18 - local.get $18 - f64.const 0 - f64.eq - if - local.get $15 - i64.const -9223372036854775808 - i64.and - f64.reinterpret_i64 - local.set $18 - end - end - local.get $18 - f64.const 2.2250738585072014e-308 - f64.mul - end - br $~lib/util/math/exp_lut|inlined.0 + local.get $1 + i64.const -9223372036854775808 + i64.and + f64.reinterpret_i64 + local.set $4 end - local.get $11 - f64.reinterpret_i64 - local.set $18 - local.get $18 - local.get $18 - local.get $13 - f64.mul - f64.add end - return + local.get $4 + f64.const 2.2250738585072014e-308 + f64.mul ) - (func $~lib/math/NativeMath.cosh (param $0 f64) (result f64) + (func $~lib/util/math/exp_lut (param $0 f64) (result f64) (local $1 i64) (local $2 i32) (local $3 f64) (local $4 f64) - (local $5 f64) + (local $5 i64) + (local $6 f64) + (local $7 i32) + (local $8 i64) + (local $9 f64) + (local $10 i64) + (local $11 f64) + (local $12 f64) + (local $13 f64) local.get $0 i64.reinterpret_f64 local.set $1 local.get $1 - i64.const 9223372036854775807 - i64.and - local.set $1 - local.get $1 - f64.reinterpret_i64 - local.set $0 - local.get $1 - i64.const 32 + i64.const 52 i64.shr_u + i64.const 2047 + i64.and i32.wrap_i64 local.set $2 local.get $2 - i32.const 1072049730 - i32.lt_u + i32.const 969 + i32.sub + i32.const 63 + i32.ge_u if local.get $2 - i32.const 1072693248 - i32.const 26 - i32.const 20 - i32.shl + i32.const 969 i32.sub - i32.lt_u + i32.const -2147483648 + i32.ge_u if f64.const 1 return end - local.get $0 - call $~lib/math/NativeMath.expm1 - local.set $3 - f64.const 1 - local.get $3 - local.get $3 - f64.mul - f64.const 2 - f64.const 2 - local.get $3 - f64.mul - f64.add - f64.div - f64.add - return - end - local.get $2 - i32.const 1082535490 - i32.lt_u - if - local.get $0 - call $~lib/math/NativeMath.exp - local.set $3 - f64.const 0.5 - local.get $3 - f64.const 1 - local.get $3 - f64.div - f64.add - f64.mul - return + local.get $2 + i32.const 1033 + i32.ge_u + if + local.get $1 + i64.const -4503599627370496 + i64.eq + if + f64.const 0 + return + end + local.get $2 + i32.const 2047 + i32.ge_u + if + f64.const 1 + local.get $0 + f64.add + return + end + f64.const 0 + f64.const inf + local.get $1 + i64.const 63 + i64.shr_u + i64.const 0 + i64.ne + select + return + end + i32.const 0 + local.set $2 end + f64.const 184.6649652337873 local.get $0 + f64.mul + local.set $3 + local.get $3 + f64.const 6755399441055744 + f64.add local.set $4 - i32.const 1023 - i32.const 2043 - i32.const 2 - i32.div_u - i32.add - i32.const 20 - i32.shl - i64.extend_i32_u - i64.const 32 - i64.shl - f64.reinterpret_i64 + local.get $4 + i64.reinterpret_f64 local.set $5 local.get $4 - f64.const 1416.0996898839683 + f64.const 6755399441055744 f64.sub - call $~lib/math/NativeMath.exp - local.get $5 + local.set $4 + local.get $0 + local.get $4 + f64.const -0.005415212348111709 f64.mul - local.get $5 + f64.add + local.get $4 + f64.const -1.2864023111638346e-14 f64.mul - local.set $3 - local.get $3 - ) - (func $std/math/test_cosh (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - local.get $0 - call $~lib/math/NativeMath.cosh - local.get $1 - local.get $2 - local.get $3 - call $std/math/check - if (result i32) - global.get $std/math/js - i32.eqz - if (result i32) - i32.const 1 - else - local.get $0 - call $~lib/bindings/Math/cosh - local.get $1 - local.get $2 - local.get $3 + f64.add + local.set $6 + local.get $5 + i64.const 127 + i64.and + i64.const 1 + i64.shl + i32.wrap_i64 + local.set $7 + local.get $5 + i64.const 52 + i64.const 7 + i64.sub + i64.shl + local.set $8 + i32.const 4632 + local.get $7 + i32.const 3 + i32.shl + i32.add + i64.load + f64.reinterpret_i64 + local.set $9 + i32.const 4632 + local.get $7 + i32.const 3 + i32.shl + i32.add + i64.load offset=8 + local.get $8 + i64.add + local.set $10 + local.get $6 + local.get $6 + f64.mul + local.set $11 + local.get $9 + local.get $6 + f64.add + local.get $11 + f64.const 0.49999999999996786 + local.get $6 + f64.const 0.16666666666665886 + f64.mul + f64.add + f64.mul + f64.add + local.get $11 + local.get $11 + f64.mul + f64.const 0.0416666808410674 + local.get $6 + f64.const 0.008333335853059549 + f64.mul + f64.add + f64.mul + f64.add + local.set $12 + local.get $2 + i32.const 0 + i32.eq + if + local.get $12 + local.get $10 + local.get $5 + call $~lib/util/math/specialcase + return + end + local.get $10 + f64.reinterpret_i64 + local.set $13 + local.get $13 + local.get $13 + local.get $12 + f64.mul + f64.add + ) + (func $~lib/math/NativeMath.exp (param $0 f64) (result f64) + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $0 + call $~lib/util/math/exp_lut + return + ) + (func $~lib/math/expo2 (param $0 f64) (result f64) + (local $1 f64) + i32.const 1023 + i32.const 2043 + i32.const 2 + i32.div_u + i32.add + i32.const 20 + i32.shl + i64.extend_i32_u + i64.const 32 + i64.shl + f64.reinterpret_i64 + local.set $1 + local.get $0 + f64.const 1416.0996898839683 + f64.sub + call $~lib/math/NativeMath.exp + local.get $1 + f64.mul + local.get $1 + f64.mul + ) + (func $~lib/math/NativeMath.cosh (param $0 f64) (result f64) + (local $1 i64) + (local $2 i32) + (local $3 f64) + local.get $0 + i64.reinterpret_f64 + local.set $1 + local.get $1 + i64.const 9223372036854775807 + i64.and + local.set $1 + local.get $1 + f64.reinterpret_i64 + local.set $0 + local.get $1 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $2 + local.get $2 + i32.const 1072049730 + i32.lt_u + if + local.get $2 + i32.const 1072693248 + i32.const 26 + i32.const 20 + i32.shl + i32.sub + i32.lt_u + if + f64.const 1 + return + end + local.get $0 + call $~lib/math/NativeMath.expm1 + local.set $3 + f64.const 1 + local.get $3 + local.get $3 + f64.mul + f64.const 2 + f64.const 2 + local.get $3 + f64.mul + f64.add + f64.div + f64.add + return + end + local.get $2 + i32.const 1082535490 + i32.lt_u + if + local.get $0 + call $~lib/math/NativeMath.exp + local.set $3 + f64.const 0.5 + local.get $3 + f64.const 1 + local.get $3 + f64.div + f64.add + f64.mul + return + end + local.get $0 + call $~lib/math/expo2 + local.set $3 + local.get $3 + ) + (func $std/math/test_cosh (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + local.get $0 + call $~lib/math/NativeMath.cosh + local.get $1 + local.get $2 + local.get $3 + call $std/math/check + if (result i32) + global.get $std/math/js + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + call $~lib/bindings/Math/cosh + local.get $1 + local.get $2 + local.get $3 call $std/math/check end else @@ -6839,147 +6498,165 @@ local.get $13 f32.mul ) - (func $~lib/math/NativeMathf.exp (param $0 f32) (result f32) - (local $1 f32) - (local $2 f64) + (func $~lib/util/math/expf_lut (param $0 f32) (result f32) + (local $1 f64) + (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) - (local $6 f64) - (local $7 i64) + (local $6 i64) + (local $7 f64) (local $8 f64) (local $9 f64) - (local $10 f64) - (local $11 i64) - i32.const 0 - i32.const 1 - i32.lt_s - drop - block $~lib/util/math/expf_lut|inlined.0 (result f32) - local.get $0 - local.set $1 - local.get $1 - f64.promote_f32 - local.set $2 - local.get $1 - i32.reinterpret_f32 - local.set $3 + (local $10 i64) + local.get $0 + f64.promote_f32 + local.set $1 + local.get $0 + i32.reinterpret_f32 + local.set $2 + local.get $2 + i32.const 20 + i32.shr_u + i32.const 2047 + i32.and + local.set $3 + local.get $3 + i32.const 1067 + i32.ge_u + if + local.get $2 + i32.const -8388608 + i32.eq + if + f32.const 0 + return + end local.get $3 - i32.const 20 - i32.shr_u - i32.const 2047 - i32.and - local.set $4 - local.get $4 - i32.const 1067 + i32.const 2040 i32.ge_u if - local.get $3 - i32.const -8388608 - i32.eq - if - f32.const 0 - br $~lib/util/math/expf_lut|inlined.0 - end - local.get $4 - i32.const 2040 - i32.ge_u - if - local.get $1 - local.get $1 - f32.add - br $~lib/util/math/expf_lut|inlined.0 - end - local.get $1 - i32.const 1118925335 - f32.reinterpret_i32 - f32.gt - if - local.get $1 - f32.const 1701411834604692317316873e14 - f32.mul - br $~lib/util/math/expf_lut|inlined.0 - end - local.get $1 - i32.const -1026559564 - f32.reinterpret_i32 - f32.lt - if - f32.const 0 - br $~lib/util/math/expf_lut|inlined.0 - end + local.get $0 + local.get $0 + f32.add + return + end + local.get $0 + i32.const 1118925335 + f32.reinterpret_i32 + f32.gt + if + local.get $0 + f32.const 1701411834604692317316873e14 + f32.mul + return + end + local.get $0 + i32.const -1026559564 + f32.reinterpret_i32 + f32.lt + if + f32.const 0 + return end - f64.const 46.16624130844683 - local.get $2 - f64.mul - local.set $5 - local.get $5 - f64.const 6755399441055744 - f64.add - local.set $6 - local.get $6 - i64.reinterpret_f64 - local.set $7 - local.get $5 - local.get $6 - f64.const 6755399441055744 - f64.sub - f64.sub - local.set $8 - i32.const 6680 - local.get $7 - i32.wrap_i64 - i32.const 31 - i32.and - i32.const 3 - i32.shl - i32.add - i64.load - local.set $11 - local.get $11 - local.get $7 - i64.const 52 - i64.const 5 - i64.sub - i64.shl - i64.add - local.set $11 - local.get $11 - f64.reinterpret_i64 - local.set $9 - f64.const 1.6938359250920212e-06 - local.get $8 - f64.mul - f64.const 2.3459809789509004e-04 - f64.add - local.set $5 - f64.const 0.021660849396613134 - local.get $8 - f64.mul - f64.const 1 - f64.add - local.set $10 - local.get $10 - local.get $5 - local.get $8 - local.get $8 - f64.mul - f64.mul - f64.add - local.set $10 - local.get $10 - local.get $9 - f64.mul - local.set $10 - local.get $10 - f32.demote_f64 end + f64.const 46.16624130844683 + local.get $1 + f64.mul + local.set $4 + local.get $4 + f64.const 6755399441055744 + f64.add + local.set $5 + local.get $5 + i64.reinterpret_f64 + local.set $6 + local.get $4 + local.get $5 + f64.const 6755399441055744 + f64.sub + f64.sub + local.set $7 + i32.const 6680 + local.get $6 + i32.wrap_i64 + i32.const 31 + i32.and + i32.const 3 + i32.shl + i32.add + i64.load + local.set $10 + local.get $10 + local.get $6 + i64.const 52 + i64.const 5 + i64.sub + i64.shl + i64.add + local.set $10 + local.get $10 + f64.reinterpret_i64 + local.set $8 + f64.const 1.6938359250920212e-06 + local.get $7 + f64.mul + f64.const 2.3459809789509004e-04 + f64.add + local.set $4 + f64.const 0.021660849396613134 + local.get $7 + f64.mul + f64.const 1 + f64.add + local.set $9 + local.get $9 + local.get $4 + local.get $7 + local.get $7 + f64.mul + f64.mul + f64.add + local.set $9 + local.get $9 + local.get $8 + f64.mul + local.set $9 + local.get $9 + f32.demote_f64 + ) + (func $~lib/math/NativeMathf.exp (param $0 f32) (result f32) + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $0 + call $~lib/util/math/expf_lut return ) + (func $~lib/math/expo2f (param $0 f32) (result f32) + (local $1 f32) + i32.const 127 + i32.const 235 + i32.const 1 + i32.shr_u + i32.add + i32.const 23 + i32.shl + f32.reinterpret_i32 + local.set $1 + local.get $0 + f32.const 162.88958740234375 + f32.sub + call $~lib/math/NativeMathf.exp + local.get $1 + f32.mul + local.get $1 + f32.mul + ) (func $~lib/math/NativeMathf.cosh (param $0 f32) (result f32) (local $1 i32) (local $2 f32) - (local $3 f32) local.get $0 i32.reinterpret_f32 local.set $1 @@ -7038,24 +6715,7 @@ return end local.get $0 - local.set $2 - i32.const 127 - i32.const 235 - i32.const 1 - i32.shr_u - i32.add - i32.const 23 - i32.shl - f32.reinterpret_i32 - local.set $3 - local.get $2 - f32.const 162.88958740234375 - f32.sub - call $~lib/math/NativeMathf.exp - local.get $3 - f32.mul - local.get $3 - f32.mul + call $~lib/math/expo2f ) (func $std/math/test_coshf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 @@ -7129,272 +6789,267 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMath.exp2 (param $0 f64) (result f64) - (local $1 f64) - (local $2 i64) - (local $3 i32) + (func $~lib/util/math/specialcase2 (param $0 f64) (param $1 i64) (param $2 i64) (result f64) + (local $3 f64) (local $4 f64) - (local $5 i64) + (local $5 f64) (local $6 f64) - (local $7 i32) - (local $8 i64) - (local $9 f64) - (local $10 i64) - (local $11 f64) - (local $12 f64) - (local $13 i64) - (local $14 i64) - (local $15 f64) - (local $16 f64) - (local $17 f64) - (local $18 f64) - (local $19 f64) - block $~lib/util/math/exp2_lut|inlined.0 (result f64) - local.get $0 - local.set $1 + local.get $2 + i64.const 2147483648 + i64.and + i64.const 0 + i64.eq + if local.get $1 - i64.reinterpret_f64 - local.set $2 - local.get $2 + i64.const 1 i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - i32.wrap_i64 + i64.shl + i64.sub + local.set $1 + local.get $1 + f64.reinterpret_i64 local.set $3 + f64.const 2 + local.get $3 + local.get $0 + f64.mul local.get $3 - i32.const 969 - i32.sub - i32.const 63 - i32.ge_u - if - local.get $3 - i32.const 969 - i32.sub - i32.const -2147483648 - i32.ge_u - if - f64.const 1 - br $~lib/util/math/exp2_lut|inlined.0 - end - local.get $3 - i32.const 1033 - i32.ge_u - if - local.get $2 - i64.const -4503599627370496 - i64.eq - if - f64.const 0 - br $~lib/util/math/exp2_lut|inlined.0 - end - local.get $3 - i32.const 2047 - i32.ge_u - if - f64.const 1 - local.get $1 - f64.add - br $~lib/util/math/exp2_lut|inlined.0 - end - local.get $2 - i64.const 63 - i64.shr_u - i64.const 0 - i64.ne - i32.eqz - if - f64.const inf - br $~lib/util/math/exp2_lut|inlined.0 - else - local.get $2 - i64.const -4570929321408987136 - i64.ge_u - if - f64.const 0 - br $~lib/util/math/exp2_lut|inlined.0 - end - end - end - local.get $2 - i64.const 1 - i64.shl - i64.const -9143996093422370816 - i64.gt_u - if - i32.const 0 - local.set $3 - end - end - local.get $1 - f64.const 52776558133248 f64.add - local.set $4 - local.get $4 - i64.reinterpret_f64 - local.set $5 - local.get $4 - f64.const 52776558133248 - f64.sub - local.set $4 - local.get $1 + f64.mul + return + end + local.get $1 + i64.const 1022 + i64.const 52 + i64.shl + i64.add + local.set $1 + local.get $1 + f64.reinterpret_i64 + local.set $3 + local.get $3 + local.get $0 + f64.mul + local.get $3 + f64.add + local.set $4 + local.get $4 + f64.const 1 + f64.lt + if + local.get $3 local.get $4 f64.sub - local.set $6 - local.get $5 - i64.const 127 - i64.and - i64.const 1 - i64.shl - i32.wrap_i64 - local.set $7 - local.get $5 - i64.const 52 - i64.const 7 - i64.sub - i64.shl - local.set $8 - i32.const 4632 - local.get $7 - i32.const 3 - i32.shl - i32.add - i64.load - f64.reinterpret_i64 - local.set $9 - i32.const 4632 - local.get $7 - i32.const 3 - i32.shl - i32.add - i64.load offset=8 - local.get $8 - i64.add - local.set $10 - local.get $6 - local.get $6 - f64.mul - local.set $11 - local.get $9 - local.get $6 - f64.const 0.6931471805599453 + local.get $3 + local.get $0 f64.mul f64.add - local.get $11 - f64.const 0.24022650695909065 - local.get $6 - f64.const 0.0555041086686087 - f64.mul + local.set $6 + f64.const 1 + local.get $4 f64.add - f64.mul + local.set $5 + f64.const 1 + local.get $5 + f64.sub + local.get $4 f64.add - local.get $11 - local.get $11 - f64.mul - f64.const 0.009618131975721055 local.get $6 - f64.const 1.3332074570119598e-03 - f64.mul f64.add - f64.mul + local.set $6 + local.get $5 + local.get $6 f64.add - local.set $12 - local.get $3 - i32.const 0 - i32.eq + f64.const 1 + f64.sub + local.set $4 + end + local.get $4 + f64.const 2.2250738585072014e-308 + f64.mul + ) + (func $~lib/util/math/exp2_lut (param $0 f64) (result f64) + (local $1 i64) + (local $2 i32) + (local $3 f64) + (local $4 i64) + (local $5 f64) + (local $6 i32) + (local $7 i64) + (local $8 f64) + (local $9 i64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + local.get $0 + i64.reinterpret_f64 + local.set $1 + local.get $1 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + i32.wrap_i64 + local.set $2 + local.get $2 + i32.const 969 + i32.sub + i32.const 63 + i32.ge_u + if + local.get $2 + i32.const 969 + i32.sub + i32.const -2147483648 + i32.ge_u if - block $~lib/util/math/specialcase2|inlined.0 (result f64) - local.get $12 - local.set $15 - local.get $10 - local.set $14 - local.get $5 - local.set $13 - local.get $13 - i64.const 2147483648 - i64.and - i64.const 0 - i64.eq - if - local.get $14 - i64.const 1 - i64.const 52 - i64.shl - i64.sub - local.set $14 - local.get $14 - f64.reinterpret_i64 - local.set $16 - f64.const 2 - local.get $16 - local.get $15 - f64.mul - local.get $16 - f64.add - f64.mul - br $~lib/util/math/specialcase2|inlined.0 - end - local.get $14 - i64.const 1022 - i64.const 52 - i64.shl - i64.add - local.set $14 - local.get $14 - f64.reinterpret_i64 - local.set $16 - local.get $16 - local.get $15 - f64.mul - local.get $16 - f64.add - local.set $17 - local.get $17 + f64.const 1 + return + end + local.get $2 + i32.const 1033 + i32.ge_u + if + local.get $1 + i64.const -4503599627370496 + i64.eq + if + f64.const 0 + return + end + local.get $2 + i32.const 2047 + i32.ge_u + if f64.const 1 - f64.lt + local.get $0 + f64.add + return + end + local.get $1 + i64.const 63 + i64.shr_u + i64.const 0 + i64.ne + i32.eqz + if + f64.const inf + return + else + local.get $1 + i64.const -4570929321408987136 + i64.ge_u if - local.get $16 - local.get $17 - f64.sub - local.get $16 - local.get $15 - f64.mul - f64.add - local.set $19 - f64.const 1 - local.get $17 - f64.add - local.set $18 - f64.const 1 - local.get $18 - f64.sub - local.get $17 - f64.add - local.get $19 - f64.add - local.set $19 - local.get $18 - local.get $19 - f64.add - f64.const 1 - f64.sub - local.set $17 + f64.const 0 + return end - local.get $17 - f64.const 2.2250738585072014e-308 - f64.mul end - br $~lib/util/math/exp2_lut|inlined.0 end - local.get $10 - f64.reinterpret_i64 - local.set $17 - local.get $17 - local.get $12 - f64.mul - local.get $17 - f64.add + local.get $1 + i64.const 1 + i64.shl + i64.const -9143996093422370816 + i64.gt_u + if + i32.const 0 + local.set $2 + end + end + local.get $0 + f64.const 52776558133248 + f64.add + local.set $3 + local.get $3 + i64.reinterpret_f64 + local.set $4 + local.get $3 + f64.const 52776558133248 + f64.sub + local.set $3 + local.get $0 + local.get $3 + f64.sub + local.set $5 + local.get $4 + i64.const 127 + i64.and + i64.const 1 + i64.shl + i32.wrap_i64 + local.set $6 + local.get $4 + i64.const 52 + i64.const 7 + i64.sub + i64.shl + local.set $7 + i32.const 4632 + local.get $6 + i32.const 3 + i32.shl + i32.add + i64.load + f64.reinterpret_i64 + local.set $8 + i32.const 4632 + local.get $6 + i32.const 3 + i32.shl + i32.add + i64.load offset=8 + local.get $7 + i64.add + local.set $9 + local.get $5 + local.get $5 + f64.mul + local.set $10 + local.get $8 + local.get $5 + f64.const 0.6931471805599453 + f64.mul + f64.add + local.get $10 + f64.const 0.24022650695909065 + local.get $5 + f64.const 0.0555041086686087 + f64.mul + f64.add + f64.mul + f64.add + local.get $10 + local.get $10 + f64.mul + f64.const 0.009618131975721055 + local.get $5 + f64.const 1.3332074570119598e-03 + f64.mul + f64.add + f64.mul + f64.add + local.set $11 + local.get $2 + i32.const 0 + i32.eq + if + local.get $11 + local.get $9 + local.get $4 + call $~lib/util/math/specialcase2 + return end + local.get $9 + f64.reinterpret_i64 + local.set $12 + local.get $12 + local.get $11 + f64.mul + local.get $12 + f64.add + ) + (func $~lib/math/NativeMath.exp2 (param $0 f64) (result f64) + local.get $0 + call $~lib/util/math/exp2_lut ) (func $std/math/test_exp2 (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) local.get $0 @@ -7421,128 +7076,127 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.exp2 (param $0 f32) (result f32) - (local $1 f32) - (local $2 f64) + (func $~lib/util/math/exp2f_lut (param $0 f32) (result f32) + (local $1 f64) + (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i64) - (local $7 f64) - (local $8 i64) + (local $4 f64) + (local $5 i64) + (local $6 f64) + (local $7 i64) + (local $8 f64) (local $9 f64) - (local $10 f64) - block $~lib/util/math/exp2f_lut|inlined.0 (result f32) - local.get $0 - local.set $1 - local.get $1 - f64.promote_f32 - local.set $2 - local.get $1 - i32.reinterpret_f32 - local.set $3 + local.get $0 + f64.promote_f32 + local.set $1 + local.get $0 + i32.reinterpret_f32 + local.set $2 + local.get $2 + i32.const 20 + i32.shr_u + i32.const 2047 + i32.and + local.set $3 + local.get $3 + i32.const 1072 + i32.ge_u + if + local.get $2 + i32.const -8388608 + i32.eq + if + f32.const 0 + return + end local.get $3 - i32.const 20 - i32.shr_u - i32.const 2047 - i32.and - local.set $4 - local.get $4 - i32.const 1072 + i32.const 2040 i32.ge_u if - local.get $3 - i32.const -8388608 - i32.eq - if - f32.const 0 - br $~lib/util/math/exp2f_lut|inlined.0 - end - local.get $4 - i32.const 2040 - i32.ge_u - if - local.get $1 - local.get $1 - f32.add - br $~lib/util/math/exp2f_lut|inlined.0 - end - local.get $1 + local.get $0 + local.get $0 + f32.add + return + end + local.get $0 + f32.const 0 + f32.gt + if + local.get $0 + f32.const 1701411834604692317316873e14 + f32.mul + return + end + local.get $0 + f32.const -150 + f32.le + if f32.const 0 - f32.gt - if - local.get $1 - f32.const 1701411834604692317316873e14 - f32.mul - br $~lib/util/math/exp2f_lut|inlined.0 - end - local.get $1 - f32.const -150 - f32.le - if - f32.const 0 - br $~lib/util/math/exp2f_lut|inlined.0 - end + return end - local.get $2 - f64.const 211106232532992 - f64.add - local.set $5 - local.get $5 - i64.reinterpret_f64 - local.set $6 - local.get $2 - local.get $5 - f64.const 211106232532992 - f64.sub - f64.sub - local.set $7 - i32.const 6680 - local.get $6 - i32.wrap_i64 - i32.const 31 - i32.and - i32.const 3 - i32.shl - i32.add - i64.load - local.set $8 - local.get $8 - local.get $6 - i64.const 52 - i64.const 5 - i64.sub - i64.shl - i64.add - local.set $8 - local.get $8 - f64.reinterpret_i64 - local.set $10 - f64.const 0.6931471806916203 - local.get $7 - f64.mul - f64.const 1 - f64.add - local.set $9 - local.get $9 - f64.const 0.05550361559341535 - local.get $7 - f64.mul - f64.const 0.2402284522445722 - f64.add - local.get $7 - local.get $7 - f64.mul - f64.mul - f64.add - local.set $9 - local.get $9 - local.get $10 - f64.mul - local.set $9 - local.get $9 - f32.demote_f64 end + local.get $1 + f64.const 211106232532992 + f64.add + local.set $4 + local.get $4 + i64.reinterpret_f64 + local.set $5 + local.get $1 + local.get $4 + f64.const 211106232532992 + f64.sub + f64.sub + local.set $6 + i32.const 6680 + local.get $5 + i32.wrap_i64 + i32.const 31 + i32.and + i32.const 3 + i32.shl + i32.add + i64.load + local.set $7 + local.get $7 + local.get $5 + i64.const 52 + i64.const 5 + i64.sub + i64.shl + i64.add + local.set $7 + local.get $7 + f64.reinterpret_i64 + local.set $9 + f64.const 0.6931471806916203 + local.get $6 + f64.mul + f64.const 1 + f64.add + local.set $8 + local.get $8 + f64.const 0.05550361559341535 + local.get $6 + f64.mul + f64.const 0.2402284522445722 + f64.add + local.get $6 + local.get $6 + f64.mul + f64.mul + f64.add + local.set $8 + local.get $8 + local.get $9 + f64.mul + local.set $8 + local.get $8 + f32.demote_f64 + ) + (func $~lib/math/NativeMathf.exp2 (param $0 f32) (result f32) + local.get $0 + call $~lib/util/math/exp2f_lut ) (func $std/math/test_exp2f (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 @@ -7552,12 +7206,13 @@ local.get $3 call $std/math/check ) - (func $std/math/test_floor (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 f64) + (func $~lib/math/NativeMath.floor (param $0 f64) (result f64) local.get $0 - local.set $4 - local.get $4 f64.floor + ) + (func $std/math/test_floor (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + local.get $0 + call $~lib/math/NativeMath.floor local.get $1 local.get $2 local.get $3 @@ -7579,12 +7234,13 @@ i32.const 0 end ) - (func $std/math/test_floorf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - (local $4 f32) + (func $~lib/math/NativeMathf.floor (param $0 f32) (result f32) local.get $0 - local.set $4 - local.get $4 f32.floor + ) + (func $std/math/test_floorf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.floor local.get $1 local.get $2 local.get $3 @@ -8494,9 +8150,9 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMath.log2 (param $0 f64) (result f64) - (local $1 f64) - (local $2 i64) + (func $~lib/util/math/log2_lut (param $0 f64) (result f64) + (local $1 i64) + (local $2 f64) (local $3 f64) (local $4 f64) (local $5 f64) @@ -8505,12 +8161,12 @@ (local $8 f64) (local $9 f64) (local $10 f64) - (local $11 f64) - (local $12 i32) - (local $13 i64) - (local $14 i32) + (local $11 i32) + (local $12 i64) + (local $13 i32) + (local $14 i64) (local $15 i64) - (local $16 i64) + (local $16 f64) (local $17 f64) (local $18 f64) (local $19 f64) @@ -8518,331 +8174,339 @@ (local $21 f64) (local $22 f64) (local $23 f64) - i32.const 0 - i32.const 1 - i32.lt_s - drop - block $~lib/util/math/log2_lut|inlined.0 (result f64) + (local $24 f64) + (local $25 f64) + (local $26 f64) + (local $27 f64) + (local $28 f64) + (local $29 f64) + (local $30 f64) + (local $31 f64) + local.get $0 + i64.reinterpret_f64 + local.set $1 + local.get $1 + i64.const 4606800540372828160 + i64.sub + i64.const 4607381812656734208 + i64.const 4606800540372828160 + i64.sub + i64.lt_u + if local.get $0 - local.set $1 - local.get $1 - i64.reinterpret_f64 + f64.const 1 + f64.sub local.set $2 local.get $2 - i64.const 4606800540372828160 - i64.sub - i64.const 4607381812656734208 - i64.const 4606800540372828160 - i64.sub - i64.lt_u - if - local.get $1 - f64.const 1 - f64.sub - local.set $3 - local.get $3 - i64.reinterpret_f64 - i64.const -4294967296 - i64.and - f64.reinterpret_i64 - local.set $4 - local.get $3 - local.get $4 - f64.sub - local.set $5 - local.get $4 - f64.const 1.4426950407214463 - f64.mul - local.set $6 - local.get $5 - f64.const 1.4426950407214463 - f64.mul - local.get $3 - f64.const 1.6751713164886512e-10 - f64.mul - f64.add - local.set $7 - local.get $3 - local.get $3 - f64.mul - local.set $8 - local.get $8 - local.get $8 - f64.mul - local.set $9 - local.get $8 - f64.const -0.7213475204444817 - local.get $3 - f64.const 0.48089834696298744 - f64.mul - f64.add - f64.mul - local.set $10 - local.get $6 - local.get $10 - f64.add - local.set $11 - local.get $7 - local.get $6 - local.get $11 - f64.sub - local.get $10 - f64.add - f64.add - local.set $7 - local.get $7 - local.get $9 - f64.const -0.360673760222145 - local.get $3 - f64.const 0.2885390081805197 - f64.mul - f64.add - local.get $8 - f64.const -0.24044917405728863 - local.get $3 - f64.const 0.2060992861022954 - f64.mul - f64.add - f64.mul - f64.add - local.get $9 - f64.const -0.18033596705327856 - local.get $3 - f64.const 0.1603032746063156 - f64.mul - f64.add - local.get $8 - f64.const -0.14483316576701266 - local.get $3 - f64.const 0.13046826811283835 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - local.set $7 - local.get $11 - local.get $7 - f64.add - br $~lib/util/math/log2_lut|inlined.0 - end - local.get $2 - i64.const 48 - i64.shr_u - i32.wrap_i64 - local.set $12 - local.get $12 - i32.const 16 - i32.sub - i32.const 32752 - i32.const 16 - i32.sub - i32.ge_u - if - local.get $2 - i64.const 1 - i64.shl - i64.const 0 - i64.eq - if - f64.const -1 - local.get $1 - local.get $1 - f64.mul - f64.div - br $~lib/util/math/log2_lut|inlined.0 - end - local.get $2 - i64.const 9218868437227405312 - i64.eq - if - local.get $1 - br $~lib/util/math/log2_lut|inlined.0 - end - local.get $12 - i32.const 32768 - i32.and - if (result i32) - i32.const 1 - else - local.get $12 - i32.const 32752 - i32.and - i32.const 32752 - i32.eq - end - if - local.get $1 - local.get $1 - f64.sub - local.get $1 - local.get $1 - f64.sub - f64.div - br $~lib/util/math/log2_lut|inlined.0 - end - local.get $1 - f64.const 4503599627370496 - f64.mul - i64.reinterpret_f64 - local.set $2 - local.get $2 - i64.const 52 - i64.const 52 - i64.shl - i64.sub - local.set $2 - end - local.get $2 - i64.const 4604367669032910848 - i64.sub - local.set $13 - local.get $13 - i64.const 52 - i64.const 6 - i64.sub - i64.shr_u - i64.const 63 - i64.and - i32.wrap_i64 - local.set $14 - local.get $13 - i64.const 52 - i64.shr_s - local.set $15 - local.get $2 - local.get $13 - i64.const -4503599627370496 - i64.and - i64.sub - local.set $16 - i32.const 6936 - local.get $14 - i32.const 1 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load - local.set $11 - i32.const 6936 - local.get $14 - i32.const 1 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load offset=8 - local.set $10 - local.get $16 - f64.reinterpret_i64 - local.set $9 - local.get $15 - f64.convert_i64_s - local.set $8 - i32.const 7960 - local.get $14 - i32.const 1 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load - local.set $7 - i32.const 7960 - local.get $14 - i32.const 1 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load offset=8 - local.set $6 - local.get $9 - local.get $7 - f64.sub - local.get $6 - f64.sub - local.get $11 - f64.mul - local.set $5 - local.get $5 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $4 - local.get $5 - local.get $4 - f64.sub local.set $3 - local.get $4 + local.get $2 + local.get $3 + f64.sub + local.set $4 + local.get $3 f64.const 1.4426950407214463 f64.mul - local.set $17 - local.get $3 + local.set $5 + local.get $4 f64.const 1.4426950407214463 f64.mul - local.get $5 + local.get $2 f64.const 1.6751713164886512e-10 f64.mul f64.add - local.set $18 - local.get $8 - local.get $10 + local.set $6 + local.get $2 + local.get $2 + f64.mul + local.set $7 + local.get $7 + local.get $7 + f64.mul + local.set $8 + local.get $7 + f64.const -0.7213475204444817 + local.get $2 + f64.const 0.48089834696298744 + f64.mul f64.add - local.set $19 - local.get $19 - local.get $17 + f64.mul + local.set $9 + local.get $5 + local.get $9 f64.add - local.set $20 - local.get $19 - local.get $20 + local.set $10 + local.get $6 + local.get $5 + local.get $10 f64.sub - local.get $17 + local.get $9 f64.add - local.get $18 f64.add - local.set $21 - local.get $5 - local.get $5 + local.set $6 + local.get $6 + local.get $8 + f64.const -0.360673760222145 + local.get $2 + f64.const 0.2885390081805197 f64.mul - local.set $22 - f64.const -0.7213475204444882 - local.get $5 - f64.const 0.4808983469629985 + f64.add + local.get $7 + f64.const -0.24044917405728863 + local.get $2 + f64.const 0.2060992861022954 f64.mul f64.add - local.get $22 - f64.const -0.36067375954075914 - local.get $5 - f64.const 0.2885390073180969 f64.mul f64.add + local.get $8 + f64.const -0.18033596705327856 + local.get $2 + f64.const 0.1603032746063156 f64.mul f64.add - local.get $22 - local.get $22 + local.get $7 + f64.const -0.14483316576701266 + local.get $2 + f64.const 0.13046826811283835 f64.mul - f64.const -0.2404693555628422 - local.get $5 - f64.const 0.2061202382173603 + f64.add f64.mul f64.add f64.mul f64.add - local.set $23 - local.get $21 - local.get $22 - local.get $23 f64.mul f64.add - local.get $20 + local.set $6 + local.get $10 + local.get $6 f64.add + return + end + local.get $1 + i64.const 48 + i64.shr_u + i32.wrap_i64 + local.set $11 + local.get $11 + i32.const 16 + i32.sub + i32.const 32752 + i32.const 16 + i32.sub + i32.ge_u + if + local.get $1 + i64.const 1 + i64.shl + i64.const 0 + i64.eq + if + f64.const -1 + local.get $0 + local.get $0 + f64.mul + f64.div + return + end + local.get $1 + i64.const 9218868437227405312 + i64.eq + if + local.get $0 + return + end + local.get $11 + i32.const 32768 + i32.and + if (result i32) + i32.const 1 + else + local.get $11 + i32.const 32752 + i32.and + i32.const 32752 + i32.eq + end + if + local.get $0 + local.get $0 + f64.sub + local.get $0 + local.get $0 + f64.sub + f64.div + return + end + local.get $0 + f64.const 4503599627370496 + f64.mul + i64.reinterpret_f64 + local.set $1 + local.get $1 + i64.const 52 + i64.const 52 + i64.shl + i64.sub + local.set $1 end + local.get $1 + i64.const 4604367669032910848 + i64.sub + local.set $12 + local.get $12 + i64.const 52 + i64.const 6 + i64.sub + i64.shr_u + i64.const 63 + i64.and + i32.wrap_i64 + local.set $13 + local.get $12 + i64.const 52 + i64.shr_s + local.set $14 + local.get $1 + local.get $12 + i64.const -4503599627370496 + i64.and + i64.sub + local.set $15 + i32.const 6936 + local.get $13 + i32.const 1 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load + local.set $16 + i32.const 6936 + local.get $13 + i32.const 1 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load offset=8 + local.set $17 + local.get $15 + f64.reinterpret_i64 + local.set $18 + local.get $14 + f64.convert_i64_s + local.set $19 + i32.const 7960 + local.get $13 + i32.const 1 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load + local.set $20 + i32.const 7960 + local.get $13 + i32.const 1 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load offset=8 + local.set $21 + local.get $18 + local.get $20 + f64.sub + local.get $21 + f64.sub + local.get $16 + f64.mul + local.set $22 + local.get $22 + i64.reinterpret_f64 + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.set $23 + local.get $22 + local.get $23 + f64.sub + local.set $24 + local.get $23 + f64.const 1.4426950407214463 + f64.mul + local.set $25 + local.get $24 + f64.const 1.4426950407214463 + f64.mul + local.get $22 + f64.const 1.6751713164886512e-10 + f64.mul + f64.add + local.set $26 + local.get $19 + local.get $17 + f64.add + local.set $27 + local.get $27 + local.get $25 + f64.add + local.set $28 + local.get $27 + local.get $28 + f64.sub + local.get $25 + f64.add + local.get $26 + f64.add + local.set $29 + local.get $22 + local.get $22 + f64.mul + local.set $30 + f64.const -0.7213475204444882 + local.get $22 + f64.const 0.4808983469629985 + f64.mul + f64.add + local.get $30 + f64.const -0.36067375954075914 + local.get $22 + f64.const 0.2885390073180969 + f64.mul + f64.add + f64.mul + f64.add + local.get $30 + local.get $30 + f64.mul + f64.const -0.2404693555628422 + local.get $22 + f64.const 0.2061202382173603 + f64.mul + f64.add + f64.mul + f64.add + local.set $31 + local.get $29 + local.get $30 + local.get $31 + f64.mul + f64.add + local.get $28 + f64.add + ) + (func $~lib/math/NativeMath.log2 (param $0 f64) (result f64) + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $0 + call $~lib/util/math/log2_lut return ) (func $std/math/test_log2 (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) @@ -8869,14 +8533,14 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.log2 (param $0 f32) (result f32) - (local $1 f32) + (func $~lib/util/math/log2f_lut (param $0 f32) (result f32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) + (local $7 f64) (local $8 f64) (local $9 f64) (local $10 f64) @@ -8884,164 +8548,163 @@ (local $12 f64) (local $13 f64) (local $14 f64) - (local $15 f64) - i32.const 0 - i32.const 1 - i32.lt_s - drop - block $~lib/util/math/log2f_lut|inlined.0 (result f32) - local.get $0 - local.set $1 + local.get $0 + i32.reinterpret_f32 + local.set $1 + local.get $1 + i32.const 8388608 + i32.sub + i32.const 2139095040 + i32.const 8388608 + i32.sub + i32.ge_u + if + local.get $1 + i32.const 2 + i32.mul + i32.const 0 + i32.eq + if + f32.const inf + f32.neg + return + end local.get $1 - i32.reinterpret_f32 - local.set $2 - local.get $2 - i32.const 8388608 - i32.sub i32.const 2139095040 - i32.const 8388608 - i32.sub - i32.ge_u + i32.eq if - local.get $2 + local.get $0 + return + end + local.get $1 + i32.const 31 + i32.shr_u + if (result i32) + i32.const 1 + else + local.get $1 i32.const 2 i32.mul - i32.const 0 - i32.eq - if - f32.const inf - f32.neg - br $~lib/util/math/log2f_lut|inlined.0 - end - local.get $2 - i32.const 2139095040 - i32.eq - if - local.get $1 - br $~lib/util/math/log2f_lut|inlined.0 - end - local.get $2 - i32.const 31 - i32.shr_u - if (result i32) - i32.const 1 - else - local.get $2 - i32.const 2 - i32.mul - i32.const -16777216 - i32.ge_u - end - if - local.get $1 - local.get $1 - f32.sub - local.get $1 - local.get $1 - f32.sub - f32.div - br $~lib/util/math/log2f_lut|inlined.0 - end - local.get $1 - f32.const 8388608 - f32.mul - i32.reinterpret_f32 - local.set $2 - local.get $2 - i32.const 23 - i32.const 23 - i32.shl - i32.sub - local.set $2 + i32.const -16777216 + i32.ge_u end - local.get $2 - i32.const 1060306944 - i32.sub - local.set $3 - local.get $3 + if + local.get $0 + local.get $0 + f32.sub + local.get $0 + local.get $0 + f32.sub + f32.div + return + end + local.get $0 + f32.const 8388608 + f32.mul + i32.reinterpret_f32 + local.set $1 + local.get $1 i32.const 23 - i32.const 4 - i32.sub - i32.shr_u - i32.const 15 - i32.and - local.set $4 - local.get $3 - i32.const -8388608 - i32.and - local.set $5 - local.get $2 - local.get $5 - i32.sub - local.set $6 - local.get $3 i32.const 23 - i32.shr_s - local.set $7 - i32.const 8984 - local.get $4 - i32.const 1 - i32.const 3 - i32.add i32.shl - i32.add - f64.load - local.set $8 - i32.const 8984 - local.get $4 - i32.const 1 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load offset=8 - local.set $9 - local.get $6 - f32.reinterpret_i32 - f64.promote_f32 - local.set $10 - local.get $10 - local.get $8 - f64.mul - f64.const 1 - f64.sub - local.set $11 - local.get $9 - local.get $7 - f64.convert_i32_s - f64.add - local.set $12 - f64.const 0.4811247078767291 - local.get $11 - f64.mul - f64.const -0.7213476299867769 - f64.add - local.set $13 - f64.const 1.4426950186867042 - local.get $11 - f64.mul - local.get $12 - f64.add - local.set $14 - local.get $11 - local.get $11 - f64.mul - local.set $15 - local.get $13 - f64.const -0.36051725506874704 - local.get $15 - f64.mul - f64.add - local.set $13 - local.get $13 - local.get $15 - f64.mul - local.get $14 - f64.add - local.set $13 - local.get $13 - f32.demote_f64 + i32.sub + local.set $1 end + local.get $1 + i32.const 1060306944 + i32.sub + local.set $2 + local.get $2 + i32.const 23 + i32.const 4 + i32.sub + i32.shr_u + i32.const 15 + i32.and + local.set $3 + local.get $2 + i32.const -8388608 + i32.and + local.set $4 + local.get $1 + local.get $4 + i32.sub + local.set $5 + local.get $2 + i32.const 23 + i32.shr_s + local.set $6 + i32.const 8984 + local.get $3 + i32.const 1 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load + local.set $7 + i32.const 8984 + local.get $3 + i32.const 1 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load offset=8 + local.set $8 + local.get $5 + f32.reinterpret_i32 + f64.promote_f32 + local.set $9 + local.get $9 + local.get $7 + f64.mul + f64.const 1 + f64.sub + local.set $10 + local.get $8 + local.get $6 + f64.convert_i32_s + f64.add + local.set $11 + f64.const 0.4811247078767291 + local.get $10 + f64.mul + f64.const -0.7213476299867769 + f64.add + local.set $12 + f64.const 1.4426950186867042 + local.get $10 + f64.mul + local.get $11 + f64.add + local.set $13 + local.get $10 + local.get $10 + f64.mul + local.set $14 + local.get $12 + f64.const -0.36051725506874704 + local.get $14 + f64.mul + f64.add + local.set $12 + local.get $12 + local.get $14 + f64.mul + local.get $13 + f64.add + local.set $12 + local.get $12 + f32.demote_f64 + ) + (func $~lib/math/NativeMathf.log2 (param $0 f32) (result f32) + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $0 + call $~lib/util/math/log2f_lut return ) (func $std/math/test_log2f (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -9052,16 +8715,15 @@ local.get $3 call $std/math/check ) - (func $std/math/test_max (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) - (local $5 f64) - (local $6 f64) + (func $~lib/math/NativeMath.max (param $0 f64) (param $1 f64) (result f64) local.get $0 - local.set $6 local.get $1 - local.set $5 - local.get $6 - local.get $5 f64.max + ) + (func $std/math/test_max (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/math/NativeMath.max local.get $2 local.get $3 local.get $4 @@ -9084,31 +8746,29 @@ i32.const 0 end ) - (func $std/math/test_maxf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) - (local $5 f32) - (local $6 f32) + (func $~lib/math/NativeMathf.max (param $0 f32) (param $1 f32) (result f32) local.get $0 - local.set $6 local.get $1 - local.set $5 - local.get $6 - local.get $5 f32.max + ) + (func $std/math/test_maxf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/math/NativeMathf.max local.get $2 local.get $3 local.get $4 call $std/math/check ) - (func $std/math/test_min (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) - (local $5 f64) - (local $6 f64) + (func $~lib/math/NativeMath.min (param $0 f64) (param $1 f64) (result f64) local.get $0 - local.set $6 local.get $1 - local.set $5 - local.get $6 - local.get $5 f64.min + ) + (func $std/math/test_min (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/math/NativeMath.min local.get $2 local.get $3 local.get $4 @@ -9131,16 +8791,15 @@ i32.const 0 end ) - (func $std/math/test_minf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) - (local $5 f32) - (local $6 f32) + (func $~lib/math/NativeMathf.min (param $0 f32) (param $1 f32) (result f32) local.get $0 - local.set $6 local.get $1 - local.set $5 - local.get $6 - local.get $5 f32.min + ) + (func $std/math/test_minf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/math/NativeMathf.min local.get $2 local.get $3 local.get $4 @@ -9683,20 +9342,86 @@ local.get $4 call $std/math/check ) - (func $~lib/math/NativeMath.pow (param $0 f64) (param $1 f64) (result f64) - (local $2 f64) - (local $3 f64) - (local $4 i32) - (local $5 i64) - (local $6 i64) - (local $7 i64) - (local $8 i64) - (local $9 i64) + (func $~lib/util/math/zeroinfnan (param $0 i64) (result i32) + local.get $0 + i64.const 1 + i64.shl + i64.const 1 + i64.sub + i64.const -9007199254740992 + i64.const 1 + i64.sub + i64.ge_u + ) + (func $~lib/util/math/checkint (param $0 i64) (result i32) + (local $1 i64) + local.get $0 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + local.set $1 + local.get $1 + i64.const 1023 + i64.lt_u + if + i32.const 0 + return + end + local.get $1 + i64.const 1023 + i64.const 52 + i64.add + i64.gt_u + if + i32.const 2 + return + end + i64.const 1 + i64.const 1023 + i64.const 52 + i64.add + local.get $1 + i64.sub + i64.shl + local.set $1 + local.get $0 + local.get $1 + i64.const 1 + i64.sub + i64.and + i64.const 0 + i64.ne + if + i32.const 0 + return + end + local.get $0 + local.get $1 + i64.and + i64.const 0 + i64.ne + if + i32.const 1 + return + end + i32.const 2 + ) + (func $~lib/util/math/log_inline (param $0 i64) (result f64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + (local $4 i64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) (local $10 f64) - (local $11 i64) - (local $12 i32) - (local $13 i64) - (local $14 i64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) (local $15 f64) (local $16 f64) (local $17 f64) @@ -9712,1595 +9437,1332 @@ (local $27 f64) (local $28 f64) (local $29 f64) - (local $30 f64) - (local $31 f64) - (local $32 f64) - (local $33 f64) - (local $34 f64) - (local $35 f64) - (local $36 f64) - (local $37 f64) - (local $38 f64) - (local $39 i32) - (local $40 i32) - (local $41 i32) - (local $42 i32) - (local $43 i64) - (local $44 i64) + local.get $0 + i64.const 4604531861337669632 + i64.sub + local.set $1 local.get $1 - f64.abs - f64.const 2 - f64.le + i64.const 52 + i64.const 7 + i64.sub + i64.shr_u + i64.const 127 + i64.and + i32.wrap_i64 + local.set $2 + local.get $1 + i64.const 52 + i64.shr_s + local.set $3 + local.get $0 + local.get $1 + i64.const 4095 + i64.const 52 + i64.shl + i64.and + i64.sub + local.set $4 + local.get $4 + f64.reinterpret_i64 + local.set $5 + local.get $3 + f64.convert_i64_s + local.set $6 + i32.const 9240 + local.get $2 + i32.const 2 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load + local.set $7 + i32.const 9240 + local.get $2 + i32.const 2 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load offset=16 + local.set $8 + i32.const 9240 + local.get $2 + i32.const 2 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load offset=24 + local.set $9 + local.get $4 + i64.const 2147483648 + i64.add + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.set $10 + local.get $5 + local.get $10 + f64.sub + local.set $11 + local.get $10 + local.get $7 + f64.mul + f64.const 1 + f64.sub + local.set $12 + local.get $11 + local.get $7 + f64.mul + local.set $13 + local.get $12 + local.get $13 + f64.add + local.set $14 + local.get $6 + f64.const 0.6931471805598903 + f64.mul + local.get $8 + f64.add + local.set $15 + local.get $15 + local.get $14 + f64.add + local.set $16 + local.get $6 + f64.const 5.497923018708371e-14 + f64.mul + local.get $9 + f64.add + local.set $17 + local.get $15 + local.get $16 + f64.sub + local.get $14 + f64.add + local.set $18 + f64.const -0.5 + local.get $14 + f64.mul + local.set $19 + local.get $14 + local.get $19 + f64.mul + local.set $20 + local.get $14 + local.get $20 + f64.mul + local.set $21 + f64.const -0.5 + local.get $12 + f64.mul + local.set $22 + local.get $12 + local.get $22 + f64.mul + local.set $23 + local.get $16 + local.get $23 + f64.add + local.set $24 + local.get $13 + local.get $19 + local.get $22 + f64.add + f64.mul + local.set $25 + local.get $16 + local.get $24 + f64.sub + local.get $23 + f64.add + local.set $26 + local.get $21 + f64.const -0.6666666666666679 + local.get $14 + f64.const 0.5000000000000007 + f64.mul + f64.add + local.get $20 + f64.const 0.7999999995323976 + local.get $14 + f64.const -0.6666666663487739 + f64.mul + f64.add + local.get $20 + f64.const -1.142909628459501 + local.get $14 + f64.const 1.0000415263675542 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + local.set $27 + local.get $17 + local.get $18 + f64.add + local.get $25 + f64.add + local.get $26 + f64.add + local.get $27 + f64.add + local.set $28 + local.get $24 + local.get $28 + f64.add + local.set $29 + local.get $24 + local.get $29 + f64.sub + local.get $28 + f64.add + global.set $~lib/util/math/log_tail + local.get $29 + ) + (func $~lib/util/math/xflow (param $0 i32) (param $1 f64) (result f64) + local.get $1 + f64.neg + local.get $1 + local.get $0 + select + local.get $1 + f64.mul + ) + (func $~lib/util/math/uflow (param $0 i32) (result f64) + local.get $0 + i64.const 1152921504606846976 + f64.reinterpret_i64 + call $~lib/util/math/xflow + ) + (func $~lib/util/math/oflow (param $0 i32) (result f64) + local.get $0 + i64.const 8070450532247928832 + f64.reinterpret_i64 + call $~lib/util/math/xflow + ) + (func $~lib/util/math/exp_inline (param $0 f64) (param $1 f64) (param $2 i32) (result f64) + (local $3 i32) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i32) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 i64) + local.get $0 + i64.reinterpret_f64 + local.set $15 + local.get $15 + i64.const 52 + i64.shr_u + i32.wrap_i64 + i32.const 2047 + i32.and + local.set $3 + local.get $3 + i32.const 969 + i32.sub + i32.const 63 + i32.ge_u if - local.get $1 - f64.const 2 - f64.eq - if - local.get $0 - local.get $0 - f64.mul - return - end - local.get $1 - f64.const 0.5 - f64.eq - if - local.get $0 - f64.sqrt - f64.abs - f64.const inf - local.get $0 - f64.const inf - f64.neg - f64.ne - select - return - end - local.get $1 - f64.const -1 - f64.eq - if - f64.const 1 - local.get $0 - f64.div - return - end - local.get $1 - f64.const 1 - f64.eq - if - local.get $0 - return - end - local.get $1 - f64.const 0 - f64.eq + local.get $3 + i32.const 969 + i32.sub + i32.const -2147483648 + i32.ge_u if + f64.const -1 f64.const 1 + local.get $2 + select return end - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - block $~lib/util/math/pow_lut|inlined.0 (result f64) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - i32.const 0 - local.set $4 local.get $3 - i64.reinterpret_f64 - local.set $5 - local.get $2 - i64.reinterpret_f64 - local.set $6 - local.get $5 - i64.const 52 - i64.shr_u - local.set $7 - local.get $6 - i64.const 52 - i64.shr_u - local.set $8 - local.get $7 - i64.const 1 - i64.sub - i64.const 2047 - i64.const 1 - i64.sub - i64.ge_u - if (result i32) - i32.const 1 - else - local.get $8 - i64.const 2047 - i64.and - i64.const 958 - i64.sub - i64.const 1086 - i64.const 958 - i64.sub - i64.ge_u - end + i32.const 1033 + i32.ge_u if - local.get $6 - local.set $9 - local.get $9 - i64.const 1 - i64.shl - i64.const 1 - i64.sub - i64.const -9007199254740992 - i64.const 1 - i64.sub - i64.ge_u - if - local.get $6 - i64.const 1 - i64.shl - i64.const 0 - i64.eq - if - f64.const 1 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 - i64.const 4607182418800017408 - i64.eq - if - f64.const nan:0x8000000000000 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 - i64.const 1 - i64.shl - i64.const -9007199254740992 - i64.gt_u - if (result i32) - i32.const 1 - else - local.get $6 - i64.const 1 - i64.shl - i64.const -9007199254740992 - i64.gt_u - end - if - local.get $3 - local.get $2 - f64.add - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 - i64.const 1 - i64.shl - i64.const 9214364837600034816 - i64.eq - if - f64.const nan:0x8000000000000 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 - i64.const 1 - i64.shl - i64.const 9214364837600034816 - i64.lt_u - local.get $6 - i64.const 63 - i64.shr_u - i64.const 0 - i64.ne - i32.eqz - i32.eq - if - f64.const 0 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $2 - local.get $2 - f64.mul - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 - local.set $9 - local.get $9 - i64.const 1 - i64.shl - i64.const 1 - i64.sub - i64.const -9007199254740992 - i64.const 1 - i64.sub - i64.ge_u - if - local.get $3 - local.get $3 - f64.mul - local.set $10 - local.get $5 - i64.const 63 - i64.shr_u - i32.wrap_i64 - if (result i32) - block $~lib/util/math/checkint|inlined.0 (result i32) - local.get $6 - local.set $9 - local.get $9 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - local.set $11 - local.get $11 - i64.const 1023 - i64.lt_u - if - i32.const 0 - br $~lib/util/math/checkint|inlined.0 - end - local.get $11 - i64.const 1023 - i64.const 52 - i64.add - i64.gt_u - if - i32.const 2 - br $~lib/util/math/checkint|inlined.0 - end - i64.const 1 - i64.const 1023 - i64.const 52 - i64.add - local.get $11 - i64.sub - i64.shl - local.set $11 - local.get $9 - local.get $11 - i64.const 1 - i64.sub - i64.and - i64.const 0 - i64.ne - if - i32.const 0 - br $~lib/util/math/checkint|inlined.0 - end - local.get $9 - local.get $11 - i64.and - i64.const 0 - i64.ne - if - i32.const 1 - br $~lib/util/math/checkint|inlined.0 - end - i32.const 2 - end - i32.const 1 - i32.eq - else - i32.const 0 - end - if - local.get $10 - f64.neg - local.set $10 - end - local.get $6 - i64.const 63 - i64.shr_u - i64.const 0 - i64.ne - if (result f64) - f64.const 1 - local.get $10 - f64.div - else - local.get $10 - end - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 + local.get $15 i64.const 63 i64.shr_u i64.const 0 i64.ne - if - block $~lib/util/math/checkint|inlined.1 (result i32) - local.get $6 - local.set $9 - local.get $9 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - local.set $11 - local.get $11 - i64.const 1023 - i64.lt_u - if - i32.const 0 - br $~lib/util/math/checkint|inlined.1 - end - local.get $11 - i64.const 1023 - i64.const 52 - i64.add - i64.gt_u - if - i32.const 2 - br $~lib/util/math/checkint|inlined.1 - end - i64.const 1 - i64.const 1023 - i64.const 52 - i64.add - local.get $11 - i64.sub - i64.shl - local.set $11 - local.get $9 - local.get $11 - i64.const 1 - i64.sub - i64.and - i64.const 0 - i64.ne - if - i32.const 0 - br $~lib/util/math/checkint|inlined.1 - end - local.get $9 - local.get $11 - i64.and - i64.const 0 - i64.ne - if - i32.const 1 - br $~lib/util/math/checkint|inlined.1 - end - i32.const 2 - end - local.set $12 - local.get $12 - i32.const 0 - i32.eq - if - local.get $3 - local.get $3 - f64.sub - local.get $3 - local.get $3 - f64.sub - f64.div - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $12 + if (result f64) + local.get $2 + call $~lib/util/math/uflow + else + local.get $2 + call $~lib/util/math/oflow + end + return + end + i32.const 0 + local.set $3 + end + f64.const 184.6649652337873 + local.get $0 + f64.mul + local.set $9 + local.get $9 + f64.const 6755399441055744 + f64.add + local.set $8 + local.get $8 + i64.reinterpret_f64 + local.set $4 + local.get $8 + f64.const 6755399441055744 + f64.sub + local.set $8 + local.get $0 + local.get $8 + f64.const -0.005415212348111709 + f64.mul + f64.add + local.get $8 + f64.const -1.2864023111638346e-14 + f64.mul + f64.add + local.set $10 + local.get $10 + local.get $1 + f64.add + local.set $10 + local.get $4 + i64.const 127 + i64.and + i64.const 1 + i64.shl + i32.wrap_i64 + local.set $7 + local.get $4 + local.get $2 + i64.extend_i32_u + i64.add + i64.const 52 + i64.const 7 + i64.sub + i64.shl + local.set $5 + i32.const 4632 + local.get $7 + i32.const 3 + i32.shl + i32.add + i64.load + f64.reinterpret_i64 + local.set $13 + i32.const 4632 + local.get $7 + i32.const 3 + i32.shl + i32.add + i64.load offset=8 + local.get $5 + i64.add + local.set $6 + local.get $10 + local.get $10 + f64.mul + local.set $11 + local.get $13 + local.get $10 + f64.add + local.get $11 + f64.const 0.49999999999996786 + local.get $10 + f64.const 0.16666666666665886 + f64.mul + f64.add + f64.mul + f64.add + local.get $11 + local.get $11 + f64.mul + f64.const 0.0416666808410674 + local.get $10 + f64.const 0.008333335853059549 + f64.mul + f64.add + f64.mul + f64.add + local.set $14 + local.get $3 + i32.const 0 + i32.eq + if + local.get $14 + local.get $6 + local.get $4 + call $~lib/util/math/specialcase + return + end + local.get $6 + f64.reinterpret_i64 + local.set $12 + local.get $12 + local.get $12 + local.get $14 + f64.mul + f64.add + ) + (func $~lib/util/math/pow_lut (param $0 f64) (param $1 f64) (result f64) + (local $2 i32) + (local $3 i64) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 f64) + (local $8 i32) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + i32.const 0 + local.set $2 + local.get $0 + i64.reinterpret_f64 + local.set $3 + local.get $1 + i64.reinterpret_f64 + local.set $4 + local.get $3 + i64.const 52 + i64.shr_u + local.set $5 + local.get $4 + i64.const 52 + i64.shr_u + local.set $6 + local.get $5 + i64.const 1 + i64.sub + i64.const 2047 + i64.const 1 + i64.sub + i64.ge_u + if (result i32) + i32.const 1 + else + local.get $6 + i64.const 2047 + i64.and + i64.const 958 + i64.sub + i64.const 1086 + i64.const 958 + i64.sub + i64.ge_u + end + if + local.get $4 + call $~lib/util/math/zeroinfnan + if + local.get $4 + i64.const 1 + i64.shl + i64.const 0 + i64.eq + if + f64.const 1 + return + end + local.get $3 + i64.const 4607182418800017408 + i64.eq + if + f64.const nan:0x8000000000000 + return + end + local.get $3 + i64.const 1 + i64.shl + i64.const -9007199254740992 + i64.gt_u + if (result i32) + i32.const 1 + else + local.get $4 + i64.const 1 + i64.shl + i64.const -9007199254740992 + i64.gt_u + end + if + local.get $0 + local.get $1 + f64.add + return + end + local.get $3 + i64.const 1 + i64.shl + i64.const 9214364837600034816 + i64.eq + if + f64.const nan:0x8000000000000 + return + end + local.get $3 + i64.const 1 + i64.shl + i64.const 9214364837600034816 + i64.lt_u + local.get $4 + i64.const 63 + i64.shr_u + i64.const 0 + i64.ne + i32.eqz + i32.eq + if + f64.const 0 + return + end + local.get $1 + local.get $1 + f64.mul + return + end + local.get $3 + call $~lib/util/math/zeroinfnan + if + local.get $0 + local.get $0 + f64.mul + local.set $7 + local.get $3 + i64.const 63 + i64.shr_u + i32.wrap_i64 + if (result i32) + local.get $4 + call $~lib/util/math/checkint i32.const 1 i32.eq - if - i32.const 262144 - local.set $4 - end - local.get $5 - i64.const 9223372036854775807 - i64.and - local.set $5 + else + i32.const 0 + end + if local.get $7 - i64.const 2047 - i64.and + f64.neg local.set $7 end + local.get $4 + i64.const 63 + i64.shr_u + i64.const 0 + i64.ne + if (result f64) + f64.const 1 + local.get $7 + f64.div + else + local.get $7 + end + return + end + local.get $3 + i64.const 63 + i64.shr_u + i64.const 0 + i64.ne + if + local.get $4 + call $~lib/util/math/checkint + local.set $8 local.get $8 - i64.const 2047 - i64.and - i64.const 958 - i64.sub - i64.const 1086 - i64.const 958 - i64.sub - i64.ge_u + i32.const 0 + i32.eq if - local.get $5 - i64.const 4607182418800017408 - i64.eq - if - f64.const 1 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $8 - i64.const 2047 - i64.and - i64.const 958 - i64.lt_u - if - f64.const 1 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 - i64.const 4607182418800017408 - i64.gt_u - local.get $8 - i64.const 2048 - i64.lt_u - i32.eq - if (result f64) - f64.const inf - else - f64.const 0 - end - br $~lib/util/math/pow_lut|inlined.0 + local.get $0 + local.get $0 + f64.sub + local.get $0 + local.get $0 + f64.sub + f64.div + return end - local.get $7 - i64.const 0 - i64.eq + local.get $8 + i32.const 1 + i32.eq if - local.get $3 - f64.const 4503599627370496 - f64.mul - i64.reinterpret_f64 - local.set $5 - local.get $5 - i64.const 9223372036854775807 - i64.and - local.set $5 - local.get $5 - i64.const 52 - i64.const 52 - i64.shl - i64.sub - local.set $5 + i32.const 262144 + local.set $2 end + local.get $3 + i64.const 9223372036854775807 + i64.and + local.set $3 + local.get $5 + i64.const 2047 + i64.and + local.set $5 end - local.get $5 - local.set $9 - local.get $9 - i64.const 4604531861337669632 - i64.sub - local.set $11 - local.get $11 - i64.const 52 - i64.const 7 - i64.sub - i64.shr_u - i64.const 127 - i64.and - i32.wrap_i64 - local.set $12 - local.get $11 - i64.const 52 - i64.shr_s - local.set $13 - local.get $9 - local.get $11 - i64.const 4095 - i64.const 52 - i64.shl - i64.and - i64.sub - local.set $14 - local.get $14 - f64.reinterpret_i64 - local.set $10 - local.get $13 - f64.convert_i64_s - local.set $15 - i32.const 9240 - local.get $12 - i32.const 2 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load - local.set $16 - i32.const 9240 - local.get $12 - i32.const 2 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load offset=16 - local.set $17 - i32.const 9240 - local.get $12 - i32.const 2 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load offset=24 - local.set $18 - local.get $14 - i64.const 2147483648 - i64.add - i64.const -4294967296 - i64.and - f64.reinterpret_i64 - local.set $19 - local.get $10 - local.get $19 - f64.sub - local.set $20 - local.get $19 - local.get $16 - f64.mul - f64.const 1 - f64.sub - local.set $21 - local.get $20 - local.get $16 - f64.mul - local.set $22 - local.get $21 - local.get $22 - f64.add - local.set $23 - local.get $15 - f64.const 0.6931471805598903 - f64.mul - local.get $17 - f64.add - local.set $24 - local.get $24 - local.get $23 - f64.add - local.set $25 - local.get $15 - f64.const 5.497923018708371e-14 - f64.mul - local.get $18 - f64.add - local.set $26 - local.get $24 - local.get $25 - f64.sub - local.get $23 - f64.add - local.set $27 - f64.const -0.5 - local.get $23 - f64.mul - local.set $28 - local.get $23 - local.get $28 - f64.mul - local.set $29 - local.get $23 - local.get $29 - f64.mul - local.set $30 - f64.const -0.5 - local.get $21 - f64.mul - local.set $31 - local.get $21 - local.get $31 - f64.mul - local.set $32 - local.get $25 - local.get $32 - f64.add - local.set $33 - local.get $22 - local.get $28 - local.get $31 - f64.add - f64.mul - local.set $34 - local.get $25 - local.get $33 - f64.sub - local.get $32 - f64.add - local.set $35 - local.get $30 - f64.const -0.6666666666666679 - local.get $23 - f64.const 0.5000000000000007 - f64.mul - f64.add - local.get $29 - f64.const 0.7999999995323976 - local.get $23 - f64.const -0.6666666663487739 - f64.mul - f64.add - local.get $29 - f64.const -1.142909628459501 - local.get $23 - f64.const 1.0000415263675542 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - f64.mul - local.set $36 - local.get $26 - local.get $27 - f64.add - local.get $34 - f64.add - local.get $35 - f64.add - local.get $36 - f64.add - local.set $37 - local.get $33 - local.get $37 - f64.add - local.set $38 - local.get $33 - local.get $38 - f64.sub - local.get $37 - f64.add - global.set $~lib/util/math/log_tail - local.get $38 - local.set $38 - global.get $~lib/util/math/log_tail - local.set $37 local.get $6 - i64.const -134217728 - i64.and - f64.reinterpret_i64 - local.set $34 - local.get $2 - local.get $34 - f64.sub - local.set $33 - local.get $38 - i64.reinterpret_f64 - i64.const -134217728 + i64.const 2047 i64.and - f64.reinterpret_i64 - local.set $32 - local.get $38 - local.get $32 - f64.sub - local.get $37 - f64.add - local.set $31 - local.get $34 - local.get $32 - f64.mul - local.set $36 - local.get $33 - local.get $32 - f64.mul - local.get $2 - local.get $31 - f64.mul - f64.add - local.set $35 - block $~lib/util/math/exp_inline|inlined.0 (result f64) - local.get $36 - local.set $15 - local.get $35 - local.set $10 - local.get $4 - local.set $12 - local.get $15 - i64.reinterpret_f64 - local.set $9 - local.get $9 - i64.const 52 - i64.shr_u - i32.wrap_i64 - i32.const 2047 - i32.and - local.set $39 - local.get $39 - i32.const 969 - i32.sub - i32.const 63 - i32.ge_u + i64.const 958 + i64.sub + i64.const 1086 + i64.const 958 + i64.sub + i64.ge_u + if + local.get $3 + i64.const 4607182418800017408 + i64.eq if - local.get $39 - i32.const 969 - i32.sub - i32.const -2147483648 - i32.ge_u - if - f64.const -1 - f64.const 1 - local.get $12 - select - br $~lib/util/math/exp_inline|inlined.0 - end - local.get $39 - i32.const 1033 - i32.ge_u - if - local.get $9 - i64.const 63 - i64.shr_u - i64.const 0 - i64.ne - if (result f64) - local.get $12 - local.set $41 - local.get $41 - local.set $42 - i64.const 1152921504606846976 - f64.reinterpret_i64 - local.set $16 - local.get $16 - f64.neg - local.get $16 - local.get $42 - select - local.get $16 - f64.mul - else - local.get $12 - local.set $42 - local.get $42 - local.set $41 - i64.const 8070450532247928832 - f64.reinterpret_i64 - local.set $17 - local.get $17 - f64.neg - local.get $17 - local.get $41 - select - local.get $17 - f64.mul - end - br $~lib/util/math/exp_inline|inlined.0 - end - i32.const 0 - local.set $39 + f64.const 1 + return end - f64.const 184.6649652337873 - local.get $15 + local.get $6 + i64.const 2047 + i64.and + i64.const 958 + i64.lt_u + if + f64.const 1 + return + end + local.get $3 + i64.const 4607182418800017408 + i64.gt_u + local.get $6 + i64.const 2048 + i64.lt_u + i32.eq + if (result f64) + f64.const inf + else + f64.const 0 + end + return + end + local.get $5 + i64.const 0 + i64.eq + if + local.get $0 + f64.const 4503599627370496 f64.mul - local.set $29 - local.get $29 - f64.const 6755399441055744 - f64.add - local.set $30 - local.get $30 i64.reinterpret_f64 - local.set $14 - local.get $30 - f64.const 6755399441055744 - f64.sub - local.set $30 - local.get $15 - local.get $30 - f64.const -0.005415212348111709 - f64.mul - f64.add - local.get $30 - f64.const -1.2864023111638346e-14 - f64.mul - f64.add - local.set $28 - local.get $28 - local.get $10 - f64.add - local.set $28 - local.get $14 - i64.const 127 + local.set $3 + local.get $3 + i64.const 9223372036854775807 i64.and - i64.const 1 - i64.shl - i32.wrap_i64 - local.set $40 - local.get $14 - local.get $12 - i64.extend_i32_u - i64.add + local.set $3 + local.get $3 + i64.const 52 i64.const 52 - i64.const 7 - i64.sub i64.shl - local.set $13 - i32.const 4632 - local.get $40 - i32.const 3 - i32.shl - i32.add - i64.load - f64.reinterpret_i64 - local.set $25 - i32.const 4632 - local.get $40 - i32.const 3 - i32.shl - i32.add - i64.load offset=8 - local.get $13 - i64.add - local.set $11 - local.get $28 - local.get $28 - f64.mul - local.set $27 - local.get $25 - local.get $28 - f64.add - local.get $27 - f64.const 0.49999999999996786 - local.get $28 - f64.const 0.16666666666665886 - f64.mul - f64.add - f64.mul - f64.add - local.get $27 - local.get $27 - f64.mul - f64.const 0.0416666808410674 - local.get $28 - f64.const 0.008333335853059549 - f64.mul - f64.add - f64.mul - f64.add - local.set $24 - local.get $39 - i32.const 0 - i32.eq - if - block $~lib/util/math/specialcase|inlined.1 (result f64) - local.get $24 - local.set $18 - local.get $11 - local.set $44 - local.get $14 - local.set $43 - local.get $43 - i64.const 2147483648 - i64.and - i64.const 0 - i64.ne - i32.eqz - if - local.get $44 - i64.const 1009 - i64.const 52 - i64.shl - i64.sub - local.set $44 - local.get $44 - f64.reinterpret_i64 - local.set $17 - f64.const 5486124068793688683255936e279 - local.get $17 - local.get $17 - local.get $18 - f64.mul - f64.add - f64.mul - br $~lib/util/math/specialcase|inlined.1 - end - local.get $44 - i64.const 1022 - i64.const 52 - i64.shl - i64.add - local.set $44 - local.get $44 - f64.reinterpret_i64 - local.set $17 - local.get $17 - local.get $17 - local.get $18 - f64.mul - f64.add - local.set $16 - local.get $16 - f64.abs - f64.const 1 - f64.lt - if - f64.const 1 - local.get $16 - f64.copysign - local.set $23 - local.get $17 - local.get $16 - f64.sub - local.get $17 - local.get $18 - f64.mul - f64.add - local.set $22 - local.get $23 - local.get $16 - f64.add - local.set $21 - local.get $23 - local.get $21 - f64.sub - local.get $16 - f64.add - local.get $22 - f64.add - local.set $22 - local.get $21 - local.get $22 - f64.add - local.get $23 - f64.sub - local.set $16 - local.get $16 - f64.const 0 - f64.eq - if - local.get $44 - i64.const -9223372036854775808 - i64.and - f64.reinterpret_i64 - local.set $16 - end - end - local.get $16 - f64.const 2.2250738585072014e-308 - f64.mul - end - br $~lib/util/math/exp_inline|inlined.0 - end - local.get $11 - f64.reinterpret_i64 - local.set $26 - local.get $26 - local.get $26 - local.get $24 + i64.sub + local.set $3 + end + end + local.get $3 + call $~lib/util/math/log_inline + local.set $9 + global.get $~lib/util/math/log_tail + local.set $10 + local.get $4 + i64.const -134217728 + i64.and + f64.reinterpret_i64 + local.set $13 + local.get $1 + local.get $13 + f64.sub + local.set $14 + local.get $9 + i64.reinterpret_f64 + i64.const -134217728 + i64.and + f64.reinterpret_i64 + local.set $15 + local.get $9 + local.get $15 + f64.sub + local.get $10 + f64.add + local.set $16 + local.get $13 + local.get $15 + f64.mul + local.set $11 + local.get $14 + local.get $15 + f64.mul + local.get $1 + local.get $16 + f64.mul + f64.add + local.set $12 + local.get $11 + local.get $12 + local.get $2 + call $~lib/util/math/exp_inline + ) + (func $~lib/math/NativeMath.pow (param $0 f64) (param $1 f64) (result f64) + local.get $1 + f64.abs + f64.const 2 + f64.le + if + local.get $1 + f64.const 2 + f64.eq + if + local.get $0 + local.get $0 f64.mul - f64.add + return + end + local.get $1 + f64.const 0.5 + f64.eq + if + local.get $0 + f64.sqrt + f64.abs + f64.const inf + local.get $0 + f64.const inf + f64.neg + f64.ne + select + return + end + local.get $1 + f64.const -1 + f64.eq + if + f64.const 1 + local.get $0 + f64.div + return + end + local.get $1 + f64.const 1 + f64.eq + if + local.get $0 + return + end + local.get $1 + f64.const 0 + f64.eq + if + f64.const 1 + return end end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $0 + local.get $1 + call $~lib/util/math/pow_lut return ) - (func $std/math/test_pow (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + (func $std/math/test_pow (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/math/NativeMath.pow + local.get $2 + local.get $3 + local.get $4 + call $std/math/check + if (result i32) + global.get $std/math/js + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + local.get $1 + call $~lib/bindings/Math/pow + local.get $2 + local.get $3 + local.get $4 + call $std/math/check + end + else + i32.const 0 + end + ) + (func $~lib/util/math/zeroinfnanf (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 1 + i32.sub + i32.const 2139095040 + i32.const 1 + i32.shl + i32.const 1 + i32.sub + i32.ge_u + ) + (func $~lib/util/math/checkintf (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 23 + i32.shr_u + i32.const 255 + i32.and + local.set $1 + local.get $1 + i32.const 127 + i32.lt_u + if + i32.const 0 + return + end + local.get $1 + i32.const 127 + i32.const 23 + i32.add + i32.gt_u + if + i32.const 2 + return + end + i32.const 1 + i32.const 127 + i32.const 23 + i32.add + local.get $1 + i32.sub + i32.shl + local.set $1 + local.get $0 + local.get $1 + i32.const 1 + i32.sub + i32.and + if + i32.const 0 + return + end + local.get $0 + local.get $1 + i32.and + if + i32.const 1 + return + end + i32.const 2 + ) + (func $~lib/util/math/log2f_inline (param $0 i32) (result f64) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + local.get $0 + i32.const 1060306944 + i32.sub + local.set $1 + local.get $1 + i32.const 23 + i32.const 4 + i32.sub + i32.shr_u + i32.const 15 + i32.and + local.set $2 + local.get $1 + i32.const -8388608 + i32.and + local.set $3 + local.get $0 + local.get $3 + i32.sub + local.set $4 + local.get $3 + i32.const 23 + i32.shr_s + local.set $5 + i32.const 8984 + local.get $2 + i32.const 1 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load + local.set $6 + i32.const 8984 + local.get $2 + i32.const 1 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load offset=8 + local.set $7 + local.get $4 + f32.reinterpret_i32 + f64.promote_f32 + local.set $8 + local.get $8 + local.get $6 + f64.mul + f64.const 1 + f64.sub + local.set $9 + local.get $7 + local.get $5 + f64.convert_i32_s + f64.add + local.set $10 + f64.const 0.288457581109214 + local.get $9 + f64.mul + f64.const -0.36092606229713164 + f64.add + local.set $11 + f64.const 0.480898481472577 + local.get $9 + f64.mul + f64.const -0.7213474675006291 + f64.add + local.set $12 + f64.const 1.4426950408774342 + local.get $9 + f64.mul + local.get $10 + f64.add + local.set $13 + local.get $9 + local.get $9 + f64.mul + local.set $9 + local.get $13 + local.get $12 + local.get $9 + f64.mul + f64.add + local.set $13 + local.get $11 + local.get $9 + local.get $9 + f64.mul + f64.mul + local.get $13 + f64.add + local.set $11 + local.get $11 + ) + (func $~lib/util/math/xflowf (param $0 i32) (param $1 f32) (result f32) + local.get $1 + f32.neg + local.get $1 local.get $0 + select local.get $1 - call $~lib/math/NativeMath.pow + f32.mul + ) + (func $~lib/util/math/oflowf (param $0 i32) (result f32) + local.get $0 + i32.const 1879048192 + f32.reinterpret_i32 + call $~lib/util/math/xflowf + ) + (func $~lib/util/math/uflowf (param $0 i32) (result f32) + local.get $0 + i32.const 268435456 + f32.reinterpret_i32 + call $~lib/util/math/xflowf + ) + (func $~lib/util/math/exp2f_inline (param $0 f64) (param $1 i32) (result f32) + (local $2 f64) + (local $3 i64) + (local $4 f64) + (local $5 i64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + local.get $0 + f64.const 211106232532992 + f64.add + local.set $2 + local.get $2 + i64.reinterpret_f64 + local.set $3 + local.get $0 local.get $2 + f64.const 211106232532992 + f64.sub + f64.sub + local.set $4 + i32.const 6680 + local.get $3 + i32.wrap_i64 + i32.const 31 + i32.and + i32.const 3 + i32.shl + i32.add + i64.load + local.set $5 + local.get $5 local.get $3 + local.get $1 + i64.extend_i32_u + i64.add + i64.const 52 + i64.const 5 + i64.sub + i64.shl + i64.add + local.set $5 + local.get $5 + f64.reinterpret_i64 + local.set $8 + f64.const 0.05550361559341535 local.get $4 - call $std/math/check - if (result i32) - global.get $std/math/js - i32.eqz - if (result i32) - i32.const 1 - else - local.get $0 - local.get $1 - call $~lib/bindings/Math/pow - local.get $2 - local.get $3 - local.get $4 - call $std/math/check - end - else - i32.const 0 - end + f64.mul + f64.const 0.2402284522445722 + f64.add + local.set $6 + f64.const 0.6931471806916203 + local.get $4 + f64.mul + f64.const 1 + f64.add + local.set $7 + local.get $7 + local.get $6 + local.get $4 + local.get $4 + f64.mul + f64.mul + f64.add + local.set $7 + local.get $7 + local.get $8 + f64.mul + local.set $7 + local.get $7 + f32.demote_f64 ) - (func $~lib/math/NativeMathf.pow (param $0 f32) (param $1 f32) (result f32) - (local $2 f32) - (local $3 f32) + (func $~lib/util/math/powf_lut (param $0 f32) (param $1 f32) (result f32) + (local $2 i32) + (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + (local $6 f32) (local $7 i32) - (local $8 i32) - (local $9 f32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 f64) - (local $16 f64) - (local $17 f64) - (local $18 f64) - (local $19 f64) - (local $20 f64) - (local $21 f64) - (local $22 f64) - (local $23 i64) - (local $24 i64) + (local $8 f64) + (local $9 f64) + i32.const 0 + local.set $2 + local.get $0 + i32.reinterpret_f32 + local.set $3 local.get $1 - f32.abs - f32.const 2 - f32.le - if - local.get $1 - f32.const 2 - f32.eq - if - local.get $0 - local.get $0 - f32.mul - return - end - local.get $1 - f32.const 0.5 - f32.eq - if - local.get $0 - f32.sqrt - f32.abs - f32.const inf - local.get $0 - f32.const inf - f32.neg - f32.ne - select - return - end - local.get $1 - f32.const -1 - f32.eq - if - f32.const 1 - local.get $0 - f32.div - return - end - local.get $1 - f32.const 1 - f32.eq - if - local.get $0 - return - end - local.get $1 - f32.const 0 - f32.eq - if - f32.const 1 - return - end - end + i32.reinterpret_f32 + local.set $4 i32.const 0 - i32.const 1 - i32.lt_s - drop - block $~lib/util/math/powf_lut|inlined.0 (result f32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - i32.const 0 - local.set $4 - local.get $3 - i32.reinterpret_f32 - local.set $5 - local.get $2 - i32.reinterpret_f32 - local.set $6 - i32.const 0 - local.set $7 + local.set $5 + local.get $3 + i32.const 8388608 + i32.sub + i32.const 2139095040 + i32.const 8388608 + i32.sub + i32.ge_u + local.get $4 + call $~lib/util/math/zeroinfnanf + local.tee $5 + i32.or + if local.get $5 - i32.const 8388608 - i32.sub - i32.const 2139095040 - i32.const 8388608 - i32.sub - i32.ge_u - local.get $6 - local.set $8 - local.get $8 - i32.const 1 - i32.shl - i32.const 1 - i32.sub - i32.const 2139095040 - i32.const 1 - i32.shl - i32.const 1 - i32.sub - i32.ge_u - i32.const 0 - i32.ne - local.tee $7 - i32.or if - local.get $7 + local.get $4 + i32.const 1 + i32.shl + i32.const 0 + i32.eq if - local.get $6 + f32.const 1 + return + end + local.get $3 + i32.const 1065353216 + i32.eq + if + f32.const nan:0x400000 + return + end + local.get $3 + i32.const 1 + i32.shl + i32.const 2139095040 + i32.const 1 + i32.shl + i32.gt_u + if (result i32) i32.const 1 - i32.shl - i32.const 0 - i32.eq - if - f32.const 1 - br $~lib/util/math/powf_lut|inlined.0 - end - local.get $5 - i32.const 1065353216 - i32.eq - if - f32.const nan:0x400000 - br $~lib/util/math/powf_lut|inlined.0 - end - local.get $5 + else + local.get $4 i32.const 1 i32.shl i32.const 2139095040 i32.const 1 i32.shl i32.gt_u - if (result i32) - i32.const 1 - else - local.get $6 - i32.const 1 - i32.shl - i32.const 2139095040 - i32.const 1 - i32.shl - i32.gt_u - end - if - local.get $3 - local.get $2 - f32.add - br $~lib/util/math/powf_lut|inlined.0 - end - local.get $5 - i32.const 1 - i32.shl - i32.const 1065353216 - i32.const 1 - i32.shl - i32.eq - if - f32.const nan:0x400000 - br $~lib/util/math/powf_lut|inlined.0 - end - local.get $5 - i32.const 1 - i32.shl - i32.const 1065353216 - i32.const 1 - i32.shl - i32.lt_u - local.get $6 - i32.const 31 - i32.shr_u - i32.eqz - i32.eq - if - f32.const 0 - br $~lib/util/math/powf_lut|inlined.0 - end - local.get $2 - local.get $2 - f32.mul - br $~lib/util/math/powf_lut|inlined.0 end - local.get $5 - local.set $8 - local.get $8 + if + local.get $0 + local.get $1 + f32.add + return + end + local.get $3 i32.const 1 i32.shl - i32.const 1 - i32.sub - i32.const 2139095040 + i32.const 1065353216 i32.const 1 i32.shl - i32.const 1 - i32.sub - i32.ge_u - if - local.get $3 - local.get $3 - f32.mul - local.set $9 - local.get $5 - i32.const 31 - i32.shr_u - if (result i32) - block $~lib/util/math/checkintf|inlined.0 (result i32) - local.get $6 - local.set $8 - local.get $8 - i32.const 23 - i32.shr_u - i32.const 255 - i32.and - local.set $10 - local.get $10 - i32.const 127 - i32.lt_u - if - i32.const 0 - br $~lib/util/math/checkintf|inlined.0 - end - local.get $10 - i32.const 127 - i32.const 23 - i32.add - i32.gt_u - if - i32.const 2 - br $~lib/util/math/checkintf|inlined.0 - end - i32.const 1 - i32.const 127 - i32.const 23 - i32.add - local.get $10 - i32.sub - i32.shl - local.set $10 - local.get $8 - local.get $10 - i32.const 1 - i32.sub - i32.and - if - i32.const 0 - br $~lib/util/math/checkintf|inlined.0 - end - local.get $8 - local.get $10 - i32.and - if - i32.const 1 - br $~lib/util/math/checkintf|inlined.0 - end - i32.const 2 - end - i32.const 1 - i32.eq - else - i32.const 0 - end - if - local.get $9 - f32.neg - local.set $9 - end - local.get $6 - i32.const 31 - i32.shr_u - if (result f32) - f32.const 1 - local.get $9 - f32.div - else - local.get $9 - end - br $~lib/util/math/powf_lut|inlined.0 - end - local.get $5 - i32.const 31 - i32.shr_u + i32.eq if - block $~lib/util/math/checkintf|inlined.1 (result i32) - local.get $6 - local.set $8 - local.get $8 - i32.const 23 - i32.shr_u - i32.const 255 - i32.and - local.set $10 - local.get $10 - i32.const 127 - i32.lt_u - if - i32.const 0 - br $~lib/util/math/checkintf|inlined.1 - end - local.get $10 - i32.const 127 - i32.const 23 - i32.add - i32.gt_u - if - i32.const 2 - br $~lib/util/math/checkintf|inlined.1 - end - i32.const 1 - i32.const 127 - i32.const 23 - i32.add - local.get $10 - i32.sub - i32.shl - local.set $10 - local.get $8 - local.get $10 - i32.const 1 - i32.sub - i32.and - if - i32.const 0 - br $~lib/util/math/checkintf|inlined.1 - end - local.get $8 - local.get $10 - i32.and - if - i32.const 1 - br $~lib/util/math/checkintf|inlined.1 - end - i32.const 2 - end - local.set $10 - local.get $10 - i32.const 0 - i32.eq - if - local.get $3 - local.get $3 - f32.sub - local.get $3 - local.get $3 - f32.sub - f32.div - br $~lib/util/math/powf_lut|inlined.0 - end - local.get $10 - i32.const 1 - i32.eq - if - i32.const 65536 - local.set $4 - end - local.get $5 - i32.const 2147483647 - i32.and - local.set $5 + f32.const nan:0x400000 + return end - local.get $5 - i32.const 8388608 + local.get $3 + i32.const 1 + i32.shl + i32.const 1065353216 + i32.const 1 + i32.shl i32.lt_u + local.get $4 + i32.const 31 + i32.shr_u + i32.eqz + i32.eq if - local.get $3 - f32.const 8388608 - f32.mul - i32.reinterpret_f32 - local.set $5 - local.get $5 - i32.const 2147483647 - i32.and - local.set $5 - local.get $5 - i32.const 23 - i32.const 23 - i32.shl - i32.sub - local.set $5 + f32.const 0 + return end + local.get $1 + local.get $1 + f32.mul + return end - local.get $5 - local.set $8 - local.get $8 - i32.const 1060306944 - i32.sub - local.set $10 - local.get $10 - i32.const 23 - i32.const 4 - i32.sub - i32.shr_u - i32.const 15 - i32.and - local.set $11 - local.get $10 - i32.const -8388608 - i32.and - local.set $12 - local.get $8 - local.get $12 - i32.sub - local.set $13 - local.get $12 - i32.const 23 - i32.shr_s - local.set $14 - i32.const 8984 - local.get $11 - i32.const 1 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load - local.set $15 - i32.const 8984 - local.get $11 - i32.const 1 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load offset=8 - local.set $16 - local.get $13 - f32.reinterpret_i32 - f64.promote_f32 - local.set $17 - local.get $17 - local.get $15 - f64.mul - f64.const 1 - f64.sub - local.set $18 - local.get $16 - local.get $14 - f64.convert_i32_s - f64.add - local.set $19 - f64.const 0.288457581109214 - local.get $18 - f64.mul - f64.const -0.36092606229713164 - f64.add - local.set $20 - f64.const 0.480898481472577 - local.get $18 - f64.mul - f64.const -0.7213474675006291 - f64.add - local.set $21 - f64.const 1.4426950408774342 - local.get $18 - f64.mul - local.get $19 - f64.add - local.set $22 - local.get $18 - local.get $18 - f64.mul - local.set $18 - local.get $22 - local.get $21 - local.get $18 - f64.mul - f64.add - local.set $22 - local.get $20 - local.get $18 - local.get $18 - f64.mul - f64.mul - local.get $22 - f64.add - local.set $20 - local.get $20 - local.set $22 - local.get $2 - f64.promote_f32 - local.get $22 - f64.mul - local.set $21 - local.get $21 - i64.reinterpret_f64 - i64.const 47 - i64.shr_u - i64.const 65535 - i64.and - i64.const 32959 - i64.ge_u + local.get $3 + call $~lib/util/math/zeroinfnanf if - local.get $21 - f64.const 127.99999995700433 - f64.gt - if + local.get $0 + local.get $0 + f32.mul + local.set $6 + local.get $3 + i32.const 31 + i32.shr_u + if (result i32) local.get $4 - local.set $8 - local.get $8 - local.set $10 - i32.const 1879048192 - f32.reinterpret_i32 - local.set $9 - local.get $9 - f32.neg - local.get $9 - local.get $10 - select - local.get $9 - f32.mul - br $~lib/util/math/powf_lut|inlined.0 + call $~lib/util/math/checkintf + i32.const 1 + i32.eq + else + i32.const 0 end - local.get $21 - f64.const -150 - f64.le if - local.get $4 - local.set $11 - local.get $11 - local.set $12 - i32.const 268435456 - f32.reinterpret_i32 - local.set $9 - local.get $9 + local.get $6 f32.neg - local.get $9 - local.get $12 - select - local.get $9 - f32.mul - br $~lib/util/math/powf_lut|inlined.0 + local.set $6 + end + local.get $4 + i32.const 31 + i32.shr_u + if (result f32) + f32.const 1 + local.get $6 + f32.div + else + local.get $6 end + return end - local.get $21 - local.set $15 - local.get $4 - local.set $13 - local.get $15 - f64.const 211106232532992 - f64.add - local.set $20 - local.get $20 - i64.reinterpret_f64 - local.set $23 - local.get $15 - local.get $20 - f64.const 211106232532992 - f64.sub - f64.sub - local.set $19 - i32.const 6680 - local.get $23 - i32.wrap_i64 + local.get $3 i32.const 31 - i32.and - i32.const 3 - i32.shl - i32.add - i64.load - local.set $24 - local.get $24 - local.get $23 - local.get $13 - i64.extend_i32_u - i64.add - i64.const 52 - i64.const 5 - i64.sub - i64.shl - i64.add - local.set $24 - local.get $24 - f64.reinterpret_i64 - local.set $16 - f64.const 0.05550361559341535 - local.get $19 - f64.mul - f64.const 0.2402284522445722 - f64.add - local.set $18 - f64.const 0.6931471806916203 - local.get $19 - f64.mul - f64.const 1 - f64.add - local.set $17 - local.get $17 - local.get $18 - local.get $19 - local.get $19 - f64.mul - f64.mul - f64.add - local.set $17 - local.get $17 - local.get $16 - f64.mul - local.set $17 - local.get $17 - f32.demote_f64 + i32.shr_u + if + local.get $4 + call $~lib/util/math/checkintf + local.set $7 + local.get $7 + i32.const 0 + i32.eq + if + local.get $0 + local.get $0 + f32.sub + local.get $0 + local.get $0 + f32.sub + f32.div + return + end + local.get $7 + i32.const 1 + i32.eq + if + i32.const 65536 + local.set $2 + end + local.get $3 + i32.const 2147483647 + i32.and + local.set $3 + end + local.get $3 + i32.const 8388608 + i32.lt_u + if + local.get $0 + f32.const 8388608 + f32.mul + i32.reinterpret_f32 + local.set $3 + local.get $3 + i32.const 2147483647 + i32.and + local.set $3 + local.get $3 + i32.const 23 + i32.const 23 + i32.shl + i32.sub + local.set $3 + end + end + local.get $3 + call $~lib/util/math/log2f_inline + local.set $8 + local.get $1 + f64.promote_f32 + local.get $8 + f64.mul + local.set $9 + local.get $9 + i64.reinterpret_f64 + i64.const 47 + i64.shr_u + i64.const 65535 + i64.and + i64.const 32959 + i64.ge_u + if + local.get $9 + f64.const 127.99999995700433 + f64.gt + if + local.get $2 + call $~lib/util/math/oflowf + return + end + local.get $9 + f64.const -150 + f64.le + if + local.get $2 + call $~lib/util/math/uflowf + return + end + end + local.get $9 + local.get $2 + call $~lib/util/math/exp2f_inline + ) + (func $~lib/math/NativeMathf.pow (param $0 f32) (param $1 f32) (result f32) + local.get $1 + f32.abs + f32.const 2 + f32.le + if + local.get $1 + f32.const 2 + f32.eq + if + local.get $0 + local.get $0 + f32.mul + return + end + local.get $1 + f32.const 0.5 + f32.eq + if + local.get $0 + f32.sqrt + f32.abs + f32.const inf + local.get $0 + f32.const inf + f32.neg + f32.ne + select + return + end + local.get $1 + f32.const -1 + f32.eq + if + f32.const 1 + local.get $0 + f32.div + return + end + local.get $1 + f32.const 1 + f32.eq + if + local.get $0 + return + end + local.get $1 + f32.const 0 + f32.eq + if + f32.const 1 + return + end end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $0 + local.get $1 + call $~lib/util/math/powf_lut return ) (func $std/math/test_powf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) @@ -11422,7 +10884,7 @@ if i32.const 0 i32.const 13360 - i32.const 1404 + i32.const 1381 i32.const 5 call $~lib/builtins/abort unreachable @@ -11480,51 +10942,52 @@ f64.const 1 f64.sub ) + (func $~lib/math/NativeMathf.seedRandom (param $0 i64) + local.get $0 + call $~lib/math/NativeMath.seedRandom + ) (func $~lib/math/NativeMathf.random (result f32) - (local $0 i64) + (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) global.get $~lib/math/random_seeded i32.eqz if call $~lib/builtins/seed i64.reinterpret_f64 - local.set $0 - local.get $0 - call $~lib/math/NativeMath.seedRandom + call $~lib/math/NativeMathf.seedRandom end global.get $~lib/math/random_state0_32 - local.set $1 + local.set $0 global.get $~lib/math/random_state1_32 - local.set $2 - local.get $1 + local.set $1 + local.get $0 i32.const -1640531525 i32.mul i32.const 5 i32.rotl i32.const 5 i32.mul - local.set $3 - local.get $2 - local.get $1 - i32.xor local.set $2 local.get $1 + local.get $0 + i32.xor + local.set $1 + local.get $0 i32.const 26 i32.rotl - local.get $2 + local.get $1 i32.xor - local.get $2 + local.get $1 i32.const 9 i32.shl i32.xor global.set $~lib/math/random_state0_32 - local.get $2 + local.get $1 i32.const 13 i32.rotl global.set $~lib/math/random_state1_32 - local.get $3 + local.get $2 i32.const 9 i32.shr_u i32.const 127 @@ -11535,62 +10998,63 @@ f32.const 1 f32.sub ) - (func $std/math/test_round (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 f64) + (func $~lib/math/NativeMath.round (param $0 f64) (result f64) local.get $0 - local.set $4 - local.get $4 f64.const 0.5 f64.add f64.floor - local.get $4 + local.get $0 f64.copysign + ) + (func $std/math/test_round (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + local.get $0 + call $~lib/math/NativeMath.round local.get $1 local.get $2 local.get $3 call $std/math/check ) - (func $std/math/test_roundf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - (local $4 f32) + (func $~lib/math/NativeMathf.round (param $0 f32) (result f32) local.get $0 - local.set $4 - local.get $4 f32.const 0.5 f32.add f32.floor - local.get $4 + local.get $0 f32.copysign + ) + (func $std/math/test_roundf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.round local.get $1 local.get $2 local.get $3 call $std/math/check ) - (func $std/math/test_sign (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 f64) - block $~lib/math/NativeMath.sign|inlined.0 (result f64) + (func $~lib/math/NativeMath.sign (param $0 f64) (result f64) + i32.const 0 + i32.const 0 + i32.gt_s + drop + local.get $0 + f64.const 0 + f64.gt + if (result f64) + f64.const 1 + else local.get $0 - local.set $4 - i32.const 0 - i32.const 0 - i32.gt_s - drop - local.get $4 f64.const 0 - f64.gt + f64.lt if (result f64) - f64.const 1 + f64.const -1 else - local.get $4 - f64.const 0 - f64.lt - if (result f64) - f64.const -1 - else - local.get $4 - end + local.get $0 end - br $~lib/math/NativeMath.sign|inlined.0 end + return + ) + (func $std/math/test_sign (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + local.get $0 + call $~lib/math/NativeMath.sign local.get $1 local.get $2 local.get $3 @@ -11612,32 +11076,31 @@ i32.const 0 end ) - (func $std/math/test_signf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - (local $4 f32) - block $~lib/math/NativeMathf.sign|inlined.0 (result f32) + (func $~lib/math/NativeMathf.sign (param $0 f32) (result f32) + i32.const 0 + i32.const 0 + i32.gt_s + drop + local.get $0 + f32.const 0 + f32.gt + if (result f32) + f32.const 1 + else local.get $0 - local.set $4 - i32.const 0 - i32.const 0 - i32.gt_s - drop - local.get $4 f32.const 0 - f32.gt + f32.lt if (result f32) - f32.const 1 + f32.const -1 else - local.get $4 - f32.const 0 - f32.lt - if (result f32) - f32.const -1 - else - local.get $4 - end + local.get $0 end - br $~lib/math/NativeMathf.sign|inlined.0 end + return + ) + (func $std/math/test_signf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.sign local.get $1 local.get $2 local.get $3 @@ -12297,19 +11760,6 @@ (local $4 i32) (local $5 f64) (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 i64) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i32) - (local $18 f64) - (local $19 f64) local.get $0 i64.reinterpret_f64 local.set $1 @@ -12317,100 +11767,30 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.set $2 - local.get $2 - i32.const 31 - i32.shr_u - local.set $3 - local.get $2 - i32.const 2147483647 - i32.and - local.set $2 - local.get $2 - i32.const 1072243195 - i32.le_u - if - local.get $2 - i32.const 1045430272 - i32.lt_u - if - local.get $0 - return - end - block $~lib/math/sin_kern|inlined.1 (result f64) - local.get $0 - local.set $6 - f64.const 0 - local.set $5 - i32.const 0 - local.set $4 - local.get $6 - local.get $6 - f64.mul - local.set $7 - local.get $7 - local.get $7 - f64.mul - local.set $8 - f64.const 0.00833333333332249 - local.get $7 - f64.const -1.984126982985795e-04 - local.get $7 - f64.const 2.7557313707070068e-06 - f64.mul - f64.add - f64.mul - f64.add - local.get $7 - local.get $8 - f64.mul - f64.const -2.5050760253406863e-08 - local.get $7 - f64.const 1.58969099521155e-10 - f64.mul - f64.add - f64.mul - f64.add - local.set $9 - local.get $7 - local.get $6 - f64.mul - local.set $10 - local.get $4 - i32.eqz - if - local.get $6 - local.get $10 - f64.const -0.16666666666666632 - local.get $7 - local.get $9 - f64.mul - f64.add - f64.mul - f64.add - br $~lib/math/sin_kern|inlined.1 - else - local.get $6 - local.get $7 - f64.const 0.5 - local.get $5 - f64.mul - local.get $10 - local.get $9 - f64.mul - f64.sub - f64.mul - local.get $5 - f64.sub - local.get $10 - f64.const -0.16666666666666632 - f64.mul - f64.sub - f64.sub - br $~lib/math/sin_kern|inlined.1 - end - unreachable + local.set $2 + local.get $2 + i32.const 31 + i32.shr_u + local.set $3 + local.get $2 + i32.const 2147483647 + i32.and + local.set $2 + local.get $2 + i32.const 1072243195 + i32.le_u + if + local.get $2 + i32.const 1045430272 + i32.lt_u + if + local.get $0 + return end + local.get $0 + f64.const 0 + i32.const 0 + call $~lib/math/sin_kern return end local.get $2 @@ -12422,398 +11802,30 @@ f64.sub return end - block $~lib/math/rempio2|inlined.1 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $11 - local.get $3 - local.set $4 - local.get $11 - i64.const 32 - i64.shr_u - i32.wrap_i64 - i32.const 2147483647 - i32.and - local.set $12 - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $12 - i32.const 1073928572 - i32.lt_u - if - i32.const 1 - local.set $13 - local.get $4 - i32.eqz - if - local.get $5 - f64.const 1.5707963267341256 - f64.sub - local.set $10 - local.get $12 - i32.const 1073291771 - i32.ne - if - local.get $10 - f64.const 6.077100506506192e-11 - f64.sub - local.set $9 - local.get $10 - local.get $9 - f64.sub - f64.const 6.077100506506192e-11 - f64.sub - local.set $8 - else - local.get $10 - f64.const 6.077100506303966e-11 - f64.sub - local.set $10 - local.get $10 - f64.const 2.0222662487959506e-21 - f64.sub - local.set $9 - local.get $10 - local.get $9 - f64.sub - f64.const 2.0222662487959506e-21 - f64.sub - local.set $8 - end - else - local.get $5 - f64.const 1.5707963267341256 - f64.add - local.set $10 - local.get $12 - i32.const 1073291771 - i32.ne - if - local.get $10 - f64.const 6.077100506506192e-11 - f64.add - local.set $9 - local.get $10 - local.get $9 - f64.sub - f64.const 6.077100506506192e-11 - f64.add - local.set $8 - else - local.get $10 - f64.const 6.077100506303966e-11 - f64.add - local.set $10 - local.get $10 - f64.const 2.0222662487959506e-21 - f64.add - local.set $9 - local.get $10 - local.get $9 - f64.sub - f64.const 2.0222662487959506e-21 - f64.add - local.set $8 - end - i32.const -1 - local.set $13 - end - local.get $9 - global.set $~lib/math/rempio2_y0 - local.get $8 - global.set $~lib/math/rempio2_y1 - local.get $13 - br $~lib/math/rempio2|inlined.1 - end - local.get $12 - i32.const 1094263291 - i32.lt_u - if - local.get $5 - f64.const 0.6366197723675814 - f64.mul - f64.nearest - local.set $8 - local.get $5 - local.get $8 - f64.const 1.5707963267341256 - f64.mul - f64.sub - local.set $9 - local.get $8 - f64.const 6.077100506506192e-11 - f64.mul - local.set $10 - local.get $12 - i32.const 20 - i32.shr_u - local.set $13 - local.get $9 - local.get $10 - f64.sub - local.set $7 - local.get $7 - i64.reinterpret_f64 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.set $14 - local.get $13 - local.get $14 - i32.const 20 - i32.shr_u - i32.const 2047 - i32.and - i32.sub - local.set $15 - local.get $15 - i32.const 16 - i32.gt_u - if - local.get $9 - local.set $6 - local.get $8 - f64.const 6.077100506303966e-11 - f64.mul - local.set $10 - local.get $6 - local.get $10 - f64.sub - local.set $9 - local.get $8 - f64.const 2.0222662487959506e-21 - f64.mul - local.get $6 - local.get $9 - f64.sub - local.get $10 - f64.sub - f64.sub - local.set $10 - local.get $9 - local.get $10 - f64.sub - local.set $7 - local.get $7 - i64.reinterpret_f64 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.set $14 - local.get $13 - local.get $14 - i32.const 20 - i32.shr_u - i32.const 2047 - i32.and - i32.sub - local.set $15 - local.get $15 - i32.const 49 - i32.gt_u - if - local.get $9 - local.set $16 - local.get $8 - f64.const 2.0222662487111665e-21 - f64.mul - local.set $10 - local.get $16 - local.get $10 - f64.sub - local.set $9 - local.get $8 - f64.const 8.4784276603689e-32 - f64.mul - local.get $16 - local.get $9 - f64.sub - local.get $10 - f64.sub - f64.sub - local.set $10 - local.get $9 - local.get $10 - f64.sub - local.set $7 - end - end - local.get $9 - local.get $7 - f64.sub - local.get $10 - f64.sub - local.set $6 - local.get $7 - global.set $~lib/math/rempio2_y0 - local.get $6 - global.set $~lib/math/rempio2_y1 - local.get $8 - i32.trunc_f64_s - br $~lib/math/rempio2|inlined.1 - end - local.get $5 - local.get $11 - call $~lib/math/pio2_large_quot - local.set $15 - i32.const 0 - local.get $15 - i32.sub - local.get $15 - local.get $4 - select - end - local.set $17 + local.get $0 + local.get $1 + local.get $3 + call $~lib/math/rempio2 + local.set $4 global.get $~lib/math/rempio2_y0 - local.set $18 + local.set $5 global.get $~lib/math/rempio2_y1 - local.set $19 - local.get $17 + local.set $6 + local.get $4 i32.const 1 i32.and if (result f64) - local.get $18 - local.set $8 - local.get $19 - local.set $16 - local.get $8 - local.get $8 - f64.mul - local.set $5 - local.get $5 - local.get $5 - f64.mul - local.set $6 local.get $5 - f64.const 0.0416666666666666 - local.get $5 - f64.const -0.001388888888887411 - local.get $5 - f64.const 2.480158728947673e-05 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - local.get $6 local.get $6 - f64.mul - f64.const -2.7557314351390663e-07 - local.get $5 - f64.const 2.087572321298175e-09 - local.get $5 - f64.const -1.1359647557788195e-11 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - local.set $7 - f64.const 0.5 + call $~lib/math/cos_kern + else local.get $5 - f64.mul - local.set $10 - f64.const 1 - local.get $10 - f64.sub - local.set $6 - local.get $6 - f64.const 1 local.get $6 - f64.sub - local.get $10 - f64.sub - local.get $5 - local.get $7 - f64.mul - local.get $8 - local.get $16 - f64.mul - f64.sub - f64.add - f64.add - else - block $~lib/math/sin_kern|inlined.2 (result f64) - local.get $18 - local.set $16 - local.get $19 - local.set $9 - i32.const 1 - local.set $13 - local.get $16 - local.get $16 - f64.mul - local.set $10 - local.get $10 - local.get $10 - f64.mul - local.set $7 - f64.const 0.00833333333332249 - local.get $10 - f64.const -1.984126982985795e-04 - local.get $10 - f64.const 2.7557313707070068e-06 - f64.mul - f64.add - f64.mul - f64.add - local.get $10 - local.get $7 - f64.mul - f64.const -2.5050760253406863e-08 - local.get $10 - f64.const 1.58969099521155e-10 - f64.mul - f64.add - f64.mul - f64.add - local.set $6 - local.get $10 - local.get $16 - f64.mul - local.set $5 - local.get $13 - i32.eqz - if - local.get $16 - local.get $5 - f64.const -0.16666666666666632 - local.get $10 - local.get $6 - f64.mul - f64.add - f64.mul - f64.add - br $~lib/math/sin_kern|inlined.2 - else - local.get $16 - local.get $10 - f64.const 0.5 - local.get $9 - f64.mul - local.get $5 - local.get $6 - f64.mul - f64.sub - f64.mul - local.get $9 - f64.sub - local.get $5 - f64.const -0.16666666666666632 - f64.mul - f64.sub - f64.sub - br $~lib/math/sin_kern|inlined.2 - end - unreachable - end + i32.const 1 + call $~lib/math/sin_kern end local.set $0 - local.get $17 + local.get $4 i32.const 2 i32.and if (result f64) @@ -12850,30 +11862,9 @@ (func $~lib/math/NativeMathf.sin (param $0 f32) (result f32) (local $1 i32) (local $2 i32) - (local $3 f64) + (local $3 i32) (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 i32) - (local $9 i32) - (local $10 f32) - (local $11 i32) - (local $12 f32) - (local $13 i32) - (local $14 i64) - (local $15 i32) - (local $16 i64) - (local $17 i64) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i32) - (local $24 i32) - (local $25 f64) - (local $26 f32) + (local $5 f32) local.get $0 i32.reinterpret_f32 local.set $1 @@ -12898,41 +11889,7 @@ end local.get $0 f64.promote_f32 - local.set $3 - local.get $3 - local.get $3 - f64.mul - local.set $4 - local.get $4 - local.get $4 - f64.mul - local.set $5 - f64.const -1.9839334836096632e-04 - local.get $4 - f64.const 2.718311493989822e-06 - f64.mul - f64.add - local.set $6 - local.get $4 - local.get $3 - f64.mul - local.set $7 - local.get $3 - local.get $7 - f64.const -0.16666666641626524 - local.get $4 - f64.const 0.008333329385889463 - f64.mul - f64.add - f64.mul - f64.add - local.get $7 - local.get $5 - f64.mul - local.get $6 - f64.mul - f64.add - f32.demote_f64 + call $~lib/math/sin_kernf return end i32.const 0 @@ -12953,76 +11910,14 @@ f64.promote_f32 f64.const 1.5707963267948966 f64.add - local.set $3 - local.get $3 - local.get $3 - f64.mul - local.set $7 - local.get $7 - local.get $7 - f64.mul - local.set $6 - f64.const -0.001388676377460993 - local.get $7 - f64.const 2.439044879627741e-05 - f64.mul - f64.add - local.set $5 - f32.const 1 - f64.promote_f32 - local.get $7 - f64.const -0.499999997251031 - f64.mul - f64.add - local.get $6 - f64.const 0.04166662332373906 - f64.mul - f64.add - local.get $6 - local.get $7 - f64.mul - local.get $5 - f64.mul - f64.add - f32.demote_f64 + call $~lib/math/cos_kernf f32.neg else local.get $0 f64.promote_f32 f64.const 1.5707963267948966 f64.sub - local.set $4 - local.get $4 - local.get $4 - f64.mul - local.set $5 - local.get $5 - local.get $5 - f64.mul - local.set $6 - f64.const -0.001388676377460993 - local.get $5 - f64.const 2.439044879627741e-05 - f64.mul - f64.add - local.set $7 - f32.const 1 - f64.promote_f32 - local.get $5 - f64.const -0.499999997251031 - f64.mul - f64.add - local.get $6 - f64.const 0.04166662332373906 - f64.mul - f64.add - local.get $6 - local.get $5 - f64.mul - local.get $7 - f64.mul - f64.add - f32.demote_f64 + call $~lib/math/cos_kernf end return end @@ -13039,126 +11934,30 @@ f64.sub end f64.neg - local.set $3 - local.get $3 - local.get $3 - f64.mul - local.set $7 - local.get $7 - local.get $7 - f64.mul - local.set $6 - f64.const -1.9839334836096632e-04 - local.get $7 - f64.const 2.718311493989822e-06 - f64.mul - f64.add - local.set $5 - local.get $7 - local.get $3 - f64.mul - local.set $4 - local.get $3 - local.get $4 - f64.const -0.16666666641626524 - local.get $7 - f64.const 0.008333329385889463 - f64.mul - f64.add - f64.mul - f64.add - local.get $4 - local.get $6 - f64.mul - local.get $5 - f64.mul - f64.add - f32.demote_f64 + call $~lib/math/sin_kernf return end local.get $1 i32.const 1088565717 i32.le_u - if - local.get $1 - i32.const 1085271519 - i32.le_u - if - local.get $2 - if (result f32) - local.get $0 - f64.promote_f32 - f64.const 4.71238898038469 - f64.add - local.set $3 - local.get $3 - local.get $3 - f64.mul - local.set $4 - local.get $4 - local.get $4 - f64.mul - local.set $5 - f64.const -0.001388676377460993 - local.get $4 - f64.const 2.439044879627741e-05 - f64.mul - f64.add - local.set $6 - f32.const 1 - f64.promote_f32 - local.get $4 - f64.const -0.499999997251031 - f64.mul - f64.add - local.get $5 - f64.const 0.04166662332373906 - f64.mul - f64.add - local.get $5 - local.get $4 - f64.mul - local.get $6 - f64.mul - f64.add - f32.demote_f64 - else - local.get $0 - f64.promote_f32 - f64.const 4.71238898038469 - f64.sub - local.set $7 - local.get $7 - local.get $7 - f64.mul - local.set $6 - local.get $6 - local.get $6 - f64.mul - local.set $5 - f64.const -0.001388676377460993 - local.get $6 - f64.const 2.439044879627741e-05 - f64.mul - f64.add - local.set $4 - f32.const 1 + if + local.get $1 + i32.const 1085271519 + i32.le_u + if + local.get $2 + if (result f32) + local.get $0 f64.promote_f32 - local.get $6 - f64.const -0.499999997251031 - f64.mul - f64.add - local.get $5 - f64.const 0.04166662332373906 - f64.mul - f64.add - local.get $5 - local.get $6 - f64.mul - local.get $4 - f64.mul + f64.const 4.71238898038469 f64.add - f32.demote_f64 + call $~lib/math/cos_kernf + else + local.get $0 + f64.promote_f32 + f64.const 4.71238898038469 + f64.sub + call $~lib/math/cos_kernf f32.neg end return @@ -13175,41 +11974,7 @@ f64.const 6.283185307179586 f64.sub end - local.set $3 - local.get $3 - local.get $3 - f64.mul - local.set $4 - local.get $4 - local.get $4 - f64.mul - local.set $5 - f64.const -1.9839334836096632e-04 - local.get $4 - f64.const 2.718311493989822e-06 - f64.mul - f64.add - local.set $6 - local.get $4 - local.get $3 - f64.mul - local.set $7 - local.get $3 - local.get $7 - f64.const -0.16666666641626524 - local.get $4 - f64.const 0.008333329385889463 - f64.mul - f64.add - f64.mul - f64.add - local.get $7 - local.get $5 - f64.mul - local.get $6 - f64.mul - f64.add - f32.demote_f64 + call $~lib/math/sin_kernf return end local.get $1 @@ -13221,240 +11986,32 @@ f32.sub return end - block $~lib/math/rempio2f|inlined.1 (result i32) - local.get $0 - local.set $10 - local.get $1 - local.set $9 - local.get $2 - local.set $8 - local.get $9 - i32.const 1305022427 - i32.lt_u - if - local.get $10 - f64.promote_f32 - f64.const 0.6366197723675814 - f64.mul - f64.nearest - local.set $7 - local.get $10 - f64.promote_f32 - local.get $7 - f64.const 1.5707963109016418 - f64.mul - f64.sub - local.get $7 - f64.const 1.5893254773528196e-08 - f64.mul - f64.sub - global.set $~lib/math/rempio2f_y - local.get $7 - i32.trunc_f64_s - br $~lib/math/rempio2f|inlined.1 - end - local.get $10 - local.set $12 - local.get $9 - local.set $11 - local.get $11 - i32.const 23 - i32.shr_s - i32.const 152 - i32.sub - local.set $13 - local.get $13 - i32.const 63 - i32.and - i64.extend_i32_s - local.set $14 - i32.const 4600 - local.get $13 - i32.const 6 - i32.shr_s - i32.const 3 - i32.shl - i32.add - local.set $15 - local.get $15 - i64.load - local.set $16 - local.get $15 - i64.load offset=8 - local.set $17 - local.get $14 - i64.const 32 - i64.gt_u - if - local.get $15 - i64.load offset=16 - local.set $19 - local.get $19 - i64.const 96 - local.get $14 - i64.sub - i64.shr_u - local.set $18 - local.get $18 - local.get $17 - local.get $14 - i64.const 32 - i64.sub - i64.shl - i64.or - local.set $18 - else - local.get $17 - i64.const 32 - local.get $14 - i64.sub - i64.shr_u - local.set $18 - end - local.get $17 - i64.const 64 - local.get $14 - i64.sub - i64.shr_u - local.get $16 - local.get $14 - i64.shl - i64.or - local.set $19 - local.get $11 - i32.const 8388607 - i32.and - i32.const 8388608 - i32.or - i64.extend_i32_s - local.set $20 - local.get $20 - local.get $19 - i64.mul - local.get $20 - local.get $18 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.set $21 - local.get $21 - i64.const 2 - i64.shl - local.set $22 - local.get $21 - i64.const 62 - i64.shr_u - local.get $22 - i64.const 63 - i64.shr_u - i64.add - i32.wrap_i64 - local.set $23 - f64.const 8.515303950216386e-20 - local.get $12 - f64.promote_f32 - f64.copysign - local.get $22 - f64.convert_i64_s - f64.mul - global.set $~lib/math/rempio2f_y - local.get $23 - local.set $23 - i32.const 0 - local.get $23 - i32.sub - local.get $23 - local.get $8 - select - end - local.set $24 + local.get $0 + local.get $1 + local.get $2 + call $~lib/math/rempio2f + local.set $3 global.get $~lib/math/rempio2f_y - local.set $25 - local.get $24 + local.set $4 + local.get $3 i32.const 1 i32.and if (result f32) - local.get $25 - local.set $3 - local.get $3 - local.get $3 - f64.mul - local.set $7 - local.get $7 - local.get $7 - f64.mul - local.set $6 - f64.const -0.001388676377460993 - local.get $7 - f64.const 2.439044879627741e-05 - f64.mul - f64.add - local.set $5 - f32.const 1 - f64.promote_f32 - local.get $7 - f64.const -0.499999997251031 - f64.mul - f64.add - local.get $6 - f64.const 0.04166662332373906 - f64.mul - f64.add - local.get $6 - local.get $7 - f64.mul - local.get $5 - f64.mul - f64.add - f32.demote_f64 - else - local.get $25 - local.set $4 - local.get $4 - local.get $4 - f64.mul - local.set $5 - local.get $5 - local.get $5 - f64.mul - local.set $6 - f64.const -1.9839334836096632e-04 - local.get $5 - f64.const 2.718311493989822e-06 - f64.mul - f64.add - local.set $7 - local.get $5 local.get $4 - f64.mul - local.set $3 + call $~lib/math/cos_kernf + else local.get $4 - local.get $3 - f64.const -0.16666666641626524 - local.get $5 - f64.const 0.008333329385889463 - f64.mul - f64.add - f64.mul - f64.add - local.get $3 - local.get $6 - f64.mul - local.get $7 - f64.mul - f64.add - f32.demote_f64 + call $~lib/math/sin_kernf end - local.set $26 - local.get $24 + local.set $5 + local.get $3 i32.const 2 i32.and if (result f32) - local.get $26 + local.get $5 f32.neg else - local.get $26 + local.get $5 end ) (func $std/math/test_sinf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -13471,8 +12028,6 @@ (local $3 i32) (local $4 f64) (local $5 f64) - (local $6 f64) - (local $7 f64) local.get $0 i64.reinterpret_f64 i64.const 9223372036854775807 @@ -13542,27 +12097,7 @@ local.get $5 f64.mul local.get $2 - local.set $6 - i32.const 1023 - i32.const 2043 - i32.const 2 - i32.div_u - i32.add - i32.const 20 - i32.shl - i64.extend_i32_u - i64.const 32 - i64.shl - f64.reinterpret_i64 - local.set $7 - local.get $6 - f64.const 1416.0996898839683 - f64.sub - call $~lib/math/NativeMath.exp - local.get $7 - f64.mul - local.get $7 - f64.mul + call $~lib/math/expo2 f64.mul local.set $4 local.get $4 @@ -13596,8 +12131,6 @@ (local $2 f32) (local $3 f32) (local $4 f32) - (local $5 f32) - (local $6 f32) local.get $0 i32.reinterpret_f32 i32.const 2147483647 @@ -13662,24 +12195,7 @@ local.get $4 f32.mul local.get $2 - local.set $5 - i32.const 127 - i32.const 235 - i32.const 1 - i32.shr_u - i32.add - i32.const 23 - i32.shl - f32.reinterpret_i32 - local.set $6 - local.get $5 - f32.const 162.88958740234375 - f32.sub - call $~lib/math/NativeMathf.exp - local.get $6 - f32.mul - local.get $6 - f32.mul + call $~lib/math/expo2f f32.mul local.set $3 local.get $3 @@ -13692,12 +12208,13 @@ local.get $3 call $std/math/check ) - (func $std/math/test_sqrt (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 f64) + (func $~lib/math/NativeMath.sqrt (param $0 f64) (result f64) local.get $0 - local.set $4 - local.get $4 f64.sqrt + ) + (func $std/math/test_sqrt (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + local.get $0 + call $~lib/math/NativeMath.sqrt local.get $1 local.get $2 local.get $3 @@ -13719,12 +12236,13 @@ i32.const 0 end ) - (func $std/math/test_sqrtf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - (local $4 f32) + (func $~lib/math/NativeMathf.sqrt (param $0 f32) (result f32) local.get $0 - local.set $4 - local.get $4 f32.sqrt + ) + (func $std/math/test_sqrtf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.sqrt local.get $1 local.get $2 local.get $3 @@ -13948,19 +12466,6 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) - (local $6 f64) - (local $7 i32) - (local $8 i32) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 i32) - (local $14 i32) - (local $15 f64) - (local $16 f64) - (local $17 i32) local.get $0 i64.reinterpret_f64 local.set $1 @@ -14003,255 +12508,15 @@ f64.sub return end - block $~lib/math/rempio2|inlined.2 (result i32) - local.get $0 - local.set $6 - local.get $1 - local.set $5 - local.get $3 - local.set $4 - local.get $5 - i64.const 32 - i64.shr_u - i32.wrap_i64 - i32.const 2147483647 - i32.and - local.set $7 - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $7 - i32.const 1073928572 - i32.lt_u - if - i32.const 1 - local.set $8 - local.get $4 - i32.eqz - if - local.get $6 - f64.const 1.5707963267341256 - f64.sub - local.set $9 - local.get $7 - i32.const 1073291771 - i32.ne - if - local.get $9 - f64.const 6.077100506506192e-11 - f64.sub - local.set $10 - local.get $9 - local.get $10 - f64.sub - f64.const 6.077100506506192e-11 - f64.sub - local.set $11 - else - local.get $9 - f64.const 6.077100506303966e-11 - f64.sub - local.set $9 - local.get $9 - f64.const 2.0222662487959506e-21 - f64.sub - local.set $10 - local.get $9 - local.get $10 - f64.sub - f64.const 2.0222662487959506e-21 - f64.sub - local.set $11 - end - else - local.get $6 - f64.const 1.5707963267341256 - f64.add - local.set $9 - local.get $7 - i32.const 1073291771 - i32.ne - if - local.get $9 - f64.const 6.077100506506192e-11 - f64.add - local.set $10 - local.get $9 - local.get $10 - f64.sub - f64.const 6.077100506506192e-11 - f64.add - local.set $11 - else - local.get $9 - f64.const 6.077100506303966e-11 - f64.add - local.set $9 - local.get $9 - f64.const 2.0222662487959506e-21 - f64.add - local.set $10 - local.get $9 - local.get $10 - f64.sub - f64.const 2.0222662487959506e-21 - f64.add - local.set $11 - end - i32.const -1 - local.set $8 - end - local.get $10 - global.set $~lib/math/rempio2_y0 - local.get $11 - global.set $~lib/math/rempio2_y1 - local.get $8 - br $~lib/math/rempio2|inlined.2 - end - local.get $7 - i32.const 1094263291 - i32.lt_u - if - local.get $6 - f64.const 0.6366197723675814 - f64.mul - f64.nearest - local.set $11 - local.get $6 - local.get $11 - f64.const 1.5707963267341256 - f64.mul - f64.sub - local.set $10 - local.get $11 - f64.const 6.077100506506192e-11 - f64.mul - local.set $9 - local.get $7 - i32.const 20 - i32.shr_u - local.set $8 - local.get $10 - local.get $9 - f64.sub - local.set $12 - local.get $12 - i64.reinterpret_f64 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.set $13 - local.get $8 - local.get $13 - i32.const 20 - i32.shr_u - i32.const 2047 - i32.and - i32.sub - local.set $14 - local.get $14 - i32.const 16 - i32.gt_u - if - local.get $10 - local.set $15 - local.get $11 - f64.const 6.077100506303966e-11 - f64.mul - local.set $9 - local.get $15 - local.get $9 - f64.sub - local.set $10 - local.get $11 - f64.const 2.0222662487959506e-21 - f64.mul - local.get $15 - local.get $10 - f64.sub - local.get $9 - f64.sub - f64.sub - local.set $9 - local.get $10 - local.get $9 - f64.sub - local.set $12 - local.get $12 - i64.reinterpret_f64 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.set $13 - local.get $8 - local.get $13 - i32.const 20 - i32.shr_u - i32.const 2047 - i32.and - i32.sub - local.set $14 - local.get $14 - i32.const 49 - i32.gt_u - if - local.get $10 - local.set $16 - local.get $11 - f64.const 2.0222662487111665e-21 - f64.mul - local.set $9 - local.get $16 - local.get $9 - f64.sub - local.set $10 - local.get $11 - f64.const 8.4784276603689e-32 - f64.mul - local.get $16 - local.get $10 - f64.sub - local.get $9 - f64.sub - f64.sub - local.set $9 - local.get $10 - local.get $9 - f64.sub - local.set $12 - end - end - local.get $10 - local.get $12 - f64.sub - local.get $9 - f64.sub - local.set $15 - local.get $12 - global.set $~lib/math/rempio2_y0 - local.get $15 - global.set $~lib/math/rempio2_y1 - local.get $11 - i32.trunc_f64_s - br $~lib/math/rempio2|inlined.2 - end - local.get $6 - local.get $5 - call $~lib/math/pio2_large_quot - local.set $14 - i32.const 0 - local.get $14 - i32.sub - local.get $14 - local.get $4 - select - end - local.set $17 + local.get $0 + local.get $1 + local.get $3 + call $~lib/math/rempio2 + local.set $4 global.get $~lib/math/rempio2_y0 global.get $~lib/math/rempio2_y1 i32.const 1 - local.get $17 + local.get $4 i32.const 1 i32.and i32.const 1 @@ -14261,56 +12526,97 @@ ) (func $std/math/test_tan (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) local.get $0 - call $~lib/math/NativeMath.tan - local.get $1 + call $~lib/math/NativeMath.tan + local.get $1 + local.get $2 + local.get $3 + call $std/math/check + if (result i32) + global.get $std/math/js + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + call $~lib/bindings/Math/tan + local.get $1 + local.get $2 + local.get $3 + call $std/math/check + end + else + i32.const 0 + end + ) + (func $~lib/math/tan_kernf (param $0 f64) (param $1 i32) (result f32) + (local $2 f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + local.get $0 + local.get $0 + f64.mul + local.set $2 + f64.const 0.002974357433599673 + local.get $2 + f64.const 0.009465647849436732 + f64.mul + f64.add + local.set $3 + f64.const 0.05338123784456704 + local.get $2 + f64.const 0.024528318116654728 + f64.mul + f64.add + local.set $4 + local.get $2 + local.get $2 + f64.mul + local.set $5 + local.get $2 + local.get $0 + f64.mul + local.set $6 + f64.const 0.3333313950307914 local.get $2 + f64.const 0.13339200271297674 + f64.mul + f64.add + local.set $7 + local.get $0 + local.get $6 + local.get $7 + f64.mul + f64.add + local.get $6 + local.get $5 + f64.mul + local.get $4 + local.get $5 local.get $3 - call $std/math/check - if (result i32) - global.get $std/math/js - i32.eqz - if (result i32) - i32.const 1 - else - local.get $0 - call $~lib/bindings/Math/tan - local.get $1 - local.get $2 - local.get $3 - call $std/math/check - end + f64.mul + f64.add + f64.mul + f64.add + local.set $3 + local.get $1 + if (result f64) + f32.const -1 + f64.promote_f32 + local.get $3 + f64.div else - i32.const 0 + local.get $3 end + f32.demote_f64 ) (func $~lib/math/NativeMathf.tan (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 i32) - (local $12 f32) - (local $13 i32) - (local $14 f32) - (local $15 i32) - (local $16 i64) - (local $17 i32) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i64) - (local $25 i32) - (local $26 i32) - (local $27 f64) local.get $0 i32.reinterpret_f32 local.set $1 @@ -14335,65 +12641,8 @@ end local.get $0 f64.promote_f32 - local.set $4 i32.const 0 - local.set $3 - local.get $4 - local.get $4 - f64.mul - local.set $5 - f64.const 0.002974357433599673 - local.get $5 - f64.const 0.009465647849436732 - f64.mul - f64.add - local.set $6 - f64.const 0.05338123784456704 - local.get $5 - f64.const 0.024528318116654728 - f64.mul - f64.add - local.set $7 - local.get $5 - local.get $5 - f64.mul - local.set $8 - local.get $5 - local.get $4 - f64.mul - local.set $9 - f64.const 0.3333313950307914 - local.get $5 - f64.const 0.13339200271297674 - f64.mul - f64.add - local.set $10 - local.get $4 - local.get $9 - local.get $10 - f64.mul - f64.add - local.get $9 - local.get $8 - f64.mul - local.get $7 - local.get $8 - local.get $6 - f64.mul - f64.add - f64.mul - f64.add - local.set $6 - local.get $3 - if (result f64) - f32.const -1 - f64.promote_f32 - local.get $6 - f64.div - else - local.get $6 - end - f32.demote_f64 + call $~lib/math/tan_kernf return end i32.const 0 @@ -14420,65 +12669,8 @@ f64.const 1.5707963267948966 f64.sub end - local.set $4 i32.const 1 - local.set $3 - local.get $4 - local.get $4 - f64.mul - local.set $10 - f64.const 0.002974357433599673 - local.get $10 - f64.const 0.009465647849436732 - f64.mul - f64.add - local.set $9 - f64.const 0.05338123784456704 - local.get $10 - f64.const 0.024528318116654728 - f64.mul - f64.add - local.set $8 - local.get $10 - local.get $10 - f64.mul - local.set $7 - local.get $10 - local.get $4 - f64.mul - local.set $6 - f64.const 0.3333313950307914 - local.get $10 - f64.const 0.13339200271297674 - f64.mul - f64.add - local.set $5 - local.get $4 - local.get $6 - local.get $5 - f64.mul - f64.add - local.get $6 - local.get $7 - f64.mul - local.get $8 - local.get $7 - local.get $9 - f64.mul - f64.add - f64.mul - f64.add - local.set $9 - local.get $3 - if (result f64) - f32.const -1 - f64.promote_f32 - local.get $9 - f64.div - else - local.get $9 - end - f32.demote_f64 + call $~lib/math/tan_kernf return else local.get $2 @@ -14493,65 +12685,8 @@ f64.const 3.141592653589793 f64.sub end - local.set $4 i32.const 0 - local.set $3 - local.get $4 - local.get $4 - f64.mul - local.set $5 - f64.const 0.002974357433599673 - local.get $5 - f64.const 0.009465647849436732 - f64.mul - f64.add - local.set $6 - f64.const 0.05338123784456704 - local.get $5 - f64.const 0.024528318116654728 - f64.mul - f64.add - local.set $7 - local.get $5 - local.get $5 - f64.mul - local.set $8 - local.get $5 - local.get $4 - f64.mul - local.set $9 - f64.const 0.3333313950307914 - local.get $5 - f64.const 0.13339200271297674 - f64.mul - f64.add - local.set $10 - local.get $4 - local.get $9 - local.get $10 - f64.mul - f64.add - local.get $9 - local.get $8 - f64.mul - local.get $7 - local.get $8 - local.get $6 - f64.mul - f64.add - f64.mul - f64.add - local.set $6 - local.get $3 - if (result f64) - f32.const -1 - f64.promote_f32 - local.get $6 - f64.div - else - local.get $6 - end - f32.demote_f64 + call $~lib/math/tan_kernf return end unreachable @@ -14576,65 +12711,8 @@ f64.const 4.71238898038469 f64.sub end - local.set $4 i32.const 1 - local.set $3 - local.get $4 - local.get $4 - f64.mul - local.set $10 - f64.const 0.002974357433599673 - local.get $10 - f64.const 0.009465647849436732 - f64.mul - f64.add - local.set $9 - f64.const 0.05338123784456704 - local.get $10 - f64.const 0.024528318116654728 - f64.mul - f64.add - local.set $8 - local.get $10 - local.get $10 - f64.mul - local.set $7 - local.get $10 - local.get $4 - f64.mul - local.set $6 - f64.const 0.3333313950307914 - local.get $10 - f64.const 0.13339200271297674 - f64.mul - f64.add - local.set $5 - local.get $4 - local.get $6 - local.get $5 - f64.mul - f64.add - local.get $6 - local.get $7 - f64.mul - local.get $8 - local.get $7 - local.get $9 - f64.mul - f64.add - f64.mul - f64.add - local.set $9 - local.get $3 - if (result f64) - f32.const -1 - f64.promote_f32 - local.get $9 - f64.div - else - local.get $9 - end - f32.demote_f64 + call $~lib/math/tan_kernf return else local.get $2 @@ -14649,65 +12727,8 @@ f64.const 6.283185307179586 f64.sub end - local.set $4 i32.const 0 - local.set $3 - local.get $4 - local.get $4 - f64.mul - local.set $5 - f64.const 0.002974357433599673 - local.get $5 - f64.const 0.009465647849436732 - f64.mul - f64.add - local.set $6 - f64.const 0.05338123784456704 - local.get $5 - f64.const 0.024528318116654728 - f64.mul - f64.add - local.set $7 - local.get $5 - local.get $5 - f64.mul - local.set $8 - local.get $5 - local.get $4 - f64.mul - local.set $9 - f64.const 0.3333313950307914 - local.get $5 - f64.const 0.13339200271297674 - f64.mul - f64.add - local.set $10 - local.get $4 - local.get $9 - local.get $10 - f64.mul - f64.add - local.get $9 - local.get $8 - f64.mul - local.get $7 - local.get $8 - local.get $6 - f64.mul - f64.add - f64.mul - f64.add - local.set $6 - local.get $3 - if (result f64) - f32.const -1 - f64.promote_f32 - local.get $6 - f64.div - else - local.get $6 - end - f32.demote_f64 + call $~lib/math/tan_kernf return end unreachable @@ -14721,218 +12742,18 @@ f32.sub return end - block $~lib/math/rempio2f|inlined.2 (result i32) - local.get $0 - local.set $12 - local.get $1 - local.set $11 - local.get $2 - local.set $3 - local.get $11 - i32.const 1305022427 - i32.lt_u - if - local.get $12 - f64.promote_f32 - f64.const 0.6366197723675814 - f64.mul - f64.nearest - local.set $10 - local.get $12 - f64.promote_f32 - local.get $10 - f64.const 1.5707963109016418 - f64.mul - f64.sub - local.get $10 - f64.const 1.5893254773528196e-08 - f64.mul - f64.sub - global.set $~lib/math/rempio2f_y - local.get $10 - i32.trunc_f64_s - br $~lib/math/rempio2f|inlined.2 - end - local.get $12 - local.set $14 - local.get $11 - local.set $13 - local.get $13 - i32.const 23 - i32.shr_s - i32.const 152 - i32.sub - local.set $15 - local.get $15 - i32.const 63 - i32.and - i64.extend_i32_s - local.set $16 - i32.const 4600 - local.get $15 - i32.const 6 - i32.shr_s - i32.const 3 - i32.shl - i32.add - local.set $17 - local.get $17 - i64.load - local.set $18 - local.get $17 - i64.load offset=8 - local.set $19 - local.get $16 - i64.const 32 - i64.gt_u - if - local.get $17 - i64.load offset=16 - local.set $21 - local.get $21 - i64.const 96 - local.get $16 - i64.sub - i64.shr_u - local.set $20 - local.get $20 - local.get $19 - local.get $16 - i64.const 32 - i64.sub - i64.shl - i64.or - local.set $20 - else - local.get $19 - i64.const 32 - local.get $16 - i64.sub - i64.shr_u - local.set $20 - end - local.get $19 - i64.const 64 - local.get $16 - i64.sub - i64.shr_u - local.get $18 - local.get $16 - i64.shl - i64.or - local.set $21 - local.get $13 - i32.const 8388607 - i32.and - i32.const 8388608 - i32.or - i64.extend_i32_s - local.set $22 - local.get $22 - local.get $21 - i64.mul - local.get $22 - local.get $20 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.set $23 - local.get $23 - i64.const 2 - i64.shl - local.set $24 - local.get $23 - i64.const 62 - i64.shr_u - local.get $24 - i64.const 63 - i64.shr_u - i64.add - i32.wrap_i64 - local.set $25 - f64.const 8.515303950216386e-20 - local.get $14 - f64.promote_f32 - f64.copysign - local.get $24 - f64.convert_i64_s - f64.mul - global.set $~lib/math/rempio2f_y - local.get $25 - local.set $25 - i32.const 0 - local.get $25 - i32.sub - local.get $25 - local.get $3 - select - end - local.set $26 + local.get $0 + local.get $1 + local.get $2 + call $~lib/math/rempio2f + local.set $3 global.get $~lib/math/rempio2f_y - local.set $27 - local.get $27 local.set $4 - local.get $26 + local.get $4 + local.get $3 i32.const 1 i32.and - local.set $13 - local.get $4 - local.get $4 - f64.mul - local.set $10 - f64.const 0.002974357433599673 - local.get $10 - f64.const 0.009465647849436732 - f64.mul - f64.add - local.set $9 - f64.const 0.05338123784456704 - local.get $10 - f64.const 0.024528318116654728 - f64.mul - f64.add - local.set $8 - local.get $10 - local.get $10 - f64.mul - local.set $7 - local.get $10 - local.get $4 - f64.mul - local.set $6 - f64.const 0.3333313950307914 - local.get $10 - f64.const 0.13339200271297674 - f64.mul - f64.add - local.set $5 - local.get $4 - local.get $6 - local.get $5 - f64.mul - f64.add - local.get $6 - local.get $7 - f64.mul - local.get $8 - local.get $7 - local.get $9 - f64.mul - f64.add - f64.mul - f64.add - local.set $9 - local.get $13 - if (result f64) - f32.const -1 - f64.promote_f32 - local.get $9 - f64.div - else - local.get $9 - end - f32.demote_f64 + call $~lib/math/tan_kernf ) (func $std/math/test_tanf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) local.get $0 @@ -15152,12 +12973,13 @@ local.get $3 call $std/math/check ) - (func $std/math/test_trunc (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 f64) + (func $~lib/math/NativeMath.trunc (param $0 f64) (result f64) local.get $0 - local.set $4 - local.get $4 f64.trunc + ) + (func $std/math/test_trunc (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) + local.get $0 + call $~lib/math/NativeMath.trunc local.get $1 local.get $2 local.get $3 @@ -15179,12 +13001,13 @@ i32.const 0 end ) - (func $std/math/test_truncf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - (local $4 f32) + (func $~lib/math/NativeMathf.trunc (param $0 f32) (result f32) local.get $0 - local.set $4 - local.get $4 f32.trunc + ) + (func $std/math/test_truncf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.trunc local.get $1 local.get $2 local.get $3 @@ -15194,26 +13017,14 @@ (local $1 i64) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 f64) + (local $4 f64) + (local $5 i32) (local $6 f64) (local $7 f64) (local $8 f64) (local $9 f64) (local $10 f64) - (local $11 i64) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i32) - (local $18 f64) - (local $19 f64) - (local $20 f64) - (local $21 f64) - (local $22 f64) - (local $23 f64) + (local $11 f64) local.get $0 i64.reinterpret_f64 local.set $1 @@ -15244,142 +13055,14 @@ global.set $~lib/math/NativeMath.sincos_cos return end - block $~lib/math/sin_kern|inlined.3 (result f64) - local.get $0 - local.set $6 - f64.const 0 - local.set $5 - i32.const 0 - local.set $4 - local.get $6 - local.get $6 - f64.mul - local.set $7 - local.get $7 - local.get $7 - f64.mul - local.set $8 - f64.const 0.00833333333332249 - local.get $7 - f64.const -1.984126982985795e-04 - local.get $7 - f64.const 2.7557313707070068e-06 - f64.mul - f64.add - f64.mul - f64.add - local.get $7 - local.get $8 - f64.mul - f64.const -2.5050760253406863e-08 - local.get $7 - f64.const 1.58969099521155e-10 - f64.mul - f64.add - f64.mul - f64.add - local.set $9 - local.get $7 - local.get $6 - f64.mul - local.set $10 - local.get $4 - i32.eqz - if - local.get $6 - local.get $10 - f64.const -0.16666666666666632 - local.get $7 - local.get $9 - f64.mul - f64.add - f64.mul - f64.add - br $~lib/math/sin_kern|inlined.3 - else - local.get $6 - local.get $7 - f64.const 0.5 - local.get $5 - f64.mul - local.get $10 - local.get $9 - f64.mul - f64.sub - f64.mul - local.get $5 - f64.sub - local.get $10 - f64.const -0.16666666666666632 - f64.mul - f64.sub - f64.sub - br $~lib/math/sin_kern|inlined.3 - end - unreachable - end + local.get $0 + f64.const 0 + i32.const 0 + call $~lib/math/sin_kern global.set $~lib/math/NativeMath.sincos_sin local.get $0 - local.set $6 f64.const 0 - local.set $5 - local.get $6 - local.get $6 - f64.mul - local.set $10 - local.get $10 - local.get $10 - f64.mul - local.set $9 - local.get $10 - f64.const 0.0416666666666666 - local.get $10 - f64.const -0.001388888888887411 - local.get $10 - f64.const 2.480158728947673e-05 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - local.get $9 - local.get $9 - f64.mul - f64.const -2.7557314351390663e-07 - local.get $10 - f64.const 2.087572321298175e-09 - local.get $10 - f64.const -1.1359647557788195e-11 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - local.set $8 - f64.const 0.5 - local.get $10 - f64.mul - local.set $7 - f64.const 1 - local.get $7 - f64.sub - local.set $9 - local.get $9 - f64.const 1 - local.get $9 - f64.sub - local.get $7 - f64.sub - local.get $10 - local.get $8 - f64.mul - local.get $6 - local.get $5 - f64.mul - f64.sub - f64.add - f64.add + call $~lib/math/cos_kern global.set $~lib/math/NativeMath.sincos_cos return end @@ -15390,427 +13073,59 @@ local.get $0 local.get $0 f64.sub - local.set $7 - local.get $7 + local.set $4 + local.get $4 global.set $~lib/math/NativeMath.sincos_sin - local.get $7 + local.get $4 global.set $~lib/math/NativeMath.sincos_cos return end - block $~lib/math/rempio2|inlined.3 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $11 - local.get $3 - local.set $4 - local.get $11 - i64.const 32 - i64.shr_u - i32.wrap_i64 - i32.const 2147483647 - i32.and - local.set $12 - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $12 - i32.const 1073928572 - i32.lt_u - if - i32.const 1 - local.set $13 - local.get $4 - i32.eqz - if - local.get $5 - f64.const 1.5707963267341256 - f64.sub - local.set $7 - local.get $12 - i32.const 1073291771 - i32.ne - if - local.get $7 - f64.const 6.077100506506192e-11 - f64.sub - local.set $8 - local.get $7 - local.get $8 - f64.sub - f64.const 6.077100506506192e-11 - f64.sub - local.set $9 - else - local.get $7 - f64.const 6.077100506303966e-11 - f64.sub - local.set $7 - local.get $7 - f64.const 2.0222662487959506e-21 - f64.sub - local.set $8 - local.get $7 - local.get $8 - f64.sub - f64.const 2.0222662487959506e-21 - f64.sub - local.set $9 - end - else - local.get $5 - f64.const 1.5707963267341256 - f64.add - local.set $7 - local.get $12 - i32.const 1073291771 - i32.ne - if - local.get $7 - f64.const 6.077100506506192e-11 - f64.add - local.set $8 - local.get $7 - local.get $8 - f64.sub - f64.const 6.077100506506192e-11 - f64.add - local.set $9 - else - local.get $7 - f64.const 6.077100506303966e-11 - f64.add - local.set $7 - local.get $7 - f64.const 2.0222662487959506e-21 - f64.add - local.set $8 - local.get $7 - local.get $8 - f64.sub - f64.const 2.0222662487959506e-21 - f64.add - local.set $9 - end - i32.const -1 - local.set $13 - end - local.get $8 - global.set $~lib/math/rempio2_y0 - local.get $9 - global.set $~lib/math/rempio2_y1 - local.get $13 - br $~lib/math/rempio2|inlined.3 - end - local.get $12 - i32.const 1094263291 - i32.lt_u - if - local.get $5 - f64.const 0.6366197723675814 - f64.mul - f64.nearest - local.set $9 - local.get $5 - local.get $9 - f64.const 1.5707963267341256 - f64.mul - f64.sub - local.set $8 - local.get $9 - f64.const 6.077100506506192e-11 - f64.mul - local.set $7 - local.get $12 - i32.const 20 - i32.shr_u - local.set $13 - local.get $8 - local.get $7 - f64.sub - local.set $10 - local.get $10 - i64.reinterpret_f64 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.set $14 - local.get $13 - local.get $14 - i32.const 20 - i32.shr_u - i32.const 2047 - i32.and - i32.sub - local.set $15 - local.get $15 - i32.const 16 - i32.gt_u - if - local.get $8 - local.set $6 - local.get $9 - f64.const 6.077100506303966e-11 - f64.mul - local.set $7 - local.get $6 - local.get $7 - f64.sub - local.set $8 - local.get $9 - f64.const 2.0222662487959506e-21 - f64.mul - local.get $6 - local.get $8 - f64.sub - local.get $7 - f64.sub - f64.sub - local.set $7 - local.get $8 - local.get $7 - f64.sub - local.set $10 - local.get $10 - i64.reinterpret_f64 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.set $14 - local.get $13 - local.get $14 - i32.const 20 - i32.shr_u - i32.const 2047 - i32.and - i32.sub - local.set $15 - local.get $15 - i32.const 49 - i32.gt_u - if - local.get $8 - local.set $16 - local.get $9 - f64.const 2.0222662487111665e-21 - f64.mul - local.set $7 - local.get $16 - local.get $7 - f64.sub - local.set $8 - local.get $9 - f64.const 8.4784276603689e-32 - f64.mul - local.get $16 - local.get $8 - f64.sub - local.get $7 - f64.sub - f64.sub - local.set $7 - local.get $8 - local.get $7 - f64.sub - local.set $10 - end - end - local.get $8 - local.get $10 - f64.sub - local.get $7 - f64.sub - local.set $6 - local.get $10 - global.set $~lib/math/rempio2_y0 - local.get $6 - global.set $~lib/math/rempio2_y1 - local.get $9 - i32.trunc_f64_s - br $~lib/math/rempio2|inlined.3 - end - local.get $5 - local.get $11 - call $~lib/math/pio2_large_quot - local.set $15 - i32.const 0 - local.get $15 - i32.sub - local.get $15 - local.get $4 - select - end - local.set $17 + local.get $0 + local.get $1 + local.get $3 + call $~lib/math/rempio2 + local.set $5 global.get $~lib/math/rempio2_y0 - local.set $18 + local.set $6 global.get $~lib/math/rempio2_y1 - local.set $19 - block $~lib/math/sin_kern|inlined.4 (result f64) - local.get $18 - local.set $9 - local.get $19 - local.set $16 - i32.const 1 - local.set $13 - local.get $9 - local.get $9 - f64.mul - local.set $5 - local.get $5 - local.get $5 - f64.mul - local.set $6 - f64.const 0.00833333333332249 - local.get $5 - f64.const -1.984126982985795e-04 - local.get $5 - f64.const 2.7557313707070068e-06 - f64.mul - f64.add - f64.mul - f64.add - local.get $5 - local.get $6 - f64.mul - f64.const -2.5050760253406863e-08 - local.get $5 - f64.const 1.58969099521155e-10 - f64.mul - f64.add - f64.mul - f64.add - local.set $10 - local.get $5 - local.get $9 - f64.mul - local.set $7 - local.get $13 - i32.eqz - if - local.get $9 - local.get $7 - f64.const -0.16666666666666632 - local.get $5 - local.get $10 - f64.mul - f64.add - f64.mul - f64.add - br $~lib/math/sin_kern|inlined.4 - else - local.get $9 - local.get $5 - f64.const 0.5 - local.get $16 - f64.mul - local.get $7 - local.get $10 - f64.mul - f64.sub - f64.mul - local.get $16 - f64.sub - local.get $7 - f64.const -0.16666666666666632 - f64.mul - f64.sub - f64.sub - br $~lib/math/sin_kern|inlined.4 - end - unreachable - end - local.set $20 - local.get $18 - local.set $16 - local.get $19 - local.set $8 - local.get $16 - local.get $16 - f64.mul local.set $7 + local.get $6 local.get $7 + i32.const 1 + call $~lib/math/sin_kern + local.set $8 + local.get $6 local.get $7 - f64.mul - local.set $10 - local.get $7 - f64.const 0.0416666666666666 - local.get $7 - f64.const -0.001388888888887411 - local.get $7 - f64.const 2.480158728947673e-05 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - local.get $10 - local.get $10 - f64.mul - f64.const -2.7557314351390663e-07 - local.get $7 - f64.const 2.087572321298175e-09 - local.get $7 - f64.const -1.1359647557788195e-11 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - local.set $6 - f64.const 0.5 - local.get $7 - f64.mul - local.set $5 - f64.const 1 - local.get $5 - f64.sub + call $~lib/math/cos_kern + local.set $9 + local.get $8 local.set $10 - local.get $10 - f64.const 1 - local.get $10 - f64.sub + local.get $9 + local.set $11 local.get $5 - f64.sub - local.get $7 - local.get $6 - f64.mul - local.get $16 - local.get $8 - f64.mul - f64.sub - f64.add - f64.add - local.set $21 - local.get $20 - local.set $22 - local.get $21 - local.set $23 - local.get $17 i32.const 1 i32.and if - local.get $21 - local.set $22 - local.get $20 + local.get $9 + local.set $10 + local.get $8 f64.neg - local.set $23 + local.set $11 end - local.get $17 + local.get $5 i32.const 2 i32.and if - local.get $22 + local.get $10 f64.neg - local.set $22 - local.get $23 + local.set $10 + local.get $11 f64.neg - local.set $23 + local.set $11 end - local.get $22 + local.get $10 global.set $~lib/math/NativeMath.sincos_sin - local.get $23 + local.get $11 global.set $~lib/math/NativeMath.sincos_cos ) (func $std/math/test_sincos (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i32) (result i32) @@ -16298,8 +13613,7 @@ (local $0 f64) (local $1 i32) (local $2 i32) - (local $3 i64) - (local $4 f32) + (local $3 f32) global.get $~lib/math/NativeMath.E global.get $~lib/math/NativeMath.E f64.eq @@ -47240,9 +44554,7 @@ end call $~lib/bindings/Math/random i64.reinterpret_f64 - local.set $3 - local.get $3 - call $~lib/math/NativeMath.seedRandom + call $~lib/math/NativeMathf.seedRandom i32.const 0 local.set $1 loop $for-loop|1 @@ -47254,12 +44566,12 @@ local.get $2 if call $~lib/math/NativeMathf.random - local.set $4 - local.get $4 + local.set $3 + local.get $3 f32.const 0 f32.ge if (result i32) - local.get $4 + local.get $3 f32.const 1 f32.lt else @@ -48296,257 +45608,217 @@ unreachable end f64.const 0 - local.set $0 - local.get $0 - i64.reinterpret_f64 - i64.const 63 - i64.shr_u - i32.wrap_i64 - local.get $0 - local.get $0 - f64.eq - i32.and - i32.const 0 - i32.ne + call $~lib/math/NativeMath.signbit i32.const 0 i32.eq - drop + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 3127 + i32.const 1 + call $~lib/builtins/abort + unreachable + end f64.const -0 - local.set $0 - local.get $0 - i64.reinterpret_f64 - i64.const 63 - i64.shr_u - i32.wrap_i64 - local.get $0 - local.get $0 - f64.eq - i32.and - i32.const 0 - i32.ne + call $~lib/math/NativeMath.signbit i32.const 1 i32.eq - drop + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 3128 + i32.const 1 + call $~lib/builtins/abort + unreachable + end f64.const 1 - local.set $0 - local.get $0 - i64.reinterpret_f64 - i64.const 63 - i64.shr_u - i32.wrap_i64 - local.get $0 - local.get $0 - f64.eq - i32.and - i32.const 0 - i32.ne + call $~lib/math/NativeMath.signbit i32.const 0 i32.eq - drop + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 3129 + i32.const 1 + call $~lib/builtins/abort + unreachable + end f64.const -1 - local.set $0 - local.get $0 - i64.reinterpret_f64 - i64.const 63 - i64.shr_u - i32.wrap_i64 - local.get $0 - local.get $0 - f64.eq - i32.and - i32.const 0 - i32.ne + call $~lib/math/NativeMath.signbit i32.const 1 i32.eq - drop + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 3130 + i32.const 1 + call $~lib/builtins/abort + unreachable + end f64.const nan:0x8000000000000 - local.set $0 - local.get $0 - i64.reinterpret_f64 - i64.const 63 - i64.shr_u - i32.wrap_i64 - local.get $0 - local.get $0 - f64.eq - i32.and - i32.const 0 - i32.ne + call $~lib/math/NativeMath.signbit i32.const 0 i32.eq - drop + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 3131 + i32.const 1 + call $~lib/builtins/abort + unreachable + end f64.const nan:0x8000000000000 f64.neg - local.set $0 - local.get $0 - i64.reinterpret_f64 - i64.const 63 - i64.shr_u - i32.wrap_i64 - local.get $0 - local.get $0 - f64.eq - i32.and - i32.const 0 - i32.ne + call $~lib/math/NativeMath.signbit i32.const 0 i32.eq - drop + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 3132 + i32.const 1 + call $~lib/builtins/abort + unreachable + end f64.const inf - local.set $0 - local.get $0 - i64.reinterpret_f64 - i64.const 63 - i64.shr_u - i32.wrap_i64 - local.get $0 - local.get $0 - f64.eq - i32.and - i32.const 0 - i32.ne + call $~lib/math/NativeMath.signbit i32.const 0 i32.eq - drop + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 3133 + i32.const 1 + call $~lib/builtins/abort + unreachable + end f64.const inf f64.neg - local.set $0 - local.get $0 - i64.reinterpret_f64 - i64.const 63 - i64.shr_u - i32.wrap_i64 - local.get $0 - local.get $0 - f64.eq - i32.and - i32.const 0 - i32.ne + call $~lib/math/NativeMath.signbit i32.const 1 i32.eq - drop + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 3134 + i32.const 1 + call $~lib/builtins/abort + unreachable + end f32.const 0 - local.set $4 - local.get $4 - i32.reinterpret_f32 - i32.const 31 - i32.shr_u - local.get $4 - local.get $4 - f32.eq - i32.and - i32.const 0 - i32.ne + call $~lib/math/NativeMathf.signbit i32.const 0 i32.eq - drop + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 3140 + i32.const 1 + call $~lib/builtins/abort + unreachable + end f32.const -0 - local.set $4 - local.get $4 - i32.reinterpret_f32 - i32.const 31 - i32.shr_u - local.get $4 - local.get $4 - f32.eq - i32.and - i32.const 0 - i32.ne + call $~lib/math/NativeMathf.signbit i32.const 1 i32.eq - drop + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 3141 + i32.const 1 + call $~lib/builtins/abort + unreachable + end f32.const 1 - local.set $4 - local.get $4 - i32.reinterpret_f32 - i32.const 31 - i32.shr_u - local.get $4 - local.get $4 - f32.eq - i32.and - i32.const 0 - i32.ne + call $~lib/math/NativeMathf.signbit i32.const 0 i32.eq - drop + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 3142 + i32.const 1 + call $~lib/builtins/abort + unreachable + end f32.const -1 - local.set $4 - local.get $4 - i32.reinterpret_f32 - i32.const 31 - i32.shr_u - local.get $4 - local.get $4 - f32.eq - i32.and - i32.const 0 - i32.ne + call $~lib/math/NativeMathf.signbit i32.const 1 i32.eq - drop + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 3143 + i32.const 1 + call $~lib/builtins/abort + unreachable + end f32.const nan:0x400000 - local.set $4 - local.get $4 - i32.reinterpret_f32 - i32.const 31 - i32.shr_u - local.get $4 - local.get $4 - f32.eq - i32.and - i32.const 0 - i32.ne + call $~lib/math/NativeMathf.signbit i32.const 0 i32.eq - drop + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 3144 + i32.const 1 + call $~lib/builtins/abort + unreachable + end f32.const nan:0x400000 f32.neg - local.set $4 - local.get $4 - i32.reinterpret_f32 - i32.const 31 - i32.shr_u - local.get $4 - local.get $4 - f32.eq - i32.and - i32.const 0 - i32.ne + call $~lib/math/NativeMathf.signbit i32.const 0 i32.eq - drop + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 3145 + i32.const 1 + call $~lib/builtins/abort + unreachable + end f32.const inf - local.set $4 - local.get $4 - i32.reinterpret_f32 - i32.const 31 - i32.shr_u - local.get $4 - local.get $4 - f32.eq - i32.and - i32.const 0 - i32.ne + call $~lib/math/NativeMathf.signbit i32.const 0 i32.eq - drop + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 3146 + i32.const 1 + call $~lib/builtins/abort + unreachable + end f32.const inf f32.neg - local.set $4 - local.get $4 - i32.reinterpret_f32 - i32.const 31 - i32.shr_u - local.get $4 - local.get $4 - f32.eq - i32.and - i32.const 0 - i32.ne + call $~lib/math/NativeMathf.signbit i32.const 1 i32.eq - drop + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 3147 + i32.const 1 + call $~lib/builtins/abort + unreachable + end f64.const -8.06684839057968 f64.const 4.535662560676869 f64.const 1.0044767307740567 @@ -58746,8 +56018,8 @@ f32.const nan:0x400000 i32.const 1 call $~lib/math/ipow32f - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 f32.ne i32.eqz if @@ -58761,8 +56033,8 @@ f32.const nan:0x400000 i32.const -1 call $~lib/math/ipow32f - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 f32.ne i32.eqz if @@ -58776,8 +56048,8 @@ f32.const nan:0x400000 i32.const 2 call $~lib/math/ipow32f - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 f32.ne i32.eqz if diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index ca613cd6b6..5d103ef43e 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -4,8 +4,14 @@ (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i64_=>_i32 (func (param i64) (result i32))) + (type $i32_=>_f64 (func (param i32) (result f64))) (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_f64_=>_f64 (func (param i32 f64) (result f64))) + (type $i64_=>_f64 (func (param i64) (result f64))) + (type $f64_i64_i64_=>_f64 (func (param f64 i64 i64) (result f64))) + (type $f64_f64_i32_=>_f64 (func (param f64 f64 i32) (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 16) "6\00\00\00\01\00\00\00\01\00\00\006\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s\00") @@ -354,20 +360,86 @@ call $~lib/rt/stub/__release local.get $2 ) - (func $~lib/math/NativeMath.pow (param $0 f64) (param $1 f64) (result f64) - (local $2 f64) - (local $3 f64) - (local $4 i32) - (local $5 i64) - (local $6 i64) - (local $7 i64) - (local $8 i64) - (local $9 i64) + (func $~lib/util/math/zeroinfnan (param $0 i64) (result i32) + local.get $0 + i64.const 1 + i64.shl + i64.const 1 + i64.sub + i64.const -9007199254740992 + i64.const 1 + i64.sub + i64.ge_u + ) + (func $~lib/util/math/checkint (param $0 i64) (result i32) + (local $1 i64) + local.get $0 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + local.set $1 + local.get $1 + i64.const 1023 + i64.lt_u + if + i32.const 0 + return + end + local.get $1 + i64.const 1023 + i64.const 52 + i64.add + i64.gt_u + if + i32.const 2 + return + end + i64.const 1 + i64.const 1023 + i64.const 52 + i64.add + local.get $1 + i64.sub + i64.shl + local.set $1 + local.get $0 + local.get $1 + i64.const 1 + i64.sub + i64.and + i64.const 0 + i64.ne + if + i32.const 0 + return + end + local.get $0 + local.get $1 + i64.and + i64.const 0 + i64.ne + if + i32.const 1 + return + end + i32.const 2 + ) + (func $~lib/util/math/log_inline (param $0 i64) (result f64) + (local $1 i64) + (local $2 i32) + (local $3 i64) + (local $4 i64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + (local $8 f64) + (local $9 f64) (local $10 f64) - (local $11 i64) - (local $12 i32) - (local $13 i64) - (local $14 i64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) (local $15 f64) (local $16 f64) (local $17 f64) @@ -383,955 +455,843 @@ (local $27 f64) (local $28 f64) (local $29 f64) - (local $30 f64) - (local $31 f64) - (local $32 f64) - (local $33 f64) - (local $34 f64) - (local $35 f64) - (local $36 f64) - (local $37 f64) - (local $38 f64) - (local $39 i32) - (local $40 i32) - (local $41 i32) - (local $42 i32) - (local $43 i64) - (local $44 i64) + local.get $0 + i64.const 4604531861337669632 + i64.sub + local.set $1 local.get $1 - f64.abs - f64.const 2 - f64.le + i64.const 52 + i64.const 7 + i64.sub + i64.shr_u + i64.const 127 + i64.and + i32.wrap_i64 + local.set $2 + local.get $1 + i64.const 52 + i64.shr_s + local.set $3 + local.get $0 + local.get $1 + i64.const 4095 + i64.const 52 + i64.shl + i64.and + i64.sub + local.set $4 + local.get $4 + f64.reinterpret_i64 + local.set $5 + local.get $3 + f64.convert_i64_s + local.set $6 + i32.const 88 + local.get $2 + i32.const 2 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load + local.set $7 + i32.const 88 + local.get $2 + i32.const 2 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load offset=16 + local.set $8 + i32.const 88 + local.get $2 + i32.const 2 + i32.const 3 + i32.add + i32.shl + i32.add + f64.load offset=24 + local.set $9 + local.get $4 + i64.const 2147483648 + i64.add + i64.const -4294967296 + i64.and + f64.reinterpret_i64 + local.set $10 + local.get $5 + local.get $10 + f64.sub + local.set $11 + local.get $10 + local.get $7 + f64.mul + f64.const 1 + f64.sub + local.set $12 + local.get $11 + local.get $7 + f64.mul + local.set $13 + local.get $12 + local.get $13 + f64.add + local.set $14 + local.get $6 + f64.const 0.6931471805598903 + f64.mul + local.get $8 + f64.add + local.set $15 + local.get $15 + local.get $14 + f64.add + local.set $16 + local.get $6 + f64.const 5.497923018708371e-14 + f64.mul + local.get $9 + f64.add + local.set $17 + local.get $15 + local.get $16 + f64.sub + local.get $14 + f64.add + local.set $18 + f64.const -0.5 + local.get $14 + f64.mul + local.set $19 + local.get $14 + local.get $19 + f64.mul + local.set $20 + local.get $14 + local.get $20 + f64.mul + local.set $21 + f64.const -0.5 + local.get $12 + f64.mul + local.set $22 + local.get $12 + local.get $22 + f64.mul + local.set $23 + local.get $16 + local.get $23 + f64.add + local.set $24 + local.get $13 + local.get $19 + local.get $22 + f64.add + f64.mul + local.set $25 + local.get $16 + local.get $24 + f64.sub + local.get $23 + f64.add + local.set $26 + local.get $21 + f64.const -0.6666666666666679 + local.get $14 + f64.const 0.5000000000000007 + f64.mul + f64.add + local.get $20 + f64.const 0.7999999995323976 + local.get $14 + f64.const -0.6666666663487739 + f64.mul + f64.add + local.get $20 + f64.const -1.142909628459501 + local.get $14 + f64.const 1.0000415263675542 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + local.set $27 + local.get $17 + local.get $18 + f64.add + local.get $25 + f64.add + local.get $26 + f64.add + local.get $27 + f64.add + local.set $28 + local.get $24 + local.get $28 + f64.add + local.set $29 + local.get $24 + local.get $29 + f64.sub + local.get $28 + f64.add + global.set $~lib/util/math/log_tail + local.get $29 + ) + (func $~lib/util/math/xflow (param $0 i32) (param $1 f64) (result f64) + local.get $1 + f64.neg + local.get $1 + local.get $0 + select + local.get $1 + f64.mul + ) + (func $~lib/util/math/uflow (param $0 i32) (result f64) + local.get $0 + i64.const 1152921504606846976 + f64.reinterpret_i64 + call $~lib/util/math/xflow + ) + (func $~lib/util/math/oflow (param $0 i32) (result f64) + local.get $0 + i64.const 8070450532247928832 + f64.reinterpret_i64 + call $~lib/util/math/xflow + ) + (func $~lib/util/math/specialcase (param $0 f64) (param $1 i64) (param $2 i64) (result f64) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 f64) + (local $7 f64) + local.get $2 + i64.const 2147483648 + i64.and + i64.const 0 + i64.ne + i32.eqz if local.get $1 - f64.const 2 - f64.eq - if - local.get $0 - local.get $0 - f64.mul - return - end + i64.const 1009 + i64.const 52 + i64.shl + i64.sub + local.set $1 local.get $1 - f64.const 0.5 + f64.reinterpret_i64 + local.set $3 + f64.const 5486124068793688683255936e279 + local.get $3 + local.get $3 + local.get $0 + f64.mul + f64.add + f64.mul + return + end + local.get $1 + i64.const 1022 + i64.const 52 + i64.shl + i64.add + local.set $1 + local.get $1 + f64.reinterpret_i64 + local.set $3 + local.get $3 + local.get $3 + local.get $0 + f64.mul + f64.add + local.set $4 + local.get $4 + f64.abs + f64.const 1 + f64.lt + if + f64.const 1 + local.get $4 + f64.copysign + local.set $5 + local.get $3 + local.get $4 + f64.sub + local.get $3 + local.get $0 + f64.mul + f64.add + local.set $6 + local.get $5 + local.get $4 + f64.add + local.set $7 + local.get $5 + local.get $7 + f64.sub + local.get $4 + f64.add + local.get $6 + f64.add + local.set $6 + local.get $7 + local.get $6 + f64.add + local.get $5 + f64.sub + local.set $4 + local.get $4 + f64.const 0 f64.eq if - local.get $0 - f64.sqrt - f64.abs - f64.const inf - local.get $0 - f64.const inf - f64.neg - f64.ne - select - return + local.get $1 + i64.const -9223372036854775808 + i64.and + f64.reinterpret_i64 + local.set $4 end - local.get $1 - f64.const -1 - f64.eq + end + local.get $4 + f64.const 2.2250738585072014e-308 + f64.mul + ) + (func $~lib/util/math/exp_inline (param $0 f64) (param $1 f64) (param $2 i32) (result f64) + (local $3 i32) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i32) + (local $8 f64) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 i64) + local.get $0 + i64.reinterpret_f64 + local.set $15 + local.get $15 + i64.const 52 + i64.shr_u + i32.wrap_i64 + i32.const 2047 + i32.and + local.set $3 + local.get $3 + i32.const 969 + i32.sub + i32.const 63 + i32.ge_u + if + local.get $3 + i32.const 969 + i32.sub + i32.const -2147483648 + i32.ge_u if + f64.const -1 f64.const 1 - local.get $0 - f64.div - return - end - local.get $1 - f64.const 1 - f64.eq - if - local.get $0 + local.get $2 + select return end - local.get $1 - f64.const 0 - f64.eq + local.get $3 + i32.const 1033 + i32.ge_u if - f64.const 1 + local.get $15 + i64.const 63 + i64.shr_u + i64.const 0 + i64.ne + if (result f64) + local.get $2 + call $~lib/util/math/uflow + else + local.get $2 + call $~lib/util/math/oflow + end return end - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - block $~lib/util/math/pow_lut|inlined.0 (result f64) - local.get $0 - local.set $3 - local.get $1 - local.set $2 i32.const 0 - local.set $4 - local.get $3 - i64.reinterpret_f64 - local.set $5 - local.get $2 - i64.reinterpret_f64 - local.set $6 - local.get $5 - i64.const 52 - i64.shr_u - local.set $7 + local.set $3 + end + f64.const 184.6649652337873 + local.get $0 + f64.mul + local.set $9 + local.get $9 + f64.const 6755399441055744 + f64.add + local.set $8 + local.get $8 + i64.reinterpret_f64 + local.set $4 + local.get $8 + f64.const 6755399441055744 + f64.sub + local.set $8 + local.get $0 + local.get $8 + f64.const -0.005415212348111709 + f64.mul + f64.add + local.get $8 + f64.const -1.2864023111638346e-14 + f64.mul + f64.add + local.set $10 + local.get $10 + local.get $1 + f64.add + local.set $10 + local.get $4 + i64.const 127 + i64.and + i64.const 1 + i64.shl + i32.wrap_i64 + local.set $7 + local.get $4 + local.get $2 + i64.extend_i32_u + i64.add + i64.const 52 + i64.const 7 + i64.sub + i64.shl + local.set $5 + i32.const 4184 + local.get $7 + i32.const 3 + i32.shl + i32.add + i64.load + f64.reinterpret_i64 + local.set $13 + i32.const 4184 + local.get $7 + i32.const 3 + i32.shl + i32.add + i64.load offset=8 + local.get $5 + i64.add + local.set $6 + local.get $10 + local.get $10 + f64.mul + local.set $11 + local.get $13 + local.get $10 + f64.add + local.get $11 + f64.const 0.49999999999996786 + local.get $10 + f64.const 0.16666666666665886 + f64.mul + f64.add + f64.mul + f64.add + local.get $11 + local.get $11 + f64.mul + f64.const 0.0416666808410674 + local.get $10 + f64.const 0.008333335853059549 + f64.mul + f64.add + f64.mul + f64.add + local.set $14 + local.get $3 + i32.const 0 + i32.eq + if + local.get $14 + local.get $6 + local.get $4 + call $~lib/util/math/specialcase + return + end + local.get $6 + f64.reinterpret_i64 + local.set $12 + local.get $12 + local.get $12 + local.get $14 + f64.mul + f64.add + ) + (func $~lib/util/math/pow_lut (param $0 f64) (param $1 f64) (result f64) + (local $2 i32) + (local $3 i64) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 f64) + (local $8 i32) + (local $9 f64) + (local $10 f64) + (local $11 f64) + (local $12 f64) + (local $13 f64) + (local $14 f64) + (local $15 f64) + (local $16 f64) + i32.const 0 + local.set $2 + local.get $0 + i64.reinterpret_f64 + local.set $3 + local.get $1 + i64.reinterpret_f64 + local.set $4 + local.get $3 + i64.const 52 + i64.shr_u + local.set $5 + local.get $4 + i64.const 52 + i64.shr_u + local.set $6 + local.get $5 + i64.const 1 + i64.sub + i64.const 2047 + i64.const 1 + i64.sub + i64.ge_u + if (result i32) + i32.const 1 + else local.get $6 - i64.const 52 - i64.shr_u - local.set $8 - local.get $7 - i64.const 1 - i64.sub i64.const 2047 - i64.const 1 + i64.and + i64.const 958 + i64.sub + i64.const 1086 + i64.const 958 i64.sub i64.ge_u - if (result i32) - i32.const 1 - else - local.get $8 - i64.const 2047 - i64.and - i64.const 958 - i64.sub - i64.const 1086 - i64.const 958 - i64.sub - i64.ge_u - end + end + if + local.get $4 + call $~lib/util/math/zeroinfnan if - local.get $6 - local.set $9 - local.get $9 + local.get $4 i64.const 1 i64.shl + i64.const 0 + i64.eq + if + f64.const 1 + return + end + local.get $3 + i64.const 4607182418800017408 + i64.eq + if + f64.const nan:0x8000000000000 + return + end + local.get $3 i64.const 1 - i64.sub + i64.shl i64.const -9007199254740992 - i64.const 1 - i64.sub - i64.ge_u - if - local.get $6 - i64.const 1 - i64.shl - i64.const 0 - i64.eq - if - f64.const 1 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 - i64.const 4607182418800017408 - i64.eq - if - f64.const nan:0x8000000000000 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 + i64.gt_u + if (result i32) + i32.const 1 + else + local.get $4 i64.const 1 i64.shl i64.const -9007199254740992 i64.gt_u - if (result i32) - i32.const 1 - else - local.get $6 - i64.const 1 - i64.shl - i64.const -9007199254740992 - i64.gt_u - end - if - local.get $3 - local.get $2 - f64.add - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 - i64.const 1 - i64.shl - i64.const 9214364837600034816 - i64.eq - if - f64.const nan:0x8000000000000 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 - i64.const 1 - i64.shl - i64.const 9214364837600034816 - i64.lt_u - local.get $6 - i64.const 63 - i64.shr_u - i64.const 0 - i64.ne - i32.eqz - i32.eq - if - f64.const 0 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $2 - local.get $2 - f64.mul - br $~lib/util/math/pow_lut|inlined.0 end - local.get $5 - local.set $9 - local.get $9 + if + local.get $0 + local.get $1 + f64.add + return + end + local.get $3 i64.const 1 i64.shl - i64.const 1 - i64.sub - i64.const -9007199254740992 - i64.const 1 - i64.sub - i64.ge_u + i64.const 9214364837600034816 + i64.eq if - local.get $3 - local.get $3 - f64.mul - local.set $10 - local.get $5 - i64.const 63 - i64.shr_u - i32.wrap_i64 - if (result i32) - block $~lib/util/math/checkint|inlined.0 (result i32) - local.get $6 - local.set $9 - local.get $9 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - local.set $11 - local.get $11 - i64.const 1023 - i64.lt_u - if - i32.const 0 - br $~lib/util/math/checkint|inlined.0 - end - local.get $11 - i64.const 1023 - i64.const 52 - i64.add - i64.gt_u - if - i32.const 2 - br $~lib/util/math/checkint|inlined.0 - end - i64.const 1 - i64.const 1023 - i64.const 52 - i64.add - local.get $11 - i64.sub - i64.shl - local.set $11 - local.get $9 - local.get $11 - i64.const 1 - i64.sub - i64.and - i64.const 0 - i64.ne - if - i32.const 0 - br $~lib/util/math/checkint|inlined.0 - end - local.get $9 - local.get $11 - i64.and - i64.const 0 - i64.ne - if - i32.const 1 - br $~lib/util/math/checkint|inlined.0 - end - i32.const 2 - end - i32.const 1 - i32.eq - else - i32.const 0 - end - if - local.get $10 - f64.neg - local.set $10 - end - local.get $6 - i64.const 63 - i64.shr_u - i64.const 0 - i64.ne - if (result f64) - f64.const 1 - local.get $10 - f64.div - else - local.get $10 - end - br $~lib/util/math/pow_lut|inlined.0 + f64.const nan:0x8000000000000 + return end - local.get $5 + local.get $3 + i64.const 1 + i64.shl + i64.const 9214364837600034816 + i64.lt_u + local.get $4 i64.const 63 i64.shr_u i64.const 0 i64.ne + i32.eqz + i32.eq if - block $~lib/util/math/checkint|inlined.1 (result i32) - local.get $6 - local.set $9 - local.get $9 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - local.set $11 - local.get $11 - i64.const 1023 - i64.lt_u - if - i32.const 0 - br $~lib/util/math/checkint|inlined.1 - end - local.get $11 - i64.const 1023 - i64.const 52 - i64.add - i64.gt_u - if - i32.const 2 - br $~lib/util/math/checkint|inlined.1 - end - i64.const 1 - i64.const 1023 - i64.const 52 - i64.add - local.get $11 - i64.sub - i64.shl - local.set $11 - local.get $9 - local.get $11 - i64.const 1 - i64.sub - i64.and - i64.const 0 - i64.ne - if - i32.const 0 - br $~lib/util/math/checkint|inlined.1 - end - local.get $9 - local.get $11 - i64.and - i64.const 0 - i64.ne - if - i32.const 1 - br $~lib/util/math/checkint|inlined.1 - end - i32.const 2 - end - local.set $12 - local.get $12 - i32.const 0 - i32.eq - if - local.get $3 - local.get $3 - f64.sub - local.get $3 - local.get $3 - f64.sub - f64.div - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $12 + f64.const 0 + return + end + local.get $1 + local.get $1 + f64.mul + return + end + local.get $3 + call $~lib/util/math/zeroinfnan + if + local.get $0 + local.get $0 + f64.mul + local.set $7 + local.get $3 + i64.const 63 + i64.shr_u + i32.wrap_i64 + if (result i32) + local.get $4 + call $~lib/util/math/checkint i32.const 1 i32.eq - if - i32.const 262144 - local.set $4 - end - local.get $5 - i64.const 9223372036854775807 - i64.and - local.set $5 + else + i32.const 0 + end + if local.get $7 - i64.const 2047 - i64.and + f64.neg local.set $7 end + local.get $4 + i64.const 63 + i64.shr_u + i64.const 0 + i64.ne + if (result f64) + f64.const 1 + local.get $7 + f64.div + else + local.get $7 + end + return + end + local.get $3 + i64.const 63 + i64.shr_u + i64.const 0 + i64.ne + if + local.get $4 + call $~lib/util/math/checkint + local.set $8 local.get $8 - i64.const 2047 - i64.and - i64.const 958 - i64.sub - i64.const 1086 - i64.const 958 - i64.sub - i64.ge_u + i32.const 0 + i32.eq if - local.get $5 - i64.const 4607182418800017408 - i64.eq - if - f64.const 1 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $8 - i64.const 2047 - i64.and - i64.const 958 - i64.lt_u - if - f64.const 1 - br $~lib/util/math/pow_lut|inlined.0 - end - local.get $5 - i64.const 4607182418800017408 - i64.gt_u - local.get $8 - i64.const 2048 - i64.lt_u - i32.eq - if (result f64) - f64.const inf - else - f64.const 0 - end - br $~lib/util/math/pow_lut|inlined.0 + local.get $0 + local.get $0 + f64.sub + local.get $0 + local.get $0 + f64.sub + f64.div + return end - local.get $7 - i64.const 0 - i64.eq + local.get $8 + i32.const 1 + i32.eq if - local.get $3 - f64.const 4503599627370496 - f64.mul - i64.reinterpret_f64 - local.set $5 - local.get $5 - i64.const 9223372036854775807 - i64.and - local.set $5 - local.get $5 - i64.const 52 - i64.const 52 - i64.shl - i64.sub - local.set $5 + i32.const 262144 + local.set $2 end + local.get $3 + i64.const 9223372036854775807 + i64.and + local.set $3 + local.get $5 + i64.const 2047 + i64.and + local.set $5 end - local.get $5 - local.set $9 - local.get $9 - i64.const 4604531861337669632 - i64.sub - local.set $11 - local.get $11 - i64.const 52 - i64.const 7 - i64.sub - i64.shr_u - i64.const 127 - i64.and - i32.wrap_i64 - local.set $12 - local.get $11 - i64.const 52 - i64.shr_s - local.set $13 - local.get $9 - local.get $11 - i64.const 4095 - i64.const 52 - i64.shl - i64.and - i64.sub - local.set $14 - local.get $14 - f64.reinterpret_i64 - local.set $10 - local.get $13 - f64.convert_i64_s - local.set $15 - i32.const 88 - local.get $12 - i32.const 2 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load - local.set $16 - i32.const 88 - local.get $12 - i32.const 2 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load offset=16 - local.set $17 - i32.const 88 - local.get $12 - i32.const 2 - i32.const 3 - i32.add - i32.shl - i32.add - f64.load offset=24 - local.set $18 - local.get $14 - i64.const 2147483648 - i64.add - i64.const -4294967296 - i64.and - f64.reinterpret_i64 - local.set $19 - local.get $10 - local.get $19 - f64.sub - local.set $20 - local.get $19 - local.get $16 - f64.mul - f64.const 1 - f64.sub - local.set $21 - local.get $20 - local.get $16 - f64.mul - local.set $22 - local.get $21 - local.get $22 - f64.add - local.set $23 - local.get $15 - f64.const 0.6931471805598903 - f64.mul - local.get $17 - f64.add - local.set $24 - local.get $24 - local.get $23 - f64.add - local.set $25 - local.get $15 - f64.const 5.497923018708371e-14 - f64.mul - local.get $18 - f64.add - local.set $26 - local.get $24 - local.get $25 - f64.sub - local.get $23 - f64.add - local.set $27 - f64.const -0.5 - local.get $23 - f64.mul - local.set $28 - local.get $23 - local.get $28 - f64.mul - local.set $29 - local.get $23 - local.get $29 - f64.mul - local.set $30 - f64.const -0.5 - local.get $21 - f64.mul - local.set $31 - local.get $21 - local.get $31 - f64.mul - local.set $32 - local.get $25 - local.get $32 - f64.add - local.set $33 - local.get $22 - local.get $28 - local.get $31 - f64.add - f64.mul - local.set $34 - local.get $25 - local.get $33 - f64.sub - local.get $32 - f64.add - local.set $35 - local.get $30 - f64.const -0.6666666666666679 - local.get $23 - f64.const 0.5000000000000007 - f64.mul - f64.add - local.get $29 - f64.const 0.7999999995323976 - local.get $23 - f64.const -0.6666666663487739 - f64.mul - f64.add - local.get $29 - f64.const -1.142909628459501 - local.get $23 - f64.const 1.0000415263675542 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - f64.mul - local.set $36 - local.get $26 - local.get $27 - f64.add - local.get $34 - f64.add - local.get $35 - f64.add - local.get $36 - f64.add - local.set $37 - local.get $33 - local.get $37 - f64.add - local.set $38 - local.get $33 - local.get $38 - f64.sub - local.get $37 - f64.add - global.set $~lib/util/math/log_tail - local.get $38 - local.set $38 - global.get $~lib/util/math/log_tail - local.set $37 local.get $6 - i64.const -134217728 - i64.and - f64.reinterpret_i64 - local.set $34 - local.get $2 - local.get $34 - f64.sub - local.set $33 - local.get $38 - i64.reinterpret_f64 - i64.const -134217728 + i64.const 2047 i64.and - f64.reinterpret_i64 - local.set $32 - local.get $38 - local.get $32 - f64.sub - local.get $37 - f64.add - local.set $31 - local.get $34 - local.get $32 - f64.mul - local.set $36 - local.get $33 - local.get $32 - f64.mul - local.get $2 - local.get $31 - f64.mul - f64.add - local.set $35 - block $~lib/util/math/exp_inline|inlined.0 (result f64) - local.get $36 - local.set $15 - local.get $35 - local.set $10 - local.get $4 - local.set $12 - local.get $15 - i64.reinterpret_f64 - local.set $9 - local.get $9 - i64.const 52 - i64.shr_u - i32.wrap_i64 - i32.const 2047 - i32.and - local.set $39 - local.get $39 - i32.const 969 - i32.sub - i32.const 63 - i32.ge_u + i64.const 958 + i64.sub + i64.const 1086 + i64.const 958 + i64.sub + i64.ge_u + if + local.get $3 + i64.const 4607182418800017408 + i64.eq if - local.get $39 - i32.const 969 - i32.sub - i32.const -2147483648 - i32.ge_u - if - f64.const -1 - f64.const 1 - local.get $12 - select - br $~lib/util/math/exp_inline|inlined.0 - end - local.get $39 - i32.const 1033 - i32.ge_u - if - local.get $9 - i64.const 63 - i64.shr_u - i64.const 0 - i64.ne - if (result f64) - local.get $12 - local.set $41 - local.get $41 - local.set $42 - i64.const 1152921504606846976 - f64.reinterpret_i64 - local.set $16 - local.get $16 - f64.neg - local.get $16 - local.get $42 - select - local.get $16 - f64.mul - else - local.get $12 - local.set $42 - local.get $42 - local.set $41 - i64.const 8070450532247928832 - f64.reinterpret_i64 - local.set $17 - local.get $17 - f64.neg - local.get $17 - local.get $41 - select - local.get $17 - f64.mul - end - br $~lib/util/math/exp_inline|inlined.0 - end - i32.const 0 - local.set $39 + f64.const 1 + return end - f64.const 184.6649652337873 - local.get $15 + local.get $6 + i64.const 2047 + i64.and + i64.const 958 + i64.lt_u + if + f64.const 1 + return + end + local.get $3 + i64.const 4607182418800017408 + i64.gt_u + local.get $6 + i64.const 2048 + i64.lt_u + i32.eq + if (result f64) + f64.const inf + else + f64.const 0 + end + return + end + local.get $5 + i64.const 0 + i64.eq + if + local.get $0 + f64.const 4503599627370496 f64.mul - local.set $29 - local.get $29 - f64.const 6755399441055744 - f64.add - local.set $30 - local.get $30 i64.reinterpret_f64 - local.set $14 - local.get $30 - f64.const 6755399441055744 - f64.sub - local.set $30 - local.get $15 - local.get $30 - f64.const -0.005415212348111709 - f64.mul - f64.add - local.get $30 - f64.const -1.2864023111638346e-14 - f64.mul - f64.add - local.set $28 - local.get $28 - local.get $10 - f64.add - local.set $28 - local.get $14 - i64.const 127 + local.set $3 + local.get $3 + i64.const 9223372036854775807 i64.and - i64.const 1 - i64.shl - i32.wrap_i64 - local.set $40 - local.get $14 - local.get $12 - i64.extend_i32_u - i64.add + local.set $3 + local.get $3 + i64.const 52 i64.const 52 - i64.const 7 - i64.sub i64.shl - local.set $13 - i32.const 4184 - local.get $40 - i32.const 3 - i32.shl - i32.add - i64.load - f64.reinterpret_i64 - local.set $25 - i32.const 4184 - local.get $40 - i32.const 3 - i32.shl - i32.add - i64.load offset=8 - local.get $13 - i64.add - local.set $11 - local.get $28 - local.get $28 - f64.mul - local.set $27 - local.get $25 - local.get $28 - f64.add - local.get $27 - f64.const 0.49999999999996786 - local.get $28 - f64.const 0.16666666666665886 - f64.mul - f64.add - f64.mul - f64.add - local.get $27 - local.get $27 - f64.mul - f64.const 0.0416666808410674 - local.get $28 - f64.const 0.008333335853059549 - f64.mul - f64.add - f64.mul - f64.add - local.set $24 - local.get $39 - i32.const 0 - i32.eq - if - block $~lib/util/math/specialcase|inlined.0 (result f64) - local.get $24 - local.set $18 - local.get $11 - local.set $44 - local.get $14 - local.set $43 - local.get $43 - i64.const 2147483648 - i64.and - i64.const 0 - i64.ne - i32.eqz - if - local.get $44 - i64.const 1009 - i64.const 52 - i64.shl - i64.sub - local.set $44 - local.get $44 - f64.reinterpret_i64 - local.set $17 - f64.const 5486124068793688683255936e279 - local.get $17 - local.get $17 - local.get $18 - f64.mul - f64.add - f64.mul - br $~lib/util/math/specialcase|inlined.0 - end - local.get $44 - i64.const 1022 - i64.const 52 - i64.shl - i64.add - local.set $44 - local.get $44 - f64.reinterpret_i64 - local.set $17 - local.get $17 - local.get $17 - local.get $18 - f64.mul - f64.add - local.set $16 - local.get $16 - f64.abs - f64.const 1 - f64.lt - if - f64.const 1 - local.get $16 - f64.copysign - local.set $23 - local.get $17 - local.get $16 - f64.sub - local.get $17 - local.get $18 - f64.mul - f64.add - local.set $22 - local.get $23 - local.get $16 - f64.add - local.set $21 - local.get $23 - local.get $21 - f64.sub - local.get $16 - f64.add - local.get $22 - f64.add - local.set $22 - local.get $21 - local.get $22 - f64.add - local.get $23 - f64.sub - local.set $16 - local.get $16 - f64.const 0 - f64.eq - if - local.get $44 - i64.const -9223372036854775808 - i64.and - f64.reinterpret_i64 - local.set $16 - end - end - local.get $16 - f64.const 2.2250738585072014e-308 - f64.mul - end - br $~lib/util/math/exp_inline|inlined.0 - end - local.get $11 - f64.reinterpret_i64 - local.set $26 - local.get $26 - local.get $26 - local.get $24 + i64.sub + local.set $3 + end + end + local.get $3 + call $~lib/util/math/log_inline + local.set $9 + global.get $~lib/util/math/log_tail + local.set $10 + local.get $4 + i64.const -134217728 + i64.and + f64.reinterpret_i64 + local.set $13 + local.get $1 + local.get $13 + f64.sub + local.set $14 + local.get $9 + i64.reinterpret_f64 + i64.const -134217728 + i64.and + f64.reinterpret_i64 + local.set $15 + local.get $9 + local.get $15 + f64.sub + local.get $10 + f64.add + local.set $16 + local.get $13 + local.get $15 + f64.mul + local.set $11 + local.get $14 + local.get $15 + f64.mul + local.get $1 + local.get $16 + f64.mul + f64.add + local.set $12 + local.get $11 + local.get $12 + local.get $2 + call $~lib/util/math/exp_inline + ) + (func $~lib/math/NativeMath.pow (param $0 f64) (param $1 f64) (result f64) + local.get $1 + f64.abs + f64.const 2 + f64.le + if + local.get $1 + f64.const 2 + f64.eq + if + local.get $0 + local.get $0 f64.mul - f64.add + return + end + local.get $1 + f64.const 0.5 + f64.eq + if + local.get $0 + f64.sqrt + f64.abs + f64.const inf + local.get $0 + f64.const inf + f64.neg + f64.ne + select + return + end + local.get $1 + f64.const -1 + f64.eq + if + f64.const 1 + local.get $0 + f64.div + return + end + local.get $1 + f64.const 1 + f64.eq + if + local.get $0 + return + end + local.get $1 + f64.const 0 + f64.eq + if + f64.const 1 + return end end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $0 + local.get $1 + call $~lib/util/math/pow_lut return ) (func $std/operator-overloading/Tester.pow (param $0 i32) (param $1 i32) (result i32) diff --git a/tests/compiler/std/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index 28130fa71a..318cec91ef 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -13,86 +13,44 @@ (global $std/pointer/buf (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - i32.const 8 - local.set $4 - local.get $0 + i32.const 8 + local.set $4 + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $0 + local.get $1 + i32.lt_u + if local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 + i32.const 7 + i32.and local.get $0 - local.get $1 - i32.lt_u + i32.const 7 + i32.and + i32.eq if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if local.get $4 - i32.const 8 - i32.ge_u + i32.eqz if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + return end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $4 + i32.const 1 + i32.sub + local.set $4 local.get $0 local.tee $2 i32.const 1 @@ -107,84 +65,130 @@ local.get $3 i32.load8_u i32.store8 + br $while-continue|0 + end + end + loop $while-continue|1 + local.get $4 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store local.get $4 - i32.const 1 + i32.const 8 i32.sub local.set $4 - br $while-continue|2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $while-continue|1 end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq + end + loop $while-continue|2 + local.get $4 if - loop $while-continue|3 - local.get $0 + local.get $0 + local.tee $2 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $2 + local.get $3 + i32.load8_u + i32.store8 + local.get $4 + i32.const 1 + i32.sub + local.set $4 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $4 + i32.add + i32.const 7 + i32.and + if local.get $4 - i32.add - i32.const 7 - i32.and + i32.eqz if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 + return end - end - loop $while-continue|4 + local.get $0 local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.const 1 + i32.sub + local.tee $4 + i32.add + local.get $1 + local.get $4 + i32.add + i32.load8_u + i32.store8 + br $while-continue|3 end end - loop $while-continue|5 + loop $while-continue|4 local.get $4 + i32.const 8 + i32.ge_u if local.get $0 local.get $4 - i32.const 1 + i32.const 8 i32.sub local.tee $4 i32.add local.get $1 local.get $4 i32.add - i32.load8_u - i32.store8 - br $while-continue|5 + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $4 + if + local.get $0 + local.get $4 + i32.const 1 + i32.sub + local.tee $4 + i32.add + local.get $1 + local.get $4 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) (func $start:std/pointer @@ -354,7 +358,7 @@ if local.get $0 local.get $1 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove else local.get $0 i32.const 0 diff --git a/tests/compiler/std/pointer.untouched.wat b/tests/compiler/std/pointer.untouched.wat index c91702a279..7db5b3db9c 100644 --- a/tests/compiler/std/pointer.untouched.wat +++ b/tests/compiler/std/pointer.untouched.wat @@ -23,219 +23,214 @@ (func $~lib/rt/stub/__release (param $0 i32) nop ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + (local $6 i64) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 + i32.const 0 + i32.const 1 + i32.gt_s + drop + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.set $3 + local.get $0 + local.get $1 + i32.store8 + local.get $3 + local.get $1 + i32.store8 offset=3 + local.get $2 + i32.const 2 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store8 offset=1 + local.get $0 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=1 + local.get $2 + i32.const 6 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store8 offset=3 + local.get $3 + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $5 + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.set $3 + local.get $0 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=16 + local.get $3 + local.get $5 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=12 + local.get $0 + local.get $5 + i32.store offset=16 + local.get $0 + local.get $5 + i32.store offset=20 + local.get $0 + local.get $5 + i32.store offset=24 + local.get $3 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=12 + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $5 + i64.extend_i32_u + local.get $5 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $6 + loop $while-continue|0 local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - i32.const 4 - i32.sub - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - local.get $4 - i32.store8 offset=3 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=1 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and + i32.const 32 + i32.ge_u local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - i32.const 28 - i32.sub - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=24 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=16 - local.get $6 - local.get $8 - i32.store offset=20 - local.get $3 - i32.const 24 - i32.le_u if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=4 - local.get $6 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=12 - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 + local.get $0 + local.get $6 + i64.store + local.get $0 + local.get $6 + i64.store offset=8 + local.get $0 + local.get $6 + i64.store offset=16 + local.get $0 + local.get $6 + i64.store offset=24 + local.get $2 i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 end end ) + (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memset + ) (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -1260,238 +1255,233 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if local.get $0 - local.set $5 local.get $1 - local.set $4 local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if i32.const 0 - i32.const 1 + i32.const 2 i32.lt_s drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.tee $7 + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 i32.const 1 i32.add - local.set $5 - local.get $7 + local.set $0 local.get $4 - local.tee $7 + local.get $1 + local.tee $4 i32.const 1 i32.add - local.set $4 - local.get $7 + local.set $1 + local.get $4 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 + br $while-continue|0 end end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) (func $start:std/pointer (local $0 i32) (local $1 i32) diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index ec63d08717..879cb6859c 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -1,16 +1,16 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i32_i64_=>_none (func (param i32 i64))) (type $i32_f32_=>_none (func (param i32 f32))) @@ -41,6 +41,58 @@ (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -55,7 +107,7 @@ if i32.const 0 i32.const 1040 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -77,7 +129,7 @@ if i32.const 0 i32.const 1040 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -96,23 +148,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -120,72 +172,56 @@ if i32.const 0 i32.const 1040 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -193,7 +229,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -216,7 +252,7 @@ if i32.const 0 i32.const 1040 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -230,22 +266,16 @@ if i32.const 0 i32.const 1040 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -254,7 +284,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -263,7 +293,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -274,16 +304,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -303,7 +327,7 @@ if i32.const 0 i32.const 1040 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -336,8 +360,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -358,7 +382,7 @@ if i32.const 0 i32.const 1040 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -368,17 +392,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1040 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -407,13 +431,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -421,21 +445,15 @@ if i32.const 0 i32.const 1040 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -450,37 +468,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -504,7 +513,7 @@ if i32.const 0 i32.const 1040 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -521,7 +530,7 @@ if i32.const 0 i32.const 1040 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -549,7 +558,7 @@ if i32.const 0 i32.const 1040 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -601,7 +610,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -622,7 +631,8 @@ unreachable end i32.const 1456 - local.tee $0 + local.set $2 + i32.const 1456 i32.const 0 i32.store i32.const 3024 @@ -633,35 +643,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1456 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1456 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -681,7 +682,7 @@ i32.const 1456 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) local.get $0 @@ -690,7 +691,7 @@ if i32.const 1088 i32.const 1040 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -763,17 +764,14 @@ if i32.const 0 i32.const 1040 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const -1 local.get $1 i32.shl @@ -781,16 +779,10 @@ local.tee $1 if (result i32) local.get $0 + local.get $2 local.get $1 i32.ctz - local.get $2 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -806,31 +798,22 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1040 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end @@ -848,7 +831,7 @@ if i32.const 0 i32.const 1040 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -891,20 +874,9 @@ i32.and i32.store local.get $1 - i32.const 16 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 + call $~lib/rt/tlsf/GETRIGHT local.get $1 - i32.load - i32.const -4 - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const -3 i32.and @@ -919,7 +891,7 @@ if i32.const 0 i32.const 1040 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -942,15 +914,16 @@ local.tee $3 i32.eqz if - i32.const 16 memory.size local.tee $3 i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -975,9 +948,7 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 - local.get $5 + local.tee $5 local.get $3 local.get $5 i32.gt_s @@ -1010,7 +981,7 @@ if i32.const 0 i32.const 1040 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1026,7 +997,7 @@ if i32.const 0 i32.const 1040 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -1110,161 +1081,171 @@ end local.get $0 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (local $2 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 4 - i32.sub - local.tee $2 - i32.const 0 - i32.store8 offset=3 - local.get $1 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 offset=1 - local.get $0 - i32.const 0 - i32.store8 offset=2 - local.get $2 - i32.const 0 - i32.store8 offset=2 - local.get $2 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 offset=3 - local.get $2 - i32.const 0 - i32.store8 - local.get $1 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $2 - i32.add - local.tee $0 - i32.const 0 - i32.store - local.get $0 - local.get $1 - local.get $2 - i32.sub - i32.const -4 - i32.and - local.tee $2 - i32.add - i32.const 28 - i32.sub - local.tee $1 - i32.const 0 - i32.store offset=24 - local.get $2 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $2 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $1 - i32.const 0 - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $0 - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $1 - i32.add - local.set $0 - local.get $2 + local.get $1 + i32.eqz + if + return + end + local.get $0 + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 4 + i32.sub + local.tee $2 + i32.const 0 + i32.store8 offset=3 + local.get $1 + i32.const 2 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store8 offset=1 + local.get $0 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=1 + local.get $1 + i32.const 6 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store8 offset=3 + local.get $2 + i32.const 0 + i32.store8 + local.get $1 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $2 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $0 + local.get $1 + local.get $2 + i32.sub + i32.const -4 + i32.and + local.tee $2 + i32.add + i32.const 28 + i32.sub + local.tee $1 + i32.const 0 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + i32.const 0 + i32.store offset=24 + local.get $1 + i32.const 0 + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $1 + i32.add + local.set $0 + local.get $2 + local.get $1 + i32.sub + local.set $1 + loop $while-continue|0 local.get $1 - i32.sub - local.set $1 - loop $while-continue|0 + i32.const 32 + i32.ge_u + if + local.get $0 + i64.const 0 + i64.store + local.get $0 + i64.const 0 + i64.store offset=8 + local.get $0 + i64.const 0 + i64.store offset=16 + local.get $0 + i64.const 0 + i64.store offset=24 local.get $1 i32.const 32 - i32.ge_u - if - local.get $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i64.const 0 - i64.store offset=16 - local.get $0 - i64.const 0 - i64.store offset=24 - local.get $1 - i32.const 32 - i32.sub - local.set $1 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $while-continue|0 - end + i32.sub + local.set $1 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 end end ) @@ -1286,7 +1267,7 @@ call $~lib/rt/tlsf/__alloc local.tee $1 local.get $0 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset local.get $1 call $~lib/rt/pure/__retain ) @@ -1369,6 +1350,14 @@ i32.const 16777619 i32.mul ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/util/hash/hash8 + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load @@ -1416,11 +1405,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -1436,124 +1421,120 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $4 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $8 + local.tee $7 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 + local.set $2 local.get $0 i32.load offset=8 - local.tee $6 + local.tee $8 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $7 - local.get $3 - local.set $4 + local.set $6 + local.get $2 + local.set $3 loop $while-continue|0 local.get $6 - local.get $7 + local.get $8 i32.ne if - local.get $6 - local.tee $2 + local.get $8 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $4 - local.get $2 + local.get $3 + local.get $8 i32.load8_s i32.store8 + local.get $3 local.get $4 - local.get $5 - local.get $2 + local.get $8 i32.load8_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $5 i32.load i32.store offset=4 - local.get $2 - local.get $4 + local.get $5 + local.get $3 i32.store - local.get $4 + local.get $3 i32.const 8 i32.add - local.set $4 + local.set $3 end - local.get $6 + local.get $8 i32.const 8 i32.add - local.set $6 + local.set $8 br $while-continue|0 end end - local.get $5 - local.tee $4 + local.get $4 + local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $6 + local.tee $8 i32.ne if - local.get $4 + local.get $3 call $~lib/rt/pure/__retain - local.set $4 - local.get $6 + local.set $3 + local.get $8 call $~lib/rt/pure/__release end - local.get $2 - local.get $4 + local.get $0 + local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $3 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 - local.tee $4 + local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - local.get $4 + local.set $1 + local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $8 + local.get $0 + local.get $7 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $4 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) @@ -1563,11 +1544,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH local.tee $3 call $~lib/set/Set#find i32.eqz @@ -1643,177 +1620,179 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $0 + local.get $1 + i32.lt_u + if local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 + i32.const 7 + i32.and local.get $0 - local.get $1 - i32.lt_u + i32.const 7 + i32.and + i32.eq if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + return end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $2 + i32.const 1 + i32.sub + local.set $2 local.get $0 - local.tee $2 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $1 - local.get $2 local.get $3 + local.get $4 i32.load8_u i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 + br $while-continue|0 end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 - local.get $4 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u + i32.add + local.set $1 + br $while-continue|1 + end + end + end + loop $while-continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + local.get $2 + i32.eqz if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 + return end - end - end - loop $while-continue|5 - local.get $4 - if - local.get $4 + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $4 - local.get $0 + local.tee $2 i32.add local.get $1 - local.get $4 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) @@ -1855,13 +1834,7 @@ return end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.tee $6 i32.load local.tee $4 @@ -1918,7 +1891,7 @@ i32.const 16 i32.add local.get $2 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $1 i32.const 1444 i32.ge_u @@ -1995,7 +1968,7 @@ if i32.const 0 i32.const 1040 - i32.const 581 + i32.const 573 i32.const 3 call $~lib/builtins/abort unreachable @@ -2014,7 +1987,7 @@ local.get $2 local.get $5 i32.sub - call $~lib/memory/memory.fill + call $~lib/util/memory/memset local.get $1 local.get $3 i32.ne @@ -2110,7 +2083,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 local.get $8 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 4 call $~lib/rt/tlsf/__alloc @@ -2215,11 +2188,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $1 i32.eqz @@ -2640,51 +2609,50 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $4 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $8 + local.tee $7 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 + local.set $2 local.get $0 i32.load offset=8 - local.tee $6 + local.tee $8 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $7 - local.get $3 - local.set $4 + local.set $6 + local.get $2 + local.set $3 loop $while-continue|0 local.get $6 - local.get $7 + local.get $8 i32.ne if - local.get $6 - local.tee $2 + local.get $8 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $4 - local.get $2 + local.get $3 + local.get $8 i32.load8_u i32.store8 + local.get $3 local.get $4 - local.get $5 - local.get $2 + local.get $8 i32.load8_u call $~lib/util/hash/hash8 local.get $1 @@ -2692,85 +2660,84 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $5 i32.load i32.store offset=4 - local.get $2 - local.get $4 + local.get $5 + local.get $3 i32.store - local.get $4 + local.get $3 i32.const 8 i32.add - local.set $4 + local.set $3 end - local.get $6 + local.get $8 i32.const 8 i32.add - local.set $6 + local.set $8 br $while-continue|0 end end - local.get $5 - local.tee $4 + local.get $4 + local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $6 + local.tee $8 i32.ne if - local.get $4 + local.get $3 call $~lib/rt/pure/__retain - local.set $4 - local.get $6 + local.set $3 + local.get $8 call $~lib/rt/pure/__release end - local.get $2 - local.get $4 + local.get $0 + local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $3 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 - local.tee $4 + local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - local.get $4 + local.set $1 + local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $8 + local.get $0 + local.get $7 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $4 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - local.get $1 local.get $1 i32.const 255 i32.and call $~lib/util/hash/hash8 - local.tee $3 + local.tee $2 + local.set $3 + local.get $0 + local.get $1 + local.get $2 call $~lib/set/Set#find i32.eqz if @@ -2876,7 +2843,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 local.get $8 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 6 call $~lib/rt/tlsf/__alloc @@ -3389,6 +3356,14 @@ i32.const 16777619 i32.mul ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load @@ -3436,11 +3411,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -3456,124 +3427,120 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $4 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $8 + local.tee $7 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 + local.set $2 local.get $0 i32.load offset=8 - local.tee $6 + local.tee $8 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $7 - local.get $3 - local.set $4 + local.set $6 + local.get $2 + local.set $3 loop $while-continue|0 local.get $6 - local.get $7 + local.get $8 i32.ne if - local.get $6 - local.tee $2 + local.get $8 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $4 - local.get $2 + local.get $3 + local.get $8 i32.load16_s i32.store16 + local.get $3 local.get $4 - local.get $5 - local.get $2 + local.get $8 i32.load16_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $5 i32.load i32.store offset=4 - local.get $2 - local.get $4 + local.get $5 + local.get $3 i32.store - local.get $4 + local.get $3 i32.const 8 i32.add - local.set $4 + local.set $3 end - local.get $6 + local.get $8 i32.const 8 i32.add - local.set $6 + local.set $8 br $while-continue|0 end end - local.get $5 - local.tee $4 + local.get $4 + local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $6 + local.tee $8 i32.ne if - local.get $4 + local.get $3 call $~lib/rt/pure/__retain - local.set $4 - local.get $6 + local.set $3 + local.get $8 call $~lib/rt/pure/__release end - local.get $2 - local.get $4 + local.get $0 + local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $3 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 - local.tee $4 + local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - local.get $4 + local.set $1 + local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $8 + local.get $0 + local.get $7 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $4 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) @@ -3583,11 +3550,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH local.tee $3 call $~lib/set/Set#find i32.eqz @@ -3749,7 +3712,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 local.get $5 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 8 call $~lib/rt/tlsf/__alloc @@ -3856,11 +3819,7 @@ local.get $0 local.get $1 local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 + call $~lib/util/hash/HASH call $~lib/set/Set#find local.tee $1 i32.eqz @@ -4281,51 +4240,50 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $4 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $8 + local.tee $7 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 + local.set $2 local.get $0 i32.load offset=8 - local.tee $6 + local.tee $8 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $7 - local.get $3 - local.set $4 + local.set $6 + local.get $2 + local.set $3 loop $while-continue|0 local.get $6 - local.get $7 + local.get $8 i32.ne if - local.get $6 - local.tee $2 + local.get $8 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $4 - local.get $2 + local.get $3 + local.get $8 i32.load16_u i32.store16 + local.get $3 local.get $4 - local.get $5 - local.get $2 + local.get $8 i32.load16_u call $~lib/util/hash/hash16 local.get $1 @@ -4333,85 +4291,84 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $5 i32.load i32.store offset=4 - local.get $2 - local.get $4 + local.get $5 + local.get $3 i32.store - local.get $4 + local.get $3 i32.const 8 i32.add - local.set $4 + local.set $3 end - local.get $6 + local.get $8 i32.const 8 i32.add - local.set $6 + local.set $8 br $while-continue|0 end end - local.get $5 - local.tee $4 + local.get $4 + local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $6 + local.tee $8 i32.ne if - local.get $4 + local.get $3 call $~lib/rt/pure/__retain - local.set $4 - local.get $6 + local.set $3 + local.get $8 call $~lib/rt/pure/__release end - local.get $2 - local.get $4 + local.get $0 + local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $3 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 - local.tee $4 + local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - local.get $4 + local.set $1 + local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $8 + local.get $0 + local.get $7 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $4 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - local.get $1 local.get $1 i32.const 65535 i32.and call $~lib/util/hash/hash16 - local.tee $3 + local.tee $2 + local.set $3 + local.get $0 + local.get $1 + local.get $2 call $~lib/set/Set#find i32.eqz if @@ -4522,7 +4479,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 local.get $5 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 10 call $~lib/rt/tlsf/__alloc @@ -5114,51 +5071,50 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $4 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $8 + local.tee $7 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 + local.set $2 local.get $0 i32.load offset=8 - local.tee $6 + local.tee $8 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $7 - local.get $3 - local.set $4 + local.set $6 + local.get $2 + local.set $3 loop $while-continue|0 local.get $6 - local.get $7 + local.get $8 i32.ne if - local.get $6 - local.tee $2 + local.get $8 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $4 - local.get $2 + local.get $3 + local.get $8 i32.load i32.store + local.get $3 local.get $4 - local.get $5 - local.get $2 + local.get $8 i32.load call $~lib/util/hash/hash32 local.get $1 @@ -5166,83 +5122,82 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $5 i32.load i32.store offset=4 - local.get $2 - local.get $4 + local.get $5 + local.get $3 i32.store - local.get $4 + local.get $3 i32.const 8 i32.add - local.set $4 + local.set $3 end - local.get $6 + local.get $8 i32.const 8 i32.add - local.set $6 + local.set $8 br $while-continue|0 end end - local.get $5 - local.tee $4 + local.get $4 + local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $6 + local.tee $8 i32.ne if - local.get $4 + local.get $3 call $~lib/rt/pure/__retain - local.set $4 - local.get $6 + local.set $3 + local.get $8 call $~lib/rt/pure/__release end - local.get $2 - local.get $4 + local.get $0 + local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $3 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 - local.tee $4 + local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - local.get $4 + local.set $1 + local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $8 + local.get $0 + local.get $7 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $4 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - local.get $1 local.get $1 call $~lib/util/hash/hash32 - local.tee $3 + local.tee $2 + local.set $3 + local.get $0 + local.get $1 + local.get $2 call $~lib/set/Set#find i32.eqz if @@ -5403,7 +5358,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 local.get $5 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 12 call $~lib/rt/tlsf/__alloc @@ -5929,7 +5884,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 local.get $5 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 14 call $~lib/rt/tlsf/__alloc @@ -6499,51 +6454,50 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $4 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $8 + local.tee $7 i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 + local.set $2 local.get $0 i32.load offset=8 - local.tee $6 + local.tee $8 local.get $0 i32.load offset=16 i32.const 4 i32.shl i32.add - local.set $7 - local.get $3 - local.set $4 + local.set $6 + local.get $2 + local.set $3 loop $while-continue|0 local.get $6 - local.get $7 + local.get $8 i32.ne if - local.get $6 - local.tee $2 + local.get $8 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $4 - local.get $2 + local.get $3 + local.get $8 i64.load i64.store + local.get $3 local.get $4 - local.get $5 - local.get $2 + local.get $8 i64.load call $~lib/util/hash/hash64 local.get $1 @@ -6551,83 +6505,82 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $5 i32.load i32.store offset=8 - local.get $2 - local.get $4 + local.get $5 + local.get $3 i32.store - local.get $4 + local.get $3 i32.const 16 i32.add - local.set $4 + local.set $3 end - local.get $6 + local.get $8 i32.const 16 i32.add - local.set $6 + local.set $8 br $while-continue|0 end end - local.get $5 - local.tee $4 + local.get $4 + local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $6 + local.tee $8 i32.ne if - local.get $4 + local.get $3 call $~lib/rt/pure/__retain - local.set $4 - local.get $6 + local.set $3 + local.get $8 call $~lib/rt/pure/__release end - local.get $2 - local.get $4 + local.get $0 + local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $3 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 - local.tee $4 + local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - local.get $4 + local.set $1 + local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $8 + local.get $0 + local.get $7 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $4 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - local.get $1 local.get $1 call $~lib/util/hash/hash64 - local.tee $4 + local.tee $2 + local.set $3 + local.get $0 + local.get $1 + local.get $2 call $~lib/set/Set#find i32.eqz if @@ -6665,11 +6618,11 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $3 + local.tee $4 i32.const 1 i32.add i32.store offset=16 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -6685,7 +6638,7 @@ local.get $2 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -6788,7 +6741,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 local.get $5 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 16 call $~lib/rt/tlsf/__alloc @@ -7316,7 +7269,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 local.get $5 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 18 call $~lib/rt/tlsf/__alloc @@ -7789,51 +7742,50 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $4 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $8 + local.tee $7 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 + local.set $2 local.get $0 i32.load offset=8 - local.tee $6 + local.tee $8 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $7 - local.get $3 - local.set $4 + local.set $6 + local.get $2 + local.set $3 loop $while-continue|0 local.get $6 - local.get $7 + local.get $8 i32.ne if - local.get $6 - local.tee $2 + local.get $8 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $4 - local.get $2 + local.get $3 + local.get $8 f32.load f32.store + local.get $3 local.get $4 - local.get $5 - local.get $2 + local.get $8 f32.load i32.reinterpret_f32 call $~lib/util/hash/hash32 @@ -7842,84 +7794,83 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $5 i32.load i32.store offset=4 - local.get $2 - local.get $4 + local.get $5 + local.get $3 i32.store - local.get $4 + local.get $3 i32.const 8 i32.add - local.set $4 + local.set $3 end - local.get $6 + local.get $8 i32.const 8 i32.add - local.set $6 + local.set $8 br $while-continue|0 end end - local.get $5 - local.tee $4 + local.get $4 + local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $6 + local.tee $8 i32.ne if - local.get $4 + local.get $3 call $~lib/rt/pure/__retain - local.set $4 - local.get $6 + local.set $3 + local.get $8 call $~lib/rt/pure/__release end - local.get $2 - local.get $4 + local.get $0 + local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $3 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 - local.tee $4 + local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - local.get $4 + local.set $1 + local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $8 + local.get $0 + local.get $7 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $4 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - local.get $1 local.get $1 i32.reinterpret_f32 call $~lib/util/hash/hash32 - local.tee $4 + local.tee $2 + local.set $3 + local.get $0 + local.get $1 + local.get $2 call $~lib/set/Set#find i32.eqz if @@ -7957,11 +7908,11 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $3 + local.tee $4 i32.const 1 i32.add i32.store offset=16 - local.get $3 + local.get $4 i32.const 3 i32.shl i32.add @@ -7977,7 +7928,7 @@ local.get $2 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -8031,7 +7982,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 local.get $6 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 20 call $~lib/rt/tlsf/__alloc @@ -8619,51 +8570,50 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $4 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $8 + local.tee $7 i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 + local.set $2 local.get $0 i32.load offset=8 - local.tee $6 + local.tee $8 local.get $0 i32.load offset=16 i32.const 4 i32.shl i32.add - local.set $7 - local.get $3 - local.set $4 + local.set $6 + local.get $2 + local.set $3 loop $while-continue|0 local.get $6 - local.get $7 + local.get $8 i32.ne if - local.get $6 - local.tee $2 + local.get $8 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $4 - local.get $2 + local.get $3 + local.get $8 f64.load f64.store + local.get $3 local.get $4 - local.get $5 - local.get $2 + local.get $8 f64.load i64.reinterpret_f64 call $~lib/util/hash/hash64 @@ -8672,84 +8622,83 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $5 i32.load i32.store offset=8 - local.get $2 - local.get $4 + local.get $5 + local.get $3 i32.store - local.get $4 + local.get $3 i32.const 16 i32.add - local.set $4 + local.set $3 end - local.get $6 + local.get $8 i32.const 16 i32.add - local.set $6 + local.set $8 br $while-continue|0 end end - local.get $5 - local.tee $4 + local.get $4 + local.tee $3 local.get $0 - local.tee $2 i32.load - local.tee $6 + local.tee $8 i32.ne if - local.get $4 + local.get $3 call $~lib/rt/pure/__retain - local.set $4 - local.get $6 + local.set $3 + local.get $8 call $~lib/rt/pure/__release end - local.get $2 - local.get $4 + local.get $0 + local.get $3 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.set $1 - local.get $3 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=8 - local.tee $4 + local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - local.get $4 + local.set $1 + local.get $3 call $~lib/rt/pure/__release end + local.get $0 local.get $1 - local.get $2 i32.store offset=8 - local.get $1 - local.get $8 + local.get $0 + local.get $7 i32.store offset=12 - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $4 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - local.get $1 local.get $1 i64.reinterpret_f64 call $~lib/util/hash/hash64 - local.tee $4 + local.tee $2 + local.set $3 + local.get $0 + local.get $1 + local.get $2 call $~lib/set/Set#find i32.eqz if @@ -8787,11 +8736,11 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $3 + local.tee $4 i32.const 1 i32.add i32.store offset=16 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -8807,7 +8756,7 @@ local.get $2 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -8861,7 +8810,7 @@ call $~lib/rt/tlsf/__alloc local.tee $2 local.get $6 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset i32.const 16 i32.const 22 call $~lib/rt/tlsf/__alloc diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index d25308241e..1b7fff634b 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -1,9 +1,10 @@ (module - (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 $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) @@ -11,16 +12,17 @@ (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) + (type $i64_=>_i32 (func (param i64) (result 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_f64_=>_none (func (param i32 i32 f64))) (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $none_=>_i32 (func (result i32))) (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) - (type $i64_=>_i32 (func (param i64) (result i32))) + (type $f32_=>_i32 (func (param f32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -45,6 +47,69 @@ (global $~lib/heap/__heap_base i32 (i32.const 436)) (export "memory" (memory $0)) (start $~start) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -53,9 +118,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -68,7 +130,7 @@ if i32.const 0 i32.const 32 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -95,7 +157,7 @@ if i32.const 0 i32.const 32 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -149,7 +211,7 @@ if i32.const 0 i32.const 32 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -174,77 +236,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -261,6 +281,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -272,8 +298,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -281,7 +305,7 @@ if i32.const 0 i32.const 32 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -298,28 +322,18 @@ if i32.const 0 i32.const 32 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -330,44 +344,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -375,30 +379,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 32 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -417,22 +417,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -458,7 +458,7 @@ if i32.const 0 i32.const 32 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -470,18 +470,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 32 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -535,27 +535,15 @@ if i32.const 0 i32.const 32 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -570,24 +558,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -597,31 +571,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -629,8 +587,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -656,24 +612,22 @@ if i32.const 0 i32.const 32 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -681,7 +635,7 @@ if i32.const 0 i32.const 32 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -689,16 +643,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -714,7 +668,7 @@ if i32.const 0 i32.const 32 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -723,8 +677,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -735,49 +689,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -790,10 +740,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -843,73 +789,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -922,11 +841,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -946,7 +865,7 @@ if i32.const 80 i32.const 32 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -972,9 +891,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1042,31 +958,24 @@ if i32.const 0 i32.const 32 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1079,79 +988,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 32 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1188,9 +1066,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1204,12 +1080,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1219,7 +1095,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1256,7 +1132,7 @@ if i32.const 0 i32.const 32 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1307,29 +1183,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1349,7 +1205,7 @@ if i32.const 0 i32.const 32 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1396,7 +1252,7 @@ if i32.const 0 i32.const 32 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1417,7 +1273,7 @@ if i32.const 0 i32.const 32 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1438,7 +1294,7 @@ if i32.const 0 i32.const 32 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -1538,219 +1394,214 @@ end local.get $0 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + (local $6 i64) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - i32.const 4 - i32.sub - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - local.get $4 - i32.store8 offset=3 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=1 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - i32.const 28 - i32.sub - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=24 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=16 - local.get $6 - local.get $8 - i32.store offset=20 - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=4 - local.get $6 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=12 - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add + i32.const 0 + i32.const 1 + i32.gt_s + drop + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.set $3 + local.get $0 + local.get $1 + i32.store8 + local.get $3 + local.get $1 + i32.store8 offset=3 + local.get $2 + i32.const 2 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store8 offset=1 + local.get $0 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=1 + local.get $2 + i32.const 6 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store8 offset=3 + local.get $3 + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $5 + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.set $3 + local.get $0 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=16 + local.get $3 + local.get $5 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=12 + local.get $0 + local.get $5 + i32.store offset=16 + local.get $0 + local.get $5 + i32.store offset=20 + local.get $0 + local.get $5 + i32.store offset=24 + local.get $3 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=12 + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $5 + i64.extend_i32_u + local.get $5 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $6 + loop $while-continue|0 + local.get $2 + i32.const 32 + i32.ge_u local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 + if + local.get $0 + local.get $6 + i64.store + local.get $0 + local.get $6 + i64.store offset=8 + local.get $0 + local.get $6 + i64.store offset=16 + local.get $0 + local.get $6 + i64.store offset=24 + local.get $2 i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 end end ) + (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memset + ) (func $~lib/arraybuffer/ArrayBuffer#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 @@ -1786,9 +1637,28 @@ call $~lib/rt/pure/decrement end ) + (func $~lib/set/ENTRY_ALIGN (result i32) + i32.const 3 + ) + (func $~lib/set/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/set/ENTRY_ALIGN + local.set $0 + i32.const 8 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/set/Set#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -1805,16 +1675,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/set/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 32 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -1865,6 +1739,25 @@ i32.const 16777619 i32.mul ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/util/hash/hash8 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -1918,30 +1811,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -1977,7 +1850,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -1987,7 +1860,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -2014,24 +1887,9 @@ local.get $10 i32.load8_s i32.store8 - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $10 - i32.load8_s - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $10 + i32.load8_s + call $~lib/util/hash/HASH local.get $1 i32.and local.set $12 @@ -2049,12 +1907,12 @@ local.get $8 i32.store local.get $8 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -2095,52 +1953,33 @@ local.get $11 call $~lib/rt/pure/__release end - local.get $9 - i32.store offset=8 - local.get $0 - local.get $4 - i32.store offset=12 - local.get $0 - local.get $0 - i32.load offset=20 - i32.store offset=16 - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - ) - (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $9 + i32.store offset=8 local.get $0 - local.get $1 + local.get $4 + i32.store offset=12 + local.get $0 + local.get $0 + i32.load offset=20 + i32.store offset=16 local.get $3 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + ) + (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + call $~lib/util/hash/HASH + local.set $2 + local.get $0 + local.get $1 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -2177,16 +2016,16 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $2 + local.tee $4 i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 + local.get $4 + call $~lib/set/ENTRY_SIZE i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i32.store8 local.get $0 @@ -2197,20 +2036,20 @@ i32.store offset=20 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load i32.store offset=4 - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -2341,7 +2180,7 @@ if i32.const 0 i32.const 32 - i32.const 581 + i32.const 573 i32.const 3 call $~lib/builtins/abort unreachable @@ -3372,238 +3211,233 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if local.get $0 - local.set $5 local.get $1 - local.set $4 local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if i32.const 0 - i32.const 1 + i32.const 2 i32.lt_s drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 + local.get $3 + if + local.get $2 + i32.eqz if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 + return end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + br $while-continue|0 end - loop $while-continue|1 - local.get $3 + end + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|2 + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 i32.add - local.set $4 - local.get $7 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 - end - end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 - i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + br $while-continue|3 end end - loop $while-continue|5 + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 - i32.const 1 + local.get $2 + i32.const 8 i32.sub - local.tee $3 + local.set $2 + local.get $0 + local.get $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $2 i32.add - i32.load8_u - i32.store8 - br $while-continue|5 + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 @@ -3654,22 +3488,12 @@ return end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $5 local.get $5 - i32.const 16 - i32.add - local.get $5 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $6 local.get $6 - i32.load - local.set $7 - local.get $7 i32.const 1 i32.and if @@ -3680,25 +3504,25 @@ i32.and i32.const 16 i32.add - local.get $7 + local.get $6 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $5 - local.get $5 + local.set $7 + local.get $7 local.get $3 i32.ge_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $4 i32.const 3 i32.and - local.get $5 + local.get $7 i32.or i32.store local.get $1 @@ -3909,7 +3733,7 @@ if local.get $1 local.get $5 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -3984,30 +3808,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -4015,8 +3820,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -4031,16 +3836,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -4060,7 +3865,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -4421,9 +4226,28 @@ local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/set/ENTRY_ALIGN (result i32) + i32.const 3 + ) + (func $~lib/set/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/set/ENTRY_ALIGN + local.set $0 + i32.const 8 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/set/Set#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -4440,16 +4264,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/set/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 32 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -4493,6 +4321,23 @@ call $~lib/set/Set#clear local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + i32.const 1 + i32.eq + drop + local.get $0 + i32.const 255 + i32.and + call $~lib/util/hash/hash8 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -4544,28 +4389,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -4601,7 +4428,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -4611,7 +4438,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -4638,24 +4465,9 @@ local.get $10 i32.load8_u i32.store8 - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $10 - i32.load8_u - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $10 + i32.load8_u + call $~lib/util/hash/HASH local.get $1 i32.and local.set $12 @@ -4673,12 +4485,12 @@ local.get $8 i32.store local.get $8 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -4737,32 +4549,15 @@ (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.1 - end + local.get $1 + call $~lib/util/hash/HASH + local.set $2 + local.get $0 + local.get $1 + local.get $2 + call $~lib/set/Set#find local.set $3 - local.get $0 - local.get $1 local.get $3 - call $~lib/set/Set#find - local.set $4 - local.get $4 i32.eqz if local.get $0 @@ -4799,16 +4594,16 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $2 + local.tee $4 i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 + local.get $4 + call $~lib/set/ENTRY_SIZE i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i32.store8 local.get $0 @@ -4819,20 +4614,20 @@ i32.store offset=20 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load i32.store offset=4 - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -5015,7 +4810,7 @@ if local.get $1 local.get $5 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -5090,28 +4885,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - i32.const 1 - i32.eq - drop - local.get $2 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -5119,8 +4897,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -5135,16 +4913,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -5164,7 +4942,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -5517,9 +5295,28 @@ local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/set/ENTRY_ALIGN (result i32) + i32.const 3 + ) + (func $~lib/set/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/set/ENTRY_ALIGN + local.set $0 + i32.const 8 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/set/Set#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -5536,16 +5333,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/set/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 32 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -5611,6 +5412,29 @@ local.set $1 local.get $1 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -5664,34 +5488,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -5727,7 +5527,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -5737,7 +5537,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -5764,28 +5564,9 @@ local.get $10 i32.load16_s i32.store16 - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $10 - i32.load16_s - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $10 + i32.load16_s + call $~lib/util/hash/HASH local.get $1 i32.and local.set $12 @@ -5803,12 +5584,12 @@ local.get $8 i32.store local.get $8 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -5867,38 +5648,15 @@ (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -5935,16 +5693,16 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $2 + local.tee $4 i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 + local.get $4 + call $~lib/set/ENTRY_SIZE i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i32.store16 local.get $0 @@ -5955,20 +5713,20 @@ i32.store offset=20 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load i32.store offset=4 - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -6151,7 +5909,7 @@ if local.get $1 local.get $5 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -6226,34 +5984,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -6261,8 +5996,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -6277,16 +6012,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -6306,7 +6041,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -6667,9 +6402,28 @@ local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/set/ENTRY_ALIGN (result i32) + i32.const 3 + ) + (func $~lib/set/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/set/ENTRY_ALIGN + local.set $0 + i32.const 8 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/set/Set#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -6686,16 +6440,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/set/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 32 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -6739,6 +6497,27 @@ call $~lib/set/Set#clear local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 2 + i32.const 1 + i32.eq + drop + i32.const 2 + i32.const 2 + i32.eq + drop + local.get $0 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -6790,32 +6569,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -6851,7 +6608,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -6861,7 +6618,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -6888,28 +6645,9 @@ local.get $10 i32.load16_u i32.store16 - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $10 - i32.load16_u - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $10 + i32.load16_u + call $~lib/util/hash/HASH local.get $1 i32.and local.set $12 @@ -6927,12 +6665,12 @@ local.get $8 i32.store local.get $8 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -6991,36 +6729,15 @@ (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -7057,16 +6774,16 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $2 + local.tee $4 i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 + local.get $4 + call $~lib/set/ENTRY_SIZE i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i32.store16 local.get $0 @@ -7077,20 +6794,20 @@ i32.store offset=20 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load i32.store offset=4 - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -7273,7 +6990,7 @@ if local.get $1 local.get $5 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -7348,32 +7065,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 2 - i32.const 1 - i32.eq - drop - i32.const 2 - i32.const 2 - i32.eq - drop - local.get $2 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -7381,8 +7077,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -7397,16 +7093,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -7426,7 +7122,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -7779,9 +7475,28 @@ local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/set/ENTRY_ALIGN (result i32) + i32.const 3 + ) + (func $~lib/set/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/set/ENTRY_ALIGN + local.set $0 + i32.const 8 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/set/Set#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -7798,16 +7513,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/set/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 32 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -7893,6 +7612,29 @@ local.set $1 local.get $1 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $0 + call $~lib/util/hash/hash32 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -7942,34 +7684,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -8005,7 +7723,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -8015,7 +7733,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -8042,32 +7760,9 @@ local.get $10 i32.load i32.store - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $10 - i32.load - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $10 + i32.load + call $~lib/util/hash/HASH local.get $1 i32.and local.set $12 @@ -8085,12 +7780,12 @@ local.get $8 i32.store local.get $8 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -8149,38 +7844,15 @@ (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -8217,16 +7889,16 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $2 + local.tee $4 i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 + local.get $4 + call $~lib/set/ENTRY_SIZE i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i32.store local.get $0 @@ -8237,20 +7909,20 @@ i32.store offset=20 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load i32.store offset=4 - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -8433,7 +8105,7 @@ if local.get $1 local.get $5 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -8508,34 +8180,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -8543,8 +8192,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -8559,16 +8208,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -8588,7 +8237,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -8929,9 +8578,28 @@ local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/set/ENTRY_ALIGN (result i32) + i32.const 3 + ) + (func $~lib/set/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/set/ENTRY_ALIGN + local.set $0 + i32.const 8 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/set/Set#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -8948,16 +8616,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/set/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 32 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -9001,6 +8673,29 @@ call $~lib/set/Set#clear local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $0 + call $~lib/util/hash/hash32 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -9050,34 +8745,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -9113,7 +8784,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -9123,7 +8794,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -9150,32 +8821,9 @@ local.get $10 i32.load i32.store - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $10 - i32.load - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $10 + i32.load + call $~lib/util/hash/HASH local.get $1 i32.and local.set $12 @@ -9193,12 +8841,12 @@ local.get $8 i32.store local.get $8 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -9257,38 +8905,15 @@ (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -9325,16 +8950,16 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $2 + local.tee $4 i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 + local.get $4 + call $~lib/set/ENTRY_SIZE i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i32.store local.get $0 @@ -9345,20 +8970,20 @@ i32.store offset=20 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $2 + local.set $4 + local.get $3 local.get $4 - local.get $2 i32.load i32.store offset=4 - local.get $2 local.get $4 + local.get $3 i32.store end local.get $0 @@ -9541,7 +9166,7 @@ if local.get $1 local.get $5 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -9616,34 +9241,11 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -9651,8 +9253,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -9667,16 +9269,16 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=20 local.tee $5 - local.get $2 + local.get $4 local.get $5 i32.gt_u select @@ -9696,7 +9298,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -10037,9 +9639,28 @@ local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/set/ENTRY_ALIGN (result i32) + i32.const 7 + ) + (func $~lib/set/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/set/ENTRY_ALIGN + local.set $0 + i32.const 12 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/set/Set#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -10056,16 +9677,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/set/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 64 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -10197,6 +9822,33 @@ local.set $3 local.get $3 ) + (func $~lib/util/hash/HASH (param $0 i64) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + call $~lib/util/hash/hash64 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -10246,38 +9898,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -10293,9 +9917,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i64) + (local $12 i32) (local $13 i32) - (local $14 i32) local.get $1 i32.const 1 i32.add @@ -10314,7 +9937,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 16 + call $~lib/set/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -10324,7 +9947,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 16 + call $~lib/set/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -10351,59 +9974,32 @@ local.get $10 i64.load i64.store - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $10 - i64.load - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $10 + i64.load + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $13 + local.set $12 local.get $3 - local.get $13 + local.get $12 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=8 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 - i32.const 16 + call $~lib/set/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 16 + call $~lib/set/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -10412,28 +10008,28 @@ local.get $0 local.tee $11 local.get $3 - local.tee $13 + local.tee $12 local.get $11 i32.load local.tee $9 i32.ne if - local.get $13 + local.get $12 call $~lib/rt/pure/__retain - local.set $13 + local.set $12 local.get $9 call $~lib/rt/pure/__release end - local.get $13 + local.get $12 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.tee $14 + local.tee $13 local.get $5 local.tee $9 - local.get $14 + local.get $13 i32.load offset=8 local.tee $11 i32.ne @@ -10459,46 +10055,18 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -10535,16 +10103,16 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $4 i32.const 1 i32.add i32.store offset=16 - local.get $5 - i32.const 16 + local.get $4 + call $~lib/set/ENTRY_SIZE i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i64.store local.get $0 @@ -10555,20 +10123,20 @@ i32.store offset=20 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $5 + local.set $4 + local.get $3 local.get $4 - local.get $5 i32.load i32.store offset=8 - local.get $5 local.get $4 + local.get $3 i32.store end local.get $0 @@ -10751,7 +10319,7 @@ if local.get $1 local.get $5 - i32.const 16 + call $~lib/set/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -10820,45 +10388,17 @@ local.get $2 ) (func $~lib/set/Set#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -10866,8 +10406,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -10882,17 +10422,17 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=20 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -10911,7 +10451,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -11253,9 +10793,28 @@ local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/set/ENTRY_ALIGN (result i32) + i32.const 7 + ) + (func $~lib/set/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/set/ENTRY_ALIGN + local.set $0 + i32.const 12 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/set/Set#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -11272,16 +10831,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/set/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 64 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -11325,6 +10888,33 @@ call $~lib/set/Set#clear local.get $0 ) + (func $~lib/util/hash/HASH (param $0 i64) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 8 + i32.const 1 + i32.eq + drop + i32.const 8 + i32.const 2 + i32.eq + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + call $~lib/util/hash/hash64 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -11373,39 +10963,11 @@ end i32.const 0 ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) - local.get $0 - local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + (func $~lib/set/Set#has (param $0 i32) (param $1 i64) (result i32) + local.get $0 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -11421,9 +10983,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i64) + (local $12 i32) (local $13 i32) - (local $14 i32) local.get $1 i32.const 1 i32.add @@ -11442,7 +11003,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 16 + call $~lib/set/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -11452,7 +11013,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 16 + call $~lib/set/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -11479,59 +11040,32 @@ local.get $10 i64.load i64.store - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $10 - i64.load - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $10 + i64.load + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $13 + local.set $12 local.get $3 - local.get $13 + local.get $12 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=8 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 - i32.const 16 + call $~lib/set/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 16 + call $~lib/set/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -11540,28 +11074,28 @@ local.get $0 local.tee $11 local.get $3 - local.tee $13 + local.tee $12 local.get $11 i32.load local.tee $9 i32.ne if - local.get $13 + local.get $12 call $~lib/rt/pure/__retain - local.set $13 + local.set $12 local.get $9 call $~lib/rt/pure/__release end - local.get $13 + local.get $12 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.tee $14 + local.tee $13 local.get $5 local.tee $9 - local.get $14 + local.get $13 i32.load offset=8 local.tee $11 i32.ne @@ -11587,46 +11121,18 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -11663,16 +11169,16 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $4 i32.const 1 i32.add i32.store offset=16 - local.get $5 - i32.const 16 + local.get $4 + call $~lib/set/ENTRY_SIZE i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 i64.store local.get $0 @@ -11683,20 +11189,20 @@ i32.store offset=20 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $5 + local.set $4 + local.get $3 local.get $4 - local.get $5 i32.load i32.store offset=8 - local.get $5 local.get $4 + local.get $3 i32.store end local.get $0 @@ -11879,7 +11385,7 @@ if local.get $1 local.get $5 - i32.const 16 + call $~lib/set/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -11948,45 +11454,17 @@ local.get $2 ) (func $~lib/set/Set#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 8 - i32.const 1 - i32.eq - drop - i32.const 8 - i32.const 2 - i32.eq - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -11994,8 +11472,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -12010,17 +11488,17 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=20 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -12039,7 +11517,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -12381,9 +11859,28 @@ local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/set/ENTRY_ALIGN (result i32) + i32.const 3 + ) + (func $~lib/set/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/set/ENTRY_ALIGN + local.set $0 + i32.const 8 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/set/Set#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -12400,16 +11897,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/set/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 32 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -12453,6 +11954,22 @@ call $~lib/set/Set#clear local.get $0 ) + (func $~lib/util/hash/HASH (param $0 f32) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -12502,27 +12019,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -12538,9 +12038,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 f32) + (local $12 i32) (local $13 i32) - (local $14 i32) local.get $1 i32.const 1 i32.add @@ -12559,7 +12058,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -12569,7 +12068,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -12596,48 +12095,32 @@ local.get $10 f32.load f32.store - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $10 - f32.load - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $12 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $10 + f32.load + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $13 + local.set $12 local.get $3 - local.get $13 + local.get $12 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=4 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -12646,28 +12129,28 @@ local.get $0 local.tee $11 local.get $3 - local.tee $13 + local.tee $12 local.get $11 i32.load local.tee $9 i32.ne if - local.get $13 + local.get $12 call $~lib/rt/pure/__retain - local.set $13 + local.set $12 local.get $9 call $~lib/rt/pure/__release end - local.get $13 + local.get $12 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.tee $14 + local.tee $13 local.get $5 local.tee $9 - local.get $14 + local.get $13 i32.load offset=8 local.tee $11 i32.ne @@ -12681,47 +12164,30 @@ local.get $9 i32.store offset=8 local.get $0 - local.get $4 - i32.store offset=12 - local.get $0 - local.get $0 - i32.load offset=20 - i32.store offset=16 - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - ) - (func $~lib/set/Set#add (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $4 + i32.store offset=12 local.get $0 - local.get $1 + local.get $0 + i32.load offset=20 + i32.store offset=16 local.get $3 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + ) + (func $~lib/set/Set#add (param $0 i32) (param $1 f32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + call $~lib/util/hash/HASH + local.set $2 + local.get $0 + local.get $1 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -12758,16 +12224,16 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $4 i32.const 1 i32.add i32.store offset=16 - local.get $5 - i32.const 8 + local.get $4 + call $~lib/set/ENTRY_SIZE i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 f32.store local.get $0 @@ -12778,20 +12244,20 @@ i32.store offset=20 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $5 + local.set $4 + local.get $3 local.get $4 - local.get $5 i32.load i32.store offset=4 - local.get $5 local.get $4 + local.get $3 i32.store end local.get $0 @@ -12974,7 +12440,7 @@ if local.get $1 local.get $5 - i32.const 8 + call $~lib/set/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -13043,34 +12509,17 @@ local.get $2 ) (func $~lib/set/Set#delete (param $0 i32) (param $1 f32) (result i32) - (local $2 f32) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -13078,8 +12527,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=4 i32.const 1 i32.or @@ -13094,17 +12543,17 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=20 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -13123,7 +12572,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 @@ -13465,9 +12914,28 @@ local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/set/ENTRY_ALIGN (result i32) + i32.const 7 + ) + (func $~lib/set/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/set/ENTRY_ALIGN + local.set $0 + i32.const 12 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/set/Set#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -13484,16 +12952,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/set/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 64 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -13537,6 +13009,26 @@ call $~lib/set/Set#clear local.get $0 ) + (func $~lib/util/hash/HASH (param $0 f64) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 8 + i32.const 8 + i32.eq + drop + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + return + ) (func $~lib/set/Set#find (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -13586,31 +13078,10 @@ i32.const 0 ) (func $~lib/set/Set#has (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 i32.ne @@ -13626,9 +13097,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 f64) + (local $12 i32) (local $13 i32) - (local $14 i32) local.get $1 i32.const 1 i32.add @@ -13647,7 +13117,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 16 + call $~lib/set/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -13657,7 +13127,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 16 + call $~lib/set/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -13684,52 +13154,32 @@ local.get $10 f64.load f64.store - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $10 - f64.load - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $12 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $10 + f64.load + call $~lib/util/hash/HASH local.get $1 i32.and - local.set $13 + local.set $12 local.get $3 - local.get $13 + local.get $12 i32.const 4 i32.mul i32.add - local.set $14 + local.set $13 local.get $11 - local.get $14 + local.get $13 i32.load i32.store offset=8 - local.get $14 + local.get $13 local.get $8 i32.store local.get $8 - i32.const 16 + call $~lib/set/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 16 + call $~lib/set/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -13738,28 +13188,28 @@ local.get $0 local.tee $11 local.get $3 - local.tee $13 + local.tee $12 local.get $11 i32.load local.tee $9 i32.ne if - local.get $13 + local.get $12 call $~lib/rt/pure/__retain - local.set $13 + local.set $12 local.get $9 call $~lib/rt/pure/__release end - local.get $13 + local.get $12 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.tee $14 + local.tee $13 local.get $5 local.tee $9 - local.get $14 + local.get $13 i32.load offset=8 local.tee $11 i32.ne @@ -13785,39 +13235,18 @@ call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) + (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.1 - end - local.set $3 + local.get $1 + call $~lib/util/hash/HASH + local.set $2 local.get $0 local.get $1 - local.get $3 + local.get $2 call $~lib/set/Set#find - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.eqz if local.get $0 @@ -13854,16 +13283,16 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $4 i32.const 1 i32.add i32.store offset=16 - local.get $5 - i32.const 16 + local.get $4 + call $~lib/set/ENTRY_SIZE i32.mul i32.add - local.set $4 - local.get $4 + local.set $3 + local.get $3 local.get $1 f64.store local.get $0 @@ -13874,20 +13303,20 @@ i32.store offset=20 local.get $0 i32.load - local.get $3 + local.get $2 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $5 + local.set $4 + local.get $3 local.get $4 - local.get $5 i32.load i32.store offset=8 - local.get $5 local.get $4 + local.get $3 i32.store end local.get $0 @@ -14070,7 +13499,7 @@ if local.get $1 local.get $5 - i32.const 16 + call $~lib/set/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -14139,38 +13568,17 @@ local.get $2 ) (func $~lib/set/Set#delete (param $0 i32) (param $1 f64) (result i32) - (local $2 f64) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 8 - i32.const 8 - i32.eq - drop - local.get $2 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 0 @@ -14178,8 +13586,8 @@ end i32.const 0 drop - local.get $3 - local.get $3 + local.get $2 + local.get $2 i32.load offset=8 i32.const 1 i32.or @@ -14194,17 +13602,17 @@ i32.load offset=4 i32.const 1 i32.shr_u - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 1 i32.add i32.const 4 - local.tee $5 + local.tee $4 local.get $0 i32.load offset=20 - local.tee $6 + local.tee $5 + local.get $4 local.get $5 - local.get $6 i32.gt_u select i32.ge_u @@ -14223,7 +13631,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end i32.const 1 diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 3edb592153..71f2b36593 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -91,177 +91,179 @@ local.get $0 global.set $~lib/rt/stub/offset ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $0 + local.get $1 + i32.lt_u + if local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 + i32.const 7 + i32.and local.get $0 - local.get $1 - i32.lt_u + i32.const 7 + i32.and + i32.eq if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + return end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $2 + i32.const 1 + i32.sub + local.set $2 local.get $0 - local.tee $2 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $1 - local.get $2 local.get $3 + local.get $4 i32.load8_u i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 + br $while-continue|0 end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 - local.get $4 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and if - local.get $4 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $4 - local.get $0 + local.tee $2 i32.add local.get $1 - local.get $4 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) (func $~lib/rt/stub/__realloc (param $0 i32) (param $1 i32) (result i32) @@ -392,7 +394,7 @@ local.get $0 local.get $4 i32.load offset=12 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.tee $0 i32.const 16 @@ -416,161 +418,171 @@ i32.store offset=12 local.get $0 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (local $2 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 4 - i32.sub - local.tee $2 - i32.const 0 - i32.store8 offset=3 - local.get $1 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 offset=1 - local.get $0 - i32.const 0 - i32.store8 offset=2 - local.get $2 - i32.const 0 - i32.store8 offset=2 - local.get $2 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 offset=3 - local.get $2 - i32.const 0 - i32.store8 - local.get $1 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $2 - i32.add - local.tee $0 - i32.const 0 - i32.store - local.get $0 - local.get $1 - local.get $2 - i32.sub - i32.const -4 - i32.and - local.tee $2 - i32.add - i32.const 28 - i32.sub - local.tee $1 - i32.const 0 - i32.store offset=24 - local.get $2 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $2 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $1 - i32.const 0 - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $0 - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $1 - i32.add - local.set $0 - local.get $2 + local.get $1 + i32.eqz + if + return + end + local.get $0 + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 4 + i32.sub + local.tee $2 + i32.const 0 + i32.store8 offset=3 + local.get $1 + i32.const 2 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store8 offset=1 + local.get $0 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=1 + local.get $1 + i32.const 6 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store8 offset=3 + local.get $2 + i32.const 0 + i32.store8 + local.get $1 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $2 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $0 + local.get $1 + local.get $2 + i32.sub + i32.const -4 + i32.and + local.tee $2 + i32.add + i32.const 28 + i32.sub + local.tee $1 + i32.const 0 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + i32.const 0 + i32.store offset=24 + local.get $1 + i32.const 0 + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $1 + i32.add + local.set $0 + local.get $2 + local.get $1 + i32.sub + local.set $1 + loop $while-continue|0 local.get $1 - i32.sub - local.set $1 - loop $while-continue|0 + i32.const 32 + i32.ge_u + if + local.get $0 + i64.const 0 + i64.store + local.get $0 + i64.const 0 + i64.store offset=8 + local.get $0 + i64.const 0 + i64.store offset=16 + local.get $0 + i64.const 0 + i64.store offset=24 local.get $1 i32.const 32 - i32.ge_u - if - local.get $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i64.const 0 - i64.store offset=16 - local.get $0 - i64.const 0 - i64.store offset=24 - local.get $1 - i32.const 32 - i32.sub - local.set $1 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $while-continue|0 - end + i32.sub + local.set $1 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 end end ) @@ -613,7 +625,7 @@ local.get $3 local.get $2 i32.sub - call $~lib/memory/memory.fill + call $~lib/util/memory/memset local.get $1 local.get $4 i32.ne diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 7a6d33f942..c650fa6ac0 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -1205,245 +1205,240 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if local.get $0 - local.set $5 local.get $1 - local.set $4 local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if i32.const 0 - i32.const 1 + i32.const 2 i32.lt_s drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.tee $7 + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 i32.const 1 i32.add - local.set $5 - local.get $7 + local.set $0 local.get $4 - local.tee $7 + local.get $1 + local.tee $4 i32.const 1 i32.add - local.set $4 - local.get $7 + local.set $1 + local.get $4 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 + br $while-continue|0 end end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 end end - end - end - ) - (func $~lib/rt/stub/__realloc (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 + end + end + end + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end + end + ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) + (func $~lib/rt/stub/__realloc (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) local.get $0 i32.const 0 i32.ne @@ -1562,219 +1557,214 @@ i32.store offset=12 local.get $0 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + (local $6 i64) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 + i32.const 0 + i32.const 1 + i32.gt_s + drop + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.set $3 + local.get $0 + local.get $1 + i32.store8 + local.get $3 + local.get $1 + i32.store8 offset=3 + local.get $2 + i32.const 2 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store8 offset=1 + local.get $0 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=1 + local.get $2 + i32.const 6 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store8 offset=3 + local.get $3 + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $5 + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.set $3 + local.get $0 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=16 + local.get $3 + local.get $5 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=12 + local.get $0 + local.get $5 + i32.store offset=16 + local.get $0 + local.get $5 + i32.store offset=20 + local.get $0 + local.get $5 + i32.store offset=24 + local.get $3 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=12 + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $5 + i64.extend_i32_u + local.get $5 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $6 + loop $while-continue|0 local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - i32.const 4 - i32.sub - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - local.get $4 - i32.store8 offset=3 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=1 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and + i32.const 32 + i32.ge_u local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - i32.const 28 - i32.sub - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=24 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=16 - local.get $6 - local.get $8 - i32.store offset=20 - local.get $3 - i32.const 24 - i32.le_u if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=4 - local.get $6 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=12 - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 + local.get $0 + local.get $6 + i64.store + local.get $0 + local.get $6 + i64.store offset=8 + local.get $0 + local.get $6 + i64.store offset=16 + local.get $0 + local.get $6 + i64.store offset=24 + local.get $2 i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 end end ) + (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memset + ) (func $~lib/array/ensureSize (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index ec97281e2d..bba2fc3912 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -1,13 +1,13 @@ (module (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_=>_none (func (param i32 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 $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -75,6 +75,58 @@ local.get $1 i32.store offset=4 ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -89,7 +141,7 @@ if i32.const 0 i32.const 1328 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -111,7 +163,7 @@ if i32.const 0 i32.const 1328 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -130,23 +182,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -154,72 +206,56 @@ if i32.const 0 i32.const 1328 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -227,7 +263,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -250,7 +286,7 @@ if i32.const 0 i32.const 1328 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -264,22 +300,16 @@ if i32.const 0 i32.const 1328 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -288,7 +318,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -297,7 +327,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -308,16 +338,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -337,7 +361,7 @@ if i32.const 0 i32.const 1328 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -370,8 +394,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -392,7 +416,7 @@ if i32.const 0 i32.const 1328 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -402,17 +426,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1328 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -441,13 +465,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -455,21 +479,15 @@ if i32.const 0 i32.const 1328 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -484,37 +502,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -538,7 +547,7 @@ if i32.const 0 i32.const 1328 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -555,7 +564,7 @@ if i32.const 0 i32.const 1328 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -583,7 +592,7 @@ if i32.const 0 i32.const 1328 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -635,7 +644,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -656,7 +665,8 @@ unreachable end i32.const 1472 - local.tee $0 + local.set $2 + i32.const 1472 i32.const 0 i32.store i32.const 3040 @@ -667,35 +677,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1472 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1472 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -715,7 +716,7 @@ i32.const 1472 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -773,17 +774,14 @@ if i32.const 0 i32.const 1328 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const -1 local.get $1 i32.shl @@ -791,16 +789,10 @@ local.tee $1 if (result i32) local.get $0 + local.get $2 local.get $1 i32.ctz - local.get $2 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -816,151 +808,68 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1328 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end end ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - local.get $1 - i32.load - local.set $3 - local.get $2 - i32.const 15 - i32.and + (local $5 i32) + global.get $~lib/rt/tlsf/collectLock if i32.const 0 i32.const 1328 - i32.const 365 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable end + local.get $1 + local.tee $3 + i32.const 1073741808 + i32.ge_u + if + i32.const 1376 + i32.const 1328 + i32.const 453 + i32.const 30 + call $~lib/builtins/abort + unreachable + end + local.get $0 local.get $3 - i32.const -4 + i32.const 15 + i32.add + i32.const -16 i32.and - local.get $2 - i32.sub + local.tee $1 + i32.const 16 + local.get $1 + i32.const 16 + i32.gt_u + select local.tee $4 - i32.const 32 - 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 16 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 16 - 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 16 - 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) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - global.get $~lib/rt/tlsf/collectLock - if - i32.const 0 - i32.const 1328 - i32.const 501 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1073741808 - i32.ge_u - if - i32.const 1376 - i32.const 1328 - i32.const 461 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $3 - i32.const 16 - local.get $3 - i32.const 16 - i32.gt_u - select - local.tee $4 - call $~lib/rt/tlsf/searchBlock - local.tee $3 - i32.eqz + call $~lib/rt/tlsf/searchBlock + local.tee $1 + i32.eqz if i32.const 1 global.set $~lib/rt/tlsf/collectLock @@ -969,18 +878,19 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if - i32.const 16 memory.size - local.tee $3 + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -1005,10 +915,8 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 - local.get $5 - local.get $3 + local.tee $5 + local.get $1 local.get $5 i32.gt_s select @@ -1025,7 +933,7 @@ end end local.get $0 - local.get $3 + local.get $1 i32.const 16 i32.shl memory.size @@ -1035,19 +943,19 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if i32.const 0 i32.const 1328 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable end end end - local.get $3 + local.get $1 i32.load i32.const -4 i32.and @@ -1056,30 +964,86 @@ if i32.const 0 i32.const 1328 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 0 i32.store offset=4 - local.get $3 + local.get $1 local.get $2 i32.store offset=8 - local.get $3 local.get $1 + local.get $3 i32.store offset=12 local.get $0 - local.get $3 + local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 + local.get $1 + i32.load + local.set $2 local.get $4 - call $~lib/rt/tlsf/prepareBlock - local.get $3 + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1328 + i32.const 357 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const -4 + i32.and + local.get $4 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $4 + local.get $2 + i32.const 2 + i32.and + i32.or + i32.store + local.get $4 + local.get $1 + i32.const 16 + i32.add + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + call $~lib/rt/tlsf/GETRIGHT + local.get $1 + call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $1 call $~lib/rt/rtrace/onalloc - local.get $3 + local.get $1 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -1089,177 +1053,179 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $0 + local.get $1 + i32.lt_u + if local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 + i32.const 7 + i32.and local.get $0 - local.get $1 - i32.lt_u + i32.const 7 + i32.and + i32.eq if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 + return end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 - end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $2 + i32.const 1 + i32.sub + local.set $2 local.get $0 - local.tee $2 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $1 - local.get $2 local.get $3 + local.get $4 i32.load8_u i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 + br $while-continue|0 end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 - local.get $4 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and if - local.get $4 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $4 - local.get $0 + local.tee $2 i32.add local.get $1 - local.get $4 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) (func $~lib/rt/__allocBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -1272,7 +1238,7 @@ local.get $1 local.get $2 local.get $0 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove end local.get $1 ) diff --git a/tests/compiler/std/staticarray.untouched.wat b/tests/compiler/std/staticarray.untouched.wat index 7698493990..f4f723d840 100644 --- a/tests/compiler/std/staticarray.untouched.wat +++ b/tests/compiler/std/staticarray.untouched.wat @@ -4,10 +4,10 @@ (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 $none_=>_none (func)) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) (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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -104,6 +104,69 @@ local.get $2 call $~lib/staticarray/StaticArray#__unchecked_set ) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -112,9 +175,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -127,7 +187,7 @@ if i32.const 0 i32.const 320 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -154,7 +214,7 @@ if i32.const 0 i32.const 320 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -208,7 +268,7 @@ if i32.const 0 i32.const 320 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -233,77 +293,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -320,6 +338,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -331,8 +355,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -340,7 +362,7 @@ if i32.const 0 i32.const 320 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -357,28 +379,18 @@ if i32.const 0 i32.const 320 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -389,44 +401,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -434,30 +436,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 320 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -476,22 +474,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -517,7 +515,7 @@ if i32.const 0 i32.const 320 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -529,18 +527,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 320 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -594,27 +592,15 @@ if i32.const 0 i32.const 320 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -629,24 +615,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -656,31 +628,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -688,8 +644,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -715,24 +669,22 @@ if i32.const 0 i32.const 320 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -740,7 +692,7 @@ if i32.const 0 i32.const 320 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -748,16 +700,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -773,7 +725,7 @@ if i32.const 0 i32.const 320 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -782,8 +734,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -794,49 +746,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -849,10 +797,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -902,73 +846,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -981,11 +898,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -1005,7 +922,7 @@ if i32.const 368 i32.const 320 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -1031,9 +948,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1101,31 +1015,24 @@ if i32.const 0 i32.const 320 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1138,79 +1045,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 320 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1247,9 +1123,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1263,12 +1137,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1278,7 +1152,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1315,7 +1189,7 @@ if i32.const 0 i32.const 320 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1366,29 +1240,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1408,7 +1262,7 @@ if i32.const 0 i32.const 320 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1455,7 +1309,7 @@ if i32.const 0 i32.const 320 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1476,7 +1330,7 @@ if i32.const 0 i32.const 320 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1497,7 +1351,7 @@ if i32.const 0 i32.const 320 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -2556,238 +2410,233 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if local.get $0 - local.set $5 local.get $1 - local.set $4 local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if i32.const 0 - i32.const 1 + i32.const 2 i32.lt_s drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.tee $7 + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 i32.const 1 i32.add - local.set $5 - local.get $7 + local.set $0 local.get $4 - local.tee $7 + local.get $1 + local.tee $4 i32.const 1 i32.add - local.set $4 - local.get $7 + local.set $1 + local.get $4 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 + br $while-continue|0 end end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) (func $~lib/rt/__allocBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 25640a67c8..3bc86e7efe 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -1,10 +1,10 @@ (module - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (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_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_none (func)) (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))) @@ -364,6 +364,58 @@ end local.get $0 ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -378,7 +430,7 @@ if i32.const 0 i32.const 1104 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -400,7 +452,7 @@ if i32.const 0 i32.const 1104 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -419,23 +471,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -443,72 +495,56 @@ if i32.const 0 i32.const 1104 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -516,7 +552,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -539,7 +575,7 @@ if i32.const 0 i32.const 1104 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -553,22 +589,16 @@ if i32.const 0 i32.const 1104 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -577,7 +607,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -586,7 +616,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -597,16 +627,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -626,7 +650,7 @@ if i32.const 0 i32.const 1104 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -659,8 +683,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -681,7 +705,7 @@ if i32.const 0 i32.const 1104 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -691,17 +715,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1104 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -730,13 +754,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -744,21 +768,15 @@ if i32.const 0 i32.const 1104 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -773,37 +791,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -827,7 +836,7 @@ if i32.const 0 i32.const 1104 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -844,7 +853,7 @@ if i32.const 0 i32.const 1104 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -872,7 +881,7 @@ if i32.const 0 i32.const 1104 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -924,7 +933,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -945,7 +954,8 @@ unreachable end i32.const 18624 - local.tee $0 + local.set $2 + i32.const 18624 i32.const 0 i32.store i32.const 20192 @@ -956,35 +966,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 18624 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 18624 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -1004,7 +1005,7 @@ i32.const 18624 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) local.get $0 @@ -1013,7 +1014,7 @@ if i32.const 1152 i32.const 1104 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -1086,17 +1087,14 @@ if i32.const 0 i32.const 1104 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const -1 local.get $1 i32.shl @@ -1104,16 +1102,10 @@ local.tee $1 if (result i32) local.get $0 + local.get $2 local.get $1 i32.ctz - local.get $2 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -1129,31 +1121,22 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1104 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end @@ -1171,7 +1154,7 @@ if i32.const 0 i32.const 1104 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1214,20 +1197,9 @@ i32.and i32.store local.get $1 - i32.const 16 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 + call $~lib/rt/tlsf/GETRIGHT local.get $1 - i32.load - i32.const -4 - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const -3 i32.and @@ -1242,7 +1214,7 @@ if i32.const 0 i32.const 1104 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1265,15 +1237,16 @@ local.tee $3 i32.eqz if - i32.const 16 memory.size local.tee $3 i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -1298,9 +1271,7 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 - local.get $5 + local.tee $5 local.get $3 local.get $5 i32.gt_s @@ -1333,7 +1304,7 @@ if i32.const 0 i32.const 1104 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1349,7 +1320,7 @@ if i32.const 0 i32.const 1104 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -1533,177 +1504,179 @@ i32.and i32.add ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $0 + local.get $1 + i32.lt_u + if local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 + i32.const 7 + i32.and local.get $0 - local.get $1 - i32.lt_u + i32.const 7 + i32.and + i32.eq if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + return end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $2 + i32.const 1 + i32.sub + local.set $2 local.get $0 - local.tee $2 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $1 - local.get $2 local.get $3 + local.get $4 i32.load8_u i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 + br $while-continue|0 end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 - local.get $4 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and if - local.get $4 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $4 - local.get $0 + local.tee $2 i32.add local.get $1 - local.get $4 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) @@ -1745,13 +1718,7 @@ return end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.tee $6 i32.load local.tee $4 @@ -1775,10 +1742,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 @@ -1808,7 +1775,7 @@ i32.const 16 i32.add local.get $2 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $1 i32.const 18616 i32.ge_u @@ -1859,7 +1826,7 @@ if i32.const 0 i32.const 1104 - i32.const 581 + i32.const 573 i32.const 3 call $~lib/builtins/abort unreachable @@ -1883,32 +1850,32 @@ (local $10 i32) local.get $0 call $~lib/string/String#get:length - local.tee $6 + local.tee $8 i32.eqz if local.get $0 call $~lib/rt/pure/__retain return end - local.get $6 + local.get $8 i32.const 3 i32.mul i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $8 + local.set $6 i32.const 1216 call $~lib/string/String#get:length - local.set $3 + local.set $4 loop $for-loop|0 local.get $7 - local.get $6 + local.get $8 i32.lt_u if + local.get $0 local.get $7 i32.const 1 i32.shl - local.get $0 i32.add i32.load16_u local.tee $2 @@ -1917,7 +1884,7 @@ if block $for-continue|0 local.get $7 - local.get $6 + local.get $8 i32.const 1 i32.sub i32.lt_u @@ -1929,13 +1896,13 @@ i32.lt_u select if + local.get $0 local.get $7 i32.const 1 i32.shl - local.get $0 i32.add i32.load16_u offset=2 - local.tee $9 + local.tee $3 i32.const 56319 i32.sub i32.const 1025 @@ -1945,7 +1912,7 @@ i32.const 1 i32.add local.set $7 - local.get $9 + local.get $3 i32.const 1023 i32.and local.get $2 @@ -1961,21 +1928,21 @@ i32.const 131072 i32.ge_u if - local.get $10 + local.get $6 + local.get $5 i32.const 1 i32.shl - local.get $8 i32.add - local.get $9 + local.get $1 + local.get $3 i32.const 16 i32.shl - local.get $1 i32.or i32.store - local.get $10 + local.get $5 i32.const 1 i32.add - local.set $10 + local.set $5 br $for-continue|0 end end @@ -1986,10 +1953,10 @@ i32.const 25 i32.le_u if - local.get $10 + local.get $6 + local.get $5 i32.const 1 i32.shl - local.get $8 i32.add local.get $2 i32.const 26 @@ -2004,24 +1971,24 @@ i32.const 64056 i32.le_u if - block $~lib/util/casemap/bsearch|inlined.0 (result i32) - local.get $3 - local.set $1 + block $__inlined_func$~lib/util/casemap/bsearch + local.get $4 + local.set $3 i32.const 0 - local.set $5 - loop $while-continue|1 - local.get $5 - local.get $1 + local.set $9 + loop $while-continue|0 + local.get $9 + local.get $3 i32.le_s if - local.get $1 - local.get $5 + local.get $3 + local.get $9 i32.add i32.const 3 i32.shr_u i32.const 2 i32.shl - local.tee $9 + local.tee $1 i32.const 1 i32.shl i32.const 1216 @@ -2029,32 +1996,29 @@ i32.load16_u local.get $2 i32.sub - local.tee $4 + local.tee $10 + i32.eqz + br_if $__inlined_func$~lib/util/casemap/bsearch + local.get $10 + i32.const 31 + i32.shr_u if - local.get $4 - i32.const 31 - i32.shr_u - if - local.get $9 - i32.const 4 - i32.add - local.set $5 - else - local.get $9 - i32.const 4 - i32.sub - local.set $1 - end + local.get $1 + i32.const 4 + i32.add + local.set $9 else - local.get $9 - br $~lib/util/casemap/bsearch|inlined.0 + local.get $1 + i32.const 4 + i32.sub + local.set $3 end - br $while-continue|1 + br $while-continue|0 end end i32.const -1 + local.set $1 end - local.set $1 end local.get $1 i32.const -1 @@ -2065,61 +2029,61 @@ i32.shl i32.const 1216 i32.add - local.tee $1 + local.tee $2 i32.load16_u offset=6 - local.set $2 - local.get $10 + local.set $3 + local.get $6 + local.get $5 i32.const 1 i32.shl - local.get $8 i32.add - local.tee $9 - local.get $1 + local.tee $1 + local.get $2 i32.load offset=2 i32.store - local.get $9 - local.get $2 + local.get $1 + local.get $3 i32.store16 offset=4 - local.get $2 + local.get $5 + local.get $3 i32.const 0 i32.ne i32.const 1 i32.add - local.get $10 i32.add - local.set $10 + local.set $5 else local.get $2 i32.const 1 call $~lib/util/casemap/casemap i32.const 2097151 i32.and - local.tee $2 + local.tee $1 i32.const 65536 i32.lt_s if - local.get $10 + local.get $6 + local.get $5 i32.const 1 i32.shl - local.get $8 i32.add - local.get $2 + local.get $1 i32.store16 else - local.get $10 + local.get $6 + local.get $5 i32.const 1 i32.shl - local.get $8 i32.add - local.get $2 + local.get $1 i32.const 65536 i32.sub - local.tee $2 + local.tee $1 i32.const 10 i32.shr_u i32.const 55296 i32.or - local.get $2 + local.get $1 i32.const 1023 i32.and i32.const 56320 @@ -2128,32 +2092,30 @@ i32.shl i32.or i32.store - local.get $10 + local.get $5 i32.const 1 i32.add - local.set $10 + local.set $5 end end end end else - local.get $10 + local.get $6 + local.get $5 i32.const 1 i32.shl - local.get $8 i32.add local.get $2 + local.get $2 i32.const 97 i32.sub i32.const 26 i32.lt_u - i32.const 0 - i32.ne i32.const 5 i32.shl i32.const -1 i32.xor - local.get $2 i32.and i32.store16 end @@ -2161,15 +2123,15 @@ i32.const 1 i32.add local.set $7 - local.get $10 + local.get $5 i32.const 1 i32.add - local.set $10 + local.set $5 br $for-loop|0 end end - local.get $8 - local.get $10 + local.get $6 + local.get $5 i32.const 1 i32.shl call $~lib/rt/tlsf/__realloc @@ -2319,35 +2281,253 @@ i32.const 1 i32.and ) - (func $~lib/string/String#toLowerCase (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/util/string/isCaseIgnorable (param $0 i32) (result i32) + local.get $0 + i32.const 918000 + i32.lt_u + if (result i32) + i32.const 6658 + local.get $0 + call $~lib/util/string/stagedBinaryLookup + else + i32.const 0 + end + ) + (func $~lib/util/string/isCased (param $0 i32) (result i32) + local.get $0 + i32.const 127370 + i32.lt_u + if (result i32) + i32.const 9666 + local.get $0 + call $~lib/util/string/stagedBinaryLookup + else + i32.const 0 + end + ) + (func $~lib/util/string/isFinalSigma (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + i32.const 0 + local.get $1 + local.tee $3 + i32.const 30 + i32.sub + local.tee $4 + i32.const 0 + local.get $4 + i32.gt_s + select + local.set $5 + loop $while-continue|0 + local.get $3 + local.get $5 + i32.gt_s + if + block $__inlined_func$~lib/util/string/codePointBefore (result i32) + i32.const -1 + local.get $3 + local.tee $4 + i32.const 0 + i32.le_s + br_if $__inlined_func$~lib/util/string/codePointBefore + drop + local.get $0 + local.get $4 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.tee $3 + i32.const 64512 + i32.and + i32.const 56320 + i32.eq + local.get $4 + i32.const 2 + i32.sub + i32.const 0 + i32.ge_s + i32.and + if + local.get $0 + local.get $4 + i32.const 2 + i32.sub + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.tee $7 + i32.const 64512 + i32.and + i32.const 55296 + i32.eq + if + local.get $3 + i32.const 1023 + i32.and + local.get $7 + i32.const 1023 + i32.and + i32.const 10 + i32.shl + i32.add + i32.const 65536 + i32.add + br $__inlined_func$~lib/util/string/codePointBefore + end + end + i32.const 65533 + local.get $3 + local.get $3 + i32.const 63488 + i32.and + i32.const 55296 + i32.eq + select + end + local.tee $3 + call $~lib/util/string/isCaseIgnorable + i32.eqz + if + local.get $3 + call $~lib/util/string/isCased + i32.eqz + if + i32.const 0 + return + end + i32.const 1 + local.set $6 + end + local.get $4 + local.get $3 + i32.const 65536 + i32.ge_s + i32.const 1 + i32.add + i32.sub + local.set $3 + br $while-continue|0 + end + end + local.get $6 + i32.eqz + if + i32.const 0 + return + end + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 30 + i32.add + local.tee $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select + local.set $4 + loop $while-continue|1 + local.get $3 + local.get $4 + i32.lt_s + if + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.tee $1 + i32.const 64512 + i32.and + i32.const 55296 + i32.eq + local.get $2 + local.get $3 + i32.const 1 + i32.add + i32.ne + i32.and + if + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_u offset=2 + local.tee $5 + i32.const 64512 + i32.and + i32.const 56320 + i32.eq + if + local.get $5 + local.get $1 + i32.const 10 + i32.shl + i32.add + i32.const -56613888 + i32.add + local.set $1 + end + end + local.get $1 + call $~lib/util/string/isCaseIgnorable + i32.eqz + if + local.get $1 + call $~lib/util/string/isCased + i32.eqz + return + end + local.get $3 + local.get $1 + i32.const 65536 + i32.ge_u + i32.const 1 + i32.add + i32.add + local.set $3 + br $while-continue|1 + end + end + i32.const 1 + ) + (func $~lib/string/String#toLowerCase (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 $10 i32) - (local $11 i32) local.get $0 call $~lib/string/String#get:length - local.tee $7 + local.tee $4 i32.eqz if local.get $0 call $~lib/rt/pure/__retain return end - local.get $7 + local.get $4 i32.const 2 i32.shl call $~lib/rt/tlsf/__alloc - local.set $10 + local.set $6 loop $for-loop|0 local.get $5 - local.get $7 + local.get $4 i32.lt_u if local.get $0 @@ -2362,7 +2542,7 @@ if block $for-continue|0 local.get $5 - local.get $7 + local.get $4 i32.const 1 i32.sub i32.lt_u @@ -2380,7 +2560,7 @@ i32.shl i32.add i32.load16_u offset=2 - local.tee $4 + local.tee $3 i32.const 56319 i32.sub i32.const 1025 @@ -2390,7 +2570,7 @@ i32.const 1 i32.add local.set $5 - local.get $4 + local.get $3 i32.const 1023 i32.and local.get $2 @@ -2406,21 +2586,21 @@ i32.const 131072 i32.ge_u if - local.get $10 - local.get $11 + local.get $6 + local.get $7 i32.const 1 i32.shl i32.add local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.shl i32.or i32.store - local.get $11 + local.get $7 i32.const 1 i32.add - local.set $11 + local.set $7 br $for-continue|0 end end @@ -2429,263 +2609,35 @@ i32.const 304 i32.eq if - local.get $10 - local.get $11 + local.get $6 + local.get $7 i32.const 1 i32.shl i32.add i32.const 50790505 i32.store - local.get $11 + local.get $7 i32.const 1 i32.add - local.set $11 + local.set $7 else local.get $2 i32.const 931 i32.eq if - local.get $10 - local.get $11 + local.get $6 + local.get $7 i32.const 1 i32.shl i32.add - local.get $7 + local.get $4 i32.const 1 i32.gt_u if (result i32) - block $~lib/util/string/isFinalSigma|inlined.0 (result i32) - local.get $0 - local.set $4 - local.get $5 - i32.const 0 - local.set $9 - i32.const 0 - local.get $5 - local.tee $2 - i32.const 30 - i32.sub - local.tee $1 - i32.const 0 - local.get $1 - i32.gt_s - select - local.set $8 - loop $while-continue|1 - local.get $2 - local.get $8 - i32.gt_s - if - block $~lib/util/string/codePointBefore|inlined.0 (result i32) - local.get $2 - local.set $1 - i32.const -1 - local.get $2 - i32.const 0 - i32.le_s - br_if $~lib/util/string/codePointBefore|inlined.0 - drop - local.get $4 - local.get $1 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.tee $3 - i32.const 64512 - i32.and - i32.const 56320 - i32.eq - local.get $1 - i32.const 2 - i32.sub - i32.const 0 - i32.ge_s - i32.and - if - local.get $4 - local.get $1 - i32.const 2 - i32.sub - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.tee $1 - i32.const 64512 - i32.and - i32.const 55296 - i32.eq - if - local.get $3 - i32.const 1023 - i32.and - local.get $1 - i32.const 1023 - i32.and - i32.const 10 - i32.shl - i32.add - i32.const 65536 - i32.add - br $~lib/util/string/codePointBefore|inlined.0 - end - end - i32.const 65533 - local.get $3 - local.get $3 - i32.const 63488 - i32.and - i32.const 55296 - i32.eq - select - end - local.tee $1 - local.set $3 - local.get $1 - i32.const 918000 - i32.lt_u - if (result i32) - i32.const 6658 - local.get $3 - call $~lib/util/string/stagedBinaryLookup - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - local.get $1 - i32.const 127370 - i32.lt_u - if (result i32) - i32.const 9666 - local.get $1 - call $~lib/util/string/stagedBinaryLookup - else - i32.const 0 - end - i32.eqz - br_if $~lib/util/string/isFinalSigma|inlined.0 - drop - i32.const 1 - local.set $9 - end - local.get $2 - local.get $1 - i32.const 65536 - i32.ge_s - i32.const 1 - i32.add - i32.sub - local.set $2 - br $while-continue|1 - end - end - i32.const 0 - local.get $9 - i32.eqz - br_if $~lib/util/string/isFinalSigma|inlined.0 - drop - i32.const 1 - i32.add - local.tee $2 - i32.const 30 - i32.add - local.tee $1 - local.get $7 - local.get $1 - local.get $7 - i32.lt_s - select - local.set $6 - loop $while-continue|2 - local.get $2 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.tee $1 - i32.const 64512 - i32.and - i32.const 55296 - i32.eq - local.get $7 - local.get $2 - i32.const 1 - i32.add - i32.ne - i32.and - if - local.get $4 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_u offset=2 - local.tee $3 - i32.const 64512 - i32.and - i32.const 56320 - i32.eq - if - local.get $1 - i32.const 10 - i32.shl - local.get $3 - i32.add - i32.const -56613888 - i32.add - local.set $1 - end - end - local.get $1 - local.tee $3 - i32.const 918000 - i32.lt_u - if (result i32) - i32.const 6658 - local.get $3 - call $~lib/util/string/stagedBinaryLookup - else - i32.const 0 - end - i32.eqz - if - local.get $3 - local.tee $2 - i32.const 127370 - i32.lt_u - if (result i32) - i32.const 9666 - local.get $2 - call $~lib/util/string/stagedBinaryLookup - else - i32.const 0 - end - i32.eqz - br $~lib/util/string/isFinalSigma|inlined.0 - end - local.get $2 - local.get $3 - i32.const 65536 - i32.ge_u - i32.const 1 - i32.add - i32.add - local.set $2 - br $while-continue|2 - end - end - i32.const 1 - end + local.get $0 + local.get $5 + local.get $4 + call $~lib/util/string/isFinalSigma else i32.const 0 end @@ -2702,8 +2654,8 @@ i32.const 25 i32.le_u if - local.get $10 - local.get $11 + local.get $6 + local.get $7 i32.const 1 i32.shl i32.add @@ -2721,16 +2673,16 @@ i32.const 65536 i32.lt_s if - local.get $10 - local.get $11 + local.get $6 + local.get $7 i32.const 1 i32.shl i32.add local.get $2 i32.store16 else - local.get $10 - local.get $11 + local.get $6 + local.get $7 i32.const 1 i32.shl i32.add @@ -2751,18 +2703,18 @@ i32.shl i32.or i32.store - local.get $11 + local.get $7 i32.const 1 i32.add - local.set $11 + local.set $7 end end end end end else - local.get $10 - local.get $11 + local.get $6 + local.get $7 i32.const 1 i32.shl i32.add @@ -2772,8 +2724,6 @@ i32.sub i32.const 26 i32.lt_u - i32.const 0 - i32.ne i32.const 5 i32.shl i32.or @@ -2783,15 +2733,15 @@ i32.const 1 i32.add local.set $5 - local.get $11 + local.get $7 i32.const 1 i32.add - local.set $11 + local.set $7 br $for-loop|0 end end - local.get $10 - local.get $11 + local.get $6 + local.get $7 i32.const 1 i32.shl call $~lib/rt/tlsf/__realloc @@ -3080,63 +3030,64 @@ (local $2 i32) (local $3 i32) (local $4 i32) - block $__inlined_func$~lib/string/String#concat (result i32) - local.get $0 - i32.const 18336 - local.get $0 - select - local.set $2 + local.get $0 + i32.const 18336 + local.get $0 + select + local.set $2 + local.get $1 + call $~lib/rt/pure/__retain + local.tee $1 + i32.eqz + if local.get $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.eqz + i32.const 18336 + i32.ne if - local.get $0 - i32.const 18336 - i32.ne - if - local.get $0 - call $~lib/rt/pure/__release - end - i32.const 18336 - local.set $0 + local.get $1 + call $~lib/rt/pure/__release end + i32.const 18336 + local.set $1 + end + block $__inlined_func$~lib/string/String#concat local.get $2 call $~lib/string/String#get:length i32.const 1 i32.shl local.tee $3 - local.get $0 + local.get $1 call $~lib/string/String#get:length i32.const 1 i32.shl local.tee $4 i32.add - local.tee $1 + local.tee $0 i32.eqz if - local.get $0 - call $~lib/rt/pure/__release i32.const 1040 + local.set $0 + local.get $1 + call $~lib/rt/pure/__release br $__inlined_func$~lib/string/String#concat end - local.get $1 + local.get $0 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 local.get $2 local.get $3 - call $~lib/memory/memory.copy - local.get $1 + call $~lib/util/memory/memmove + local.get $0 local.get $3 i32.add - local.get $0 + local.get $1 local.get $4 - call $~lib/memory/memory.copy - local.get $0 - call $~lib/rt/pure/__release + call $~lib/util/memory/memmove local.get $1 + call $~lib/rt/pure/__release end + local.get $0 ) (func $start:std/string-casemapping (local $0 i64) diff --git a/tests/compiler/std/string-casemapping.untouched.wat b/tests/compiler/std/string-casemapping.untouched.wat index 41c7e6ce04..11de72a4b7 100644 --- a/tests/compiler/std/string-casemapping.untouched.wat +++ b/tests/compiler/std/string-casemapping.untouched.wat @@ -1,15 +1,15 @@ (module - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 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 (func (param i32 i32 i32) (result i32))) (type $i64_=>_i32 (func (param i64) (result i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 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))) (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) + (type $i32_i32_f64_f64_f64_f64_f64_=>_none (func (param i32 i32 f64 f64 f64 f64 f64))) (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -277,6 +277,69 @@ end local.get $0 ) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -285,9 +348,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -300,7 +360,7 @@ if i32.const 0 i32.const 96 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -327,7 +387,7 @@ if i32.const 0 i32.const 96 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -381,7 +441,7 @@ if i32.const 0 i32.const 96 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -406,77 +466,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -493,6 +511,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -504,8 +528,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -513,7 +535,7 @@ if i32.const 0 i32.const 96 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -530,28 +552,18 @@ if i32.const 0 i32.const 96 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -562,44 +574,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -607,30 +609,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 96 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -649,22 +647,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -690,7 +688,7 @@ if i32.const 0 i32.const 96 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -702,18 +700,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 96 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -767,27 +765,15 @@ if i32.const 0 i32.const 96 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -802,24 +788,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -829,31 +801,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -861,8 +817,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -888,24 +842,22 @@ if i32.const 0 i32.const 96 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -913,7 +865,7 @@ if i32.const 0 i32.const 96 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -921,16 +873,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -946,7 +898,7 @@ if i32.const 0 i32.const 96 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -955,8 +907,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -967,49 +919,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -1022,10 +970,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -1075,73 +1019,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -1154,11 +1071,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -1178,7 +1095,7 @@ if i32.const 144 i32.const 96 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -1204,9 +1121,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1274,31 +1188,24 @@ if i32.const 0 i32.const 96 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1311,79 +1218,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 96 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1420,9 +1296,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1436,12 +1310,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1451,7 +1325,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1488,7 +1362,7 @@ if i32.const 0 i32.const 96 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1539,29 +1413,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1581,7 +1435,7 @@ if i32.const 0 i32.const 96 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1628,7 +1482,7 @@ if i32.const 0 i32.const 96 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1649,7 +1503,7 @@ if i32.const 0 i32.const 96 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1670,7 +1524,7 @@ if i32.const 0 i32.const 96 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -1713,6 +1567,81 @@ i32.const 1 i32.shr_u ) + (func $~lib/util/string/isAscii (param $0 i32) (result i32) + local.get $0 + i32.const 7 + i32.shr_u + i32.eqz + ) + (func $~lib/util/string/toUpper8 (param $0 i32) (result i32) + i32.const 0 + i32.const 0 + i32.gt_s + drop + i32.const 1024 + local.get $0 + i32.add + i32.load8_u + return + ) + (func $~lib/util/casemap/bsearch (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 0 + local.set $3 + loop $while-continue|0 + local.get $3 + local.get $2 + i32.le_s + local.set $4 + local.get $4 + if + local.get $3 + local.get $2 + i32.add + i32.const 3 + i32.shr_u + i32.const 2 + i32.shl + local.set $5 + local.get $1 + local.get $5 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $0 + i32.sub + local.set $6 + local.get $6 + i32.const 0 + i32.eq + if + local.get $5 + return + else + local.get $6 + i32.const 31 + i32.shr_u + if + local.get $5 + i32.const 4 + i32.add + local.set $3 + else + local.get $5 + i32.const 4 + i32.sub + local.set $2 + end + end + br $while-continue|0 + end + end + i32.const -1 + ) (func $~lib/util/casemap/casemap (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -1944,7 +1873,7 @@ if i32.const 0 i32.const 96 - i32.const 581 + i32.const 573 i32.const 3 call $~lib/builtins/abort unreachable @@ -2975,238 +2904,233 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $3 + else + local.get $0 + local.get $2 i32.add - local.get $5 + local.get $1 i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + end + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.tee $7 + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 i32.const 1 i32.add - local.set $5 - local.get $7 + local.set $0 local.get $4 - local.tee $7 + local.get $1 + local.tee $4 i32.const 1 i32.add - local.set $4 - local.get $7 + local.set $1 + local.get $4 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 + br $while-continue|0 end end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 end end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 + end + end + end + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end end end ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 @@ -3257,22 +3181,12 @@ return end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $5 local.get $5 - i32.const 16 - i32.add - local.get $5 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $6 local.get $6 - i32.load - local.set $7 - local.get $7 i32.const 1 i32.and if @@ -3283,25 +3197,25 @@ i32.and i32.const 16 i32.add - local.get $7 + local.get $6 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $5 - local.get $5 + local.set $7 + local.get $7 local.get $3 i32.ge_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $4 i32.const 3 i32.and - local.get $5 + local.get $7 i32.or i32.store local.get $1 @@ -3370,10 +3284,6 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) local.get $0 call $~lib/string/String#get:length local.set $1 @@ -3417,30 +3327,15 @@ i32.load16_u local.set $8 local.get $8 - local.set $9 - local.get $9 - i32.const 7 - i32.shr_u - i32.eqz + call $~lib/util/string/isAscii if local.get $2 local.get $5 i32.const 1 i32.shl i32.add - block $~lib/util/string/toUpper8|inlined.0 (result i32) - local.get $8 - local.set $9 - i32.const 0 - i32.const 0 - i32.gt_s - drop - i32.const 1024 - local.get $9 - i32.add - i32.load8_u - br $~lib/util/string/toUpper8|inlined.0 - end + local.get $8 + call $~lib/util/string/toUpper8 i32.store16 else local.get $8 @@ -3544,66 +3439,10 @@ i32.sub i32.le_u if - block $~lib/util/casemap/bsearch|inlined.0 (result i32) - local.get $8 - local.set $12 - local.get $3 - local.set $11 - local.get $4 - local.set $10 - i32.const 0 - local.set $13 - loop $while-continue|1 - local.get $13 - local.get $10 - i32.le_s - local.set $14 - local.get $14 - if - local.get $13 - local.get $10 - i32.add - i32.const 3 - i32.shr_u - i32.const 2 - i32.shl - local.set $15 - local.get $11 - local.get $15 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.get $12 - i32.sub - local.set $16 - local.get $16 - i32.const 0 - i32.eq - if - local.get $15 - br $~lib/util/casemap/bsearch|inlined.0 - else - local.get $16 - i32.const 31 - i32.shr_u - if - local.get $15 - i32.const 4 - i32.add - local.set $13 - else - local.get $15 - i32.const 4 - i32.sub - local.set $10 - end - end - br $while-continue|1 - end - end - i32.const -1 - end + local.get $8 + local.get $3 + local.get $4 + call $~lib/util/casemap/bsearch local.set $9 end local.get $9 @@ -3616,31 +3455,31 @@ i32.shl i32.add i32.load offset=2 - local.set $13 + local.set $10 local.get $3 local.get $9 i32.const 1 i32.shl i32.add i32.load16_u offset=6 - local.set $12 + local.set $11 local.get $2 local.get $5 i32.const 1 i32.shl i32.add - local.get $13 + local.get $10 i32.store local.get $2 local.get $5 i32.const 1 i32.shl i32.add - local.get $12 + local.get $11 i32.store16 offset=4 local.get $5 i32.const 1 - local.get $12 + local.get $11 i32.const 0 i32.ne i32.add @@ -3652,8 +3491,8 @@ call $~lib/util/casemap/casemap i32.const 2097151 i32.and - local.set $12 - local.get $12 + local.set $11 + local.get $11 i32.const 65536 i32.lt_s if @@ -3662,32 +3501,32 @@ i32.const 1 i32.shl i32.add - local.get $12 + local.get $11 i32.store16 else - local.get $12 + local.get $11 i32.const 65536 i32.sub - local.set $12 - local.get $12 + local.set $11 + local.get $11 i32.const 10 i32.shr_u i32.const 55296 i32.or - local.set $13 - local.get $12 + local.set $10 + local.get $11 i32.const 1023 i32.and i32.const 56320 i32.or - local.set $11 + local.set $12 local.get $2 local.get $5 i32.const 1 i32.shl i32.add - local.get $13 - local.get $11 + local.get $10 + local.get $12 i32.const 16 i32.shl i32.or @@ -3917,19 +3756,101 @@ local.get $2 return end - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - local.get $3 - call $~lib/util/string/compareImpl - i32.eqz - local.set $2 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + local.get $3 + call $~lib/util/string/compareImpl + i32.eqz + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + ) + (func $~lib/util/string/toLower8 (param $0 i32) (result i32) + i32.const 0 + i32.const 0 + i32.gt_s + drop + i32.const 5778 + local.get $0 + i32.add + i32.load8_u + return + ) + (func $~lib/util/string/codePointBefore (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.const 0 + i32.le_s + if + i32.const -1 + return + end + local.get $0 + local.get $1 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.set $2 + local.get $2 + i32.const 64512 + i32.and + i32.const 56320 + i32.eq + local.get $1 + i32.const 2 + i32.sub + i32.const 0 + i32.ge_s + i32.and + if + local.get $0 + local.get $1 + i32.const 2 + i32.sub + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.set $3 + local.get $3 + i32.const 64512 + i32.and + i32.const 55296 + i32.eq + if + local.get $3 + i32.const 1023 + i32.and + i32.const 10 + i32.shl + local.get $2 + i32.const 1023 + i32.and + i32.add + i32.const 65536 + i32.add + return + end + end local.get $2 + i32.const 63488 + i32.and + i32.const 55296 + i32.eq + if (result i32) + i32.const 65533 + else + local.get $2 + end ) (func $~lib/util/string/stagedBinaryLookup (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -3956,6 +3877,186 @@ i32.const 1 i32.and ) + (func $~lib/util/string/isCaseIgnorable (param $0 i32) (result i32) + local.get $0 + i32.const 918000 + i32.lt_u + if (result i32) + i32.const 5906 + local.get $0 + call $~lib/util/string/stagedBinaryLookup + else + i32.const 0 + end + ) + (func $~lib/util/string/isCased (param $0 i32) (result i32) + local.get $0 + i32.const 127370 + i32.lt_u + if (result i32) + i32.const 8914 + local.get $0 + call $~lib/util/string/stagedBinaryLookup + else + i32.const 0 + end + ) + (func $~lib/util/string/isFinalSigma (param $0 i32) (param $1 i32) (param $2 i32) (result 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) + i32.const 0 + local.set $3 + local.get $1 + local.set $4 + i32.const 0 + local.tee $5 + local.get $4 + i32.const 30 + i32.sub + local.tee $6 + local.get $5 + local.get $6 + i32.gt_s + select + local.set $7 + loop $while-continue|0 + local.get $4 + local.get $7 + i32.gt_s + local.set $5 + local.get $5 + if + local.get $0 + local.get $4 + call $~lib/util/string/codePointBefore + local.set $6 + local.get $6 + call $~lib/util/string/isCaseIgnorable + i32.eqz + if + local.get $6 + call $~lib/util/string/isCased + if + i32.const 1 + local.set $3 + else + i32.const 0 + return + end + end + local.get $4 + local.get $6 + i32.const 65536 + i32.ge_s + i32.const 1 + i32.add + i32.sub + local.set $4 + br $while-continue|0 + end + end + local.get $3 + i32.eqz + if + i32.const 0 + return + end + local.get $1 + i32.const 1 + i32.add + local.set $4 + local.get $4 + i32.const 30 + i32.add + local.tee $5 + local.get $2 + local.tee $8 + local.get $5 + local.get $8 + i32.lt_s + select + local.set $9 + loop $while-continue|1 + local.get $4 + local.get $9 + i32.lt_s + local.set $5 + local.get $5 + if + local.get $0 + local.get $4 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.set $8 + local.get $8 + i32.const 64512 + i32.and + i32.const 55296 + i32.eq + local.get $4 + i32.const 1 + i32.add + local.get $2 + i32.ne + i32.and + if + local.get $0 + local.get $4 + i32.const 1 + i32.shl + i32.add + i32.load16_u offset=2 + local.set $10 + local.get $10 + i32.const 64512 + i32.and + i32.const 56320 + i32.eq + if + local.get $8 + i32.const 55296 + i32.sub + i32.const 10 + i32.shl + local.get $10 + i32.const 56320 + i32.sub + i32.add + i32.const 65536 + i32.add + local.set $8 + end + end + local.get $8 + call $~lib/util/string/isCaseIgnorable + i32.eqz + if + local.get $8 + call $~lib/util/string/isCased + i32.eqz + return + end + local.get $4 + local.get $8 + i32.const 65536 + i32.ge_u + i32.const 1 + i32.add + i32.add + local.set $4 + br $while-continue|1 + end + end + i32.const 1 + ) (func $~lib/string/String#toLowerCase (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -3966,15 +4067,6 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) local.get $0 call $~lib/string/String#get:length local.set $1 @@ -4013,30 +4105,15 @@ i32.load16_u local.set $6 local.get $6 - local.set $7 - local.get $7 - i32.const 7 - i32.shr_u - i32.eqz + call $~lib/util/string/isAscii if local.get $2 local.get $3 i32.const 1 i32.shl i32.add - block $~lib/util/string/toLower8|inlined.0 (result i32) - local.get $6 - local.set $7 - i32.const 0 - i32.const 0 - i32.gt_s - drop - i32.const 5778 - local.get $7 - i32.add - i32.load8_u - br $~lib/util/string/toLower8|inlined.0 - end + local.get $6 + call $~lib/util/string/toLower8 i32.store16 else local.get $6 @@ -4142,270 +4219,10 @@ i32.const 1 i32.gt_u if (result i32) - block $~lib/util/string/isFinalSigma|inlined.0 (result i32) - local.get $0 - local.set $10 - local.get $4 - local.set $9 - local.get $1 - local.set $8 - i32.const 0 - local.set $11 - local.get $9 - local.set $12 - i32.const 0 - local.tee $13 - local.get $12 - i32.const 30 - i32.sub - local.tee $14 - local.get $13 - local.get $14 - i32.gt_s - select - local.set $13 - loop $while-continue|1 - local.get $12 - local.get $13 - i32.gt_s - local.set $14 - local.get $14 - if - block $~lib/util/string/codePointBefore|inlined.0 (result i32) - local.get $10 - local.set $16 - local.get $12 - local.set $15 - local.get $15 - i32.const 0 - i32.le_s - if - i32.const -1 - br $~lib/util/string/codePointBefore|inlined.0 - end - local.get $16 - local.get $15 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.set $17 - local.get $17 - i32.const 64512 - i32.and - i32.const 56320 - i32.eq - local.get $15 - i32.const 2 - i32.sub - i32.const 0 - i32.ge_s - i32.and - if - local.get $16 - local.get $15 - i32.const 2 - i32.sub - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.set $18 - local.get $18 - i32.const 64512 - i32.and - i32.const 55296 - i32.eq - if - local.get $18 - i32.const 1023 - i32.and - i32.const 10 - i32.shl - local.get $17 - i32.const 1023 - i32.and - i32.add - i32.const 65536 - i32.add - br $~lib/util/string/codePointBefore|inlined.0 - end - end - local.get $17 - i32.const 63488 - i32.and - i32.const 55296 - i32.eq - if (result i32) - i32.const 65533 - else - local.get $17 - end - end - local.set $17 - local.get $17 - local.set $18 - local.get $18 - i32.const 918000 - i32.lt_u - if (result i32) - i32.const 5906 - local.get $18 - call $~lib/util/string/stagedBinaryLookup - else - i32.const 0 - end - i32.eqz - if - local.get $17 - local.set $15 - local.get $15 - i32.const 127370 - i32.lt_u - if (result i32) - i32.const 8914 - local.get $15 - call $~lib/util/string/stagedBinaryLookup - else - i32.const 0 - end - if - i32.const 1 - local.set $11 - else - i32.const 0 - br $~lib/util/string/isFinalSigma|inlined.0 - end - end - local.get $12 - local.get $17 - i32.const 65536 - i32.ge_s - i32.const 1 - i32.add - i32.sub - local.set $12 - br $while-continue|1 - end - end - local.get $11 - i32.eqz - if - i32.const 0 - br $~lib/util/string/isFinalSigma|inlined.0 - end - local.get $9 - i32.const 1 - i32.add - local.set $12 - local.get $12 - i32.const 30 - i32.add - local.tee $14 - local.get $8 - local.tee $15 - local.get $14 - local.get $15 - i32.lt_s - select - local.set $14 - loop $while-continue|2 - local.get $12 - local.get $14 - i32.lt_s - local.set $15 - local.get $15 - if - local.get $10 - local.get $12 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.set $18 - local.get $18 - i32.const 64512 - i32.and - i32.const 55296 - i32.eq - local.get $12 - i32.const 1 - i32.add - local.get $8 - i32.ne - i32.and - if - local.get $10 - local.get $12 - i32.const 1 - i32.shl - i32.add - i32.load16_u offset=2 - local.set $16 - local.get $16 - i32.const 64512 - i32.and - i32.const 56320 - i32.eq - if - local.get $18 - i32.const 55296 - i32.sub - i32.const 10 - i32.shl - local.get $16 - i32.const 56320 - i32.sub - i32.add - i32.const 65536 - i32.add - local.set $18 - end - end - local.get $18 - local.set $16 - local.get $16 - i32.const 918000 - i32.lt_u - if (result i32) - i32.const 5906 - local.get $16 - call $~lib/util/string/stagedBinaryLookup - else - i32.const 0 - end - i32.eqz - if - local.get $18 - local.set $16 - local.get $16 - i32.const 127370 - i32.lt_u - if (result i32) - i32.const 8914 - local.get $16 - call $~lib/util/string/stagedBinaryLookup - else - i32.const 0 - end - i32.eqz - br $~lib/util/string/isFinalSigma|inlined.0 - end - local.get $12 - local.get $18 - i32.const 65536 - i32.ge_u - i32.const 1 - i32.add - i32.add - local.set $12 - br $while-continue|2 - end - end - i32.const 1 - end + local.get $0 + local.get $4 + local.get $1 + call $~lib/util/string/isFinalSigma else i32.const 0 end @@ -4466,20 +4283,20 @@ i32.shr_u i32.const 55296 i32.or - local.set $14 + local.set $8 local.get $7 i32.const 1023 i32.and i32.const 56320 i32.or - local.set $13 + local.set $9 local.get $2 local.get $3 i32.const 1 i32.shl i32.add - local.get $14 - local.get $13 + local.get $8 + local.get $9 i32.const 16 i32.shl i32.or @@ -4837,6 +4654,16 @@ i32.store16 end ) + (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 0 + i32.const 1 + i32.ge_s + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa32_lut + ) (func $~lib/util/number/decimalCount64High (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 @@ -5019,14 +4846,20 @@ local.get $2 call $~lib/util/number/utoa32_lut ) + (func $~lib/util/number/utoa64_core (param $0 i32) (param $1 i64) (param $2 i32) + i32.const 0 + i32.const 1 + i32.ge_s + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa64_lut + ) (func $~lib/util/number/utoa64 (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i64) local.get $0 i64.const 0 i64.ne @@ -5053,19 +4886,9 @@ call $~lib/rt/tlsf/__alloc local.set $1 local.get $1 - local.set $6 local.get $2 - local.set $5 local.get $3 - local.set $4 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $6 - local.get $5 - local.get $4 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core else local.get $0 call $~lib/util/number/decimalCount64High @@ -5077,19 +4900,9 @@ call $~lib/rt/tlsf/__alloc local.set $1 local.get $1 - local.set $5 local.get $0 - local.set $7 local.get $3 - local.set $4 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $5 - local.get $7 - local.get $4 - call $~lib/util/number/utoa64_lut + call $~lib/util/number/utoa64_core end local.get $1 call $~lib/rt/pure/__retain diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index 0e16ace529..ce353311a7 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -1,10 +1,10 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_=>_none (func (param i32 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_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -97,6 +97,58 @@ call $~lib/rt/pure/decrement end ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -111,7 +163,7 @@ if i32.const 0 i32.const 1184 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -133,7 +185,7 @@ if i32.const 0 i32.const 1184 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -152,23 +204,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -176,72 +228,56 @@ if i32.const 0 i32.const 1184 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -249,7 +285,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -272,7 +308,7 @@ if i32.const 0 i32.const 1184 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -286,22 +322,16 @@ if i32.const 0 i32.const 1184 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -310,7 +340,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -319,7 +349,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -330,16 +360,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -359,7 +383,7 @@ if i32.const 0 i32.const 1184 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -392,8 +416,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -414,7 +438,7 @@ if i32.const 0 i32.const 1184 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -424,17 +448,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1184 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -463,13 +487,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -477,21 +501,15 @@ if i32.const 0 i32.const 1184 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -506,37 +524,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -560,7 +569,7 @@ if i32.const 0 i32.const 1184 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -577,7 +586,7 @@ if i32.const 0 i32.const 1184 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -605,7 +614,7 @@ if i32.const 0 i32.const 1184 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -657,7 +666,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -678,7 +687,8 @@ unreachable end i32.const 22064 - local.tee $0 + local.set $2 + i32.const 22064 i32.const 0 i32.store i32.const 23632 @@ -689,35 +699,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 22064 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 22064 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -737,7 +738,7 @@ i32.const 22064 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) local.get $0 @@ -746,7 +747,7 @@ if i32.const 1232 i32.const 1184 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -819,17 +820,14 @@ if i32.const 0 i32.const 1184 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const -1 local.get $1 i32.shl @@ -837,16 +835,10 @@ local.tee $1 if (result i32) local.get $0 + local.get $2 local.get $1 i32.ctz - local.get $2 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -862,31 +854,22 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1184 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end @@ -904,7 +887,7 @@ if i32.const 0 i32.const 1184 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -947,20 +930,9 @@ i32.and i32.store local.get $1 - i32.const 16 - i32.add - local.tee $0 + call $~lib/rt/tlsf/GETRIGHT 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 + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const -3 i32.and @@ -975,7 +947,7 @@ if i32.const 0 i32.const 1184 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -998,15 +970,16 @@ local.tee $3 i32.eqz if - i32.const 16 memory.size local.tee $3 i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -1031,9 +1004,7 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 - local.get $5 + local.tee $5 local.get $3 local.get $5 i32.gt_s @@ -1066,7 +1037,7 @@ if i32.const 0 i32.const 1184 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1082,7 +1053,7 @@ if i32.const 0 i32.const 1184 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -1123,177 +1094,179 @@ i32.const 1 i32.shr_u ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $0 + local.get $1 + i32.lt_u + if local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 + i32.const 7 + i32.and local.get $0 - local.get $1 - i32.lt_u + i32.const 7 + i32.and + i32.eq if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + return end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $2 + i32.const 1 + i32.sub + local.set $2 local.get $0 - local.tee $2 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $1 - local.get $2 local.get $3 + local.get $4 i32.load8_u i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 + br $while-continue|0 end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 - local.get $4 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and if - local.get $4 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $4 - local.get $0 + local.tee $2 i32.add local.get $1 - local.get $4 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) (func $~lib/string/String.UTF16.encode (param $0 i32) (result i32) @@ -1310,7 +1283,7 @@ call $~lib/string/String#get:length i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $1 call $~lib/rt/pure/__retain ) @@ -1488,7 +1461,7 @@ local.tee $2 local.get $0 local.get $1 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 call $~lib/rt/pure/__retain ) @@ -2372,13 +2345,7 @@ return end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.tee $6 i32.load local.tee $4 @@ -2402,10 +2369,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 @@ -2435,7 +2402,7 @@ i32.const 16 i32.add local.get $2 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $1 i32.const 22060 i32.ge_u @@ -2464,7 +2431,7 @@ if i32.const 0 i32.const 1440 - i32.const 738 + i32.const 736 i32.const 7 call $~lib/builtins/abort unreachable @@ -2666,7 +2633,7 @@ if i32.const 0 i32.const 1184 - i32.const 581 + i32.const 573 i32.const 3 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/string-encoding.untouched.wat b/tests/compiler/std/string-encoding.untouched.wat index 49ea1dfcdb..cdf0e3de1e 100644 --- a/tests/compiler/std/string-encoding.untouched.wat +++ b/tests/compiler/std/string-encoding.untouched.wat @@ -1,8 +1,8 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (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_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) @@ -148,6 +148,69 @@ unreachable end ) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -156,9 +219,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -171,7 +231,7 @@ if i32.const 0 i32.const 176 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -198,7 +258,7 @@ if i32.const 0 i32.const 176 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -252,7 +312,7 @@ if i32.const 0 i32.const 176 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -277,77 +337,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -364,6 +382,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -375,8 +399,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -384,7 +406,7 @@ if i32.const 0 i32.const 176 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -401,28 +423,18 @@ if i32.const 0 i32.const 176 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -433,44 +445,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -478,30 +480,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 176 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -520,22 +518,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -561,7 +559,7 @@ if i32.const 0 i32.const 176 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -573,18 +571,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 176 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -638,27 +636,15 @@ if i32.const 0 i32.const 176 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -673,24 +659,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -700,31 +672,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -732,8 +688,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -759,24 +713,22 @@ if i32.const 0 i32.const 176 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -784,7 +736,7 @@ if i32.const 0 i32.const 176 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -792,16 +744,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -817,7 +769,7 @@ if i32.const 0 i32.const 176 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -826,8 +778,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -838,49 +790,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -893,10 +841,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -946,73 +890,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -1025,11 +942,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -1049,7 +966,7 @@ if i32.const 224 i32.const 176 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -1075,9 +992,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1145,31 +1059,24 @@ if i32.const 0 i32.const 176 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1182,79 +1089,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 176 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1291,9 +1167,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1307,12 +1181,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1322,7 +1196,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1359,7 +1233,7 @@ if i32.const 0 i32.const 176 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1410,29 +1284,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1452,7 +1306,7 @@ if i32.const 0 i32.const 176 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1499,7 +1353,7 @@ if i32.const 0 i32.const 176 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1520,7 +1374,7 @@ if i32.const 0 i32.const 176 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1541,7 +1395,7 @@ if i32.const 0 i32.const 176 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -2608,238 +2462,233 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end - i32.const 0 - i32.const 1 - i32.lt_s - drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u - if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 + (local $4 i32) + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.tee $7 + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 i32.const 1 i32.add - local.set $5 - local.get $7 + local.set $0 local.get $4 - local.tee $7 + local.get $1 + local.tee $4 i32.const 1 i32.add - local.set $4 - local.get $7 + local.set $1 + local.get $4 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 + br $while-continue|0 end end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) (func $~lib/string/String.UTF16.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 @@ -4214,7 +4063,7 @@ if i32.const 0 i32.const 176 - i32.const 581 + i32.const 573 i32.const 3 call $~lib/builtins/abort unreachable @@ -4271,22 +4120,12 @@ return end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $5 local.get $5 - i32.const 16 - i32.add - local.get $5 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $6 local.get $6 - i32.load - local.set $7 - local.get $7 i32.const 1 i32.and if @@ -4297,25 +4136,25 @@ i32.and i32.const 16 i32.add - local.get $7 + local.get $6 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $5 - local.get $5 + local.set $7 + local.get $7 local.get $3 i32.ge_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $4 i32.const 3 i32.and - local.get $5 + local.get $7 i32.or i32.store local.get $1 @@ -4395,7 +4234,7 @@ if i32.const 0 i32.const 432 - i32.const 738 + i32.const 736 i32.const 7 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 0644843b30..6a04110095 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -1,21 +1,25 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 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_=>_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))) (type $i64_=>_i32 (func (param i64) (result i32))) - (type $none_=>_none (func)) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_=>_f64 (func (param i32) (result f64))) + (type $none_=>_none (func)) + (type $i64_i32_=>_f64 (func (param i64 i32) (result f64))) + (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) (type $i32_i64_i32_=>_none (func (param i32 i64 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))) - (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $f64_=>_i32 (func (param f64) (result i32))) + (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) (type $none_=>_i64 (func (result i64))) + (type $i64_i32_=>_i64 (func (param i64 i32) (result i64))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -578,6 +582,58 @@ i32.const 1 end ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -592,7 +648,7 @@ if i32.const 0 i32.const 1360 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -614,7 +670,7 @@ if i32.const 0 i32.const 1360 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -633,23 +689,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -657,72 +713,56 @@ if i32.const 0 i32.const 1360 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -730,7 +770,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -753,7 +793,7 @@ if i32.const 0 i32.const 1360 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -767,22 +807,16 @@ if i32.const 0 i32.const 1360 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -791,7 +825,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -800,7 +834,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -811,16 +845,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -840,7 +868,7 @@ if i32.const 0 i32.const 1360 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -873,8 +901,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -895,7 +923,7 @@ if i32.const 0 i32.const 1360 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -905,17 +933,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1360 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -944,13 +972,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -958,21 +986,15 @@ if i32.const 0 i32.const 1360 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -987,37 +1009,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -1041,7 +1054,7 @@ if i32.const 0 i32.const 1360 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -1058,7 +1071,7 @@ if i32.const 0 i32.const 1360 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -1086,7 +1099,7 @@ if i32.const 0 i32.const 1360 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -1138,7 +1151,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -1159,7 +1172,8 @@ unreachable end i32.const 17920 - local.tee $0 + local.set $2 + i32.const 17920 i32.const 0 i32.store i32.const 19488 @@ -1170,35 +1184,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 17920 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 17920 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -1218,7 +1223,7 @@ i32.const 17920 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) local.get $0 @@ -1227,7 +1232,7 @@ if i32.const 1408 i32.const 1360 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -1300,17 +1305,14 @@ if i32.const 0 i32.const 1360 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const -1 local.get $1 i32.shl @@ -1318,16 +1320,10 @@ local.tee $1 if (result i32) local.get $0 + local.get $2 local.get $1 i32.ctz - local.get $2 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -1343,31 +1339,22 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1360 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end @@ -1385,7 +1372,7 @@ if i32.const 0 i32.const 1360 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1428,20 +1415,9 @@ i32.and i32.store local.get $1 - i32.const 16 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 + call $~lib/rt/tlsf/GETRIGHT local.get $1 - i32.load - i32.const -4 - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const -3 i32.and @@ -1456,7 +1432,7 @@ if i32.const 0 i32.const 1360 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1479,15 +1455,16 @@ local.tee $3 i32.eqz if - i32.const 16 memory.size local.tee $3 i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -1512,9 +1489,7 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 - local.get $5 + local.tee $5 local.get $3 local.get $5 i32.gt_s @@ -1547,7 +1522,7 @@ if i32.const 0 i32.const 1360 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1563,7 +1538,7 @@ if i32.const 0 i32.const 1360 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -1753,177 +1728,179 @@ end i32.const -1 ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $0 + local.get $1 + i32.lt_u + if local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 + i32.const 7 + i32.and local.get $0 - local.get $1 - i32.lt_u + i32.const 7 + i32.and + i32.eq if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + return end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $2 + i32.const 1 + i32.sub + local.set $2 local.get $0 - local.tee $2 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $1 - local.get $2 local.get $3 + local.get $4 i32.load8_u i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 + br $while-continue|0 end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 - local.get $4 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and if - local.get $4 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $4 - local.get $0 + local.tee $2 i32.add local.get $1 - local.get $4 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) (func $~lib/memory/memory.repeat (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) @@ -1942,7 +1919,7 @@ i32.add local.get $1 local.get $2 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.get $4 i32.add @@ -2014,19 +1991,19 @@ local.get $4 local.get $3 i32.sub - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove else local.get $1 local.get $2 local.get $4 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove end local.get $1 local.get $4 i32.add local.get $0 local.get $5 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $1 call $~lib/rt/pure/__retain ) @@ -2067,7 +2044,7 @@ local.tee $1 local.get $0 local.get $3 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $5 local.get $3 i32.sub @@ -2088,24 +2065,24 @@ i32.div_u local.tee $5 call $~lib/memory/memory.repeat + local.get $3 local.get $4 local.get $5 i32.mul - local.tee $4 - local.get $3 + local.tee $3 i32.add local.get $2 local.get $0 - local.get $4 + local.get $3 i32.sub - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove else local.get $1 local.get $3 i32.add local.get $2 local.get $0 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove end local.get $1 call $~lib/rt/pure/__retain @@ -2326,7 +2303,7 @@ local.get $1 i32.add local.get $2 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $3 call $~lib/rt/pure/__retain ) @@ -2380,7 +2357,7 @@ local.tee $2 local.get $0 local.get $1 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 call $~lib/rt/pure/__retain ) @@ -2467,7 +2444,7 @@ local.get $2 i32.add local.get $1 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $3 call $~lib/rt/pure/__retain ) @@ -3105,23 +3082,165 @@ end i64.const 0 ) - (func $~lib/math/ipow32 (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/util/string/parseExp (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - i32.const 5 - local.set $1 + (local $3 i32) + (local $4 i32) i32.const 1 - local.set $2 - loop $while-continue|0 - local.get $0 + local.set $3 + local.get $0 + i32.load16_u + i32.const 32 + i32.or + i32.const 101 + i32.ne + if i32.const 0 - i32.gt_s + return + end + local.get $0 + i32.const 2 + i32.add + local.tee $0 + i32.load16_u + local.tee $2 + i32.const 45 + i32.eq + if (result i32) + local.get $1 + i32.const 1 + i32.sub + local.tee $1 + i32.eqz if - local.get $1 - local.get $2 - i32.mul - local.get $2 - local.get $0 + i32.const 0 + return + end + i32.const -1 + local.set $3 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + i32.load16_u + else + local.get $2 + i32.const 43 + i32.eq + if (result i32) + local.get $1 + i32.const 1 + i32.sub + local.tee $1 + i32.eqz + if + i32.const 0 + return + end + local.get $0 + i32.const 2 + i32.add + local.tee $0 + i32.load16_u + else + local.get $2 + end + end + local.set $2 + loop $while-continue|0 + local.get $2 + i32.const 48 + i32.eq + if + local.get $1 + i32.const 1 + i32.sub + local.tee $1 + i32.eqz + if + i32.const 0 + return + end + local.get $0 + i32.const 2 + i32.add + local.tee $0 + i32.load16_u + local.set $2 + br $while-continue|0 + end + end + local.get $2 + i32.const 48 + i32.sub + local.set $2 + loop $for-loop|1 + local.get $2 + i32.const 10 + i32.lt_u + i32.const 0 + local.get $1 + select + if + local.get $4 + i32.const 3200 + i32.ge_s + if + local.get $3 + i32.const 3200 + i32.mul + return + end + local.get $2 + local.get $4 + i32.const 10 + i32.mul + i32.add + local.set $4 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + i32.load16_u + i32.const 48 + i32.sub + local.set $2 + br $for-loop|1 + end + end + local.get $3 + local.get $4 + i32.mul + ) + (func $~lib/util/string/pow10 (param $0 i32) (result f64) + local.get $0 + i32.const 3 + i32.shl + i32.const 3000 + i32.add + f64.load + ) + (func $~lib/math/ipow32 (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + i32.const 5 + local.set $1 + i32.const 1 + local.set $2 + loop $while-continue|0 + local.get $0 + i32.const 0 + i32.gt_s + if + local.get $1 + local.get $2 + i32.mul + local.get $2 + local.get $0 i32.const 1 i32.and select @@ -3216,203 +3335,468 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/util/string/strtod (param $0 i32) (result f64) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i64) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i64) - (local $11 f64) - (local $12 i64) - (local $13 f64) - (local $14 i32) - (local $15 i32) - (local $16 i64) - block $folding-inner0 - local.get $0 - call $~lib/string/String#get:length - local.tee $5 - i32.eqz - br_if $folding-inner0 - local.get $0 - i32.load16_u - local.set $7 - f64.const 1 - local.set $13 - loop $while-continue|0 - local.get $5 - if (result i32) - local.get $7 - call $~lib/util/string/isSpace - else - i32.const 0 - end - if - local.get $0 - i32.const 2 - i32.add - local.tee $0 - i32.load16_u - local.set $7 - local.get $5 - i32.const 1 - i32.sub - local.set $5 - br $while-continue|0 - end - end - local.get $5 - i32.eqz - br_if $folding-inner0 - local.get $7 - i32.const 45 - i32.eq - if (result i32) - local.get $5 - i32.const 1 - i32.sub - local.tee $5 - i32.eqz - br_if $folding-inner0 - f64.const -1 - local.set $13 + (func $~lib/util/string/scaledown (param $0 i64) (param $1 i32) (result f64) + (local $2 i64) + (local $3 i64) + (local $4 i64) + (local $5 i64) + local.get $0 + local.get $0 + i64.clz + local.tee $3 + i64.shl + local.set $0 + local.get $1 + i64.extend_i32_s + local.get $3 + i64.sub + local.set $3 + loop $for-loop|0 + local.get $1 + i32.const -14 + i32.le_s + if + f64.const 0.00004294967296 local.get $0 - i32.const 2 + i64.const 6103515625 + i64.rem_u + local.get $0 + i64.const 6103515625 + i64.div_u + local.tee $4 + i64.clz + local.tee $2 + i64.const 18 + i64.sub + i64.shl + f64.convert_i64_u + f64.mul + f64.nearest + i64.trunc_f64_u + local.get $4 + local.get $2 + i64.shl + i64.add + local.set $0 + local.get $3 + local.get $2 + i64.sub + local.set $3 + local.get $1 + i32.const 14 i32.add - local.tee $0 - i32.load16_u - else - local.get $7 - i32.const 43 - i32.eq - if (result i32) - local.get $5 - i32.const 1 - i32.sub - local.tee $5 - i32.eqz - br_if $folding-inner0 - local.get $0 - i32.const 2 - i32.add - local.tee $0 - i32.load16_u - else - local.get $7 - end + local.set $1 + br $for-loop|0 end - local.tee $7 - i32.const 73 - i32.eq - i32.const 0 - local.get $5 - i32.const 8 - i32.ge_s - select - if - local.get $0 - i64.load - i64.const 29555310648492105 - i64.eq - if (result i32) - local.get $0 - i64.load offset=8 - i64.const 34058970405077102 - i64.eq - else - i32.const 0 - end - if - f64.const inf - local.get $13 - f64.copysign - return - end - br $folding-inner0 + end + local.get $0 + i32.const 0 + local.get $1 + i32.sub + call $~lib/math/ipow32 + i64.extend_i32_s + local.tee $4 + i64.div_u + local.tee $5 + i64.clz + local.set $2 + local.get $0 + local.get $4 + i64.rem_u + f64.convert_i64_u + i64.reinterpret_f64 + local.get $2 + i64.const 52 + i64.shl + i64.add + f64.reinterpret_i64 + local.get $4 + f64.convert_i64_u + f64.div + i64.trunc_f64_u + local.get $5 + local.get $2 + i64.shl + i64.add + f64.convert_i64_u + local.get $3 + local.get $2 + i64.sub + i32.wrap_i64 + call $~lib/math/NativeMath.scalbn + ) + (func $~lib/util/string/fixmul (param $0 i64) (param $1 i32) (result i64) + (local $2 i64) + (local $3 i64) + i64.const 32 + local.get $1 + i64.extend_i32_u + local.get $0 + i64.const 32 + i64.shr_u + i64.mul + local.get $1 + i64.extend_i32_u + local.get $0 + i64.const 4294967295 + i64.and + i64.mul + local.tee $0 + i64.const 32 + i64.shr_u + i64.add + local.tee $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + i32.clz + local.tee $1 + i64.extend_i32_u + i64.sub + local.tee $3 + global.get $~lib/util/string/__fixmulShift + i64.add + global.set $~lib/util/string/__fixmulShift + local.get $0 + local.get $1 + i64.extend_i32_u + i64.shl + i64.const 31 + i64.shr_u + i64.const 1 + i64.and + local.get $2 + local.get $1 + i64.extend_i32_u + i64.shl + local.get $0 + i64.const 4294967295 + i64.and + local.get $3 + i64.shr_u + i64.or + i64.add + ) + (func $~lib/util/string/scientific (param $0 i64) (param $1 i32) (result f64) + (local $2 f64) + (local $3 i32) + (local $4 i64) + i32.const 1 + local.get $1 + i32.const -342 + i32.lt_s + local.get $0 + i64.eqz + select + if + f64.const 0 + return + end + local.get $1 + i32.const 308 + i32.gt_s + if + f64.const inf + return + end + local.get $0 + f64.convert_i64_u + local.set $2 + local.get $1 + i32.eqz + if + local.get $2 + return + end + local.get $1 + i32.const 37 + i32.le_s + i32.const 0 + local.get $1 + i32.const 22 + i32.gt_s + select + if + local.get $2 + local.get $1 + i32.const 22 + i32.sub + call $~lib/util/string/pow10 + f64.mul + local.set $2 + i32.const 22 + local.set $1 + end + local.get $0 + i64.const 9007199254740991 + i64.le_u + if (result i32) + local.get $1 + i32.const 31 + i32.shr_s + local.tee $3 + local.get $1 + local.get $3 + i32.add + i32.xor + i32.const 22 + i32.le_s + else + i32.const 0 + end + if (result f64) + local.get $1 + i32.const 0 + i32.gt_s + if + local.get $2 + local.get $1 + call $~lib/util/string/pow10 + f64.mul + return end - local.get $7 - i32.const 48 + local.get $2 + i32.const 0 + local.get $1 i32.sub - i32.const 10 - i32.ge_u + call $~lib/util/string/pow10 + f64.div + else + local.get $1 i32.const 0 - local.get $7 - i32.const 46 - i32.ne - select + i32.lt_s + if (result f64) + local.get $0 + local.get $1 + call $~lib/util/string/scaledown + else + local.get $0 + local.get $0 + i64.ctz + local.tee $4 + i64.shr_u + local.set $0 + local.get $4 + local.get $1 + i64.extend_i32_s + i64.add + global.set $~lib/util/string/__fixmulShift + loop $for-loop|0 + local.get $1 + i32.const 13 + i32.ge_s + if + local.get $0 + i32.const 1220703125 + call $~lib/util/string/fixmul + local.set $0 + local.get $1 + i32.const 13 + i32.sub + local.set $1 + br $for-loop|0 + end + end + local.get $0 + local.get $1 + call $~lib/math/ipow32 + call $~lib/util/string/fixmul + f64.convert_i64_u + global.get $~lib/util/string/__fixmulShift + i32.wrap_i64 + call $~lib/math/NativeMath.scalbn + end + end + ) + (func $~lib/util/string/strtod (param $0 i32) (result f64) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 f64) + (local $7 i32) + (local $8 i64) + block $folding-inner0 + local.get $0 + call $~lib/string/String#get:length + local.tee $4 + i32.eqz br_if $folding-inner0 local.get $0 - local.set $4 - loop $while-continue|1 - local.get $7 - i32.const 48 - i32.eq + i32.load16_u + local.set $5 + f64.const 1 + local.set $6 + loop $while-continue|0 + local.get $4 + if (result i32) + local.get $5 + call $~lib/util/string/isSpace + else + i32.const 0 + end if local.get $0 i32.const 2 i32.add local.tee $0 i32.load16_u - local.set $7 - local.get $5 + local.set $5 + local.get $4 i32.const 1 i32.sub - local.set $5 - br $while-continue|1 + local.set $4 + br $while-continue|0 end end + local.get $4 + i32.eqz + br_if $folding-inner0 local.get $5 - i32.const 0 - i32.le_s - if - f64.const 0 - return - end - local.get $7 - i32.const 46 + i32.const 45 i32.eq - if + if (result i32) local.get $4 - local.get $0 + i32.const 1 i32.sub + local.tee $4 i32.eqz - local.set $4 + br_if $folding-inner0 + f64.const -1 + local.set $6 local.get $0 i32.const 2 i32.add - local.set $0 - local.get $5 + local.tee $0 + i32.load16_u + else + local.get $5 + i32.const 43 + i32.eq + if (result i32) + local.get $4 + i32.const 1 + i32.sub + local.tee $4 + i32.eqz + br_if $folding-inner0 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + i32.load16_u + else + local.get $5 + end + end + local.tee $5 + i32.const 73 + i32.eq + i32.const 0 + local.get $4 + i32.const 8 + i32.ge_s + select + if + local.get $0 + i64.load + i64.const 29555310648492105 + i64.eq + if (result i32) + local.get $0 + i64.load offset=8 + i64.const 34058970405077102 + i64.eq + else + i32.const 0 + end + if + f64.const inf + local.get $6 + f64.copysign + return + end + br $folding-inner0 + end + local.get $5 + i32.const 48 + i32.sub + i32.const 10 + i32.ge_u + i32.const 0 + local.get $5 + i32.const 46 + i32.ne + select + br_if $folding-inner0 + local.get $0 + local.set $2 + loop $while-continue|1 + local.get $5 + i32.const 48 + i32.eq + if + local.get $0 + i32.const 2 + i32.add + local.tee $0 + i32.load16_u + local.set $5 + local.get $4 + i32.const 1 + i32.sub + local.set $4 + br $while-continue|1 + end + end + local.get $4 + i32.const 0 + i32.le_s + if + f64.const 0 + return + end + local.get $5 + i32.const 46 + i32.eq + if + local.get $2 + local.get $0 + i32.sub + i32.eqz + local.set $2 + local.get $0 + i32.const 2 + i32.add + local.set $0 + local.get $4 i32.const 1 i32.sub - local.tee $5 + local.tee $4 if (result i32) i32.const 0 else - local.get $4 + local.get $2 end br_if $folding-inner0 i32.const 1 - local.set $14 + local.set $7 loop $for-loop|2 local.get $0 i32.load16_u - local.tee $7 + local.tee $5 i32.const 48 i32.eq if - local.get $5 + local.get $4 i32.const 1 i32.sub - local.set $5 - local.get $2 + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $2 + local.set $3 local.get $0 i32.const 2 i32.add @@ -3420,57 +3804,57 @@ br $for-loop|2 end end - local.get $5 + local.get $4 i32.const 0 i32.le_s if f64.const 0 return end - local.get $7 + local.get $5 i32.const 48 i32.sub i32.const 10 i32.ge_u i32.const 0 i32.const 0 - local.get $4 local.get $2 + local.get $3 select select br_if $folding-inner0 end - local.get $7 + local.get $5 i32.const 48 i32.sub - local.set $8 + local.set $2 loop $for-loop|3 i32.const 1 - local.get $14 + local.get $7 i32.eqz i32.const 0 - local.get $7 + local.get $5 i32.const 46 i32.eq select - local.get $8 + local.get $2 i32.const 10 i32.lt_u select if block $for-break3 - local.get $8 + local.get $2 i32.const 10 i32.lt_u if - local.get $8 + local.get $2 i64.extend_i32_u - local.get $6 + local.get $8 i64.const 10 i64.mul i64.add - local.get $6 local.get $8 + local.get $2 i32.eqz i32.eqz i64.extend_i32_u @@ -3479,21 +3863,21 @@ i32.const 19 i32.lt_s select - local.set $6 + local.set $8 local.get $1 i32.const 1 i32.add local.set $1 else local.get $1 - local.set $2 + local.set $3 i32.const 1 - local.set $14 + local.set $7 end - local.get $5 + local.get $4 i32.const 1 i32.sub - local.tee $5 + local.tee $4 i32.eqz br_if $for-break3 local.get $0 @@ -3501,17 +3885,21 @@ i32.add local.tee $0 i32.load16_u - local.tee $7 + local.tee $5 i32.const 48 i32.sub - local.set $8 + local.set $2 br $for-loop|3 end end end - local.get $2 + local.get $8 + local.get $0 + local.get $4 + call $~lib/util/string/parseExp + local.get $3 local.get $1 - local.get $14 + local.get $7 select i32.const 19 local.get $1 @@ -3520,509 +3908,77 @@ i32.lt_s select i32.sub - local.set $4 - i32.const 1 + i32.add + call $~lib/util/string/scientific + local.get $6 + f64.copysign + return + end + f64.const nan:0x8000000000000 + ) + (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1648 + local.get $0 + select + local.set $2 + local.get $1 + call $~lib/rt/pure/__retain + local.tee $1 + i32.eqz + if + local.get $1 + i32.const 1648 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__release + end + i32.const 1648 local.set $1 - block $~lib/util/string/parseExp|inlined.0 - local.get $0 - local.tee $2 - i32.load16_u - i32.const 32 - i32.or - i32.const 101 - i32.ne - br_if $~lib/util/string/parseExp|inlined.0 - local.get $2 - i32.const 2 - i32.add - local.tee $8 - i32.load16_u - local.tee $0 - i32.const 45 - i32.eq - if (result i32) - local.get $5 - i32.const 1 - i32.sub - local.tee $5 - i32.eqz - br_if $~lib/util/string/parseExp|inlined.0 - i32.const -1 - local.set $1 - local.get $8 - i32.const 2 - i32.add - local.tee $8 - i32.load16_u - else - local.get $0 - i32.const 43 - i32.eq - if (result i32) - local.get $5 - i32.const 1 - i32.sub - local.tee $5 - i32.eqz - br_if $~lib/util/string/parseExp|inlined.0 - local.get $8 - i32.const 2 - i32.add - local.tee $8 - i32.load16_u - else - local.get $0 - end - end + end + block $__inlined_func$~lib/string/String#concat + local.get $2 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.tee $3 + local.get $1 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.tee $4 + i32.add + local.tee $0 + i32.eqz + if + i32.const 1280 local.set $0 - loop $while-continue|4 - local.get $0 - i32.const 48 - i32.eq - if - local.get $5 - i32.const 1 - i32.sub - local.tee $5 - i32.eqz - br_if $~lib/util/string/parseExp|inlined.0 - local.get $8 - i32.const 2 - i32.add - local.tee $8 - i32.load16_u - local.set $0 - br $while-continue|4 - end - end - local.get $0 - i32.const 48 - i32.sub - local.set $0 - loop $for-loop|5 - local.get $0 - i32.const 10 - i32.lt_u - i32.const 0 - local.get $5 - select - if - local.get $3 - i32.const 3200 - i32.ge_s - if - local.get $1 - i32.const 3200 - i32.mul - local.set $15 - br $~lib/util/string/parseExp|inlined.0 - end - local.get $0 - local.get $3 - i32.const 10 - i32.mul - i32.add - local.set $3 - local.get $5 - i32.const 1 - i32.sub - local.set $5 - local.get $8 - i32.const 2 - i32.add - local.tee $8 - i32.load16_u - i32.const 48 - i32.sub - local.set $0 - br $for-loop|5 - end - end local.get $1 - local.get $3 - i32.mul - local.set $15 - end - block $~lib/util/string/scientific|inlined.0 - i32.const 1 - local.get $4 - local.get $15 - i32.add - local.tee $0 - i32.const -342 - i32.lt_s - local.get $6 - i64.eqz - select - br_if $~lib/util/string/scientific|inlined.0 - local.get $0 - i32.const 308 - i32.gt_s - if - f64.const inf - local.set $11 - br $~lib/util/string/scientific|inlined.0 - end - local.get $6 - f64.convert_i64_u - local.set $11 - local.get $0 - i32.eqz - br_if $~lib/util/string/scientific|inlined.0 - local.get $0 - i32.const 37 - i32.le_s - i32.const 0 - local.get $0 - i32.const 22 - i32.gt_s - select - if - local.get $11 - local.get $0 - i32.const 3 - i32.shl - i32.const 2824 - i32.add - f64.load - f64.mul - local.set $11 - i32.const 22 - local.set $0 - end - local.get $6 - i64.const 9007199254740991 - i64.le_u - if (result i32) - local.get $0 - i32.const 31 - i32.shr_s - local.tee $1 - local.get $0 - local.get $1 - i32.add - i32.xor - i32.const 22 - i32.le_s - else - i32.const 0 - end - if (result f64) - local.get $0 - i32.const 0 - i32.gt_s - if - local.get $11 - local.get $0 - i32.const 3 - i32.shl - i32.const 3000 - i32.add - f64.load - f64.mul - local.set $11 - br $~lib/util/string/scientific|inlined.0 - end - local.get $11 - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.shl - i32.const 3000 - i32.add - f64.load - f64.div - else - local.get $0 - i32.const 0 - i32.lt_s - if (result f64) - local.get $6 - local.get $6 - i64.clz - local.tee $9 - i64.shl - local.set $6 - local.get $0 - local.tee $1 - i64.extend_i32_s - local.get $9 - i64.sub - local.set $9 - loop $for-loop|6 - local.get $1 - i32.const -14 - i32.le_s - if - f64.const 0.00004294967296 - local.get $6 - i64.const 6103515625 - i64.rem_u - local.get $6 - i64.const 6103515625 - i64.div_u - local.tee $12 - i64.clz - local.tee $10 - i64.const 18 - i64.sub - i64.shl - f64.convert_i64_u - f64.mul - f64.nearest - i64.trunc_f64_u - local.get $12 - local.get $10 - i64.shl - i64.add - local.set $6 - local.get $9 - local.get $10 - i64.sub - local.set $9 - local.get $1 - i32.const 14 - i32.add - local.set $1 - br $for-loop|6 - end - end - local.get $6 - i32.const 0 - local.get $1 - i32.sub - call $~lib/math/ipow32 - i64.extend_i32_s - local.tee $12 - i64.div_u - local.tee $16 - i64.clz - local.set $10 - local.get $6 - local.get $12 - i64.rem_u - f64.convert_i64_u - i64.reinterpret_f64 - local.get $10 - i64.const 52 - i64.shl - i64.add - f64.reinterpret_i64 - local.get $12 - f64.convert_i64_u - f64.div - i64.trunc_f64_u - local.get $16 - local.get $10 - i64.shl - i64.add - f64.convert_i64_u - local.get $9 - local.get $10 - i64.sub - i32.wrap_i64 - call $~lib/math/NativeMath.scalbn - else - local.get $6 - local.get $6 - i64.ctz - local.tee $9 - i64.shr_u - local.set $6 - local.get $9 - local.get $0 - local.tee $3 - i64.extend_i32_s - i64.add - global.set $~lib/util/string/__fixmulShift - loop $for-loop|7 - local.get $3 - i32.const 13 - i32.ge_s - if - i64.const 32 - local.get $6 - i64.const 32 - i64.shr_u - i64.const 1220703125 - i64.mul - local.get $6 - i64.const 4294967295 - i64.and - i64.const 1220703125 - i64.mul - local.tee $6 - i64.const 32 - i64.shr_u - i64.add - local.tee $9 - i64.const 32 - i64.shr_u - i32.wrap_i64 - i32.clz - local.tee $0 - i64.extend_i32_u - i64.sub - local.tee $10 - global.get $~lib/util/string/__fixmulShift - i64.add - global.set $~lib/util/string/__fixmulShift - local.get $6 - local.get $0 - i64.extend_i32_u - i64.shl - i64.const 31 - i64.shr_u - i64.const 1 - i64.and - local.get $9 - local.get $0 - i64.extend_i32_u - i64.shl - local.get $6 - i64.const 4294967295 - i64.and - local.get $10 - i64.shr_u - i64.or - i64.add - local.set $6 - local.get $3 - i32.const 13 - i32.sub - local.set $3 - br $for-loop|7 - end - end - local.get $3 - call $~lib/math/ipow32 - local.tee $0 - i64.extend_i32_u - local.get $6 - i64.const 4294967295 - i64.and - i64.mul - local.set $9 - i64.const 32 - local.get $0 - i64.extend_i32_u - local.get $6 - i64.const 32 - i64.shr_u - i64.mul - local.get $9 - i64.const 32 - i64.shr_u - i64.add - local.tee $6 - i64.const 32 - i64.shr_u - i32.wrap_i64 - i32.clz - local.tee $0 - i64.extend_i32_u - i64.sub - local.tee $10 - global.get $~lib/util/string/__fixmulShift - i64.add - global.set $~lib/util/string/__fixmulShift - local.get $9 - local.get $0 - i64.extend_i32_u - i64.shl - i64.const 31 - i64.shr_u - i64.const 1 - i64.and - local.get $6 - local.get $0 - i64.extend_i32_u - i64.shl - local.get $9 - i64.const 4294967295 - i64.and - local.get $10 - i64.shr_u - i64.or - i64.add - f64.convert_i64_u - global.get $~lib/util/string/__fixmulShift - i32.wrap_i64 - call $~lib/math/NativeMath.scalbn - end - end - local.set $11 - end - local.get $11 - local.get $13 - f64.copysign - return - end - f64.const nan:0x8000000000000 - ) - (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - block $__inlined_func$~lib/string/String#concat (result i32) - local.get $0 - i32.const 1648 - local.get $0 - select - local.set $2 - local.get $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.eqz - if - local.get $0 - i32.const 1648 - i32.ne - if - local.get $0 - call $~lib/rt/pure/__release - end - i32.const 1648 - local.set $0 - end - local.get $2 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $3 - local.get $0 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $4 - i32.add - local.tee $1 - i32.eqz - if - local.get $0 call $~lib/rt/pure/__release - i32.const 1280 br $__inlined_func$~lib/string/String#concat end - local.get $1 + local.get $0 i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 local.get $2 local.get $3 - call $~lib/memory/memory.copy - local.get $1 + call $~lib/util/memory/memmove + local.get $0 local.get $3 i32.add - local.get $0 + local.get $1 local.get $4 - call $~lib/memory/memory.copy - local.get $0 - call $~lib/rt/pure/__release + call $~lib/util/memory/memmove local.get $1 + call $~lib/rt/pure/__release end + local.get $0 ) (func $~lib/string/String.__gt (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -4134,7 +4090,7 @@ if i32.const 11872 i32.const 1536 - i32.const 322 + i32.const 320 i32.const 7 call $~lib/builtins/abort unreachable @@ -4233,7 +4189,7 @@ i32.const 1 i32.shl local.tee $7 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $3 local.get $7 i32.add @@ -4241,7 +4197,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $3 local.get $1 local.get $5 @@ -4261,7 +4217,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $3 call $~lib/rt/pure/__retain return @@ -4305,7 +4261,7 @@ if i32.const 0 i32.const 1360 - i32.const 581 + i32.const 573 i32.const 3 call $~lib/builtins/abort unreachable @@ -4351,13 +4307,7 @@ return end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.tee $6 i32.load local.tee $4 @@ -4381,10 +4331,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 @@ -4414,7 +4364,7 @@ i32.const 16 i32.add local.get $2 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $1 i32.const 17912 i32.ge_u @@ -4447,12 +4397,12 @@ (local $9 i32) (local $10 i32) local.get $2 - local.set $5 + local.set $4 local.get $0 call $~lib/string/String#get:length local.tee $3 local.get $1 - local.tee $4 + local.tee $5 call $~lib/string/String#get:length local.tee $10 i32.le_u @@ -4464,17 +4414,17 @@ local.get $0 call $~lib/rt/pure/__retain else - local.get $5 - local.get $0 local.get $4 local.get $0 + local.get $5 + local.get $0 call $~lib/string/String.__eq select call $~lib/rt/pure/__retain end return end - local.get $5 + local.get $4 call $~lib/string/String#get:length local.set $2 local.get $10 @@ -4498,12 +4448,12 @@ i32.shl i32.const 1 call $~lib/rt/tlsf/__alloc - local.tee $4 - local.get $5 + local.tee $6 + local.get $4 local.get $2 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.set $1 loop $for-loop|0 @@ -4511,7 +4461,7 @@ local.get $3 i32.lt_u if - local.get $4 + local.get $6 local.get $1 i32.const 1 i32.shl @@ -4523,7 +4473,7 @@ i32.add i32.load16_u i32.store16 - local.get $4 + local.get $6 local.get $1 i32.const 1 i32.add @@ -4531,11 +4481,11 @@ i32.const 1 i32.shl i32.add - local.get $5 + local.get $4 local.get $2 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $1 local.get $2 i32.add @@ -4547,7 +4497,7 @@ br $for-loop|0 end end - local.get $4 + local.get $6 call $~lib/rt/pure/__retain return end @@ -4558,33 +4508,33 @@ local.get $3 i32.const 1 i32.shl - local.tee $3 + local.tee $6 i32.const 1 call $~lib/rt/tlsf/__alloc local.tee $1 local.get $0 - local.get $3 - call $~lib/memory/memory.copy + local.get $6 + call $~lib/util/memory/memmove loop $while-continue|1 local.get $0 - local.get $4 + local.get $5 local.get $7 call $~lib/string/String#indexOf - local.tee $3 + local.tee $6 i32.const -1 i32.xor if local.get $1 - local.get $3 + local.get $6 i32.const 1 i32.shl i32.add - local.get $5 + local.get $4 local.get $2 i32.const 1 i32.shl - call $~lib/memory/memory.copy - local.get $3 + call $~lib/util/memory/memmove + local.get $6 local.get $10 i32.add local.set $7 @@ -4599,7 +4549,7 @@ local.set $1 loop $while-continue|2 local.get $0 - local.get $4 + local.get $5 local.get $7 call $~lib/string/String#indexOf local.tee $9 @@ -4646,7 +4596,7 @@ local.tee $7 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $6 local.get $7 local.get $8 @@ -4655,11 +4605,11 @@ i32.const 1 i32.shl i32.add - local.get $5 + local.get $4 local.get $2 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.get $7 i32.add @@ -4705,7 +4655,7 @@ local.get $2 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove end local.get $1 local.get $2 @@ -4713,15 +4663,15 @@ i32.add local.tee $0 i32.gt_u - if (result i32) + if local.get $6 local.get $0 i32.const 1 i32.shl call $~lib/rt/tlsf/__realloc - else - local.get $6 + local.set $6 end + local.get $6 call $~lib/rt/pure/__retain return end @@ -4798,7 +4748,7 @@ i32.shl i32.add local.get $2 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $3 call $~lib/rt/pure/__retain ) @@ -4855,7 +4805,7 @@ i32.shl i32.add local.get $2 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $3 call $~lib/rt/pure/__retain ) @@ -4934,7 +4884,7 @@ local.get $2 i32.add local.get $3 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $1 call $~lib/rt/pure/__retain ) @@ -4966,252 +4916,262 @@ i32.store offset=12 local.get $1 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (local $2 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 4 - i32.sub - local.tee $2 - i32.const 0 - i32.store8 offset=3 - local.get $1 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 offset=1 - local.get $0 - i32.const 0 - i32.store8 offset=2 - local.get $2 - i32.const 0 - i32.store8 offset=2 - local.get $2 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 offset=3 - local.get $2 - i32.const 0 - i32.store8 - local.get $1 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $2 - i32.add - local.tee $0 - i32.const 0 - i32.store - local.get $0 - local.get $1 - local.get $2 - i32.sub - i32.const -4 - i32.and - local.tee $2 - i32.add - i32.const 28 - i32.sub - local.tee $1 - i32.const 0 - i32.store offset=24 - local.get $2 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $2 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $1 - i32.const 0 - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $0 - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $1 - i32.add - local.set $0 - local.get $2 - local.get $1 - i32.sub - local.set $1 - loop $while-continue|0 - local.get $1 - i32.const 32 - i32.ge_u - if - local.get $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i64.const 0 - i64.store offset=16 - local.get $0 - i64.const 0 - i64.store offset=24 - local.get $1 - i32.const 32 - i32.sub - local.set $1 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $while-continue|0 - end - end + local.get $1 + i32.eqz + if + return end - ) - (func $~lib/array/Array<~lib/string/String>#push (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 $0 - i32.load offset=12 - local.tee $6 - i32.const 1 - i32.add - local.tee $3 - local.set $2 - local.get $3 + i32.const 0 + i32.store8 local.get $0 - i32.load offset=8 - local.tee $4 + local.get $1 + i32.add + i32.const 4 + i32.sub + local.tee $2 + i32.const 0 + i32.store8 offset=3 + local.get $1 i32.const 2 - i32.shr_u - i32.gt_u + i32.le_u if - local.get $2 - i32.const 268435452 - i32.gt_u - if - i32.const 11872 - i32.const 13136 - i32.const 14 - i32.const 48 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $0 - i32.load - local.tee $7 - local.get $2 - i32.const 2 - i32.shl - local.tee $5 - call $~lib/rt/tlsf/__realloc - local.tee $2 - i32.add - local.get $5 - local.get $4 - i32.sub - call $~lib/memory/memory.fill - local.get $2 - local.get $7 - i32.ne - if - local.get $0 - local.get $2 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - end - local.get $0 - local.get $5 - i32.store offset=8 + return end local.get $0 - i32.load offset=4 - local.get $6 - i32.const 2 - i32.shl - i32.add + i32.const 0 + i32.store8 offset=1 + local.get $0 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=1 local.get $1 - call $~lib/rt/pure/__retain + i32.const 6 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store8 offset=3 + local.get $2 + i32.const 0 + i32.store8 + local.get $1 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $2 + i32.add + local.tee $0 + i32.const 0 i32.store local.get $0 - local.get $3 - i32.store offset=12 - ) - (func $~lib/string/String#split (param $0 i32) (param $1 i32) (param $2 i32) (result 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) - block $folding-inner0 - local.get $2 - i32.eqz + local.get $1 + local.get $2 + i32.sub + i32.const -4 + i32.and + local.tee $2 + i32.add + i32.const 28 + i32.sub + local.tee $1 + i32.const 0 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + i32.const 0 + i32.store offset=24 + local.get $1 + i32.const 0 + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $1 + i32.add + local.set $0 + local.get $2 + local.get $1 + i32.sub + local.set $1 + loop $while-continue|0 + local.get $1 + i32.const 32 + i32.ge_u + if + local.get $0 + i64.const 0 + i64.store + local.get $0 + i64.const 0 + i64.store offset=8 + local.get $0 + i64.const 0 + i64.store offset=16 + local.get $0 + i64.const 0 + i64.store offset=24 + local.get $1 + i32.const 32 + i32.sub + local.set $1 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 + end + end + ) + (func $~lib/array/Array<~lib/string/String>#push (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 $0 + i32.load offset=12 + local.tee $6 + i32.const 1 + i32.add + local.tee $3 + local.set $2 + local.get $3 + local.get $0 + i32.load offset=8 + local.tee $4 + i32.const 2 + i32.shr_u + i32.gt_u + if + local.get $2 + i32.const 268435452 + i32.gt_u + if + i32.const 11872 + i32.const 13136 + i32.const 14 + i32.const 48 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $0 + i32.load + local.tee $7 + local.get $2 + i32.const 2 + i32.shl + local.tee $5 + call $~lib/rt/tlsf/__realloc + local.tee $2 + i32.add + local.get $5 + local.get $4 + i32.sub + call $~lib/util/memory/memset + local.get $2 + local.get $7 + i32.ne + if + local.get $0 + local.get $2 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + end + local.get $0 + local.get $5 + i32.store offset=8 + end + local.get $0 + i32.load offset=4 + local.get $6 + i32.const 2 + i32.shl + i32.add + local.get $1 + call $~lib/rt/pure/__retain + i32.store + local.get $0 + local.get $3 + i32.store offset=12 + ) + (func $~lib/string/String#split (param $0 i32) (param $1 i32) (param $2 i32) (result 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) + block $folding-inner0 + local.get $2 + i32.eqz br_if $folding-inner0 local.get $1 i32.eqz @@ -5229,19 +5189,19 @@ end local.get $0 call $~lib/string/String#get:length - local.set $5 + local.set $3 i32.const 2147483647 local.get $2 local.get $2 i32.const 0 i32.lt_s select - local.set $2 + local.set $6 local.get $1 call $~lib/string/String#get:length local.tee $8 if - local.get $5 + local.get $3 i32.eqz if i32.const 1 @@ -5255,13 +5215,13 @@ return end else - local.get $5 + local.get $3 i32.eqz br_if $folding-inner0 - local.get $5 - local.get $2 - local.get $5 - local.get $2 + local.get $3 + local.get $6 + local.get $3 + local.get $6 i32.lt_s select local.tee $2 @@ -5269,9 +5229,9 @@ call $~lib/rt/pure/__retain local.tee $4 i32.load offset=4 - local.set $5 + local.set $3 loop $for-loop|0 - local.get $3 + local.get $5 local.get $2 i32.lt_s if @@ -5279,27 +5239,27 @@ i32.const 1 call $~lib/rt/tlsf/__alloc local.tee $1 - local.get $3 + local.get $0 + local.get $5 i32.const 1 i32.shl - local.get $0 i32.add i32.load16_u i32.store16 local.get $3 + local.get $5 i32.const 2 i32.shl - local.get $5 i32.add local.get $1 i32.store local.get $1 call $~lib/rt/pure/__retain drop - local.get $3 + local.get $5 i32.const 1 i32.add - local.set $3 + local.set $5 br $for-loop|0 end end @@ -5309,42 +5269,42 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $3 + local.set $2 loop $while-continue|1 local.get $0 local.get $1 local.get $4 call $~lib/string/String#indexOf - local.tee $7 + local.tee $5 i32.const -1 i32.xor if - local.get $7 + local.get $5 local.get $4 i32.sub - local.tee $6 + local.tee $7 i32.const 0 i32.gt_s if - local.get $6 + local.get $7 i32.const 1 i32.shl - local.tee $6 + local.tee $7 i32.const 1 call $~lib/rt/tlsf/__alloc local.tee $9 + local.get $0 local.get $4 i32.const 1 i32.shl - local.get $0 i32.add - local.get $6 - call $~lib/memory/memory.copy - local.get $3 + local.get $7 + call $~lib/util/memory/memmove + local.get $2 local.get $9 call $~lib/array/Array<~lib/string/String>#push else - local.get $3 + local.get $2 i32.const 1280 call $~lib/array/Array<~lib/string/String>#push end @@ -5352,13 +5312,13 @@ i32.const 1 i32.add local.tee $10 - local.get $2 + local.get $6 i32.eq if - local.get $3 + local.get $2 return end - local.get $7 + local.get $5 local.get $8 i32.add local.set $4 @@ -5368,13 +5328,13 @@ local.get $4 i32.eqz if - local.get $3 + local.get $2 local.get $0 call $~lib/array/Array<~lib/string/String>#push - local.get $3 + local.get $2 return end - local.get $5 + local.get $3 local.get $4 i32.sub local.tee $1 @@ -5387,23 +5347,23 @@ local.tee $1 i32.const 1 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $3 + local.get $0 local.get $4 i32.const 1 i32.shl - local.get $0 i32.add local.get $1 - call $~lib/memory/memory.copy - local.get $3 + call $~lib/util/memory/memmove local.get $2 + local.get $3 call $~lib/array/Array<~lib/string/String>#push else - local.get $3 + local.get $2 i32.const 1280 call $~lib/array/Array<~lib/string/String>#push end - local.get $3 + local.get $2 return end i32.const 0 @@ -5487,7 +5447,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -5546,7 +5506,7 @@ local.tee $2 local.get $0 local.get $3 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core local.get $1 if local.get $2 @@ -5575,7 +5535,7 @@ local.tee $2 local.get $0 local.get $1 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core local.get $2 call $~lib/rt/pure/__retain ) @@ -5625,7 +5585,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_core (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -5681,7 +5641,7 @@ local.tee $2 local.get $1 local.get $3 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core else local.get $0 call $~lib/util/number/decimalCount64High @@ -5693,7 +5653,7 @@ local.tee $2 local.get $0 local.get $1 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa64_core end local.get $2 call $~lib/rt/pure/__retain @@ -5738,7 +5698,7 @@ local.tee $3 local.get $2 local.get $4 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core else local.get $0 call $~lib/util/number/decimalCount64High @@ -5752,7 +5712,7 @@ local.tee $3 local.get $0 local.get $2 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa64_core end local.get $1 if @@ -5763,42 +5723,149 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i64) - local.get $3 + (func $~lib/util/number/umul64f (param $0 i64) (param $1 i64) (result i64) + (local $2 i64) + (local $3 i64) local.get $1 - i64.sub - local.set $9 + i64.const 4294967295 + i64.and + local.tee $2 + local.get $0 + i64.const 32 + i64.shr_u + local.tee $3 + i64.mul + local.get $2 + local.get $0 + i64.const 4294967295 + i64.and + local.tee $2 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.set $0 + local.get $3 + local.get $1 + i64.const 32 + i64.shr_u + local.tee $1 + i64.mul + local.get $0 + i64.const 32 + i64.shr_u + i64.add + local.get $1 + local.get $2 + i64.mul + local.get $0 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + i64.add + ) + (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.add + i32.const -64 + i32.sub + ) + (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) + local.get $0 + local.get $1 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.tee $0 + i32.load16_u + local.set $1 + loop $while-continue|1 + i32.const 1 + local.get $5 + local.get $3 + i64.sub + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.sub + i64.gt_u + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.lt_u + select + i32.const 0 + local.get $2 + local.get $3 + i64.sub + local.get $4 + i64.ge_u + i32.const 0 + local.get $3 + local.get $5 + i64.lt_u + select + select + if + local.get $1 + i32.const 1 + i32.sub + local.set $1 + local.get $3 + local.get $4 + i64.add + local.set $3 + br $while-continue|1 + end + end + local.get $0 + local.get $1 + i32.store16 + ) + (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (local $7 i32) + (local $8 i32) + (local $9 i64) + (local $10 i64) + (local $11 i64) + (local $12 i64) + local.get $3 + local.get $1 + i64.sub + local.set $9 local.get $3 i64.const 1 i32.const 0 local.get $4 i32.sub - local.tee $10 + local.tee $8 i64.extend_i32_s i64.shl - local.tee $11 + local.tee $10 i64.const 1 i64.sub - local.tee $12 + local.tee $11 i64.and - local.set $8 + local.set $1 local.get $3 - local.get $10 + local.get $8 i64.extend_i32_s i64.shr_u i32.wrap_i64 - local.tee $7 + local.tee $2 call $~lib/util/number/decimalCount32 - local.set $4 + local.set $7 loop $while-continue|0 - local.get $4 + local.get $7 i32.const 0 i32.gt_s if @@ -5813,116 +5880,116 @@ block $case3|1 block $case2|1 block $case1|1 - local.get $4 - local.tee $2 + local.get $7 + local.tee $4 i32.const 10 i32.ne if - local.get $2 + local.get $4 i32.const 1 i32.sub br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 end - local.get $7 + local.get $2 i32.const 1000000000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 1000000000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 100000000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 100000000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 10000000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 10000000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 1000000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 1000000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 100000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 100000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 10000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 10000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 1000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 1000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 100 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 100 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 10 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 10 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 - local.set $2 + local.get $2 + local.set $4 i32.const 0 - local.set $7 + local.set $2 br $break|1 end i32.const 0 - local.set $2 + local.set $4 end - local.get $2 + local.get $4 local.get $6 i32.or if @@ -5931,7 +5998,7 @@ i32.const 1 i32.shl i32.add - local.get $2 + local.get $4 i32.const 65535 i32.and i32.const 48 @@ -5942,110 +6009,61 @@ i32.add local.set $6 end - local.get $4 + local.get $7 i32.const 1 i32.sub - local.set $4 - local.get $8 - local.get $7 + local.set $7 + local.get $1 + local.get $2 i64.extend_i32_u - local.get $10 + local.get $8 i64.extend_i32_s i64.shl i64.add - local.tee $1 + local.tee $3 local.get $5 i64.le_u if - local.get $4 + local.get $7 global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $4 + local.get $0 + local.get $6 + local.get $5 + local.get $3 + local.get $7 i32.const 2 i32.shl i32.const 16200 i32.add i64.load32_u - local.get $10 + local.get $8 i64.extend_i32_s i64.shl - local.set $3 - local.get $0 - local.get $6 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_u - local.set $4 - loop $while-continue|3 - i32.const 1 - local.get $9 - local.get $1 - i64.sub - local.get $1 - local.get $3 - i64.add - local.get $9 - i64.sub - i64.gt_u - local.get $1 - local.get $3 - i64.add - local.get $9 - i64.lt_u - select - i32.const 0 - local.get $5 - local.get $1 - i64.sub - local.get $3 - i64.ge_u - i32.const 0 - local.get $1 - local.get $9 - i64.lt_u - select - select - if - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.get $3 - i64.add - local.set $1 - br $while-continue|3 - end - end - local.get $2 - local.get $4 - i32.store16 + local.get $9 + call $~lib/util/number/grisuRound local.get $6 return end br $while-continue|0 end end - local.get $10 + local.get $8 i64.extend_i32_s - local.set $13 - loop $while-continue|4 (result i32) + local.set $3 + loop $while-continue|2 (result i32) local.get $5 i64.const 10 i64.mul local.set $5 - local.get $8 + local.get $1 i64.const 10 i64.mul - local.tee $3 - local.get $13 - i64.shr_u local.tee $1 + local.get $3 + i64.shr_u + local.tee $12 local.get $6 i64.extend_i32_s i64.or @@ -6054,436 +6072,126 @@ if local.get $0 local.get $6 + local.tee $2 i32.const 1 i32.shl i32.add - local.get $1 + local.get $12 i32.wrap_i64 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 - local.get $6 + local.get $2 i32.const 1 - i32.add - local.set $6 - end - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $3 - local.get $12 - i64.and - local.tee $8 - local.get $5 - i64.ge_u - br_if $while-continue|4 - local.get $4 - global.get $~lib/util/number/_K - i32.add - global.set $~lib/util/number/_K - local.get $8 - local.set $1 - local.get $9 - i32.const 0 - local.get $4 - i32.sub - i32.const 2 - i32.shl - i32.const 16200 - i32.add - i64.load32_u - i64.mul - local.set $3 - local.get $0 - local.get $6 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_u - local.set $4 - loop $while-continue|6 - i32.const 1 - local.get $3 - local.get $1 - i64.sub - local.get $1 - local.get $11 - i64.add - local.get $3 - i64.sub - i64.gt_u - local.get $1 - local.get $11 - i64.add - local.get $3 - i64.lt_u - select - i32.const 0 - local.get $5 - local.get $1 - i64.sub - local.get $11 - i64.ge_u - i32.const 0 - local.get $1 - local.get $3 - i64.lt_u - select - select - if - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.get $11 - i64.add - local.set $1 - br $while-continue|6 - end - end - local.get $2 - local.get $4 - i32.store16 - local.get $6 - end - ) - (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $2 - i32.eqz - if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 3145774 - i32.store - local.get $1 - i32.const 2 - i32.add - return - end - local.get $1 - local.get $1 - local.get $2 - i32.add - local.tee $3 - i32.le_s - if (result i32) - local.get $3 - i32.const 21 - i32.le_s - else - i32.const 0 - end - if (result i32) - loop $for-loop|0 - local.get $1 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 48 - i32.store16 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.const 3145774 - i32.store - local.get $3 - i32.const 2 - i32.add - else - local.get $3 - i32.const 21 - i32.le_s - i32.const 0 - local.get $3 - i32.const 0 - i32.gt_s - select - if (result i32) - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.tee $0 - i32.const 2 - i32.add - local.get $0 - i32.const 0 - local.get $2 - i32.sub - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - i32.const 46 - i32.store16 - local.get $1 - i32.const 1 - i32.add - else - local.get $3 - i32.const 0 - i32.le_s - i32.const 0 - i32.const -6 - local.get $3 - i32.lt_s - select - if (result i32) - local.get $0 - i32.const 2 - local.get $3 - i32.sub - local.tee $3 - i32.const 1 - i32.shl - i32.add - local.get $0 - local.get $1 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - i32.const 3014704 - i32.store - i32.const 2 - local.set $2 - loop $for-loop|1 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 48 - i32.store16 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 - end - end - local.get $1 - local.get $3 - i32.add - else - local.get $1 - i32.const 1 - i32.eq - if (result i32) - local.get $0 - i32.const 101 - i32.store16 offset=2 - local.get $0 - local.tee $1 - i32.const 4 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $2 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $1 - i32.const 45 - i32.const 43 - local.get $2 - select - i32.store16 offset=4 - local.get $0 - i32.const 2 - i32.add - else - local.get $0 - i32.const 4 - i32.add - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.const 1 - i32.shl - local.tee $2 - i32.const 2 - i32.sub - call $~lib/memory/memory.copy - local.get $0 - i32.const 46 - i32.store16 offset=2 - local.get $0 - local.get $2 - i32.add - local.tee $0 - i32.const 101 - i32.store16 offset=2 - local.get $0 - local.tee $2 - i32.const 4 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $3 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $2 - i32.const 45 - i32.const 43 - local.get $3 - select - i32.store16 offset=4 - local.get $0 - local.get $1 - i32.add - i32.const 2 - i32.add - end - end - end - end - ) - (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) - (local $2 i64) - (local $3 i64) - (local $4 i32) - (local $5 i64) - (local $6 i32) - (local $7 i64) - (local $8 i32) - (local $9 i32) - (local $10 i64) - local.get $1 - f64.const 0 - f64.lt - local.tee $8 - if (result f64) - local.get $0 - i32.const 45 - i32.store16 + i32.add + local.set $6 + end + local.get $7 + i32.const 1 + i32.sub + local.set $7 local.get $1 - f64.neg - else + local.get $11 + i64.and + local.tee $1 + local.get $5 + i64.ge_u + br_if $while-continue|2 + local.get $7 + global.get $~lib/util/number/_K + i32.add + global.set $~lib/util/number/_K + local.get $0 + local.get $6 + local.get $5 local.get $1 + local.get $10 + local.get $9 + i32.const 0 + local.get $7 + i32.sub + i32.const 2 + i32.shl + i32.const 16200 + i32.add + i64.load32_u + i64.mul + call $~lib/util/number/grisuRound + local.get $6 end + ) + (func $~lib/util/number/grisu2 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i64) + (local $5 i32) + (local $6 i64) + (local $7 i32) + local.get $0 i64.reinterpret_f64 - local.tee $3 + local.tee $4 i64.const 9218868437227405312 i64.and i64.const 52 i64.shr_u i32.wrap_i64 - local.tee $6 + local.tee $5 i32.const 0 i32.ne i64.extend_i32_u i64.const 52 i64.shl - local.get $3 + local.get $4 i64.const 4503599627370495 i64.and i64.add - local.tee $2 + local.tee $4 i64.const 1 i64.shl i64.const 1 i64.add - local.tee $3 - local.get $3 + local.tee $6 i64.clz i32.wrap_i64 - local.tee $4 + local.set $3 + local.get $6 + local.get $3 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus - local.get $6 + local.get $5 i32.const 1 - local.get $6 + local.get $5 select i32.const 1075 i32.sub - local.tee $6 + local.tee $5 i32.const 1 i32.sub - local.get $4 + local.get $3 i32.sub - local.set $4 - local.get $2 - local.get $2 + local.set $3 + local.get $4 + local.get $4 i64.const 4503599627370496 i64.eq i32.const 1 i32.add - local.tee $9 + local.tee $7 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $6 - local.get $9 + local.get $5 + local.get $7 i32.sub - local.get $4 + local.get $3 i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus - local.get $4 + local.get $3 global.set $~lib/util/number/_exp i32.const 348 i32.const -61 @@ -6494,205 +6202,302 @@ f64.mul f64.const 347 f64.add - local.tee $1 + local.tee $0 i32.trunc_f64_s - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 f64.convert_i32_s - local.get $1 + local.get $0 f64.ne i32.add i32.const 3 i32.shr_s i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 3 i32.shl - local.tee $9 + local.tee $7 i32.sub global.set $~lib/util/number/_K - local.get $9 + local.get $7 i32.const 15328 i32.add i64.load global.set $~lib/util/number/_frc_pow - local.get $4 + local.get $3 i32.const 1 i32.shl i32.const 16024 i32.add i32.load16_s global.set $~lib/util/number/_exp_pow - global.get $~lib/util/number/_frc_pow - local.tee $3 - i64.const 4294967295 - i64.and - local.set $5 - local.get $0 - local.get $8 - i32.const 1 - i32.shl - i32.add - local.get $0 - local.get $2 - local.get $2 + global.get $~lib/util/number/_exp_pow + local.set $3 + local.get $1 + local.get $4 + local.get $4 i64.clz i32.wrap_i64 - local.tee $0 + local.tee $1 i64.extend_i32_s i64.shl - local.tee $2 - i64.const 32 - i64.shr_u - local.tee $7 - local.get $3 - i64.const 32 - i64.shr_u - local.tee $10 - i64.mul - local.get $5 - local.get $7 - i64.mul - local.get $2 - i64.const 4294967295 - i64.and - local.tee $2 - local.get $5 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $5 - i64.const 32 - i64.shr_u - i64.add - local.get $2 - local.get $10 - i64.mul - local.get $5 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - global.get $~lib/util/number/_exp_pow + global.get $~lib/util/number/_frc_pow local.tee $4 - local.get $6 - local.get $0 - i32.sub - i32.add - i32.const -64 + call $~lib/util/number/umul64f + local.get $5 + local.get $1 i32.sub - global.get $~lib/util/number/_frc_plus - local.tee $2 - i64.const 32 - i64.shr_u - local.tee $5 local.get $3 - i64.const 32 - i64.shr_u - local.tee $7 - i64.mul + call $~lib/util/number/umul64e + global.get $~lib/util/number/_frc_plus + local.get $4 + call $~lib/util/number/umul64f + i64.const 1 + i64.sub + local.tee $6 + global.get $~lib/util/number/_exp local.get $3 - i64.const 4294967295 - i64.and - local.tee $10 - local.get $5 - i64.mul - local.get $2 - i64.const 4294967295 - i64.and - local.tee $2 - local.get $10 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $5 - i64.const 32 - i64.shr_u - i64.add - local.get $2 - local.get $7 - i64.mul - local.get $5 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add + call $~lib/util/number/umul64e + local.get $6 + global.get $~lib/util/number/_frc_minus + local.get $4 + call $~lib/util/number/umul64f i64.const 1 + i64.add i64.sub + local.get $2 + call $~lib/util/number/genDigits + ) + (func $~lib/util/number/genExponent (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.const 0 + i32.lt_s local.tee $2 - local.get $4 - global.get $~lib/util/number/_exp + if + i32.const 0 + local.get $1 + i32.sub + local.set $1 + end + local.get $1 + local.get $1 + call $~lib/util/number/decimalCount32 + i32.const 1 i32.add - i32.const -64 - i32.sub + local.tee $1 + call $~lib/util/number/utoa32_core + local.get $0 + i32.const 45 + i32.const 43 local.get $2 - global.get $~lib/util/number/_frc_minus - local.tee $2 - i64.const 32 - i64.shr_u - local.tee $5 - local.get $3 - i64.const 32 - i64.shr_u - local.tee $7 - i64.mul - local.get $3 - i64.const 4294967295 - i64.and - local.tee $3 - local.get $5 - i64.mul + select + i32.store16 + local.get $1 + ) + (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) local.get $2 - i64.const 4294967295 - i64.and - local.tee $2 - local.get $3 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $3 - i64.const 32 - i64.shr_u - i64.add + i32.eqz + if + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 3145774 + i32.store + local.get $1 + i32.const 2 + i32.add + return + end + local.get $1 + local.get $1 local.get $2 - local.get $7 - i64.mul - local.get $3 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - i64.const 1 - i64.add - i64.sub - local.get $8 - call $~lib/util/number/genDigits - local.get $8 - i32.sub - global.get $~lib/util/number/_K - call $~lib/util/number/prettify - local.get $8 i32.add + local.tee $3 + i32.le_s + if (result i32) + local.get $3 + i32.const 21 + i32.le_s + else + i32.const 0 + end + if (result i32) + loop $for-loop|0 + local.get $1 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.const 3145774 + i32.store + local.get $3 + i32.const 2 + i32.add + else + local.get $3 + i32.const 21 + i32.le_s + i32.const 0 + local.get $3 + i32.const 0 + i32.gt_s + select + if (result i32) + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.tee $0 + i32.const 2 + i32.add + local.get $0 + i32.const 0 + local.get $2 + i32.sub + i32.const 1 + i32.shl + call $~lib/util/memory/memmove + local.get $0 + i32.const 46 + i32.store16 + local.get $1 + i32.const 1 + i32.add + else + local.get $3 + i32.const 0 + i32.le_s + i32.const 0 + i32.const -6 + local.get $3 + i32.lt_s + select + if (result i32) + local.get $0 + i32.const 2 + local.get $3 + i32.sub + local.tee $3 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $1 + i32.const 1 + i32.shl + call $~lib/util/memory/memmove + local.get $0 + i32.const 3014704 + i32.store + i32.const 2 + local.set $2 + loop $for-loop|1 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|1 + end + end + local.get $1 + local.get $3 + i32.add + else + local.get $1 + i32.const 1 + i32.eq + if (result i32) + local.get $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + i32.const 4 + i32.add + local.get $3 + i32.const 1 + i32.sub + call $~lib/util/number/genExponent + i32.const 2 + i32.add + else + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.const 1 + i32.shl + local.tee $2 + i32.const 2 + i32.sub + call $~lib/util/memory/memmove + local.get $0 + i32.const 46 + i32.store16 offset=2 + local.get $0 + local.get $2 + i32.add + local.tee $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + i32.const 4 + i32.add + local.get $3 + i32.const 1 + i32.sub + call $~lib/util/number/genExponent + local.get $1 + i32.add + i32.const 2 + i32.add + end + end + end + end ) (func $~lib/util/number/dtoa (param $0 f64) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 f64.const 0 f64.eq @@ -6725,23 +6530,51 @@ i32.const 56 i32.const 1 call $~lib/rt/tlsf/__alloc + local.tee $3 + local.set $2 + local.get $0 + f64.const 0 + f64.lt local.tee $1 + if + local.get $2 + i32.const 45 + i32.store16 + local.get $0 + f64.neg + local.set $0 + end + local.get $2 + local.get $1 + i32.const 1 + i32.shl + i32.add local.get $0 - call $~lib/util/number/dtoa_core - local.tee $2 + local.get $2 + local.get $1 + call $~lib/util/number/grisu2 + local.get $1 + i32.sub + global.get $~lib/util/number/_K + call $~lib/util/number/prettify + local.get $1 + i32.add + local.tee $1 + local.set $2 + local.get $1 i32.const 28 i32.eq if - local.get $1 + local.get $3 call $~lib/rt/pure/__retain return end - local.get $1 + local.get $3 i32.const 0 local.get $2 call $~lib/string/String#substring call $~lib/rt/tlsf/maybeInitialize - local.get $1 + local.get $3 call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index c409be3275..c2369a4265 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -6,18 +6,24 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) - (type $i64_=>_i32 (func (param i64) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i64_=>_i32 (func (param i64) (result i32))) + (type $i32_=>_f64 (func (param i32) (result f64))) + (type $i64_i32_=>_f64 (func (param i64 i32) (result f64))) + (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) - (type $i32_=>_f64 (func (param i32) (result f64))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) - (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) + (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) + (type $i64_i32_=>_none (func (param i64 i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 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))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $f64_=>_i32 (func (param f64) (result i32))) + (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) + (type $i64_i32_=>_i64 (func (param i64 i32) (result i64))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -726,6 +732,69 @@ call $~lib/rt/pure/__release local.get $1 ) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -734,9 +803,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -749,7 +815,7 @@ if i32.const 0 i32.const 352 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -776,7 +842,7 @@ if i32.const 0 i32.const 352 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -830,7 +896,7 @@ if i32.const 0 i32.const 352 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -855,77 +921,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -942,6 +966,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -953,8 +983,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -962,7 +990,7 @@ if i32.const 0 i32.const 352 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -979,28 +1007,18 @@ if i32.const 0 i32.const 352 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -1011,44 +1029,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -1056,30 +1064,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 352 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -1098,22 +1102,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -1139,7 +1143,7 @@ if i32.const 0 i32.const 352 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -1151,18 +1155,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 352 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -1216,27 +1220,15 @@ if i32.const 0 i32.const 352 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -1251,24 +1243,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -1278,31 +1256,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -1310,8 +1272,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -1337,24 +1297,22 @@ if i32.const 0 i32.const 352 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -1362,7 +1320,7 @@ if i32.const 0 i32.const 352 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -1370,16 +1328,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -1395,7 +1353,7 @@ if i32.const 0 i32.const 352 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -1404,8 +1362,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -1416,49 +1374,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -1471,10 +1425,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -1524,73 +1474,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -1603,11 +1526,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -1627,7 +1550,7 @@ if i32.const 400 i32.const 352 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -1653,9 +1576,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1723,31 +1643,24 @@ if i32.const 0 i32.const 352 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1760,79 +1673,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 352 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1869,9 +1751,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1885,12 +1765,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1900,7 +1780,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1937,7 +1817,7 @@ if i32.const 0 i32.const 352 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1988,29 +1868,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -2030,7 +1890,7 @@ if i32.const 0 i32.const 352 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -2077,7 +1937,7 @@ if i32.const 0 i32.const 352 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -2098,7 +1958,7 @@ if i32.const 0 i32.const 352 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -2119,7 +1979,7 @@ if i32.const 0 i32.const 352 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -3533,246 +3393,241 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if local.get $0 - local.set $5 local.get $1 - local.set $4 local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if i32.const 0 - i32.const 1 + i32.const 2 i32.lt_s drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.tee $7 + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 i32.const 1 i32.add - local.set $5 - local.get $7 + local.set $0 local.get $4 - local.tee $7 + local.get $1 + local.tee $4 i32.const 1 i32.add - local.set $4 - local.get $7 + local.set $1 + local.get $4 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 + br $while-continue|0 end end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end - end - ) - (func $~lib/memory/memory.repeat (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 0 - local.set $4 - local.get $2 - local.get $3 + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end + end + ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) + (func $~lib/memory/memory.repeat (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 0 + local.set $4 + local.get $2 + local.get $3 i32.mul local.set $5 loop $while-continue|0 @@ -5406,6 +5261,162 @@ call $~lib/rt/pure/__release local.get $2 ) + (func $~lib/util/string/parseExp (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 1 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + i32.load16_u + local.set $4 + local.get $4 + i32.const 32 + i32.or + i32.const 101 + i32.ne + if + i32.const 0 + return + end + local.get $0 + i32.const 2 + i32.add + local.tee $0 + i32.load16_u + local.set $4 + local.get $4 + i32.const 45 + i32.eq + if + local.get $1 + i32.const 1 + i32.sub + local.tee $1 + i32.eqz + if + i32.const 0 + return + end + local.get $0 + i32.const 2 + i32.add + local.tee $0 + i32.load16_u + local.set $4 + i32.const -1 + local.set $2 + else + local.get $4 + i32.const 43 + i32.eq + if + local.get $1 + i32.const 1 + i32.sub + local.tee $1 + i32.eqz + if + i32.const 0 + return + end + local.get $0 + i32.const 2 + i32.add + local.tee $0 + i32.load16_u + local.set $4 + end + end + loop $while-continue|0 + local.get $4 + i32.const 48 + i32.eq + local.set $5 + local.get $5 + if + local.get $1 + i32.const 1 + i32.sub + local.tee $1 + i32.eqz + if + i32.const 0 + return + end + local.get $0 + i32.const 2 + i32.add + local.tee $0 + i32.load16_u + local.set $4 + br $while-continue|0 + end + end + local.get $4 + i32.const 48 + i32.sub + local.set $5 + loop $for-loop|1 + local.get $1 + if (result i32) + local.get $5 + i32.const 10 + i32.lt_u + else + i32.const 0 + end + local.set $6 + local.get $6 + if + local.get $3 + i32.const 3200 + i32.ge_s + if + local.get $2 + i32.const 3200 + i32.mul + return + end + i32.const 10 + local.get $3 + i32.mul + local.get $5 + i32.add + local.set $3 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + i32.load16_u + local.set $4 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + local.get $4 + i32.const 48 + i32.sub + local.set $5 + br $for-loop|1 + end + end + local.get $2 + local.get $3 + i32.mul + ) + (func $~lib/util/string/pow10 (param $0 i32) (result f64) + i32.const 1992 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + ) (func $~lib/math/ipow32 (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -5698,181 +5709,503 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/util/string/strtod (param $0 i32) (result f64) - (local $1 i32) - (local $2 f64) + (func $~lib/util/string/scaledown (param $0 i64) (param $1 i32) (result f64) + (local $2 i64) (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i64) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i64) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i64) + (local $8 i64) + (local $9 i64) + (local $10 i64) local.get $0 - call $~lib/rt/pure/__retain - local.set $0 + i64.clz + local.set $2 local.get $0 - call $~lib/string/String#get:length - local.set $1 + local.get $2 + i64.shl + local.set $0 local.get $1 - i32.eqz - if - f64.const nan:0x8000000000000 - local.set $2 - local.get $0 - call $~lib/rt/pure/__release - local.get $2 - return - end - local.get $0 - local.set $3 - local.get $3 - i32.load16_u - local.set $4 - f64.const 1 - local.set $5 - loop $while-continue|0 + i64.extend_i32_s + local.get $2 + i64.sub + local.set $2 + loop $for-loop|0 local.get $1 - if (result i32) - local.get $4 - call $~lib/util/string/isSpace - else - i32.const 0 - end - local.set $6 - local.get $6 + i32.const -14 + i32.le_s + local.set $3 + local.get $3 if - local.get $3 - i32.const 2 - i32.add - local.tee $3 - i32.load16_u + local.get $0 + i64.const 6103515625 + i64.div_u local.set $4 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $while-continue|0 - end - end - local.get $1 - i32.eqz - if - f64.const nan:0x8000000000000 - local.set $2 - local.get $0 - call $~lib/rt/pure/__release - local.get $2 - return - end - local.get $4 - i32.const 45 - i32.eq - if - local.get $1 - i32.const 1 - i32.sub - local.tee $1 - i32.eqz - if - f64.const nan:0x8000000000000 - local.set $2 local.get $0 - call $~lib/rt/pure/__release + i64.const 6103515625 + i64.rem_u + local.set $5 + local.get $4 + i64.clz + local.set $6 + local.get $4 + local.get $6 + i64.shl + f64.const 0.00004294967296 + local.get $5 + local.get $6 + i64.const 18 + i64.sub + i64.shl + f64.convert_i64_u + f64.mul + f64.nearest + i64.trunc_f64_u + i64.add + local.set $0 local.get $2 - return + local.get $6 + i64.sub + local.set $2 + local.get $1 + i32.const 14 + i32.add + local.set $1 + br $for-loop|0 end + end + i32.const 5 + i32.const 0 + local.get $1 + i32.sub + call $~lib/math/ipow32 + i64.extend_i32_s + local.set $7 + local.get $0 + local.get $7 + i64.div_u + local.set $8 + local.get $0 + local.get $7 + i64.rem_u + local.set $9 + local.get $8 + i64.clz + local.set $10 + local.get $8 + local.get $10 + i64.shl + local.get $9 + f64.convert_i64_u + i64.reinterpret_f64 + local.get $10 + i64.const 52 + i64.shl + i64.add + f64.reinterpret_i64 + local.get $7 + f64.convert_i64_u + f64.div + i64.trunc_f64_u + i64.add + local.set $0 + local.get $2 + local.get $10 + i64.sub + local.set $2 + local.get $0 + f64.convert_i64_u + local.get $2 + i32.wrap_i64 + call $~lib/math/NativeMath.scalbn + ) + (func $~lib/util/string/fixmul (param $0 i64) (param $1 i32) (result i64) + (local $2 i64) + (local $3 i64) + (local $4 i32) + (local $5 i32) + (local $6 i64) + local.get $0 + i64.const 4294967295 + i64.and + local.get $1 + i64.extend_i32_u + i64.mul + local.set $2 + local.get $0 + i64.const 32 + i64.shr_u + local.get $1 + i64.extend_i32_u + i64.mul + local.get $2 + i64.const 32 + i64.shr_u + i64.add + local.set $3 + local.get $3 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $4 + local.get $4 + i32.clz + local.set $5 + i64.const 32 + local.get $5 + i64.extend_i32_u + i64.sub + local.set $6 + global.get $~lib/util/string/__fixmulShift + local.get $6 + i64.add + global.set $~lib/util/string/__fixmulShift + local.get $3 + local.get $5 + i64.extend_i32_u + i64.shl + local.get $2 + i64.const 4294967295 + i64.and + local.get $6 + i64.shr_u + i64.or + local.get $2 + local.get $5 + i64.extend_i32_u + i64.shl + i64.const 31 + i64.shr_u + i64.const 1 + i64.and + i64.add + ) + (func $~lib/util/string/scaleup (param $0 i64) (param $1 i32) (result f64) + (local $2 i64) + (local $3 i32) + local.get $0 + i64.ctz + local.set $2 + local.get $0 + local.get $2 + i64.shr_u + local.set $0 + local.get $2 + local.get $1 + i64.extend_i32_s + i64.add + local.set $2 + local.get $2 + global.set $~lib/util/string/__fixmulShift + loop $for-loop|0 + local.get $1 + i32.const 13 + i32.ge_s + local.set $3 local.get $3 - i32.const 2 - i32.add - local.tee $3 - i32.load16_u - local.set $4 - f64.const -1 - local.set $5 - else - local.get $4 - i32.const 43 - i32.eq if + local.get $0 + i32.const 1220703125 + call $~lib/util/string/fixmul + local.set $0 local.get $1 - i32.const 1 + i32.const 13 i32.sub - local.tee $1 - i32.eqz - if - f64.const nan:0x8000000000000 - local.set $2 - local.get $0 - call $~lib/rt/pure/__release - local.get $2 - return - end - local.get $3 - i32.const 2 - i32.add - local.tee $3 - i32.load16_u - local.set $4 + local.set $1 + br $for-loop|0 end end + local.get $0 + i32.const 5 local.get $1 - i32.const 8 - i32.ge_s + call $~lib/math/ipow32 + call $~lib/util/string/fixmul + local.set $0 + global.get $~lib/util/string/__fixmulShift + local.set $2 + local.get $0 + f64.convert_i64_u + local.get $2 + i32.wrap_i64 + call $~lib/math/NativeMath.scalbn + ) + (func $~lib/util/string/scientific (param $0 i64) (param $1 i32) (result f64) + (local $2 f64) + (local $3 i32) + (local $4 i32) + local.get $0 + i64.const 0 + i64.ne + i32.eqz if (result i32) - local.get $4 - i32.const 73 - i32.eq + i32.const 1 else - i32.const 0 + local.get $1 + i32.const -342 + i32.lt_s end if - local.get $3 - i64.load - i64.const 29555310648492105 - i64.eq - if (result i32) - local.get $3 - i64.load offset=8 - i64.const 34058970405077102 - i64.eq - else - i32.const 0 - end - if - f64.const inf - local.get $5 - f64.copysign - local.set $2 - local.get $0 - call $~lib/rt/pure/__release - local.get $2 - return - end - f64.const nan:0x8000000000000 - local.set $2 - local.get $0 - call $~lib/rt/pure/__release + f64.const 0 + return + end + local.get $1 + i32.const 308 + i32.gt_s + if + f64.const inf + return + end + local.get $0 + f64.convert_i64_u + local.set $2 + local.get $1 + i32.eqz + if local.get $2 return end - local.get $4 - i32.const 46 + local.get $1 + i32.const 22 + i32.gt_s + if (result i32) + local.get $1 + i32.const 22 + i32.const 15 + i32.add + i32.le_s + else + i32.const 0 + end + if + local.get $2 + local.get $1 + i32.const 22 + i32.sub + call $~lib/util/string/pow10 + f64.mul + local.set $2 + i32.const 22 + local.set $1 + end + local.get $0 + i64.const 9007199254740991 + i64.le_u + if (result i32) + local.get $1 + local.tee $3 + i32.const 31 + i32.shr_s + local.tee $4 + local.get $3 + i32.add + local.get $4 + i32.xor + i32.const 22 + i32.le_s + else + i32.const 0 + end + if + local.get $1 + i32.const 0 + i32.gt_s + if + local.get $2 + local.get $1 + call $~lib/util/string/pow10 + f64.mul + return + end + local.get $2 + i32.const 0 + local.get $1 + i32.sub + call $~lib/util/string/pow10 + f64.div + return + else + local.get $1 + i32.const 0 + i32.lt_s + if + local.get $0 + local.get $1 + call $~lib/util/string/scaledown + return + else + local.get $0 + local.get $1 + call $~lib/util/string/scaleup + return + end + unreachable + end + unreachable + ) + (func $~lib/util/string/strtod (param $0 i32) (result f64) + (local $1 i32) + (local $2 f64) + (local $3 i32) + (local $4 i32) + (local $5 f64) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i64) + (local $12 i32) + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + call $~lib/string/String#get:length + local.set $1 + local.get $1 + i32.eqz + if + f64.const nan:0x8000000000000 + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + return + end + local.get $0 + local.set $3 + local.get $3 + i32.load16_u + local.set $4 + f64.const 1 + local.set $5 + loop $while-continue|0 + local.get $1 + if (result i32) + local.get $4 + call $~lib/util/string/isSpace + else + i32.const 0 + end + local.set $6 + local.get $6 + if + local.get $3 + i32.const 2 + i32.add + local.tee $3 + i32.load16_u + local.set $4 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $while-continue|0 + end + end + local.get $1 + i32.eqz + if + f64.const nan:0x8000000000000 + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + return + end + local.get $4 + i32.const 45 + i32.eq + if + local.get $1 + i32.const 1 + i32.sub + local.tee $1 + i32.eqz + if + f64.const nan:0x8000000000000 + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + return + end + local.get $3 + i32.const 2 + i32.add + local.tee $3 + i32.load16_u + local.set $4 + f64.const -1 + local.set $5 + else + local.get $4 + i32.const 43 + i32.eq + if + local.get $1 + i32.const 1 + i32.sub + local.tee $1 + i32.eqz + if + f64.const nan:0x8000000000000 + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + return + end + local.get $3 + i32.const 2 + i32.add + local.tee $3 + i32.load16_u + local.set $4 + end + end + local.get $1 + i32.const 8 + i32.ge_s + if (result i32) + local.get $4 + i32.const 73 + i32.eq + else + i32.const 0 + end + if + local.get $3 + i64.load + i64.const 29555310648492105 + i64.eq + if (result i32) + local.get $3 + i64.load offset=8 + i64.const 34058970405077102 + i64.eq + else + i32.const 0 + end + if + f64.const inf + local.get $5 + f64.copysign + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + return + end + f64.const nan:0x8000000000000 + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + return + end + local.get $4 + i32.const 46 i32.ne if (result i32) local.get $4 @@ -6112,2305 +6445,767 @@ local.get $9 local.set $10 end - block $~lib/util/string/scientific|inlined.0 (result f64) - local.get $11 - local.set $18 - local.get $10 - i32.const 19 - local.tee $6 - local.get $9 - local.tee $12 - local.get $6 - local.get $12 - i32.lt_s - select - i32.sub - block $~lib/util/string/parseExp|inlined.0 (result i32) - local.get $3 - local.set $6 - local.get $1 - local.set $12 - i32.const 1 - local.set $13 - i32.const 0 - local.set $14 - local.get $6 - i32.load16_u - local.set $15 - local.get $15 - i32.const 32 - i32.or - i32.const 101 - i32.ne - if - i32.const 0 - br $~lib/util/string/parseExp|inlined.0 - end - local.get $6 - i32.const 2 - i32.add - local.tee $6 - i32.load16_u - local.set $15 - local.get $15 - i32.const 45 - i32.eq - if - local.get $12 - i32.const 1 - i32.sub - local.tee $12 - i32.eqz - if - i32.const 0 - br $~lib/util/string/parseExp|inlined.0 - end - local.get $6 - i32.const 2 - i32.add - local.tee $6 - i32.load16_u - local.set $15 - i32.const -1 - local.set $13 - else - local.get $15 - i32.const 43 - i32.eq - if - local.get $12 - i32.const 1 - i32.sub - local.tee $12 - i32.eqz - if - i32.const 0 - br $~lib/util/string/parseExp|inlined.0 - end - local.get $6 - i32.const 2 - i32.add - local.tee $6 - i32.load16_u - local.set $15 - end - end - loop $while-continue|4 - local.get $15 - i32.const 48 - i32.eq - local.set $16 - local.get $16 - if - local.get $12 - i32.const 1 - i32.sub - local.tee $12 - i32.eqz - if - i32.const 0 - br $~lib/util/string/parseExp|inlined.0 - end - local.get $6 - i32.const 2 - i32.add - local.tee $6 - i32.load16_u - local.set $15 - br $while-continue|4 - end - end - local.get $15 - i32.const 48 - i32.sub - local.set $16 - loop $for-loop|5 - local.get $12 - if (result i32) - local.get $16 - i32.const 10 - i32.lt_u - else - i32.const 0 - end - local.set $17 - local.get $17 - if - local.get $14 - i32.const 3200 - i32.ge_s - if - local.get $13 - i32.const 3200 - i32.mul - br $~lib/util/string/parseExp|inlined.0 - end - i32.const 10 - local.get $14 - i32.mul - local.get $16 - i32.add - local.set $14 - local.get $6 - i32.const 2 - i32.add - local.tee $6 - i32.load16_u - local.set $15 - local.get $12 - i32.const 1 - i32.sub - local.set $12 - local.get $15 - i32.const 48 - i32.sub - local.set $16 - br $for-loop|5 - end - end - local.get $13 - local.get $14 - i32.mul - end - i32.add - local.set $17 - local.get $18 - i64.const 0 - i64.ne - i32.eqz - if (result i32) - i32.const 1 - else - local.get $17 - i32.const -342 - i32.lt_s - end - if - f64.const 0 - br $~lib/util/string/scientific|inlined.0 - end - local.get $17 - i32.const 308 - i32.gt_s - if - f64.const inf - br $~lib/util/string/scientific|inlined.0 - end - local.get $18 - f64.convert_i64_u - local.set $2 - local.get $17 - i32.eqz - if - local.get $2 - br $~lib/util/string/scientific|inlined.0 - end - local.get $17 - i32.const 22 - i32.gt_s - if (result i32) - local.get $17 - i32.const 22 - i32.const 15 - i32.add - i32.le_s - else - i32.const 0 - end - if - local.get $2 - local.get $17 - i32.const 22 - i32.sub - local.set $16 - i32.const 1992 - local.get $16 - i32.const 3 - i32.shl - i32.add - f64.load - f64.mul - local.set $2 - i32.const 22 - local.set $17 - end - local.get $18 - i64.const 9007199254740991 - i64.le_u - if (result i32) - local.get $17 - local.tee $16 - i32.const 31 - i32.shr_s - local.tee $15 - local.get $16 - i32.add - local.get $15 - i32.xor - i32.const 22 - i32.le_s - else - i32.const 0 - end - if - local.get $17 - i32.const 0 - i32.gt_s - if - local.get $2 - local.get $17 - local.set $12 - i32.const 1992 - local.get $12 - i32.const 3 - i32.shl - i32.add - f64.load - f64.mul - br $~lib/util/string/scientific|inlined.0 - end - local.get $2 - i32.const 0 - local.get $17 - i32.sub - local.set $6 - i32.const 1992 - local.get $6 - i32.const 3 - i32.shl - i32.add - f64.load - f64.div - br $~lib/util/string/scientific|inlined.0 - else - local.get $17 - i32.const 0 - i32.lt_s - if - local.get $18 - local.set $19 - local.get $17 - local.set $13 - local.get $19 - i64.clz - local.set $20 - local.get $19 - local.get $20 - i64.shl - local.set $19 - local.get $13 - i64.extend_i32_s - local.get $20 - i64.sub - local.set $20 - loop $for-loop|6 - local.get $13 - i32.const -14 - i32.le_s - local.set $6 - local.get $6 - if - local.get $19 - i64.const 6103515625 - i64.div_u - local.set $21 - local.get $19 - i64.const 6103515625 - i64.rem_u - local.set $22 - local.get $21 - i64.clz - local.set $23 - local.get $21 - local.get $23 - i64.shl - f64.const 0.00004294967296 - local.get $22 - local.get $23 - i64.const 18 - i64.sub - i64.shl - f64.convert_i64_u - f64.mul - f64.nearest - i64.trunc_f64_u - i64.add - local.set $19 - local.get $20 - local.get $23 - i64.sub - local.set $20 - local.get $13 - i32.const 14 - i32.add - local.set $13 - br $for-loop|6 - end - end - i32.const 5 - i32.const 0 - local.get $13 - i32.sub - call $~lib/math/ipow32 - i64.extend_i32_s - local.set $23 - local.get $19 - local.get $23 - i64.div_u - local.set $22 - local.get $19 - local.get $23 - i64.rem_u - local.set $21 - local.get $22 - i64.clz - local.set $24 - local.get $22 - local.get $24 - i64.shl - local.get $21 - f64.convert_i64_u - i64.reinterpret_f64 - local.get $24 - i64.const 52 - i64.shl - i64.add - f64.reinterpret_i64 - local.get $23 - f64.convert_i64_u - f64.div - i64.trunc_f64_u - i64.add - local.set $19 - local.get $20 - local.get $24 - i64.sub - local.set $20 - local.get $19 - f64.convert_i64_u - local.get $20 - i32.wrap_i64 - call $~lib/math/NativeMath.scalbn - br $~lib/util/string/scientific|inlined.0 - else - local.get $18 - local.set $19 - local.get $17 - local.set $14 - local.get $19 - i64.ctz - local.set $24 - local.get $19 - local.get $24 - i64.shr_u - local.set $19 - local.get $24 - local.get $14 - i64.extend_i32_s - i64.add - local.set $24 - local.get $24 - global.set $~lib/util/string/__fixmulShift - loop $for-loop|7 - local.get $14 - i32.const 13 - i32.ge_s - local.set $13 - local.get $13 - if - local.get $19 - local.set $20 - i32.const 1220703125 - local.set $15 - local.get $20 - i64.const 4294967295 - i64.and - local.get $15 - i64.extend_i32_u - i64.mul - local.set $21 - local.get $20 - i64.const 32 - i64.shr_u - local.get $15 - i64.extend_i32_u - i64.mul - local.get $21 - i64.const 32 - i64.shr_u - i64.add - local.set $22 - local.get $22 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.set $6 - local.get $6 - i32.clz - local.set $12 - i64.const 32 - local.get $12 - i64.extend_i32_u - i64.sub - local.set $23 - global.get $~lib/util/string/__fixmulShift - local.get $23 - i64.add - global.set $~lib/util/string/__fixmulShift - local.get $22 - local.get $12 - i64.extend_i32_u - i64.shl - local.get $21 - i64.const 4294967295 - i64.and - local.get $23 - i64.shr_u - i64.or - local.get $21 - local.get $12 - i64.extend_i32_u - i64.shl - i64.const 31 - i64.shr_u - i64.const 1 - i64.and - i64.add - local.set $19 - local.get $14 - i32.const 13 - i32.sub - local.set $14 - br $for-loop|7 - end - end - local.get $19 - local.set $20 - i32.const 5 - local.get $14 - call $~lib/math/ipow32 - local.set $16 - local.get $20 - i64.const 4294967295 - i64.and - local.get $16 - i64.extend_i32_u - i64.mul - local.set $23 - local.get $20 - i64.const 32 - i64.shr_u - local.get $16 - i64.extend_i32_u - i64.mul - local.get $23 - i64.const 32 - i64.shr_u - i64.add - local.set $22 - local.get $22 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.set $13 - local.get $13 - i32.clz - local.set $12 - i64.const 32 - local.get $12 - i64.extend_i32_u - i64.sub - local.set $21 - global.get $~lib/util/string/__fixmulShift - local.get $21 - i64.add - global.set $~lib/util/string/__fixmulShift - local.get $22 - local.get $12 - i64.extend_i32_u - i64.shl - local.get $23 - i64.const 4294967295 - i64.and - local.get $21 - i64.shr_u - i64.or - local.get $23 - local.get $12 - i64.extend_i32_u - i64.shl - i64.const 31 - i64.shr_u - i64.const 1 - i64.and - i64.add - local.set $19 - global.get $~lib/util/string/__fixmulShift - local.set $24 - local.get $19 - f64.convert_i64_u - local.get $24 - i32.wrap_i64 - call $~lib/math/NativeMath.scalbn - br $~lib/util/string/scientific|inlined.0 - end - unreachable - end - unreachable - end - local.get $5 - f64.copysign - local.set $2 - local.get $0 - call $~lib/rt/pure/__release - local.get $2 - ) - (func $~lib/string/parseFloat (param $0 i32) (result f64) - (local $1 f64) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $0 - call $~lib/util/string/strtod - local.set $1 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - ) - (func $~lib/string/String#concat (param $0 i32) (param $1 i32) (result 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 $1 - local.get $1 - i32.const 0 - i32.eq - if - i32.const 640 - local.tee $2 - local.get $1 - 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 $2 - local.set $1 - end - local.get $0 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.set $4 - local.get $1 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.set $5 - local.get $4 - local.get $5 - i32.add - local.set $6 - local.get $6 - i32.const 0 - i32.eq - if - i32.const 272 - call $~lib/rt/pure/__retain - local.set $2 - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - return - end - local.get $6 - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $7 - local.get $7 - local.get $0 - local.get $4 - call $~lib/memory/memory.copy - local.get $7 - local.get $4 - i32.add - local.get $1 - local.get $5 - call $~lib/memory/memory.copy - local.get $7 - local.set $2 - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - ) - (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - i32.const 640 - local.get $0 - i32.const 0 - i32.ne - select - local.get $1 - call $~lib/string/String#concat - local.set $2 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - ) - (func $~lib/string/String.__ne (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - local.get $1 - call $~lib/string/String.__eq - i32.eqz - local.set $2 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - ) - (func $~lib/string/String.__gt (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - local.get $1 - i32.eq - if (result i32) - i32.const 1 - else - local.get $0 - i32.const 0 - i32.eq - end - if (result i32) - i32.const 1 - else - local.get $1 - i32.const 0 - i32.eq - end - if - i32.const 0 - local.set $2 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - return - end - local.get $0 - call $~lib/string/String#get:length - local.set $3 - local.get $3 - i32.eqz - if - i32.const 0 - local.set $2 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - return - end - local.get $1 - call $~lib/string/String#get:length - local.set $4 - local.get $4 - i32.eqz - if - i32.const 1 - local.set $2 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - return - end - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - local.get $3 - local.tee $2 - local.get $4 - local.tee $5 - local.get $2 - local.get $5 - i32.lt_s - select - call $~lib/util/string/compareImpl - i32.const 0 - i32.gt_s - local.set $2 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - ) - (func $~lib/string/String.__lt (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - local.get $1 - i32.eq - if (result i32) - i32.const 1 - else - local.get $0 - i32.const 0 - i32.eq - end - if (result i32) - i32.const 1 - else - local.get $1 - i32.const 0 - i32.eq - end - if - i32.const 0 - local.set $2 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - return - end - local.get $1 - call $~lib/string/String#get:length - local.set $3 - local.get $3 - i32.eqz - if - i32.const 0 - local.set $2 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - return - end - local.get $0 - call $~lib/string/String#get:length - local.set $4 - local.get $4 - i32.eqz - if - i32.const 1 - local.set $2 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - return - end - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - local.get $4 - local.tee $2 - local.get $3 - local.tee $5 - local.get $2 - local.get $5 - i32.lt_s - select - call $~lib/util/string/compareImpl - i32.const 0 - i32.lt_s - local.set $2 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - ) - (func $~lib/string/String.__gte (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - local.get $1 - call $~lib/string/String.__lt - i32.eqz - local.set $2 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - ) - (func $~lib/string/String.__lte (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - local.get $1 - call $~lib/string/String.__gt - i32.eqz - local.set $2 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - ) - (func $~lib/string/String#repeat (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - call $~lib/string/String#get:length - local.set $2 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - i32.const 1 - else - local.get $2 - i64.extend_i32_s - local.get $1 - i64.extend_i32_s - i64.mul - i64.const 1 - i64.const 28 - i64.shl - i64.gt_u - end - if - i32.const 10864 - i32.const 528 - i32.const 322 - i32.const 7 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - i32.eq - if (result i32) - i32.const 1 - else - local.get $2 - i32.eqz - end - if - i32.const 272 - call $~lib/rt/pure/__retain - return - end - local.get $1 - i32.const 1 - i32.eq - if - local.get $0 - call $~lib/rt/pure/__retain - return - end - local.get $2 - local.get $1 - i32.mul - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.set $3 - local.get $3 - local.get $0 - local.get $2 - i32.const 1 - i32.shl - local.get $1 - call $~lib/memory/memory.repeat - local.get $3 - call $~lib/rt/pure/__retain - ) - (func $~lib/string/String#replace (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - local.get $0 - call $~lib/string/String#get:length - local.set $3 - local.get $1 - call $~lib/string/String#get:length - local.set $4 - local.get $3 - local.get $4 - i32.le_u - if - local.get $3 - local.get $4 - i32.lt_u - if (result i32) - local.get $0 - call $~lib/rt/pure/__retain - else - local.get $2 - local.get $0 - local.get $1 - local.get $0 - call $~lib/string/String.__eq - select - call $~lib/rt/pure/__retain - end - local.set $5 - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $5 - return - end - local.get $0 - local.get $1 - i32.const 0 - call $~lib/string/String#indexOf - local.set $6 - local.get $6 - i32.const -1 - i32.xor - if - local.get $2 - call $~lib/string/String#get:length - local.set $5 - local.get $3 - local.get $4 - i32.sub - local.set $3 - local.get $3 - local.get $5 - i32.add - local.set $7 - local.get $7 - if - local.get $7 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 - local.get $0 - local.get $6 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $8 - local.get $6 - i32.const 1 - i32.shl - i32.add - local.get $2 - local.get $5 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $8 - local.get $6 - local.get $5 - i32.add - i32.const 1 - i32.shl - i32.add - local.get $0 - local.get $6 - local.get $4 - i32.add - i32.const 1 - i32.shl - i32.add - local.get $3 - local.get $6 - i32.sub - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $8 - call $~lib/rt/pure/__retain - local.set $9 - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $9 - return - end - end - local.get $0 - call $~lib/rt/pure/__retain - local.set $7 - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $7 - ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 16 - i32.sub - local.set $1 - local.get $0 - i32.const 0 - i32.ne - if (result i32) - local.get $0 - i32.const 15 - i32.and - i32.eqz - else - i32.const 0 - end - if (result i32) - local.get $1 - i32.load - i32.const 1 - i32.and - i32.eqz - else - i32.const 0 - end - if (result i32) - local.get $1 - i32.load offset=4 - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 352 - i32.const 581 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $1 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - i32.const 1 - drop - local.get $1 - call $~lib/rt/rtrace/onfree - ) - (func $~lib/rt/tlsf/reallocateBlock (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $2 - call $~lib/rt/tlsf/prepareSize - local.set $3 - local.get $1 - i32.load - local.set $4 - local.get $3 - local.get $4 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.le_u - if - local.get $0 - local.get $1 - local.get $3 - call $~lib/rt/tlsf/prepareBlock - local.get $1 - local.get $2 - i32.store offset=12 - local.get $1 - return - end - local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $6 - local.get $6 - i32.load - local.set $7 - local.get $7 - i32.const 1 - i32.and - if - local.get $4 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.add - local.get $7 - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add - local.set $5 - local.get $5 - local.get $3 - i32.ge_u - if - local.get $0 - local.get $6 - call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $4 - i32.const 3 - i32.and - local.get $5 - i32.or - i32.store - local.get $1 - local.get $2 - i32.store offset=12 - local.get $0 - local.get $1 - local.get $3 - call $~lib/rt/tlsf/prepareBlock - local.get $1 - return - end - end - local.get $0 - local.get $2 - local.get $1 - i32.load offset=8 - call $~lib/rt/tlsf/allocateBlock - local.set $8 - local.get $8 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $8 - i32.const 16 - i32.add - local.get $1 - i32.const 16 - i32.add - local.get $2 - call $~lib/memory/memory.copy - local.get $1 - global.get $~lib/heap/__heap_base - i32.ge_u - if - i32.const 1 - drop - local.get $1 - local.get $8 - call $~lib/rt/rtrace/onrealloc - local.get $0 - local.get $1 - call $~lib/rt/tlsf/freeBlock - end - local.get $8 - ) - (func $~lib/rt/tlsf/__realloc (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - call $~lib/rt/tlsf/checkUsedBlock - local.get $1 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add - ) - (func $~lib/string/String#replaceAll (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - local.get $0 - call $~lib/string/String#get:length - local.set $3 - local.get $1 - call $~lib/string/String#get:length - local.set $4 - local.get $3 - local.get $4 - i32.le_u - if - local.get $3 - local.get $4 - i32.lt_u - if (result i32) - local.get $0 - call $~lib/rt/pure/__retain - else - local.get $2 - local.get $0 - local.get $1 - local.get $0 - call $~lib/string/String.__eq - select - call $~lib/rt/pure/__retain - end - local.set $5 - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $5 - return - end - local.get $2 - call $~lib/string/String#get:length - local.set $6 - local.get $4 - i32.eqz - if - local.get $6 - i32.eqz - if - local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $5 - return - end - local.get $3 - local.get $3 - i32.const 1 - i32.add - local.get $6 - i32.mul - i32.add - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $5 - local.get $2 - local.get $6 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $6 - local.set $7 - i32.const 0 - local.set $8 - loop $for-loop|0 - local.get $8 - local.get $3 - i32.lt_u - local.set $9 - local.get $9 - if - local.get $5 - local.get $7 - local.tee $10 - i32.const 1 - i32.add - local.set $7 - local.get $10 - i32.const 1 - i32.shl - i32.add - local.get $0 - local.get $8 - i32.const 1 - i32.shl - i32.add - i32.load16_u - i32.store16 - local.get $5 - local.get $7 - i32.const 1 - i32.shl - i32.add - local.get $2 - local.get $6 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $7 - local.get $6 - i32.add - local.set $7 - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|0 - end - end - local.get $5 - call $~lib/rt/pure/__retain - local.set $8 - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $8 - return - end - i32.const 0 - local.set $11 - i32.const 0 - local.set $12 - local.get $4 + local.get $11 + local.get $10 + i32.const 19 + local.tee $6 + local.get $9 + local.tee $12 local.get $6 + local.get $12 + i32.lt_s + select + i32.sub + local.get $3 + local.get $1 + call $~lib/util/string/parseExp + i32.add + call $~lib/util/string/scientific + local.get $5 + f64.copysign + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + ) + (func $~lib/string/parseFloat (param $0 i32) (result f64) + (local $1 f64) + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + call $~lib/util/string/strtod + local.set $1 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + ) + (func $~lib/string/String#concat (param $0 i32) (param $1 i32) (result 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 $1 + local.get $1 + i32.const 0 i32.eq if - local.get $3 - i32.const 1 - i32.shl - local.set $7 - local.get $7 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $5 - local.get $0 - local.get $7 - call $~lib/memory/memory.copy - loop $while-continue|1 - local.get $0 - local.get $1 - local.get $11 - call $~lib/string/String#indexOf - local.tee $12 - i32.const -1 - i32.xor - local.set $8 - local.get $8 - if - local.get $5 - local.get $12 - i32.const 1 - i32.shl - i32.add - local.get $2 - local.get $6 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $12 - local.get $4 - i32.add - local.set $11 - br $while-continue|1 - end - end - local.get $5 - call $~lib/rt/pure/__retain - local.set $8 - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $8 - return - end - i32.const 0 - local.set $13 - i32.const 0 - local.set $14 - local.get $3 - local.set $15 - loop $while-continue|2 - local.get $0 + i32.const 640 + local.tee $2 local.get $1 - local.get $11 - call $~lib/string/String#indexOf - local.tee $12 - i32.const -1 - i32.xor - local.set $5 - local.get $5 + local.tee $3 + i32.ne if - local.get $13 - i32.eqz - if - local.get $3 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.set $13 - end - local.get $14 - local.get $15 - i32.gt_u - if - local.get $15 - i32.const 1 - i32.shl - local.set $7 - local.get $13 - local.get $7 - i32.const 1 - i32.shl - call $~lib/rt/tlsf/__realloc - local.set $13 - local.get $7 - local.set $15 - end - local.get $12 - local.get $11 - i32.sub - local.set $7 - local.get $13 - local.get $14 - i32.const 1 - i32.shl - i32.add - local.get $0 - local.get $11 - i32.const 1 - i32.shl - i32.add - local.get $7 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $14 - local.get $7 - i32.add - local.set $14 - local.get $13 - local.get $14 - i32.const 1 - i32.shl - i32.add local.get $2 - local.get $6 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $14 - local.get $6 - i32.add - local.set $14 - local.get $12 - local.get $4 - i32.add - local.set $11 - br $while-continue|2 - end - end - local.get $14 - if - local.get $14 - local.get $15 - i32.gt_u - if - local.get $15 - i32.const 1 - i32.shl - local.set $5 - local.get $13 - local.get $5 - i32.const 1 - i32.shl - call $~lib/rt/tlsf/__realloc - local.set $13 - local.get $5 - local.set $15 - end - local.get $3 - local.get $11 - i32.sub - local.set $5 - local.get $5 - if - local.get $13 - local.get $14 - i32.const 1 - i32.shl - i32.add - local.get $0 - local.get $11 - i32.const 1 - i32.shl - i32.add - local.get $5 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - end - local.get $5 - local.get $14 - i32.add - local.set $5 - local.get $15 - local.get $5 - i32.gt_u - if - local.get $13 - local.get $5 - i32.const 1 - i32.shl - call $~lib/rt/tlsf/__realloc - local.set $13 + call $~lib/rt/pure/__retain + local.set $2 + local.get $3 + call $~lib/rt/pure/__release end - local.get $13 + local.get $2 + local.set $1 + end + local.get $0 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.set $4 + local.get $1 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.set $5 + local.get $4 + local.get $5 + i32.add + local.set $6 + local.get $6 + i32.const 0 + i32.eq + if + i32.const 272 call $~lib/rt/pure/__retain - local.set $8 + local.set $2 local.get $1 call $~lib/rt/pure/__release local.get $2 - call $~lib/rt/pure/__release - local.get $8 return end + local.get $6 + i32.const 1 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.set $7 + local.get $7 + local.get $0 + local.get $4 + call $~lib/memory/memory.copy + local.get $7 + local.get $4 + i32.add + local.get $1 + local.get $5 + call $~lib/memory/memory.copy + local.get $7 + local.set $2 + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + ) + (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + i32.const 640 + local.get $0 + i32.const 0 + i32.ne + select + local.get $1 + call $~lib/string/String#concat + local.set $2 + local.get $0 + call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release local.get $2 + ) + (func $~lib/string/String.__ne (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + call $~lib/string/String.__eq + i32.eqz + local.set $2 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 + call $~lib/rt/pure/__release + local.get $2 ) - (func $~lib/string/String#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String.__gt (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 $0 - call $~lib/string/String#get:length - local.set $3 + call $~lib/rt/pure/__retain + local.set $0 local.get $1 - i32.const 0 - i32.lt_s + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + i32.eq if (result i32) - local.get $1 - local.get $3 - i32.add - local.tee $4 + i32.const 1 + else + local.get $0 i32.const 0 - local.tee $5 - local.get $4 - local.get $5 - i32.gt_s - select + i32.eq + end + if (result i32) + i32.const 1 else local.get $1 - local.tee $4 - local.get $3 - local.tee $5 - local.get $4 - local.get $5 - i32.lt_s - select + i32.const 0 + i32.eq 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 $4 + if i32.const 0 - local.tee $5 - local.get $4 - local.get $5 - i32.gt_s - select - else + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release local.get $2 - local.tee $4 - local.get $3 - local.tee $5 - local.get $4 - local.get $5 - i32.lt_s - select + return end - local.set $2 - local.get $2 - local.get $1 - i32.sub + local.get $0 + call $~lib/string/String#get:length local.set $3 local.get $3 - i32.const 0 - i32.le_s + i32.eqz if - i32.const 272 - call $~lib/rt/pure/__retain + i32.const 0 + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + return + end + local.get $1 + call $~lib/string/String#get:length + local.set $4 + local.get $4 + i32.eqz + if + i32.const 1 + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $2 return end - local.get $3 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $6 local.get $0 + i32.const 0 local.get $1 - i32.const 1 - i32.shl - i32.add + i32.const 0 local.get $3 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $6 - call $~lib/rt/pure/__retain + local.tee $2 + local.get $4 + local.tee $5 + local.get $2 + local.get $5 + i32.lt_s + select + call $~lib/util/string/compareImpl + i32.const 0 + i32.gt_s + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $2 ) - (func $~lib/string/String#substr (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String.__lt (param $0 i32) (param $1 i32) (result 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 $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + i32.eq + if (result i32) + i32.const 1 + else + local.get $0 + i32.const 0 + i32.eq + end + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 0 + i32.eq + end + if + i32.const 0 + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + return + end local.get $1 - local.set $3 - local.get $2 - local.set $4 - local.get $0 call $~lib/string/String#get:length - local.set $5 + local.set $3 local.get $3 - i32.const 0 - i32.lt_s + i32.eqz if - local.get $5 - local.get $3 - i32.add - local.tee $6 i32.const 0 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.set $3 + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + return end + local.get $0 + call $~lib/string/String#get:length + local.set $4 local.get $4 - local.tee $6 - i32.const 0 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - local.tee $6 - local.get $5 - local.get $3 - i32.sub - local.tee $7 - local.get $6 - local.get $7 - i32.lt_s - select - i32.const 1 - i32.shl - local.set $8 - local.get $8 - i32.const 0 - i32.le_s + i32.eqz if - i32.const 272 - call $~lib/rt/pure/__retain + i32.const 1 + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $2 return end - local.get $8 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.set $9 - local.get $9 - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.get $8 - call $~lib/memory/memory.copy - local.get $9 - call $~lib/rt/pure/__retain - ) - (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $11 i32) local.get $0 - call $~lib/string/String#get:length - local.set $3 + i32.const 0 local.get $1 - local.tee $4 i32.const 0 - local.tee $5 local.get $4 - local.get $5 - i32.gt_s - select - local.tee $4 + local.tee $2 local.get $3 local.tee $5 - local.get $4 - local.get $5 - i32.lt_s - select - local.set $6 local.get $2 - local.tee $4 - i32.const 0 - local.tee $5 - local.get $4 - local.get $5 - i32.gt_s - select - local.tee $4 - local.get $3 - local.tee $5 - local.get $4 local.get $5 i32.lt_s select - local.set $7 - local.get $6 - local.tee $4 - local.get $7 - local.tee $5 - local.get $4 - local.get $5 + call $~lib/util/string/compareImpl + i32.const 0 i32.lt_s - select - i32.const 1 - i32.shl - local.set $8 - local.get $6 - local.tee $4 - local.get $7 - local.tee $5 - local.get $4 - local.get $5 - i32.gt_s - select - i32.const 1 - i32.shl - local.set $9 - local.get $9 - local.get $8 - i32.sub - local.set $10 - local.get $10 + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + ) + (func $~lib/string/String.__gte (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + call $~lib/string/String.__lt + i32.eqz + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + ) + (func $~lib/string/String.__lte (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + call $~lib/string/String.__gt i32.eqz + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + ) + (func $~lib/string/String#repeat (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + call $~lib/string/String#get:length + local.set $2 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + i32.const 1 + else + local.get $2 + i64.extend_i32_s + local.get $1 + i64.extend_i32_s + i64.mul + i64.const 1 + i64.const 28 + i64.shl + i64.gt_u + end if - i32.const 272 - call $~lib/rt/pure/__retain - return + i32.const 10864 + i32.const 528 + i32.const 320 + i32.const 7 + call $~lib/builtins/abort + unreachable end - local.get $8 - i32.eqz + local.get $1 + i32.const 0 + i32.eq if (result i32) - local.get $9 - local.get $3 i32.const 1 - i32.shl - i32.eq else - i32.const 0 + local.get $2 + i32.eqz end if - local.get $0 + i32.const 272 call $~lib/rt/pure/__retain return end - local.get $10 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.set $11 - local.get $11 - local.get $0 - local.get $8 - i32.add - local.get $10 - call $~lib/memory/memory.copy - local.get $11 - call $~lib/rt/pure/__retain - ) - (func $~lib/rt/__allocBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 - call $~lib/rt/tlsf/__alloc - local.set $3 - local.get $2 + local.get $1 + i32.const 1 + i32.eq if - local.get $3 - local.get $2 local.get $0 - call $~lib/memory/memory.copy + call $~lib/rt/pure/__retain + return end - local.get $3 - ) - (func $~lib/rt/__allocArray (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 16 local.get $2 + local.get $1 + i32.mul + i32.const 1 + i32.shl + i32.const 1 call $~lib/rt/tlsf/__alloc - local.set $4 + local.set $3 + local.get $3 local.get $0 - local.get $1 + local.get $2 + i32.const 1 i32.shl - local.set $5 - local.get $5 - i32.const 0 + local.get $1 + call $~lib/memory/memory.repeat local.get $3 - call $~lib/rt/__allocBuffer - local.set $6 - local.get $4 - local.get $6 call $~lib/rt/pure/__retain - i32.store - local.get $4 - local.get $6 - i32.store offset=4 - local.get $4 - local.get $5 - i32.store offset=8 - local.get $4 - local.get $0 - i32.store offset=12 - local.get $4 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/string/String#replace (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - i32.const 4 - i32.sub - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - local.get $4 - i32.store8 offset=3 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=1 + (local $9 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $0 + call $~lib/string/String#get:length + local.set $3 + local.get $1 + call $~lib/string/String#get:length + local.set $4 + local.get $3 + local.get $4 + i32.le_u + if local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 + i32.lt_u + if (result i32) + local.get $0 + call $~lib/rt/pure/__retain + else + local.get $2 + local.get $0 + local.get $1 + local.get $0 + call $~lib/string/String.__eq + select + call $~lib/rt/pure/__retain end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 + local.set $5 + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release local.get $5 - local.get $7 - i32.add + return + end + local.get $0 + local.get $1 + i32.const 0 + call $~lib/string/String#indexOf + local.set $6 + local.get $6 + i32.const -1 + i32.xor + if + local.get $2 + call $~lib/string/String#get:length local.set $5 local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - i32.const 28 i32.sub - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=24 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=16 - local.get $6 - local.get $8 - i32.store offset=20 + local.set $3 local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=4 - local.get $6 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=12 - i32.const 24 local.get $5 - i32.const 4 - i32.and i32.add local.set $7 - local.get $5 local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 + if + local.get $7 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.set $8 + local.get $8 + local.get $0 + local.get $6 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $8 + local.get $6 + i32.const 1 + i32.shl + i32.add + local.get $2 + local.get $5 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $8 + local.get $6 + local.get $5 + i32.add + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $6 + local.get $4 + i32.add + i32.const 1 + i32.shl + i32.add local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end + local.get $6 + i32.sub + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $8 + call $~lib/rt/pure/__retain + local.set $9 + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $9 + return end end + local.get $0 + call $~lib/rt/pure/__retain + local.set $7 + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $7 ) - (func $~lib/array/ensureSize (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 16 + i32.sub + local.set $1 + local.get $0 + i32.const 0 + i32.ne + if (result i32) + local.get $0 + i32.const 15 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $1 + i32.load + i32.const 1 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $1 + i32.load offset=4 + i32.const 268435455 + i32.const -1 + i32.xor + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 352 + i32.const 573 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + ) + (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $1 + i32.load + local.set $2 + local.get $1 + local.get $2 + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + i32.const 1 + drop + local.get $1 + call $~lib/rt/rtrace/onfree + ) + (func $~lib/rt/tlsf/reallocateBlock (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 $0 - i32.load offset=8 + (local $7 i32) + (local $8 i32) + local.get $2 + call $~lib/rt/tlsf/prepareSize local.set $3 local.get $1 + i32.load + local.set $4 local.get $3 - local.get $2 - i32.shr_u - i32.gt_u + local.get $4 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.le_u if - local.get $1 - i32.const 1073741808 - local.get $2 - i32.shr_u - i32.gt_u - if - i32.const 10864 - i32.const 12128 - i32.const 14 - i32.const 48 - call $~lib/builtins/abort - unreachable - end local.get $0 - i32.load - local.set $4 + local.get $1 + local.get $3 + call $~lib/rt/tlsf/prepareBlock local.get $1 local.get $2 - i32.shl - local.set $5 + i32.store offset=12 + local.get $1 + return + end + local.get $1 + call $~lib/rt/tlsf/GETRIGHT + local.set $5 + local.get $5 + i32.load + local.set $6 + local.get $6 + i32.const 1 + i32.and + if local.get $4 - local.get $5 - call $~lib/rt/tlsf/__realloc - local.set $6 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.add local.get $6 - local.get $3 + i32.const 3 + i32.const -1 + i32.xor + i32.and i32.add - i32.const 0 - local.get $5 + local.set $7 + local.get $7 local.get $3 - i32.sub - call $~lib/memory/memory.fill - local.get $6 - local.get $4 - i32.ne + i32.ge_u if local.get $0 - local.get $6 + local.get $5 + call $~lib/rt/tlsf/removeBlock + local.get $1 + local.get $4 + i32.const 3 + i32.and + local.get $7 + i32.or i32.store + local.get $1 + local.get $2 + i32.store offset=12 local.get $0 - local.get $6 - i32.store offset=4 + local.get $1 + local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $1 + return end - local.get $0 - local.get $5 - i32.store offset=8 end - ) - (func $~lib/array/Array<~lib/string/String>#push (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 - i32.load offset=12 - local.set $2 local.get $2 - i32.const 1 - i32.add - local.set $3 - local.get $0 - local.get $3 - i32.const 2 - call $~lib/array/ensureSize - i32.const 1 - drop - local.get $0 + local.get $1 + i32.load offset=8 + call $~lib/rt/tlsf/allocateBlock + local.set $8 + local.get $8 + local.get $1 i32.load offset=4 - local.get $2 - i32.const 2 - i32.shl + i32.store offset=4 + local.get $8 + i32.const 16 + i32.add + local.get $1 + i32.const 16 i32.add + local.get $2 + call $~lib/memory/memory.copy local.get $1 - call $~lib/rt/pure/__retain - i32.store + global.get $~lib/heap/__heap_base + i32.ge_u + if + i32.const 1 + drop + local.get $1 + local.get $8 + call $~lib/rt/rtrace/onrealloc + local.get $0 + local.get $1 + call $~lib/rt/tlsf/freeBlock + end + local.get $8 + ) + (func $~lib/rt/tlsf/__realloc (param $0 i32) (param $1 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize local.get $0 - local.get $3 - i32.store offset=12 - local.get $3 - local.set $4 + call $~lib/rt/tlsf/checkUsedBlock local.get $1 - call $~lib/rt/pure/__release - local.get $4 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add ) - (func $~lib/string/String#split (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#replaceAll (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8423,2249 +7218,2951 @@ (local $12 i32) (local $13 i32) (local $14 i32) + (local $15 i32) local.get $1 call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.eqz - if - i32.const 0 - i32.const 2 - i32.const 3 - i32.const 0 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - return - end + call $~lib/rt/pure/__retain + local.set $2 + local.get $0 + call $~lib/string/String#get:length + local.set $3 local.get $1 - i32.const 0 - i32.eq + call $~lib/string/String#get:length + local.set $4 + local.get $3 + local.get $4 + i32.le_u if - i32.const 1 - i32.const 2 - i32.const 3 - i32.const 0 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $3 local.get $3 - i32.load offset=4 - local.set $4 local.get $4 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $3 - local.set $4 + i32.lt_u + if (result i32) + local.get $0 + call $~lib/rt/pure/__retain + else + local.get $2 + local.get $0 + local.get $1 + local.get $0 + call $~lib/string/String.__eq + select + call $~lib/rt/pure/__retain + end + local.set $5 local.get $1 call $~lib/rt/pure/__release - local.get $4 + local.get $2 + call $~lib/rt/pure/__release + local.get $5 return end - local.get $0 - call $~lib/string/String#get:length - local.set $5 - local.get $1 + local.get $2 call $~lib/string/String#get:length local.set $6 - local.get $2 - i32.const 0 - i32.lt_s - if - global.get $~lib/builtins/i32.MAX_VALUE - local.set $2 - end - local.get $6 + local.get $4 i32.eqz if - local.get $5 + local.get $6 i32.eqz if - i32.const 0 - i32.const 2 - i32.const 3 - i32.const 0 - call $~lib/rt/__allocArray + local.get $0 call $~lib/rt/pure/__retain - local.set $4 + local.set $5 local.get $1 call $~lib/rt/pure/__release - local.get $4 + local.get $2 + call $~lib/rt/pure/__release + local.get $5 return end - local.get $5 - local.tee $4 - local.get $2 - local.tee $3 - local.get $4 local.get $3 - i32.lt_s - select + local.get $3 + i32.const 1 + i32.add + local.get $6 + i32.mul + i32.add + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc local.set $5 local.get $5 - i32.const 2 - i32.const 3 - i32.const 0 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $4 - local.get $4 - i32.load offset=4 - local.set $3 - i32.const 0 + local.get $2 + local.get $6 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $6 local.set $7 + i32.const 0 + local.set $8 loop $for-loop|0 - local.get $7 - local.get $5 - i32.lt_s - local.set $8 local.get $8 + local.get $3 + i32.lt_u + local.set $9 + local.get $9 if - i32.const 2 + local.get $5 + local.get $7 + local.tee $10 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.set $9 - local.get $9 + i32.add + local.set $7 + local.get $10 + i32.const 1 + i32.shl + i32.add local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.shl i32.add i32.load16_u i32.store16 - local.get $3 + local.get $5 local.get $7 - i32.const 2 + i32.const 1 i32.shl i32.add - local.get $9 - i32.store + local.get $2 + local.get $6 i32.const 1 - drop - local.get $9 - call $~lib/rt/pure/__retain - drop + i32.shl + call $~lib/memory/memory.copy local.get $7 - i32.const 1 + local.get $6 i32.add local.set $7 + local.get $8 + i32.const 1 + i32.add + local.set $8 br $for-loop|0 end end - local.get $4 + local.get $5 + call $~lib/rt/pure/__retain + local.set $8 + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $8 + return + end + i32.const 0 + local.set $11 + i32.const 0 + local.set $12 + local.get $4 + local.get $6 + i32.eq + if + local.get $3 + i32.const 1 + i32.shl local.set $7 + local.get $7 + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.set $5 + local.get $5 + local.get $0 + local.get $7 + call $~lib/memory/memory.copy + loop $while-continue|1 + local.get $0 + local.get $1 + local.get $11 + call $~lib/string/String#indexOf + local.tee $12 + i32.const -1 + i32.xor + local.set $8 + local.get $8 + if + local.get $5 + local.get $12 + i32.const 1 + i32.shl + i32.add + local.get $2 + local.get $6 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $12 + local.get $4 + i32.add + local.set $11 + br $while-continue|1 + end + end + local.get $5 + call $~lib/rt/pure/__retain + local.set $8 local.get $1 call $~lib/rt/pure/__release - local.get $7 + local.get $2 + call $~lib/rt/pure/__release + local.get $8 return - else - local.get $5 - i32.eqz - if - i32.const 1 - i32.const 2 - i32.const 3 - i32.const 0 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $3 - local.get $3 - i32.load offset=4 - i32.const 272 - i32.store - local.get $3 - local.set $4 - local.get $1 - call $~lib/rt/pure/__release - local.get $4 - return - end end i32.const 0 - i32.const 2 - i32.const 3 - i32.const 0 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $10 - i32.const 0 - local.set $11 - i32.const 0 - local.set $12 - i32.const 0 local.set $13 - loop $while-continue|1 + i32.const 0 + local.set $14 + local.get $3 + local.set $15 + loop $while-continue|2 local.get $0 local.get $1 - local.get $12 + local.get $11 call $~lib/string/String#indexOf - local.tee $11 + local.tee $12 i32.const -1 i32.xor - local.set $3 - local.get $3 + local.set $5 + local.get $5 if - local.get $11 - local.get $12 - i32.sub - local.set $4 - local.get $4 - i32.const 0 - i32.gt_s + local.get $13 + i32.eqz if - local.get $4 + local.get $3 i32.const 1 i32.shl i32.const 1 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $7 - local.get $0 - local.get $12 + local.set $13 + end + local.get $14 + local.get $15 + i32.gt_u + if + local.get $15 i32.const 1 i32.shl - i32.add - local.get $4 + local.set $7 + local.get $13 + local.get $7 i32.const 1 i32.shl - call $~lib/memory/memory.copy - local.get $10 + call $~lib/rt/tlsf/__realloc + local.set $13 local.get $7 - call $~lib/array/Array<~lib/string/String>#push - drop - else - local.get $10 - i32.const 272 - call $~lib/array/Array<~lib/string/String>#push - drop + local.set $15 end + local.get $12 + local.get $11 + i32.sub + local.set $7 local.get $13 + local.get $14 i32.const 1 + i32.shl i32.add - local.tee $13 - local.get $2 - i32.eq - if - local.get $10 - local.set $7 - local.get $1 - call $~lib/rt/pure/__release - local.get $7 - return - end + local.get $0 local.get $11 + i32.const 1 + i32.shl + i32.add + local.get $7 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $14 + local.get $7 + i32.add + local.set $14 + local.get $13 + local.get $14 + i32.const 1 + i32.shl + i32.add + local.get $2 + local.get $6 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $14 local.get $6 i32.add - local.set $12 - br $while-continue|1 + local.set $14 + local.get $12 + local.get $4 + i32.add + local.set $11 + br $while-continue|2 end end - local.get $12 - i32.eqz + local.get $14 if - local.get $10 - local.get $0 - call $~lib/array/Array<~lib/string/String>#push - drop - local.get $10 - local.set $3 + local.get $14 + local.get $15 + i32.gt_u + if + local.get $15 + i32.const 1 + i32.shl + local.set $5 + local.get $13 + local.get $5 + i32.const 1 + i32.shl + call $~lib/rt/tlsf/__realloc + local.set $13 + local.get $5 + local.set $15 + end + local.get $3 + local.get $11 + i32.sub + local.set $5 + local.get $5 + if + local.get $13 + local.get $14 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $11 + i32.const 1 + i32.shl + i32.add + local.get $5 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + end + local.get $5 + local.get $14 + i32.add + local.set $5 + local.get $15 + local.get $5 + i32.gt_u + if + local.get $13 + local.get $5 + i32.const 1 + i32.shl + call $~lib/rt/tlsf/__realloc + local.set $13 + end + local.get $13 + call $~lib/rt/pure/__retain + local.set $8 local.get $1 call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $8 + return + end + local.get $0 + call $~lib/rt/pure/__retain + local.set $5 + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $5 + ) + (func $~lib/string/String#slice (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 $0 + call $~lib/string/String#get:length + 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 $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + else + local.get $1 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + 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 - return + i32.add + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + else + local.get $2 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select end - local.get $5 - local.get $12 + local.set $2 + local.get $2 + local.get $1 i32.sub - local.set $14 - local.get $14 + local.set $3 + local.get $3 i32.const 0 - i32.gt_s + i32.le_s if - local.get $14 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.set $3 - local.get $3 - local.get $0 - local.get $12 - i32.const 1 - i32.shl - i32.add - local.get $14 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $10 - local.get $3 - call $~lib/array/Array<~lib/string/String>#push - drop - else - local.get $10 i32.const 272 - call $~lib/array/Array<~lib/string/String>#push - drop + call $~lib/rt/pure/__retain + return end - local.get $10 - local.set $3 - local.get $1 - call $~lib/rt/pure/__release local.get $3 - ) - (func $~lib/array/Array<~lib/string/String>#get:length (param $0 i32) (result i32) - local.get $0 - i32.load offset=12 - ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_get (param $0 i32) (param $1 i32) (result i32) + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.set $6 + local.get $6 local.get $0 - i32.load offset=4 local.get $1 - i32.const 2 + i32.const 1 i32.shl i32.add - i32.load + local.get $3 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $6 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array<~lib/string/String>#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/string/String#substr (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) local.get $1 + local.set $3 + local.get $2 + local.set $4 local.get $0 - i32.load offset=12 - i32.ge_u + call $~lib/string/String#get:length + local.set $5 + local.get $3 + i32.const 0 + i32.lt_s if - i32.const 12176 - i32.const 12128 - i32.const 104 - i32.const 42 - call $~lib/builtins/abort - unreachable + local.get $5 + local.get $3 + i32.add + local.tee $6 + i32.const 0 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $3 + end + local.get $4 + local.tee $6 + i32.const 0 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.tee $6 + local.get $5 + local.get $3 + i32.sub + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + i32.const 1 + i32.shl + local.set $8 + local.get $8 + i32.const 0 + i32.le_s + if + i32.const 272 + call $~lib/rt/pure/__retain + return end + local.get $8 + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.set $9 + local.get $9 local.get $0 - local.get $1 - call $~lib/array/Array<~lib/string/String>#__unchecked_get - local.set $2 + local.get $3 i32.const 1 - drop + i32.shl + i32.add + local.get $8 + call $~lib/memory/memory.copy + local.get $9 + call $~lib/rt/pure/__retain + ) + (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $11 i32) + local.get $0 + call $~lib/string/String#get:length + local.set $3 + local.get $1 + local.tee $4 i32.const 0 - i32.eqz - drop + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + local.set $6 local.get $2 + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + local.set $7 + local.get $6 + local.tee $4 + local.get $7 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + i32.const 1 + i32.shl + local.set $8 + local.get $6 + local.tee $4 + local.get $7 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + i32.const 1 + i32.shl + local.set $9 + local.get $9 + local.get $8 + i32.sub + local.set $10 + local.get $10 i32.eqz if - local.get $2 - call $~lib/rt/pure/__release - i32.const 12240 - i32.const 12128 - i32.const 108 - i32.const 40 - call $~lib/builtins/abort - unreachable + i32.const 272 + call $~lib/rt/pure/__retain + return + end + local.get $8 + i32.eqz + if (result i32) + local.get $9 + local.get $3 + i32.const 1 + i32.shl + i32.eq + else + i32.const 0 end - local.get $2 - ) - (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) - local.get $0 - i32.const 100000 - i32.lt_u if local.get $0 - i32.const 100 - i32.lt_u - if - i32.const 1 - local.get $0 - i32.const 10 - i32.ge_u - i32.add - return - else - i32.const 3 - local.get $0 - i32.const 10000 - i32.ge_u - i32.add - local.get $0 - i32.const 1000 - i32.ge_u - i32.add - return - end - unreachable - else - local.get $0 - i32.const 10000000 - i32.lt_u - if - i32.const 6 - local.get $0 - i32.const 1000000 - i32.ge_u - i32.add - return - else - i32.const 8 - local.get $0 - i32.const 1000000000 - i32.ge_u - i32.add - local.get $0 - i32.const 100000000 - i32.ge_u - i32.add - return - end - unreachable + call $~lib/rt/pure/__retain + return end - unreachable + local.get $10 + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.set $11 + local.get $11 + local.get $0 + local.get $8 + i32.add + local.get $10 + call $~lib/memory/memory.copy + local.get $11 + call $~lib/rt/pure/__retain ) - (func $~lib/util/number/utoa32_lut (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/__allocBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i32) - loop $while-continue|0 - local.get $1 - i32.const 10000 - i32.ge_u - local.set $3 - local.get $3 - if - local.get $1 - i32.const 10000 - i32.div_u - local.set $4 - local.get $1 - i32.const 10000 - i32.rem_u - local.set $5 - local.get $4 - local.set $1 - local.get $5 - i32.const 100 - i32.div_u - local.set $6 - local.get $5 - i32.const 100 - i32.rem_u - local.set $7 - i32.const 12524 - local.get $6 - i32.const 2 - i32.shl - i32.add - i64.load32_u - local.set $8 - i32.const 12524 - local.get $7 - i32.const 2 - i32.shl - i32.add - i64.load32_u - local.set $9 - local.get $2 - i32.const 4 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - local.get $8 - local.get $9 - i64.const 32 - i64.shl - i64.or - i64.store - br $while-continue|0 - end - end + local.get $0 local.get $1 - i32.const 100 - i32.ge_u + call $~lib/rt/tlsf/__alloc + local.set $3 + local.get $2 if - local.get $1 - i32.const 100 - i32.div_u - local.set $3 - local.get $1 - i32.const 100 - i32.rem_u - local.set $10 local.get $3 - local.set $1 local.get $2 - i32.const 2 - i32.sub - local.set $2 - i32.const 12524 - local.get $10 - i32.const 2 - i32.shl - i32.add - i32.load - local.set $11 local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - local.get $11 - i32.store + call $~lib/memory/memory.copy end + local.get $3 + ) + (func $~lib/rt/__allocArray (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 16 + local.get $2 + call $~lib/rt/tlsf/__alloc + local.set $4 + local.get $0 local.get $1 - i32.const 10 - i32.ge_u - if - local.get $2 - i32.const 2 - i32.sub - local.set $2 - i32.const 12524 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - local.set $11 - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - local.get $11 - i32.store - else - local.get $2 - i32.const 1 - i32.sub - local.set $2 - i32.const 48 - local.get $1 - i32.add - local.set $11 - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - local.get $11 - i32.store16 - end + i32.shl + local.set $5 + local.get $5 + i32.const 0 + local.get $3 + call $~lib/rt/__allocBuffer + local.set $6 + local.get $4 + local.get $6 + call $~lib/rt/pure/__retain + i32.store + local.get $4 + local.get $6 + i32.store offset=4 + local.get $4 + local.get $5 + i32.store offset=8 + local.get $4 + local.get $0 + i32.store offset=12 + local.get $4 ) - (func $~lib/util/number/itoa32 (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + (local $6 i64) + (local $7 i32) + i32.const 0 + i32.const 1 + i32.gt_s + drop + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.set $3 local.get $0 - i32.eqz + local.get $1 + i32.store8 + local.get $3 + local.get $1 + i32.store8 offset=3 + local.get $2 + i32.const 2 + i32.le_u if - i32.const 1424 return end local.get $0 - i32.const 31 - i32.shr_u - local.set $1 local.get $1 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end + i32.store8 offset=1 local.get $0 - call $~lib/util/number/decimalCount32 local.get $1 - i32.add - local.set $2 - local.get $2 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.set $3 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=2 local.get $3 - local.set $6 - local.get $0 - local.set $5 - local.get $2 - local.set $4 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $6 - local.get $5 - local.get $4 - call $~lib/util/number/utoa32_lut local.get $1 + i32.store8 offset=1 + local.get $2 + i32.const 6 + i32.le_u if - local.get $3 - i32.const 45 - i32.store16 + return end - local.get $3 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/number/utoa32 (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 - i32.eqz + local.get $1 + i32.store8 offset=3 + local.get $3 + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u if - i32.const 1424 return end + i32.const 0 local.get $0 - call $~lib/util/number/decimalCount32 - local.set $1 - local.get $1 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc + i32.sub + i32.const 3 + i32.and + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub local.set $2 local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul local.set $5 local.get $0 - local.set $4 - local.get $1 + local.get $2 + i32.add + i32.const 28 + i32.sub local.set $3 - i32.const 0 - i32.const 1 - i32.ge_s - drop + local.get $0 local.get $5 - local.get $4 + i32.store local.get $3 - call $~lib/util/number/utoa32_lut + local.get $5 + i32.store offset=24 local.get $2 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/number/decimalCount64High (param $0 i64) (result i32) + i32.const 8 + i32.le_u + if + return + end local.get $0 - i64.const 1000000000000000 - i64.lt_u + local.get $5 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=16 + local.get $3 + local.get $5 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u if - local.get $0 - i64.const 1000000000000 - i64.lt_u - if - i32.const 10 - local.get $0 - i64.const 100000000000 - i64.ge_u - i32.add - local.get $0 - i64.const 10000000000 - i64.ge_u - i32.add - return - else - i32.const 13 - local.get $0 - i64.const 100000000000000 - i64.ge_u - i32.add - local.get $0 - i64.const 10000000000000 - i64.ge_u - i32.add - return - end - unreachable - else - local.get $0 - i64.const 100000000000000000 - i64.lt_u - if - i32.const 16 - local.get $0 - i64.const 10000000000000000 - i64.ge_u - i32.add - return - else - i32.const 18 - local.get $0 - i64.const -8446744073709551616 - i64.ge_u - i32.add - local.get $0 - i64.const 1000000000000000000 - i64.ge_u - i32.add - return - end - unreachable + return end - unreachable - ) - (func $~lib/util/number/utoa64_lut (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i64) - (local $13 i64) - loop $while-continue|0 - local.get $1 - i64.const 100000000 - i64.ge_u - local.set $3 - local.get $3 - if - local.get $1 - i64.const 100000000 - i64.div_u - local.set $4 - local.get $1 - local.get $4 - i64.const 100000000 - i64.mul - i64.sub - i32.wrap_i64 - local.set $5 - local.get $4 - local.set $1 - local.get $5 - i32.const 10000 - i32.div_u - local.set $6 - local.get $5 - i32.const 10000 - i32.rem_u - local.set $7 + local.get $0 + local.get $5 + i32.store offset=12 + local.get $0 + local.get $5 + i32.store offset=16 + local.get $0 + local.get $5 + i32.store offset=20 + local.get $0 + local.get $5 + i32.store offset=24 + local.get $3 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=12 + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $5 + i64.extend_i32_u + local.get $5 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $6 + loop $while-continue|0 + local.get $2 + i32.const 32 + i32.ge_u + local.set $7 + local.get $7 + if + local.get $0 local.get $6 - i32.const 100 - i32.div_u - local.set $8 + i64.store + local.get $0 local.get $6 - i32.const 100 - i32.rem_u - local.set $9 - local.get $7 - i32.const 100 - i32.div_u - local.set $10 - local.get $7 - i32.const 100 - i32.rem_u - local.set $11 - i32.const 12524 - local.get $10 - i32.const 2 - i32.shl - i32.add - i64.load32_u - local.set $12 - i32.const 12524 - local.get $11 - i32.const 2 - i32.shl - i32.add - i64.load32_u - local.set $13 - local.get $2 - i32.const 4 - i32.sub - local.set $2 + i64.store offset=8 local.get $0 + local.get $6 + i64.store offset=16 + local.get $0 + local.get $6 + i64.store offset=24 local.get $2 - i32.const 1 - i32.shl - i32.add - local.get $12 - local.get $13 - i64.const 32 - i64.shl - i64.or - i64.store - i32.const 12524 - local.get $8 - i32.const 2 - i32.shl - i32.add - i64.load32_u - local.set $12 - i32.const 12524 - local.get $9 - i32.const 2 - i32.shl - i32.add - i64.load32_u - local.set $13 - local.get $2 - i32.const 4 + i32.const 32 i32.sub local.set $2 local.get $0 - local.get $2 - i32.const 1 - i32.shl + i32.const 32 i32.add - local.get $12 - local.get $13 - i64.const 32 - i64.shl - i64.or - i64.store + local.set $0 br $while-continue|0 end end - local.get $0 - local.get $1 - i32.wrap_i64 - local.get $2 - call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/utoa64 (param $0 i64) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i64) - local.get $0 - i64.const 0 - i64.ne - i32.eqz - if - i32.const 1424 - return - end + (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 - global.get $~lib/builtins/u32.MAX_VALUE - i64.extend_i32_u - i64.le_u - if - local.get $0 - i32.wrap_i64 - local.set $2 - local.get $2 - call $~lib/util/number/decimalCount32 - local.set $3 - local.get $3 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $1 - local.set $6 - local.get $2 - local.set $5 - local.get $3 - local.set $4 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $6 - local.get $5 - local.get $4 - call $~lib/util/number/utoa32_lut - else - local.get $0 - call $~lib/util/number/decimalCount64High - local.set $3 - local.get $3 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $1 - local.set $5 - local.get $0 - local.set $7 - local.get $3 - local.set $4 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $5 - local.get $7 - local.get $4 - call $~lib/util/number/utoa64_lut - end local.get $1 - call $~lib/rt/pure/__retain + local.get $2 + call $~lib/util/memory/memset ) - (func $~lib/util/number/itoa64 (param $0 i64) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/array/ensureSize (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 $8 i64) local.get $0 - i64.const 0 - i64.ne - i32.eqz - if - i32.const 1424 - return - end - local.get $0 - i64.const 63 - i64.shr_u - i32.wrap_i64 - local.set $1 + i32.load offset=8 + local.set $3 local.get $1 + local.get $3 + local.get $2 + i32.shr_u + i32.gt_u if - i64.const 0 - local.get $0 - i64.sub - local.set $0 - end - local.get $0 - global.get $~lib/builtins/u32.MAX_VALUE - i64.extend_i32_u - i64.le_u - if - local.get $0 - i32.wrap_i64 - local.set $3 - local.get $3 - call $~lib/util/number/decimalCount32 local.get $1 - i32.add - local.set $4 - local.get $4 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.set $2 + i32.const 1073741808 local.get $2 - local.set $7 - local.get $3 - local.set $6 - local.get $4 - local.set $5 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $7 - local.get $6 - local.get $5 - call $~lib/util/number/utoa32_lut - else + i32.shr_u + i32.gt_u + if + i32.const 10864 + i32.const 12128 + i32.const 14 + i32.const 48 + call $~lib/builtins/abort + unreachable + end local.get $0 - call $~lib/util/number/decimalCount64High - local.get $1 - i32.add + i32.load local.set $4 - local.get $4 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.set $2 + local.get $1 local.get $2 - local.set $6 - local.get $0 - local.set $8 - local.get $4 + i32.shl local.set $5 + local.get $4 + local.get $5 + call $~lib/rt/tlsf/__realloc + local.set $6 + local.get $6 + local.get $3 + i32.add i32.const 0 - i32.const 1 - i32.ge_s - drop + local.get $5 + local.get $3 + i32.sub + call $~lib/memory/memory.fill local.get $6 - local.get $8 + local.get $4 + i32.ne + if + local.get $0 + local.get $6 + i32.store + local.get $0 + local.get $6 + i32.store offset=4 + end + local.get $0 local.get $5 - call $~lib/util/number/utoa64_lut - end - local.get $1 - if - local.get $2 - i32.const 45 - i32.store16 + i32.store offset=8 end - local.get $2 - call $~lib/rt/pure/__retain ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i64) - (local $11 i32) - (local $12 i32) - (local $13 i64) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i32) - (local $25 i32) - (local $26 i32) - (local $27 i32) - (local $28 i64) - i32.const 0 - local.get $4 - i32.sub - local.set $7 - i64.const 1 - local.get $7 - i64.extend_i32_s - i64.shl - local.set $8 - local.get $8 - i64.const 1 - i64.sub - local.set $9 - local.get $3 - local.get $1 - i64.sub - local.set $10 - local.get $4 - local.set $11 - local.get $3 - local.get $7 - i64.extend_i32_s - i64.shr_u - i32.wrap_i64 - local.set $12 - local.get $3 - local.get $9 - i64.and - local.set $13 - local.get $12 - call $~lib/util/number/decimalCount32 - local.set $14 - local.get $6 - local.set $15 - loop $while-continue|0 - local.get $14 - i32.const 0 - i32.gt_s - local.set $16 - local.get $16 - if - block $break|1 - block $case10|1 - block $case9|1 - block $case8|1 - block $case7|1 - block $case6|1 - block $case5|1 - block $case4|1 - block $case3|1 - block $case2|1 - block $case1|1 - block $case0|1 - local.get $14 - local.set $18 - local.get $18 - i32.const 10 - i32.eq - br_if $case0|1 - local.get $18 - i32.const 9 - i32.eq - br_if $case1|1 - local.get $18 - i32.const 8 - i32.eq - br_if $case2|1 - local.get $18 - i32.const 7 - i32.eq - br_if $case3|1 - local.get $18 - i32.const 6 - i32.eq - br_if $case4|1 - local.get $18 - i32.const 5 - i32.eq - br_if $case5|1 - local.get $18 - i32.const 4 - i32.eq - br_if $case6|1 - local.get $18 - i32.const 3 - i32.eq - br_if $case7|1 - local.get $18 - i32.const 2 - i32.eq - br_if $case8|1 - local.get $18 - i32.const 1 - i32.eq - br_if $case9|1 - br $case10|1 - end - local.get $12 - i32.const 1000000000 - i32.div_u - local.set $17 - local.get $12 - i32.const 1000000000 - i32.rem_u - local.set $12 - br $break|1 - end - local.get $12 - i32.const 100000000 - i32.div_u - local.set $17 - local.get $12 - i32.const 100000000 - i32.rem_u - local.set $12 - br $break|1 - end - local.get $12 - i32.const 10000000 - i32.div_u - local.set $17 - local.get $12 - i32.const 10000000 - i32.rem_u - local.set $12 - br $break|1 - end - local.get $12 - i32.const 1000000 - i32.div_u - local.set $17 - local.get $12 - i32.const 1000000 - i32.rem_u - local.set $12 - br $break|1 - end - local.get $12 - i32.const 100000 - i32.div_u - local.set $17 - local.get $12 - i32.const 100000 - i32.rem_u - local.set $12 - br $break|1 - end - local.get $12 - i32.const 10000 - i32.div_u - local.set $17 - local.get $12 - i32.const 10000 - i32.rem_u - local.set $12 - br $break|1 - end - local.get $12 - i32.const 1000 - i32.div_u - local.set $17 - local.get $12 - i32.const 1000 - i32.rem_u - local.set $12 - br $break|1 - end - local.get $12 - i32.const 100 - i32.div_u - local.set $17 - local.get $12 - i32.const 100 - i32.rem_u - local.set $12 - br $break|1 - end - local.get $12 - i32.const 10 - i32.div_u - local.set $17 - local.get $12 - i32.const 10 - i32.rem_u - local.set $12 - br $break|1 - end - local.get $12 - local.set $17 - i32.const 0 - local.set $12 - br $break|1 - end - i32.const 0 - local.set $17 - br $break|1 - end - local.get $17 - local.get $15 - i32.or + (func $~lib/array/Array<~lib/string/String>#push (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + i32.load offset=12 + local.set $2 + local.get $2 + i32.const 1 + i32.add + local.set $3 + local.get $0 + local.get $3 + i32.const 2 + call $~lib/array/ensureSize + i32.const 1 + drop + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.get $1 + call $~lib/rt/pure/__retain + i32.store + local.get $0 + local.get $3 + i32.store offset=12 + local.get $3 + local.set $4 + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/string/String#split (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 2 + i32.const 3 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $3 + local.get $1 + call $~lib/rt/pure/__release + local.get $3 + return + end + local.get $1 + i32.const 0 + i32.eq + if + i32.const 1 + i32.const 2 + i32.const 3 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $3 + local.get $3 + i32.load offset=4 + local.set $4 + local.get $4 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.set $4 + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + return + end + local.get $0 + call $~lib/string/String#get:length + local.set $5 + local.get $1 + call $~lib/string/String#get:length + local.set $6 + local.get $2 + i32.const 0 + i32.lt_s + if + global.get $~lib/builtins/i32.MAX_VALUE + local.set $2 + end + local.get $6 + i32.eqz + if + local.get $5 + i32.eqz + if + i32.const 0 + i32.const 2 + i32.const 3 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $4 + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + return + end + local.get $5 + local.tee $4 + local.get $2 + local.tee $3 + local.get $4 + local.get $3 + i32.lt_s + select + local.set $5 + local.get $5 + i32.const 2 + i32.const 3 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $4 + local.get $4 + i32.load offset=4 + local.set $3 + i32.const 0 + local.set $7 + loop $for-loop|0 + local.get $7 + local.get $5 + i32.lt_s + local.set $8 + local.get $8 if + i32.const 2 + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.set $9 + local.get $9 local.get $0 - local.get $15 - local.tee $18 + local.get $7 i32.const 1 + i32.shl i32.add - local.set $15 - local.get $18 - i32.const 1 + i32.load16_u + i32.store16 + local.get $3 + local.get $7 + i32.const 2 i32.shl i32.add - i32.const 48 - local.get $17 - i32.const 65535 - i32.and + local.get $9 + i32.store + i32.const 1 + drop + local.get $9 + call $~lib/rt/pure/__retain + drop + local.get $7 + i32.const 1 i32.add - i32.store16 + local.set $7 + br $for-loop|0 end - local.get $14 + end + local.get $4 + local.set $7 + local.get $1 + call $~lib/rt/pure/__release + local.get $7 + return + else + local.get $5 + i32.eqz + if i32.const 1 - i32.sub - local.set $14 + i32.const 2 + i32.const 3 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $3 + local.get $3 + i32.load offset=4 + i32.const 272 + i32.store + local.get $3 + local.set $4 + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + return + end + end + i32.const 0 + i32.const 2 + i32.const 3 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $10 + i32.const 0 + local.set $11 + i32.const 0 + local.set $12 + i32.const 0 + local.set $13 + loop $while-continue|1 + local.get $0 + local.get $1 + local.get $12 + call $~lib/string/String#indexOf + local.tee $11 + i32.const -1 + i32.xor + local.set $3 + local.get $3 + if + local.get $11 local.get $12 - i64.extend_i32_u - local.get $7 - i64.extend_i32_s - i64.shl - local.get $13 - i64.add - local.set $19 - local.get $19 - local.get $5 - i64.le_u + i32.sub + local.set $4 + local.get $4 + i32.const 0 + i32.gt_s if - global.get $~lib/util/number/_K - local.get $14 - i32.add - global.set $~lib/util/number/_K - local.get $0 - local.set $24 - local.get $15 - local.set $18 - local.get $5 - local.set $23 - local.get $19 - local.set $22 - i32.const 15592 - local.get $14 - i32.const 2 + local.get $4 + i32.const 1 i32.shl - i32.add - i64.load32_u - local.get $7 - i64.extend_i32_s - i64.shl - local.set $21 - local.get $10 - local.set $20 - local.get $24 - local.get $18 i32.const 1 - i32.sub + call $~lib/rt/tlsf/__alloc + local.set $7 + local.get $7 + local.get $0 + local.get $12 i32.const 1 i32.shl i32.add - local.set $25 - local.get $25 - i32.load16_u - local.set $26 - loop $while-continue|3 - local.get $22 - local.get $20 - i64.lt_u - if (result i32) - local.get $23 - local.get $22 - i64.sub - local.get $21 - i64.ge_u - else - i32.const 0 - end - if (result i32) - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.lt_u - if (result i32) - i32.const 1 - else - local.get $20 - local.get $22 - i64.sub - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.sub - i64.gt_u - end - else - i32.const 0 - end - local.set $27 - local.get $27 - if - local.get $26 - i32.const 1 - i32.sub - local.set $26 - local.get $22 - local.get $21 - i64.add - local.set $22 - br $while-continue|3 - end - end - local.get $25 - local.get $26 - i32.store16 - local.get $15 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $10 + local.get $7 + call $~lib/array/Array<~lib/string/String>#push + drop + else + local.get $10 + i32.const 272 + call $~lib/array/Array<~lib/string/String>#push + drop + end + local.get $13 + i32.const 1 + i32.add + local.tee $13 + local.get $2 + i32.eq + if + local.get $10 + local.set $7 + local.get $1 + call $~lib/rt/pure/__release + local.get $7 return end + local.get $11 + local.get $6 + i32.add + local.set $12 + br $while-continue|1 + end + end + local.get $12 + i32.eqz + if + local.get $10 + local.get $0 + call $~lib/array/Array<~lib/string/String>#push + drop + local.get $10 + local.set $3 + local.get $1 + call $~lib/rt/pure/__release + local.get $3 + return + end + local.get $5 + local.get $12 + i32.sub + local.set $14 + local.get $14 + i32.const 0 + i32.gt_s + if + local.get $14 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.set $3 + local.get $3 + local.get $0 + local.get $12 + i32.const 1 + i32.shl + i32.add + local.get $14 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $10 + local.get $3 + call $~lib/array/Array<~lib/string/String>#push + drop + else + local.get $10 + i32.const 272 + call $~lib/array/Array<~lib/string/String>#push + drop + end + local.get $10 + local.set $3 + local.get $1 + call $~lib/rt/pure/__release + local.get $3 + ) + (func $~lib/array/Array<~lib/string/String>#get:length (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $~lib/array/Array<~lib/string/String>#__unchecked_get (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + call $~lib/rt/pure/__retain + ) + (func $~lib/array/Array<~lib/string/String>#__get (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 12176 + i32.const 12128 + i32.const 104 + i32.const 42 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/string/String>#__unchecked_get + local.set $2 + i32.const 1 + drop + i32.const 0 + i32.eqz + drop + local.get $2 + i32.eqz + if + local.get $2 + call $~lib/rt/pure/__release + i32.const 12240 + i32.const 12128 + i32.const 108 + i32.const 40 + call $~lib/builtins/abort + unreachable + end + local.get $2 + ) + (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) + local.get $0 + i32.const 100000 + i32.lt_u + if + local.get $0 + i32.const 100 + i32.lt_u + if + i32.const 1 + local.get $0 + i32.const 10 + i32.ge_u + i32.add + return + else + i32.const 3 + local.get $0 + i32.const 10000 + i32.ge_u + i32.add + local.get $0 + i32.const 1000 + i32.ge_u + i32.add + return + end + unreachable + else + local.get $0 + i32.const 10000000 + i32.lt_u + if + i32.const 6 + local.get $0 + i32.const 1000000 + i32.ge_u + i32.add + return + else + i32.const 8 + local.get $0 + i32.const 1000000000 + i32.ge_u + i32.add + local.get $0 + i32.const 100000000 + i32.ge_u + i32.add + return + end + unreachable + end + unreachable + ) + (func $~lib/util/number/utoa32_lut (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 $8 i64) + (local $9 i64) + (local $10 i32) + (local $11 i32) + loop $while-continue|0 + local.get $1 + i32.const 10000 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $1 + i32.const 10000 + i32.div_u + local.set $4 + local.get $1 + i32.const 10000 + i32.rem_u + local.set $5 + local.get $4 + local.set $1 + local.get $5 + i32.const 100 + i32.div_u + local.set $6 + local.get $5 + i32.const 100 + i32.rem_u + local.set $7 + i32.const 12524 + local.get $6 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $8 + i32.const 12524 + local.get $7 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $9 + local.get $2 + i32.const 4 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + local.get $8 + local.get $9 + i64.const 32 + i64.shl + i64.or + i64.store br $while-continue|0 end end - loop $while-continue|4 + local.get $1 + i32.const 100 + i32.ge_u + if + local.get $1 + i32.const 100 + i32.div_u + local.set $3 + local.get $1 + i32.const 100 + i32.rem_u + local.set $10 + local.get $3 + local.set $1 + local.get $2 + i32.const 2 + i32.sub + local.set $2 + i32.const 12524 + local.get $10 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $11 + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + local.get $11 + i32.store + end + local.get $1 + i32.const 10 + i32.ge_u + if + local.get $2 + i32.const 2 + i32.sub + local.set $2 + i32.const 12524 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $11 + local.get $0 + local.get $2 i32.const 1 - local.set $16 - local.get $16 + i32.shl + i32.add + local.get $11 + i32.store + else + local.get $2 + i32.const 1 + i32.sub + local.set $2 + i32.const 48 + local.get $1 + i32.add + local.set $11 + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + local.get $11 + i32.store16 + end + ) + (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 0 + i32.const 1 + i32.ge_s + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa32_lut + ) + (func $~lib/util/number/itoa32 (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.eqz + if + i32.const 1424 + return + end + local.get $0 + i32.const 31 + i32.shr_u + local.set $1 + local.get $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 + i32.add + local.set $2 + local.get $2 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.set $3 + local.get $3 + local.get $0 + local.get $2 + call $~lib/util/number/utoa32_core + local.get $1 + if + local.get $3 + i32.const 45 + i32.store16 + end + local.get $3 + call $~lib/rt/pure/__retain + ) + (func $~lib/util/number/utoa32 (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.eqz + if + i32.const 1424 + return + end + local.get $0 + call $~lib/util/number/decimalCount32 + local.set $1 + local.get $1 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.set $2 + local.get $2 + local.get $0 + local.get $1 + call $~lib/util/number/utoa32_core + local.get $2 + call $~lib/rt/pure/__retain + ) + (func $~lib/util/number/decimalCount64High (param $0 i64) (result i32) + local.get $0 + i64.const 1000000000000000 + i64.lt_u + if + local.get $0 + i64.const 1000000000000 + i64.lt_u + if + i32.const 10 + local.get $0 + i64.const 100000000000 + i64.ge_u + i32.add + local.get $0 + i64.const 10000000000 + i64.ge_u + i32.add + return + else + i32.const 13 + local.get $0 + i64.const 100000000000000 + i64.ge_u + i32.add + local.get $0 + i64.const 10000000000000 + i64.ge_u + i32.add + return + end + unreachable + else + local.get $0 + i64.const 100000000000000000 + i64.lt_u + if + i32.const 16 + local.get $0 + i64.const 10000000000000000 + i64.ge_u + i32.add + return + else + i32.const 18 + local.get $0 + i64.const -8446744073709551616 + i64.ge_u + i32.add + local.get $0 + i64.const 1000000000000000000 + i64.ge_u + i32.add + return + end + unreachable + end + unreachable + ) + (func $~lib/util/number/utoa64_lut (param $0 i32) (param $1 i64) (param $2 i32) + (local $3 i32) + (local $4 i64) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i64) + (local $13 i64) + loop $while-continue|0 + local.get $1 + i64.const 100000000 + i64.ge_u + local.set $3 + local.get $3 if - local.get $13 - i64.const 10 - i64.mul - local.set $13 - local.get $5 - i64.const 10 + local.get $1 + i64.const 100000000 + i64.div_u + local.set $4 + local.get $1 + local.get $4 + i64.const 100000000 i64.mul + i64.sub + i32.wrap_i64 local.set $5 - local.get $13 + local.get $4 + local.set $1 + local.get $5 + i32.const 10000 + i32.div_u + local.set $6 + local.get $5 + i32.const 10000 + i32.rem_u + local.set $7 + local.get $6 + i32.const 100 + i32.div_u + local.set $8 + local.get $6 + i32.const 100 + i32.rem_u + local.set $9 local.get $7 - i64.extend_i32_s - i64.shr_u - local.set $23 - local.get $23 - local.get $15 - i64.extend_i32_s - i64.or - i64.const 0 - i64.ne - if - local.get $0 - local.get $15 - local.tee $26 - i32.const 1 - i32.add - local.set $15 - local.get $26 - i32.const 1 - i32.shl - i32.add - i32.const 48 - local.get $23 - i32.wrap_i64 - i32.const 65535 - i32.and - i32.add - i32.store16 - end + i32.const 100 + i32.div_u + local.set $10 + local.get $7 + i32.const 100 + i32.rem_u + local.set $11 + i32.const 12524 + local.get $10 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $12 + i32.const 12524 + local.get $11 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $13 + local.get $2 + i32.const 4 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + local.get $12 local.get $13 + i64.const 32 + i64.shl + i64.or + i64.store + i32.const 12524 + local.get $8 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $12 + i32.const 12524 local.get $9 - i64.and + i32.const 2 + i32.shl + i32.add + i64.load32_u local.set $13 - local.get $14 - i32.const 1 + local.get $2 + i32.const 4 i32.sub - local.set $14 + local.set $2 + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + local.get $12 local.get $13 - local.get $5 - i64.lt_u - if - global.get $~lib/util/number/_K - local.get $14 - i32.add - global.set $~lib/util/number/_K - local.get $10 - i32.const 15592 - i32.const 0 - local.get $14 - i32.sub - i32.const 2 - i32.shl - i32.add - i64.load32_u - i64.mul - local.set $10 - local.get $0 - local.set $18 - local.get $15 - local.set $27 - local.get $5 - local.set $28 - local.get $13 - local.set $22 - local.get $8 - local.set $21 - local.get $10 - local.set $20 - local.get $18 - local.get $27 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.set $26 - local.get $26 - i32.load16_u - local.set $25 - loop $while-continue|6 - local.get $22 - local.get $20 - i64.lt_u - if (result i32) - local.get $28 - local.get $22 - i64.sub - local.get $21 - i64.ge_u - else - i32.const 0 - end - if (result i32) - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.lt_u - if (result i32) - i32.const 1 - else - local.get $20 - local.get $22 - i64.sub - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.sub - i64.gt_u - end - else - i32.const 0 - end - local.set $24 - local.get $24 - if - local.get $25 - i32.const 1 - i32.sub - local.set $25 - local.get $22 - local.get $21 - i64.add - local.set $22 - br $while-continue|6 - end - end - local.get $26 - local.get $25 - i32.store16 - local.get $15 - return - end - br $while-continue|4 + i64.const 32 + i64.shl + i64.or + i64.store + br $while-continue|0 end end - unreachable + local.get $0 + local.get $1 + i32.wrap_i64 + local.get $2 + call $~lib/util/number/utoa32_lut ) - (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/utoa64_core (param $0 i32) (param $1 i64) (param $2 i32) + i32.const 0 + i32.const 1 + i32.ge_s + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa64_lut + ) + (func $~lib/util/number/utoa64 (param $0 i64) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i64.const 0 + i64.ne + i32.eqz + if + i32.const 1424 + return + end + local.get $0 + global.get $~lib/builtins/u32.MAX_VALUE + i64.extend_i32_u + i64.le_u + if + local.get $0 + i32.wrap_i64 + local.set $2 + local.get $2 + call $~lib/util/number/decimalCount32 + local.set $3 + local.get $3 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.set $1 + local.get $1 + local.get $2 + local.get $3 + call $~lib/util/number/utoa32_core + else + local.get $0 + call $~lib/util/number/decimalCount64High + local.set $3 + local.get $3 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.set $1 + local.get $1 + local.get $0 + local.get $3 + call $~lib/util/number/utoa64_core + end + local.get $1 + call $~lib/rt/pure/__retain + ) + (func $~lib/util/number/itoa64 (param $0 i64) (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 $10 i32) - (local $11 i32) - local.get $2 + local.get $0 + i64.const 0 + i64.ne i32.eqz + if + i32.const 1424 + return + end + local.get $0 + i64.const 63 + i64.shr_u + i32.wrap_i64 + local.set $1 + local.get $1 + if + i64.const 0 + local.get $0 + i64.sub + local.set $0 + end + local.get $0 + global.get $~lib/builtins/u32.MAX_VALUE + i64.extend_i32_u + i64.le_u if local.get $0 + i32.wrap_i64 + local.set $3 + local.get $3 + call $~lib/util/number/decimalCount32 local.get $1 - i32.const 1 - i32.shl i32.add - i32.const 46 - i32.const 48 - i32.const 16 + local.set $4 + local.get $4 + i32.const 1 i32.shl - i32.or - i32.store + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.set $2 + local.get $2 + local.get $3 + local.get $4 + call $~lib/util/number/utoa32_core + else + local.get $0 + call $~lib/util/number/decimalCount64High local.get $1 - i32.const 2 i32.add - return + local.set $4 + local.get $4 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.set $2 + local.get $2 + local.get $0 + local.get $4 + call $~lib/util/number/utoa64_core + end + local.get $1 + if + local.get $2 + i32.const 45 + i32.store16 end + local.get $2 + call $~lib/rt/pure/__retain + ) + (func $~lib/util/number/normalizedBoundaries (param $0 i64) (param $1 i32) + (local $2 i64) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i64.const 1 + i64.shl + i64.const 1 + i64.add + local.set $2 + local.get $1 + i32.const 1 + i32.sub + local.set $3 + local.get $2 + i64.clz + i32.wrap_i64 + local.set $4 + local.get $2 + local.get $4 + i64.extend_i32_s + i64.shl + local.set $2 + local.get $3 + local.get $4 + i32.sub + local.set $3 + i32.const 1 + local.get $0 + i64.const 4503599627370496 + i64.eq + i32.add + local.set $5 + local.get $2 + global.set $~lib/util/number/_frc_plus + local.get $0 + local.get $5 + i64.extend_i32_s + i64.shl + i64.const 1 + i64.sub + local.get $1 + local.get $5 + i32.sub + local.get $3 + i32.sub + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_minus + local.get $3 + global.set $~lib/util/number/_exp + ) + (func $~lib/util/number/getCachedPower (param $0 i32) + (local $1 f64) + (local $2 i32) + (local $3 i32) + i32.const -61 + local.get $0 + i32.sub + f64.convert_i32_s + f64.const 0.30102999566398114 + f64.mul + f64.const 347 + f64.add + local.set $1 + local.get $1 + i32.trunc_f64_s + local.set $2 + local.get $2 + local.get $2 + f64.convert_i32_s local.get $1 + f64.ne + i32.add + local.set $2 local.get $2 + i32.const 3 + i32.shr_s + i32.const 1 + i32.add + local.set $3 + i32.const 348 + local.get $3 + i32.const 3 + i32.shl + i32.sub + global.set $~lib/util/number/_K + i32.const 14720 + local.get $3 + i32.const 3 + i32.shl + i32.add + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 15416 + local.get $3 + i32.const 1 + i32.shl i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow + ) + (func $~lib/util/number/umul64f (param $0 i64) (param $1 i64) (result i64) + (local $2 i64) + (local $3 i64) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i64) + (local $8 i64) + local.get $0 + i64.const 4294967295 + i64.and + local.set $2 + local.get $1 + i64.const 4294967295 + i64.and local.set $3 + local.get $0 + i64.const 32 + i64.shr_u + local.set $4 local.get $1 + i64.const 32 + i64.shr_u + local.set $5 + local.get $2 local.get $3 - i32.le_s - if (result i32) + i64.mul + local.set $6 + local.get $4 + local.get $3 + i64.mul + local.get $6 + i64.const 32 + i64.shr_u + i64.add + local.set $7 + local.get $2 + local.get $5 + i64.mul + local.get $7 + i64.const 4294967295 + i64.and + i64.add + local.set $8 + local.get $8 + i64.const 2147483647 + i64.add + local.set $8 + local.get $7 + i64.const 32 + i64.shr_u + local.set $7 + local.get $8 + i64.const 32 + i64.shr_u + local.set $8 + local.get $4 + local.get $5 + i64.mul + local.get $7 + i64.add + local.get $8 + i64.add + ) + (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.add + i32.const 64 + i32.add + ) + (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.set $6 + local.get $6 + i32.load16_u + local.set $7 + loop $while-continue|1 local.get $3 - i32.const 21 - i32.le_s - else - i32.const 0 - end - if - local.get $1 - local.set $4 - loop $for-loop|0 + local.get $5 + i64.lt_u + if (result i32) + local.get $2 + local.get $3 + i64.sub local.get $4 + i64.ge_u + else + i32.const 0 + end + if (result i32) local.get $3 - i32.lt_s - local.set $5 + local.get $4 + i64.add local.get $5 - if - local.get $0 - local.get $4 + i64.lt_u + if (result i32) i32.const 1 - i32.shl - i32.add - i32.const 48 - i32.store16 + else + local.get $5 + local.get $3 + i64.sub + local.get $3 local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 + i64.add + local.get $5 + i64.sub + i64.gt_u end - end - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.const 46 - i32.const 48 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $3 - i32.const 2 - i32.add - return - else - local.get $3 - i32.const 0 - i32.gt_s - if (result i32) - local.get $3 - i32.const 21 - i32.le_s else i32.const 0 end + local.set $8 + local.get $8 if - local.get $0 - local.get $3 + local.get $7 i32.const 1 - i32.shl - i32.add - local.set $4 - local.get $4 - i32.const 2 - i32.add - local.get $4 - i32.const 0 - local.get $2 i32.sub - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.const 46 - i32.store16 - local.get $1 - i32.const 1 - i32.add - return - else - i32.const -6 + local.set $7 local.get $3 - i32.lt_s - if (result i32) - local.get $3 - i32.const 0 - i32.le_s - else + local.get $4 + i64.add + local.set $3 + br $while-continue|1 + end + end + local.get $6 + local.get $7 + i32.store16 + ) + (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (local $7 i32) + (local $8 i64) + (local $9 i64) + (local $10 i64) + (local $11 i32) + (local $12 i32) + (local $13 i64) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local $19 i64) + (local $20 i64) + i32.const 0 + local.get $4 + i32.sub + local.set $7 + i64.const 1 + local.get $7 + i64.extend_i32_s + i64.shl + local.set $8 + local.get $8 + i64.const 1 + i64.sub + local.set $9 + local.get $3 + local.get $1 + i64.sub + local.set $10 + local.get $4 + local.set $11 + local.get $3 + local.get $7 + i64.extend_i32_s + i64.shr_u + i32.wrap_i64 + local.set $12 + local.get $3 + local.get $9 + i64.and + local.set $13 + local.get $12 + call $~lib/util/number/decimalCount32 + local.set $14 + local.get $6 + local.set $15 + loop $while-continue|0 + local.get $14 + i32.const 0 + i32.gt_s + local.set $16 + local.get $16 + if + block $break|1 + block $case10|1 + block $case9|1 + block $case8|1 + block $case7|1 + block $case6|1 + block $case5|1 + block $case4|1 + block $case3|1 + block $case2|1 + block $case1|1 + block $case0|1 + local.get $14 + local.set $18 + local.get $18 + i32.const 10 + i32.eq + br_if $case0|1 + local.get $18 + i32.const 9 + i32.eq + br_if $case1|1 + local.get $18 + i32.const 8 + i32.eq + br_if $case2|1 + local.get $18 + i32.const 7 + i32.eq + br_if $case3|1 + local.get $18 + i32.const 6 + i32.eq + br_if $case4|1 + local.get $18 + i32.const 5 + i32.eq + br_if $case5|1 + local.get $18 + i32.const 4 + i32.eq + br_if $case6|1 + local.get $18 + i32.const 3 + i32.eq + br_if $case7|1 + local.get $18 + i32.const 2 + i32.eq + br_if $case8|1 + local.get $18 + i32.const 1 + i32.eq + br_if $case9|1 + br $case10|1 + end + local.get $12 + i32.const 1000000000 + i32.div_u + local.set $17 + local.get $12 + i32.const 1000000000 + i32.rem_u + local.set $12 + br $break|1 + end + local.get $12 + i32.const 100000000 + i32.div_u + local.set $17 + local.get $12 + i32.const 100000000 + i32.rem_u + local.set $12 + br $break|1 + end + local.get $12 + i32.const 10000000 + i32.div_u + local.set $17 + local.get $12 + i32.const 10000000 + i32.rem_u + local.set $12 + br $break|1 + end + local.get $12 + i32.const 1000000 + i32.div_u + local.set $17 + local.get $12 + i32.const 1000000 + i32.rem_u + local.set $12 + br $break|1 + end + local.get $12 + i32.const 100000 + i32.div_u + local.set $17 + local.get $12 + i32.const 100000 + i32.rem_u + local.set $12 + br $break|1 + end + local.get $12 + i32.const 10000 + i32.div_u + local.set $17 + local.get $12 + i32.const 10000 + i32.rem_u + local.set $12 + br $break|1 + end + local.get $12 + i32.const 1000 + i32.div_u + local.set $17 + local.get $12 + i32.const 1000 + i32.rem_u + local.set $12 + br $break|1 + end + local.get $12 + i32.const 100 + i32.div_u + local.set $17 + local.get $12 + i32.const 100 + i32.rem_u + local.set $12 + br $break|1 + end + local.get $12 + i32.const 10 + i32.div_u + local.set $17 + local.get $12 + i32.const 10 + i32.rem_u + local.set $12 + br $break|1 + end + local.get $12 + local.set $17 + i32.const 0 + local.set $12 + br $break|1 + end i32.const 0 + local.set $17 + br $break|1 end + local.get $17 + local.get $15 + i32.or if - i32.const 2 - local.get $3 - i32.sub - local.set $4 local.get $0 - local.get $4 + local.get $15 + local.tee $18 i32.const 1 - i32.shl i32.add - local.get $0 - local.get $1 + local.set $15 + local.get $18 i32.const 1 i32.shl - call $~lib/memory/memory.copy - local.get $0 + i32.add i32.const 48 - i32.const 46 - i32.const 16 - i32.shl - i32.or - i32.store - i32.const 2 - local.set $5 - loop $for-loop|1 - local.get $5 - local.get $4 - i32.lt_s - local.set $6 - local.get $6 - if - local.get $0 - local.get $5 - i32.const 1 - i32.shl - i32.add - i32.const 48 - i32.store16 - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|1 - end - end - local.get $1 - local.get $4 + local.get $17 + i32.const 65535 + i32.and i32.add - return - else - local.get $1 - i32.const 1 - i32.eq - if - local.get $0 - i32.const 101 - i32.store16 offset=2 - local.get $0 - i32.const 4 - i32.add - local.set $5 - local.get $3 - i32.const 1 - i32.sub - local.set $6 - local.get $6 - i32.const 0 - i32.lt_s - local.set $4 - local.get $4 - if - i32.const 0 - local.get $6 - i32.sub - local.set $6 - end - local.get $6 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.set $7 - local.get $5 - local.set $10 - local.get $6 - local.set $9 - local.get $7 - local.set $8 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $10 - local.get $9 - local.get $8 - call $~lib/util/number/utoa32_lut - local.get $5 - i32.const 45 - i32.const 43 - local.get $4 - select - i32.store16 - local.get $7 - local.set $1 - local.get $1 - i32.const 2 - i32.add - return - else - local.get $1 - i32.const 1 - i32.shl - local.set $7 - local.get $0 - i32.const 4 - i32.add - local.get $0 - i32.const 2 - i32.add - local.get $7 - i32.const 2 - i32.sub - call $~lib/memory/memory.copy - local.get $0 - i32.const 46 - i32.store16 offset=2 - local.get $0 - local.get $7 - i32.add - i32.const 101 - i32.store16 offset=2 - local.get $1 - local.get $0 - local.get $7 - i32.add - i32.const 4 - i32.add - local.set $9 - local.get $3 - i32.const 1 - i32.sub - local.set $8 - local.get $8 - i32.const 0 - i32.lt_s - local.set $4 - local.get $4 - if - i32.const 0 - local.get $8 - i32.sub - local.set $8 - end - local.get $8 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.set $5 - local.get $9 - local.set $11 - local.get $8 - local.set $6 - local.get $5 - local.set $10 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $11 - local.get $6 - local.get $10 - call $~lib/util/number/utoa32_lut - local.get $9 - i32.const 45 - i32.const 43 - local.get $4 - select - i32.store16 - local.get $5 - i32.add - local.set $1 - local.get $1 - i32.const 2 - i32.add - return - end - unreachable + i32.store16 + end + local.get $14 + i32.const 1 + i32.sub + local.set $14 + local.get $12 + i64.extend_i32_u + local.get $7 + i64.extend_i32_s + i64.shl + local.get $13 + i64.add + local.set $19 + local.get $19 + local.get $5 + i64.le_u + if + global.get $~lib/util/number/_K + local.get $14 + i32.add + global.set $~lib/util/number/_K + local.get $0 + local.get $15 + local.get $5 + local.get $19 + i32.const 15592 + local.get $14 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.get $7 + i64.extend_i32_s + i64.shl + local.get $10 + call $~lib/util/number/grisuRound + local.get $15 + return end - unreachable + br $while-continue|0 + end + end + loop $while-continue|2 + i32.const 1 + local.set $16 + local.get $16 + if + local.get $13 + i64.const 10 + i64.mul + local.set $13 + local.get $5 + i64.const 10 + i64.mul + local.set $5 + local.get $13 + local.get $7 + i64.extend_i32_s + i64.shr_u + local.set $20 + local.get $20 + local.get $15 + i64.extend_i32_s + i64.or + i64.const 0 + i64.ne + if + local.get $0 + local.get $15 + local.tee $18 + i32.const 1 + i32.add + local.set $15 + local.get $18 + i32.const 1 + i32.shl + i32.add + i32.const 48 + local.get $20 + i32.wrap_i64 + i32.const 65535 + i32.and + i32.add + i32.store16 + end + local.get $13 + local.get $9 + i64.and + local.set $13 + local.get $14 + i32.const 1 + i32.sub + local.set $14 + local.get $13 + local.get $5 + i64.lt_u + if + global.get $~lib/util/number/_K + local.get $14 + i32.add + global.set $~lib/util/number/_K + local.get $10 + i32.const 15592 + i32.const 0 + local.get $14 + i32.sub + i32.const 2 + i32.shl + i32.add + i64.load32_u + i64.mul + local.set $10 + local.get $0 + local.get $15 + local.get $5 + local.get $13 + local.get $8 + local.get $10 + call $~lib/util/number/grisuRound + local.get $15 + return + end + br $while-continue|2 end - unreachable end unreachable ) - (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - (local $3 i32) + (func $~lib/util/number/grisu2 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (local $3 i64) (local $4 i32) - (local $5 f64) + (local $5 i64) (local $6 i64) (local $7 i32) (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i64) + (local $9 i32) + (local $10 i64) + (local $11 i32) (local $12 i64) (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i64) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i64) - (local $25 i64) - (local $26 i32) - (local $27 i64) - (local $28 i32) - local.get $1 - f64.const 0 - f64.lt - local.set $2 - local.get $2 - if - local.get $1 - f64.neg - local.set $1 - local.get $0 - i32.const 45 - i32.store16 - end - local.get $1 - local.set $5 + (local $14 i64) + (local $15 i64) local.get $0 - local.set $4 - local.get $2 - local.set $3 - local.get $5 i64.reinterpret_f64 - local.set $6 - local.get $6 + local.set $3 + local.get $3 i64.const 9218868437227405312 i64.and i64.const 52 i64.shr_u i32.wrap_i64 - local.set $7 - local.get $6 + local.set $4 + local.get $3 i64.const 4503599627370495 i64.and - local.set $8 - local.get $7 + local.set $5 + local.get $4 i32.const 0 i32.ne i64.extend_i32_u i64.const 52 i64.shl - local.get $8 - i64.add - local.set $9 - local.get $7 - i32.const 1 - local.get $7 - select - i32.const 1023 - i32.const 52 - i32.add - i32.sub - local.set $7 - local.get $9 - local.set $11 - local.get $7 - local.set $10 - local.get $11 - i64.const 1 - i64.shl - i64.const 1 - i64.add - local.set $12 - local.get $10 - i32.const 1 - i32.sub - local.set $13 - local.get $12 - i64.clz - i32.wrap_i64 - local.set $14 - local.get $12 - local.get $14 - i64.extend_i32_s - i64.shl - local.set $12 - local.get $13 - local.get $14 - i32.sub - local.set $13 - i32.const 1 - local.get $11 - i64.const 4503599627370496 - i64.eq - i32.add - local.set $15 - local.get $12 - global.set $~lib/util/number/_frc_plus - local.get $11 - local.get $15 - i64.extend_i32_s - i64.shl - i64.const 1 - i64.sub - local.get $10 - local.get $15 - i32.sub - local.get $13 - i32.sub - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_minus - local.get $13 - global.set $~lib/util/number/_exp - global.get $~lib/util/number/_exp - local.set $10 - i32.const -61 - local.get $10 - i32.sub - f64.convert_i32_s - f64.const 0.30102999566398114 - f64.mul - f64.const 347 - f64.add - local.set $16 - local.get $16 - i32.trunc_f64_s - local.set $15 - local.get $15 - local.get $15 - f64.convert_i32_s - local.get $16 - f64.ne - i32.add - local.set $15 - local.get $15 - i32.const 3 - i32.shr_s - i32.const 1 - i32.add - local.set $14 - i32.const 348 - local.get $14 - i32.const 3 - i32.shl - i32.sub - global.set $~lib/util/number/_K - i32.const 14720 - local.get $14 - i32.const 3 - i32.shl - i32.add - i64.load - global.set $~lib/util/number/_frc_pow - i32.const 15416 - local.get $14 + local.get $5 + i64.add + local.set $6 + local.get $4 i32.const 1 - i32.shl + local.get $4 + select + i32.const 1023 + i32.const 52 i32.add - i32.load16_s - global.set $~lib/util/number/_exp_pow - local.get $9 + i32.sub + local.set $4 + local.get $6 + local.get $4 + call $~lib/util/number/normalizedBoundaries + global.get $~lib/util/number/_exp + call $~lib/util/number/getCachedPower + local.get $6 i64.clz i32.wrap_i64 - local.set $14 - local.get $9 - local.get $14 + local.set $7 + local.get $6 + local.get $7 i64.extend_i32_s i64.shl - local.set $9 + local.set $6 + local.get $4 local.get $7 - local.get $14 i32.sub - local.set $7 + local.set $4 global.get $~lib/util/number/_frc_pow - local.set $12 + local.set $8 global.get $~lib/util/number/_exp_pow - local.set $15 + local.set $9 + local.get $6 + local.get $8 + call $~lib/util/number/umul64f + local.set $10 + local.get $4 local.get $9 - local.set $17 - local.get $12 + call $~lib/util/number/umul64e local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $18 - local.get $11 - i64.const 4294967295 - i64.and - local.set $19 - local.get $17 - i64.const 32 - i64.shr_u - local.set $20 - local.get $11 - i64.const 32 - i64.shr_u - local.set $21 - local.get $18 - local.get $19 - i64.mul - local.set $22 - local.get $20 - local.get $19 - i64.mul - local.get $22 - i64.const 32 - i64.shr_u - i64.add - local.set $23 - local.get $18 - local.get $21 - i64.mul - local.get $23 - i64.const 4294967295 - i64.and - i64.add - local.set $24 - local.get $24 - i64.const 2147483647 - i64.add - local.set $24 - local.get $23 - i64.const 32 - i64.shr_u - local.set $23 - local.get $24 - i64.const 32 - i64.shr_u - local.set $24 - local.get $20 - local.get $21 - i64.mul - local.get $23 - i64.add - local.get $24 - i64.add - local.set $24 - local.get $7 - local.set $10 - local.get $15 - local.set $13 - local.get $10 - local.get $13 - i32.add - i32.const 64 - i32.add - local.set $10 global.get $~lib/util/number/_frc_plus - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $23 - local.get $11 - i64.const 4294967295 - i64.and - local.set $22 - local.get $17 - i64.const 32 - i64.shr_u - local.set $21 - local.get $11 - i64.const 32 - i64.shr_u - local.set $20 - local.get $23 - local.get $22 - i64.mul - local.set $19 - local.get $21 - local.get $22 - i64.mul - local.get $19 - i64.const 32 - i64.shr_u - i64.add - local.set $18 - local.get $23 - local.get $20 - i64.mul - local.get $18 - i64.const 4294967295 - i64.and - i64.add - local.set $25 - local.get $25 - i64.const 2147483647 - i64.add - local.set $25 - local.get $18 - i64.const 32 - i64.shr_u - local.set $18 - local.get $25 - i64.const 32 - i64.shr_u - local.set $25 - local.get $21 - local.get $20 - i64.mul - local.get $18 - i64.add - local.get $25 - i64.add + local.get $8 + call $~lib/util/number/umul64f i64.const 1 i64.sub - local.set $25 + local.set $12 global.get $~lib/util/number/_exp - local.set $26 - local.get $15 + local.get $9 + call $~lib/util/number/umul64e local.set $13 - local.get $26 - local.get $13 - i32.add - i32.const 64 - i32.add - local.set $26 global.get $~lib/util/number/_frc_minus - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $18 - local.get $11 - i64.const 4294967295 - i64.and - local.set $19 - local.get $17 - i64.const 32 - i64.shr_u - local.set $20 - local.get $11 - i64.const 32 - i64.shr_u - local.set $21 - local.get $18 - local.get $19 - i64.mul - local.set $22 - local.get $20 - local.get $19 - i64.mul - local.get $22 - i64.const 32 - i64.shr_u - i64.add - local.set $23 - local.get $18 - local.get $21 - i64.mul - local.get $23 - i64.const 4294967295 - i64.and - i64.add - local.set $27 - local.get $27 - i64.const 2147483647 - i64.add - local.set $27 - local.get $23 - i64.const 32 - i64.shr_u - local.set $23 - local.get $27 - i64.const 32 - i64.shr_u - local.set $27 - local.get $20 - local.get $21 - i64.mul - local.get $23 - i64.add - local.get $27 - i64.add + local.get $8 + call $~lib/util/number/umul64f i64.const 1 i64.add - local.set $27 - local.get $25 - local.get $27 + local.set $14 + local.get $12 + local.get $14 i64.sub - local.set $23 - local.get $4 - local.get $24 + local.set $15 + local.get $1 local.get $10 - local.get $25 - local.get $26 - local.get $23 + local.get $11 + local.get $12 + local.get $13 + local.get $15 + local.get $2 + call $~lib/util/number/genDigits + ) + (func $~lib/util/number/genExponent (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.set $2 + local.get $2 + if + i32.const 0 + local.get $1 + i32.sub + local.set $1 + end + local.get $1 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.set $3 + local.get $0 + local.get $1 + local.get $3 + call $~lib/util/number/utoa32_core + local.get $0 + i32.const 45 + i32.const 43 + local.get $2 + select + i32.store16 + local.get $3 + ) + (func $~lib/util/number/prettify (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 + i32.eqz + if + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 46 + i32.const 48 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $1 + i32.const 2 + i32.add + return + end + local.get $1 + local.get $2 + i32.add + local.set $3 + local.get $1 local.get $3 - call $~lib/util/number/genDigits - local.set $28 + i32.le_s + if (result i32) + local.get $3 + i32.const 21 + i32.le_s + else + i32.const 0 + end + if + local.get $1 + local.set $4 + loop $for-loop|0 + local.get $4 + local.get $3 + i32.lt_s + local.set $5 + local.get $5 + if + local.get $0 + local.get $4 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 + end + end + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.const 46 + i32.const 48 + i32.const 16 + i32.shl + i32.or + i32.store + local.get $3 + i32.const 2 + i32.add + return + else + local.get $3 + i32.const 0 + i32.gt_s + if (result i32) + local.get $3 + i32.const 21 + i32.le_s + else + i32.const 0 + end + if + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.set $4 + local.get $4 + i32.const 2 + i32.add + local.get $4 + i32.const 0 + local.get $2 + i32.sub + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.const 46 + i32.store16 + local.get $1 + i32.const 1 + i32.add + return + else + i32.const -6 + local.get $3 + i32.lt_s + if (result i32) + local.get $3 + i32.const 0 + i32.le_s + else + i32.const 0 + end + if + i32.const 2 + local.get $3 + i32.sub + local.set $4 + local.get $0 + local.get $4 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $1 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $0 + i32.const 48 + i32.const 46 + i32.const 16 + i32.shl + i32.or + i32.store + i32.const 2 + local.set $5 + loop $for-loop|1 + local.get $5 + local.get $4 + i32.lt_s + local.set $6 + local.get $6 + if + local.get $0 + local.get $5 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|1 + end + end + local.get $1 + local.get $4 + i32.add + return + else + local.get $1 + i32.const 1 + i32.eq + if + local.get $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + i32.const 4 + i32.add + local.get $3 + i32.const 1 + i32.sub + call $~lib/util/number/genExponent + local.set $1 + local.get $1 + i32.const 2 + i32.add + return + else + local.get $1 + i32.const 1 + i32.shl + local.set $4 + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $4 + i32.const 2 + i32.sub + call $~lib/memory/memory.copy + local.get $0 + i32.const 46 + i32.store16 offset=2 + local.get $0 + local.get $4 + i32.add + i32.const 101 + i32.store16 offset=2 + local.get $1 + local.get $0 + local.get $4 + i32.add + i32.const 4 + i32.add + local.get $3 + i32.const 1 + i32.sub + call $~lib/util/number/genExponent + i32.add + local.set $1 + local.get $1 + i32.const 2 + i32.add + return + end + unreachable + end + unreachable + end + unreachable + end + unreachable + ) + (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + f64.const 0 + f64.lt + local.set $2 + local.get $2 + if + local.get $1 + f64.neg + local.set $1 + local.get $0 + i32.const 45 + i32.store16 + end + local.get $1 + local.get $0 + local.get $2 + call $~lib/util/number/grisu2 + local.set $3 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $28 + local.get $3 local.get $2 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.set $28 - local.get $28 + local.set $3 + local.get $3 local.get $2 i32.add ) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index d52f3c51f4..d423b4b429 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -148,161 +148,171 @@ i32.store offset=12 local.get $4 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (local $2 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $1 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 4 - i32.sub - local.tee $2 - i32.const 0 - i32.store8 offset=3 - local.get $1 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 offset=1 - local.get $0 - i32.const 0 - i32.store8 offset=2 - local.get $2 - i32.const 0 - i32.store8 offset=2 - local.get $2 - i32.const 0 - i32.store8 offset=1 - local.get $1 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store8 offset=3 - local.get $2 - i32.const 0 - i32.store8 - local.get $1 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $2 - i32.add - local.tee $0 - i32.const 0 - i32.store - local.get $0 - local.get $1 - local.get $2 - i32.sub - i32.const -4 - i32.and - local.tee $2 - i32.add - i32.const 28 - i32.sub - local.tee $1 - i32.const 0 - i32.store offset=24 - local.get $2 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 0 - i32.store offset=20 - local.get $2 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - i32.const 0 - i32.store offset=24 - local.get $1 - i32.const 0 - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - local.get $0 - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $1 - i32.add - local.set $0 - local.get $2 + local.get $1 + i32.eqz + if + return + end + local.get $0 + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 4 + i32.sub + local.tee $2 + i32.const 0 + i32.store8 offset=3 + local.get $1 + i32.const 2 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store8 offset=1 + local.get $0 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=1 + local.get $1 + i32.const 6 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store8 offset=3 + local.get $2 + i32.const 0 + i32.store8 + local.get $1 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $2 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $0 + local.get $1 + local.get $2 + i32.sub + i32.const -4 + i32.and + local.tee $2 + i32.add + i32.const 28 + i32.sub + local.tee $1 + i32.const 0 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + i32.const 0 + i32.store offset=24 + local.get $1 + i32.const 0 + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $1 + i32.add + local.set $0 + local.get $2 + local.get $1 + i32.sub + local.set $1 + loop $while-continue|0 local.get $1 - i32.sub - local.set $1 - loop $while-continue|0 + i32.const 32 + i32.ge_u + if + local.get $0 + i64.const 0 + i64.store + local.get $0 + i64.const 0 + i64.store offset=8 + local.get $0 + i64.const 0 + i64.store offset=16 + local.get $0 + i64.const 0 + i64.store offset=24 local.get $1 i32.const 32 - i32.ge_u - if - local.get $0 - i64.const 0 - i64.store - local.get $0 - i64.const 0 - i64.store offset=8 - local.get $0 - i64.const 0 - i64.store offset=16 - local.get $0 - i64.const 0 - i64.store offset=24 - local.get $1 - i32.const 32 - i32.sub - local.set $1 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $while-continue|0 - end + i32.sub + local.set $1 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 end end ) @@ -324,7 +334,7 @@ call $~lib/rt/stub/__alloc local.tee $1 local.get $0 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset local.get $1 ) (func $~lib/map/Map<~lib/string/String,usize>#clear (param $0 i32) @@ -368,7 +378,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/hash/hashStr (param $0 i32) (result i32) + (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -569,7 +579,7 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $7 local.get $3 i32.const 3 i32.shl @@ -579,62 +589,62 @@ i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 + local.set $2 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $8 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 - local.get $3 - local.set $2 + local.set $5 + local.get $2 + local.set $3 loop $while-continue|0 - local.get $4 - local.get $7 + local.get $5 + local.get $8 i32.ne if - local.get $4 + local.get $8 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $2 - local.get $4 + local.get $3 + local.get $8 i32.load i32.store - local.get $2 - local.get $4 + local.get $3 + local.get $8 i32.load offset=4 i32.store offset=4 - local.get $2 - local.get $4 + local.get $3 + local.get $7 + local.get $8 i32.load - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> local.get $1 i32.and i32.const 2 i32.shl - local.get $5 i32.add - local.tee $8 + local.tee $4 i32.load i32.store offset=8 - local.get $8 - local.get $2 + local.get $4 + local.get $3 i32.store - local.get $2 + local.get $3 i32.const 12 i32.add - local.set $2 + local.set $3 end - local.get $4 + local.get $8 i32.const 12 i32.add - local.set $4 + local.set $8 br $while-continue|0 end end @@ -642,7 +652,7 @@ i32.load drop local.get $0 - local.get $5 + local.get $7 i32.store local.get $0 local.get $1 @@ -651,7 +661,7 @@ i32.load offset=8 drop local.get $0 - local.get $3 + local.get $2 i32.store offset=8 local.get $0 local.get $6 @@ -667,7 +677,7 @@ (local $4 i32) local.get $0 i32.const 1040 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> local.tee $3 call $~lib/map/Map<~lib/string/String,usize>#find local.tee $2 @@ -748,7 +758,7 @@ i32.store end ) - (func $~lib/util/hash/hash32 (param $0 i32) (result i32) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -835,7 +845,7 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $7 local.get $3 i32.const 3 i32.shl @@ -845,62 +855,62 @@ i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 + local.set $2 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $8 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 - local.get $3 - local.set $2 + local.set $5 + local.get $2 + local.set $3 loop $while-continue|0 - local.get $4 - local.get $7 + local.get $5 + local.get $8 i32.ne if - local.get $4 + local.get $8 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $2 - local.get $4 + local.get $3 + local.get $8 i32.load i32.store - local.get $2 - local.get $4 + local.get $3 + local.get $8 i32.load offset=4 i32.store offset=4 - local.get $2 - local.get $4 + local.get $3 + local.get $7 + local.get $8 i32.load - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.get $1 i32.and i32.const 2 i32.shl - local.get $5 i32.add - local.tee $8 + local.tee $4 i32.load i32.store offset=8 - local.get $8 - local.get $2 + local.get $4 + local.get $3 i32.store - local.get $2 + local.get $3 i32.const 12 i32.add - local.set $2 + local.set $3 end - local.get $4 + local.get $8 i32.const 12 i32.add - local.set $4 + local.set $8 br $while-continue|0 end end @@ -908,7 +918,7 @@ i32.load drop local.get $0 - local.get $5 + local.get $7 i32.store local.get $0 local.get $1 @@ -917,7 +927,7 @@ i32.load offset=8 drop local.get $0 - local.get $3 + local.get $2 i32.store offset=8 local.get $0 local.get $6 @@ -934,7 +944,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH local.tee $3 call $~lib/map/Map#find local.tee $2 @@ -1027,19 +1037,19 @@ if global.get $~lib/symbol/stringToId i32.const 1040 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,usize>#find if global.get $~lib/symbol/stringToId i32.const 1040 - call $~lib/util/hash/hashStr + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,usize>#find local.tee $0 i32.eqz if i32.const 1232 i32.const 1296 - i32.const 111 + i32.const 109 i32.const 17 call $~lib/builtins/abort unreachable @@ -1122,7 +1132,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne @@ -1131,14 +1141,14 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/hash32 + call $~lib/util/hash/HASH call $~lib/map/Map#find local.tee $0 i32.eqz if i32.const 1232 i32.const 1296 - i32.const 111 + i32.const 109 i32.const 17 call $~lib/builtins/abort unreachable @@ -1163,177 +1173,179 @@ i32.const 0 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $0 + local.get $1 + i32.lt_u + if local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 + i32.const 7 + i32.and local.get $0 - local.get $1 - i32.lt_u + i32.const 7 + i32.and + i32.eq if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + return end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $2 + i32.const 1 + i32.sub + local.set $2 local.get $0 - local.tee $2 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $1 - local.get $2 local.get $3 + local.get $4 i32.load8_u i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 + br $while-continue|0 end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 - local.get $4 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and if - local.get $4 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $4 - local.get $0 + local.tee $2 i32.add local.get $1 - local.get $4 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) @@ -1373,13 +1385,13 @@ local.tee $0 local.get $3 local.get $2 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $0 local.get $2 i32.add local.get $1 local.get $4 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove end local.get $0 ) diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index c042d623fb..8865526d6e 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -1,9 +1,10 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) + (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 $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -196,278 +197,296 @@ i32.store offset=12 local.get $2 ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + (local $6 i64) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - i32.const 4 - i32.sub - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - local.get $4 - i32.store8 offset=3 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=1 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - i32.const 28 - i32.sub - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=24 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=16 - local.get $6 - local.get $8 - i32.store offset=20 - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=4 - local.get $6 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=12 - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end + i32.const 0 + i32.const 1 + i32.gt_s + drop + local.get $2 + i32.eqz + if + return end - ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.set $3 + local.get $0 local.get $1 - i32.const 1073741808 - i32.gt_u + i32.store8 + local.get $3 + local.get $1 + i32.store8 offset=3 + local.get $2 + i32.const 2 + i32.le_u if - i32.const 112 - i32.const 160 - i32.const 49 - i32.const 43 - call $~lib/builtins/abort - unreachable + return end + local.get $0 local.get $1 - i32.const 0 - call $~lib/rt/stub/__alloc - local.set $2 - local.get $2 - i32.const 0 + i32.store8 offset=1 + local.get $0 local.get $1 - call $~lib/memory/memory.fill + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=1 local.get $2 - call $~lib/rt/stub/__retain - ) - (func $~lib/map/Map<~lib/string/String,usize>#clear (param $0 i32) - (local $1 i32) - (local $2 i32) + i32.const 6 + i32.le_u + if + return + end local.get $0 - local.tee $1 - i32.const 0 - i32.const 16 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 local.get $1 - i32.load - call $~lib/rt/stub/__release + i32.store8 offset=3 + local.get $3 + local.get $1 + i32.store8 local.get $2 - i32.store + i32.const 8 + i32.le_u + if + return + end + i32.const 0 local.get $0 - i32.const 4 - i32.const 1 i32.sub - i32.store offset=4 + i32.const 3 + i32.and + local.set $4 local.get $0 - local.tee $2 - i32.const 0 - i32.const 48 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.get $4 + i32.add + local.set $0 local.get $2 - i32.load offset=8 - call $~lib/rt/stub/__release + local.get $4 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u local.get $1 - i32.store offset=8 + i32.const 255 + i32.and + i32.mul + local.set $5 local.get $0 - i32.const 4 - i32.store offset=12 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.set $3 local.get $0 - i32.const 0 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=16 + local.get $3 + local.get $5 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=12 + local.get $0 + local.get $5 + i32.store offset=16 + local.get $0 + local.get $5 + i32.store offset=20 + local.get $0 + local.get $5 + i32.store offset=24 + local.get $3 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=12 + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $5 + i64.extend_i32_u + local.get $5 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $6 + loop $while-continue|0 + local.get $2 + i32.const 32 + i32.ge_u + local.set $7 + local.get $7 + if + local.get $0 + local.get $6 + i64.store + local.get $0 + local.get $6 + i64.store offset=8 + local.get $0 + local.get $6 + i64.store offset=16 + local.get $0 + local.get $6 + i64.store offset=24 + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 + end + end + ) + (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memset + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $1 + i32.const 1073741808 + i32.gt_u + if + i32.const 112 + i32.const 160 + i32.const 49 + i32.const 43 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 0 + call $~lib/rt/stub/__alloc + local.set $2 + local.get $2 + i32.const 0 + local.get $1 + call $~lib/memory/memory.fill + local.get $2 + call $~lib/rt/stub/__retain + ) + (func $~lib/map/ENTRY_ALIGN<~lib/string/String,usize> (result i32) + i32.const 3 + ) + (func $~lib/map/ENTRY_SIZE<~lib/string/String,usize> (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/map/ENTRY_ALIGN<~lib/string/String,usize> + local.set $0 + i32.const 12 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) + (func $~lib/map/Map<~lib/string/String,usize>#clear (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + local.tee $1 + i32.const 0 + i32.const 16 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $2 + local.get $1 + i32.load + call $~lib/rt/stub/__release + local.get $2 + i32.store + local.get $0 + i32.const 4 + i32.const 1 + i32.sub + i32.store offset=4 + i32.const 4 + call $~lib/map/ENTRY_SIZE<~lib/string/String,usize> + i32.mul + local.set $1 + local.get $0 + local.tee $2 + i32.const 0 + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $3 + local.get $2 + i32.load offset=8 + call $~lib/rt/stub/__release + local.get $3 + i32.store offset=8 + local.get $0 + i32.const 4 + i32.store offset=12 + local.get $0 + i32.const 0 i32.store offset=16 local.get $0 i32.const 0 @@ -505,9 +524,28 @@ call $~lib/map/Map<~lib/string/String,usize>#clear local.get $0 ) + (func $~lib/map/ENTRY_ALIGN (result i32) + i32.const 3 + ) + (func $~lib/map/ENTRY_SIZE (result i32) + (local $0 i32) + (local $1 i32) + call $~lib/map/ENTRY_ALIGN + local.set $0 + i32.const 12 + local.get $0 + i32.add + local.get $0 + i32.const -1 + i32.xor + i32.and + local.set $1 + local.get $1 + ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.tee $1 i32.const 0 @@ -524,16 +562,20 @@ i32.const 1 i32.sub i32.store offset=4 + i32.const 4 + call $~lib/map/ENTRY_SIZE + i32.mul + local.set $1 local.get $0 local.tee $2 i32.const 0 - i32.const 48 + local.get $1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $3 local.get $2 i32.load offset=8 call $~lib/rt/stub/__release - local.get $1 + local.get $3 i32.store offset=8 local.get $0 i32.const 4 @@ -636,6 +678,21 @@ call $~lib/rt/stub/__release local.get $3 ) + (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/rt/stub/__retain + local.set $0 + i32.const 1 + drop + local.get $0 + call $~lib/util/hash/hashStr + local.set $1 + local.get $0 + call $~lib/rt/stub/__release + local.get $1 + return + ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) @@ -897,26 +954,13 @@ ) (func $~lib/map/Map<~lib/string/String,usize>#has (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $1 call $~lib/rt/stub/__retain local.set $1 local.get $0 local.get $1 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.0 (result i32) - local.get $1 - call $~lib/rt/stub/__retain - local.set $2 - i32.const 1 - drop - local.get $2 - call $~lib/util/hash/hashStr - local.set $3 - local.get $2 - call $~lib/rt/stub/__release - local.get $3 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.0 - end + local.get $1 + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,usize>#find i32.const 0 i32.ne @@ -928,46 +972,33 @@ (func $~lib/map/Map<~lib/string/String,usize>#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $1 call $~lib/rt/stub/__retain local.set $1 local.get $0 local.get $1 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.1 (result i32) - local.get $1 - call $~lib/rt/stub/__retain - local.set $2 - i32.const 1 - drop - local.get $2 - call $~lib/util/hash/hashStr - local.set $3 - local.get $2 - call $~lib/rt/stub/__release - local.get $3 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.1 - end + local.get $1 + call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,usize>#find - local.set $4 - local.get $4 + local.set $2 + local.get $2 i32.eqz if local.get $1 call $~lib/rt/stub/__release i32.const 224 i32.const 288 - i32.const 111 + i32.const 109 i32.const 17 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.load offset=4 - local.set $2 + local.set $3 local.get $1 call $~lib/rt/stub/__release - local.get $2 + local.get $3 ) (func $~lib/map/Map<~lib/string/String,usize>#rehash (param $0 i32) (param $1 i32) (local $2 i32) @@ -1000,7 +1031,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 12 + call $~lib/map/ENTRY_SIZE<~lib/string/String,usize> i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -1010,7 +1041,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 12 + call $~lib/map/ENTRY_SIZE<~lib/string/String,usize> i32.mul i32.add local.set $7 @@ -1041,21 +1072,9 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.3 (result i32) - local.get $10 - i32.load - call $~lib/rt/stub/__retain - local.set $12 - i32.const 1 - drop - local.get $12 - call $~lib/util/hash/hashStr - local.set $13 - local.get $12 - call $~lib/rt/stub/__release - local.get $13 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.3 - end + local.get $10 + i32.load + call $~lib/util/hash/HASH<~lib/string/String> local.get $1 i32.and local.set $12 @@ -1073,12 +1092,12 @@ local.get $8 i32.store local.get $8 - i32.const 12 + call $~lib/map/ENTRY_SIZE<~lib/string/String,usize> i32.add local.set $8 end local.get $6 - i32.const 12 + call $~lib/map/ENTRY_SIZE<~lib/string/String,usize> i32.add local.set $6 br $while-continue|0 @@ -1141,31 +1160,19 @@ local.get $1 call $~lib/rt/stub/__retain local.set $1 - block $~lib/util/hash/HASH<~lib/string/String>|inlined.2 (result i32) - local.get $1 - call $~lib/rt/stub/__retain - local.set $3 - i32.const 1 - drop - local.get $3 - call $~lib/util/hash/hashStr - local.set $4 - local.get $3 - call $~lib/rt/stub/__release - local.get $4 - br $~lib/util/hash/HASH<~lib/string/String>|inlined.2 - end - local.set $5 + local.get $1 + call $~lib/util/hash/HASH<~lib/string/String> + local.set $3 local.get $0 local.get $1 - local.get $5 + local.get $3 call $~lib/map/Map<~lib/string/String,usize>#find - local.set $6 - local.get $6 + local.set $4 + local.get $4 if i32.const 0 drop - local.get $6 + local.get $4 local.get $2 i32.store offset=4 else @@ -1201,25 +1208,25 @@ local.get $0 i32.load offset=8 call $~lib/rt/stub/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=16 - local.tee $4 + local.tee $6 i32.const 1 i32.add i32.store offset=16 - local.get $4 - i32.const 12 + local.get $6 + call $~lib/map/ENTRY_SIZE<~lib/string/String,usize> i32.mul i32.add - local.set $6 - local.get $6 + local.set $4 + local.get $4 local.get $1 call $~lib/rt/stub/__retain i32.store - local.get $6 + local.get $4 local.get $2 i32.store offset=4 local.get $0 @@ -1230,30 +1237,30 @@ i32.store offset=20 local.get $0 i32.load - local.get $5 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $4 - local.get $6 + local.set $6 local.get $4 + local.get $6 i32.load i32.store offset=8 - local.get $4 local.get $6 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/stub/__release end local.get $0 call $~lib/rt/stub/__retain - local.set $4 + local.set $6 local.get $1 call $~lib/rt/stub/__release - local.get $4 + local.get $6 ) (func $~lib/util/hash/hash32 (param $0 i32) (result i32) (local $1 i32) @@ -1297,6 +1304,29 @@ local.set $1 local.get $1 ) + (func $~lib/util/hash/HASH (param $0 i32) (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 4 + i32.const 2 + i32.eq + drop + i32.const 4 + i32.const 4 + i32.eq + drop + local.get $0 + call $~lib/util/hash/hash32 + return + ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -1376,7 +1406,7 @@ local.set $4 i32.const 0 local.get $4 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 @@ -1386,7 +1416,7 @@ local.get $6 local.get $0 i32.load offset=16 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add local.set $7 @@ -1417,32 +1447,9 @@ local.get $10 i32.load offset=4 i32.store offset=4 - block $~lib/util/hash/HASH|inlined.1 (result i32) - local.get $10 - i32.load - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $12 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.1 - end + local.get $10 + i32.load + call $~lib/util/hash/HASH local.get $1 i32.and local.set $12 @@ -1460,12 +1467,12 @@ local.get $8 i32.store local.get $8 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.add local.set $8 end local.get $6 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.add local.set $6 br $while-continue|0 @@ -1528,53 +1535,30 @@ local.get $2 call $~lib/rt/stub/__retain local.set $2 - block $~lib/util/hash/HASH|inlined.0 (result i32) - local.get $1 - local.set $3 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $3 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.0 - end - local.set $4 + local.get $1 + call $~lib/util/hash/HASH + local.set $3 local.get $0 local.get $1 - local.get $4 + local.get $3 call $~lib/map/Map#find - local.set $5 - local.get $5 + local.set $4 + local.get $4 if i32.const 1 drop - local.get $5 + local.get $4 i32.load offset=4 - local.set $3 + local.set $5 local.get $2 - local.get $3 + local.get $5 i32.ne if - local.get $5 + local.get $4 local.get $2 call $~lib/rt/stub/__retain i32.store offset=4 - local.get $3 + local.get $5 call $~lib/rt/stub/__release end else @@ -1610,8 +1594,8 @@ local.get $0 i32.load offset=8 call $~lib/rt/stub/__retain - local.set $3 - local.get $3 + local.set $5 + local.get $5 local.get $0 local.get $0 i32.load offset=16 @@ -1620,14 +1604,14 @@ i32.add i32.store offset=16 local.get $6 - i32.const 12 + call $~lib/map/ENTRY_SIZE i32.mul i32.add - local.set $5 - local.get $5 + local.set $4 + local.get $4 local.get $1 i32.store - local.get $5 + local.get $4 local.get $2 call $~lib/rt/stub/__retain i32.store offset=4 @@ -1639,7 +1623,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -1647,14 +1631,14 @@ i32.mul i32.add local.set $6 - local.get $5 + local.get $4 local.get $6 i32.load i32.store offset=8 local.get $6 - local.get $5 + local.get $4 i32.store - local.get $3 + local.get $5 call $~lib/rt/stub/__release end local.get $0 @@ -1731,81 +1715,33 @@ local.get $1 ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.2 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.2 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 - block $~lib/util/hash/HASH|inlined.3 (result i32) - local.get $1 - local.set $2 - i32.const 0 - drop - i32.const 0 - drop - i32.const 0 - drop - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 4 - i32.const 2 - i32.eq - drop - i32.const 4 - i32.const 4 - i32.eq - drop - local.get $2 - call $~lib/util/hash/hash32 - br $~lib/util/hash/HASH|inlined.3 - end + local.get $1 + call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $3 - local.get $3 + local.set $2 + local.get $2 i32.eqz if i32.const 224 i32.const 288 - i32.const 111 + i32.const 109 i32.const 17 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=4 call $~lib/rt/stub/__retain ) @@ -2853,238 +2789,233 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if local.get $0 - local.set $5 local.get $1 - local.set $4 local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if i32.const 0 - i32.const 1 + i32.const 2 i32.lt_s drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.tee $7 + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 i32.const 1 i32.add - local.set $5 - local.get $7 + local.set $0 local.get $4 - local.tee $7 + local.get $1 + local.tee $4 i32.const 1 i32.add - local.set $4 - local.get $7 + local.set $1 + local.get $4 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 + br $while-continue|0 end end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 end end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 + end + end + end + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end end end ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) (func $~lib/string/String#concat (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 2e7da3d719..96efd4d8cf 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -1,17 +1,18 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $none_=>_none (func)) (type $i32_i32_i32_=>_i32 (func (param i32 i32 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_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) - (type $i64_i32_i32_=>_i32 (func (param i64 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) - (type $f32_i32_i32_=>_i32 (func (param f32 i32 i32) (result i32))) + (type $i64_i32_i32_=>_i32 (func (param i64 i32 i32) (result i32))) (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) + (type $f32_i32_i32_=>_i32 (func (param f32 i32 i32) (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) (type $i64_i64_i32_i32_=>_i64 (func (param i64 i64 i32 i32) (result i64))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i64_i32_i32_=>_none (func (param i64 i32 i32))) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) @@ -19,7 +20,7 @@ (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) (type $i32_i32_f64_f64_f64_f64_f64_=>_none (func (param i32 i32 f64 f64 f64 f64 f64))) @@ -35,6 +36,7 @@ (type $f64_=>_i32 (func (param f64) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (type $i64_i32_i32_=>_i64 (func (param i64 i32 i32) (result i64))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $f32_=>_f32 (func (param f32) (result f32))) (type $f32_i32_i32_=>_f32 (func (param f32 i32 i32) (result f32))) @@ -207,6 +209,58 @@ (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "_start" (func $~start)) (export "memory" (memory $0)) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -221,7 +275,7 @@ if i32.const 0 i32.const 1152 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -243,7 +297,7 @@ if i32.const 0 i32.const 1152 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -262,23 +316,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -286,72 +340,56 @@ if i32.const 0 i32.const 1152 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -359,7 +397,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -382,7 +420,7 @@ if i32.const 0 i32.const 1152 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -396,22 +434,16 @@ if i32.const 0 i32.const 1152 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -420,7 +452,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -429,7 +461,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -440,16 +472,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -469,7 +495,7 @@ if i32.const 0 i32.const 1152 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -502,8 +528,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -524,7 +550,7 @@ if i32.const 0 i32.const 1152 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -534,17 +560,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1152 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -573,13 +599,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -587,21 +613,15 @@ if i32.const 0 i32.const 1152 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -616,37 +636,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -670,7 +681,7 @@ if i32.const 0 i32.const 1152 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -687,7 +698,7 @@ if i32.const 0 i32.const 1152 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -715,7 +726,7 @@ if i32.const 0 i32.const 1152 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -767,7 +778,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -788,7 +799,8 @@ unreachable end i32.const 8336 - local.tee $0 + local.set $2 + i32.const 8336 i32.const 0 i32.store i32.const 9904 @@ -799,35 +811,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 8336 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 8336 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -847,7 +850,7 @@ i32.const 8336 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) local.get $0 @@ -856,7 +859,7 @@ if i32.const 1200 i32.const 1152 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -929,17 +932,14 @@ if i32.const 0 i32.const 1152 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const -1 local.get $1 i32.shl @@ -947,16 +947,10 @@ local.tee $1 if (result i32) local.get $0 + local.get $2 local.get $1 i32.ctz - local.get $2 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -972,31 +966,22 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1152 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end @@ -1014,7 +999,7 @@ if i32.const 0 i32.const 1152 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1057,20 +1042,9 @@ i32.and i32.store local.get $1 - i32.const 16 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 + call $~lib/rt/tlsf/GETRIGHT local.get $1 - i32.load - i32.const -4 - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const -3 i32.and @@ -1085,7 +1059,7 @@ if i32.const 0 i32.const 1152 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1108,15 +1082,16 @@ local.tee $3 i32.eqz if - i32.const 16 memory.size local.tee $3 i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -1141,9 +1116,7 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 - local.get $5 + local.tee $5 local.get $3 local.get $5 i32.gt_s @@ -1176,7 +1149,7 @@ if i32.const 0 i32.const 1152 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1192,7 +1165,7 @@ if i32.const 0 i32.const 1152 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -1225,288 +1198,296 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) - (local $5 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $2 - i32.eqz - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.tee $3 - local.get $1 - i32.store8 offset=3 - local.get $2 - i32.const 2 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - local.get $1 - i32.store8 offset=1 - local.get $0 - local.get $1 - i32.store8 offset=2 - local.get $3 - local.get $1 - i32.store8 offset=2 - local.get $3 - local.get $1 - i32.store8 offset=1 - local.get $2 - i32.const 6 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - local.get $1 - i32.store8 offset=3 - local.get $3 - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $0 - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $5 - i32.add - local.tee $3 - local.get $1 - i32.const 255 - i32.and - i32.const 16843009 - i32.mul - local.tee $0 - i32.store - local.get $3 - local.get $2 - local.get $5 - i32.sub - i32.const -4 - i32.and - local.tee $2 - i32.add - i32.const 28 - i32.sub - local.tee $1 - local.get $0 - i32.store offset=24 - local.get $2 - i32.const 8 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $3 - local.get $0 - i32.store offset=4 - local.get $3 - local.get $0 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=16 - local.get $1 - local.get $0 - i32.store offset=20 - local.get $2 - i32.const 24 - i32.le_u - br_if $~lib/util/memory/memset|inlined.0 - local.get $3 - local.get $0 - i32.store offset=12 - local.get $3 - local.get $0 - i32.store offset=16 - local.get $3 - local.get $0 - i32.store offset=20 - local.get $3 - local.get $0 - i32.store offset=24 - local.get $1 - local.get $0 - i32.store - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - local.get $0 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=12 - local.get $3 - local.get $3 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $0 - i64.extend_i32_u - local.get $0 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $4 - loop $while-continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $4 - i64.store - local.get $1 - local.get $4 - i64.store offset=8 - local.get $1 - local.get $4 - i64.store offset=16 - local.get $1 - local.get $4 - i64.store offset=24 - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $1 - i32.const 32 - i32.add - local.set $1 - br $while-continue|0 - end - end - end - ) - (func $~lib/rt/pure/__retain (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.const 8332 - i32.gt_u + local.get $2 + i32.eqz if - local.get $0 - i32.const 16 - i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 1264 - i32.const 109 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 1264 - i32.const 112 - i32.const 14 - call $~lib/builtins/abort - unreachable - end + return end local.get $0 - ) - (func $~lib/rt/pure/__release (param $0 i32) + local.get $1 + i32.store8 local.get $0 - i32.const 8332 - i32.gt_u + local.get $2 + i32.add + i32.const 4 + i32.sub + local.tee $3 + local.get $1 + i32.store8 offset=3 + local.get $2 + i32.const 2 + i32.le_u if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + return end - ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) + local.get $0 local.get $1 - i32.const 1073741808 + i32.store8 offset=1 + local.get $0 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=1 local.get $2 - i32.shr_u - i32.gt_u + i32.const 6 + i32.le_u if - i32.const 1040 - i32.const 1088 - i32.const 18 - i32.const 57 - call $~lib/builtins/abort - unreachable + return end + local.get $0 local.get $1 - local.get $2 - i32.shl - local.tee $3 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $1 - i32.const 0 + i32.store8 offset=3 local.get $3 - call $~lib/memory/memory.fill - local.get $0 - i32.eqz + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u if - i32.const 12 - i32.const 2 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $0 + return end local.get $0 i32.const 0 - i32.store local.get $0 - i32.const 0 - i32.store offset=4 + i32.sub + i32.const 3 + i32.and + local.tee $3 + i32.add + local.tee $0 + local.get $1 + i32.const 255 + i32.and + i32.const 16843009 + i32.mul + local.tee $1 + i32.store local.get $0 - i32.const 0 + local.get $2 + local.get $3 + i32.sub + i32.const -4 + i32.and + local.tee $3 + i32.add + i32.const 28 + i32.sub + local.tee $2 + local.get $1 + i32.store offset=24 + local.get $3 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $1 + i32.store offset=8 + local.get $2 + local.get $1 + i32.store offset=16 + local.get $2 + local.get $1 + i32.store offset=20 + local.get $3 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=16 + local.get $0 + local.get $1 + i32.store offset=20 + local.get $0 + local.get $1 + i32.store offset=24 + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + local.get $1 i32.store offset=8 + local.get $2 local.get $1 + i32.store offset=12 + local.get $0 + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $2 + i32.add + local.set $0 + local.get $3 + local.get $2 + i32.sub local.set $2 local.get $1 + i64.extend_i32_u + local.get $1 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $4 + loop $while-continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + local.get $0 + local.get $4 + i64.store + local.get $0 + local.get $4 + i64.store offset=8 + local.get $0 + local.get $4 + i64.store offset=16 + local.get $0 + local.get $4 + i64.store offset=24 + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 + end + end + ) + (func $~lib/rt/pure/__retain (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 1264 + i32.const 109 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 1264 + i32.const 112 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + end + local.get $0 + ) + (func $~lib/rt/pure/__release (param $0 i32) + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/arraybuffer/ArrayBufferView#constructor (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $1 + i32.const 1073741808 + local.get $2 + i32.shr_u + i32.gt_u + if + i32.const 1040 + i32.const 1088 + i32.const 18 + i32.const 57 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.shl + local.tee $3 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $1 + i32.const 0 + local.get $3 + call $~lib/util/memory/memset + local.get $0 + i32.eqz + if + i32.const 12 + i32.const 2 + call $~lib/rt/tlsf/__alloc + 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 $1 + local.tee $2 local.get $0 i32.load local.tee $4 @@ -2145,7 +2126,7 @@ i32.add i32.load ) - (func $~lib/typedarray/Int32Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2253,7 +2234,7 @@ local.get $2 f64.store ) - (func $~lib/typedarray/Float64Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2454,7 +2435,7 @@ if i32.const 0 i32.const 1152 - i32.const 581 + i32.const 573 i32.const 3 call $~lib/builtins/abort unreachable @@ -2494,7 +2475,7 @@ local.tee $5 i32.const 0 local.get $2 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset local.get $1 i32.const 1 i32.sub @@ -2921,186 +2902,189 @@ local.get $0 local.get $2 i32.sub - call $~lib/memory/memory.fill + call $~lib/util/memory/memset end local.get $5 ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $0 + local.get $1 + i32.lt_u + if local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 + i32.const 7 + i32.and local.get $0 - local.get $1 - i32.lt_u + i32.const 7 + i32.and + i32.eq if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + return end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $2 + i32.const 1 + i32.sub + local.set $2 local.get $0 - local.tee $2 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $1 - local.get $2 local.get $3 + local.get $4 i32.load8_u i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 + br $while-continue|0 end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 - local.get $4 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $3 local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and if - local.get $4 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $4 - local.get $0 + local.tee $2 i32.add local.get $1 - local.get $4 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) (func $~lib/rt/__allocArray (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 16 local.get $2 call $~lib/rt/tlsf/__alloc @@ -3108,28 +3092,26 @@ local.get $0 local.get $1 i32.shl - local.tee $1 - local.set $5 - local.get $1 + local.tee $5 + local.tee $6 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $4 + local.set $1 local.get $3 if - local.get $4 + local.get $1 local.get $3 - local.get $5 - call $~lib/memory/memory.copy + local.get $6 + call $~lib/util/memory/memmove end - local.get $4 - local.tee $3 + local.get $1 call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $3 + local.get $1 i32.store offset=4 local.get $2 - local.get $1 + local.get $5 i32.store offset=8 local.get $2 local.get $0 @@ -3215,7 +3197,7 @@ end i32.const 0 ) - (func $~lib/typedarray/Int8Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3293,88 +3275,92 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int32Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/FILL<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) - (local $6 i32) - local.get $1 - local.set $4 local.get $0 call $~lib/rt/pure/__retain - local.tee $5 + local.tee $4 i32.load offset=4 - local.set $6 - local.get $5 + local.set $5 + local.get $4 i32.load offset=8 i32.const 2 i32.shr_u - local.set $1 + local.set $0 local.get $2 i32.const 0 i32.lt_s if (result i32) - local.get $1 + local.get $0 local.get $2 i32.add - local.tee $0 + local.tee $2 i32.const 0 - local.get $0 + local.get $2 i32.const 0 i32.gt_s select else local.get $2 - local.get $1 + local.get $0 local.get $2 - local.get $1 + local.get $0 i32.lt_s select end - local.set $0 + local.set $2 local.get $3 i32.const 0 i32.lt_s if (result i32) - local.get $1 + local.get $0 local.get $3 i32.add - local.tee $1 + local.tee $0 i32.const 0 - local.get $1 + local.get $0 i32.const 0 i32.gt_s select else local.get $3 - local.get $1 + local.get $0 local.get $3 - local.get $1 + local.get $0 i32.lt_s select end - local.set $1 + local.set $0 loop $for-loop|0 + local.get $2 local.get $0 - local.get $1 i32.lt_s if - local.get $6 - local.get $0 + local.get $5 + local.get $2 i32.const 2 i32.shl i32.add - local.get $4 + local.get $1 i32.store - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end - local.get $5 + local.get $4 ) - (func $~lib/array/Array#__unchecked_get (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/typedarray/FILL<~lib/typedarray/Int32Array,i32> + ) + (func $~lib/array/Array#__unchecked_get (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -3442,7 +3428,7 @@ end i32.const 0 ) - (func $~lib/typedarray/Int32Array#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3516,12 +3502,12 @@ local.get $2 i32.const 2 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $3 call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Int32Array#copyWithin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/COPY_WITHIN<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3626,9 +3612,16 @@ select i32.const 2 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $5 ) + (func $~lib/typedarray/Int32Array#copyWithin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/typedarray/COPY_WITHIN<~lib/typedarray/Int32Array,i32> + ) (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 @@ -3654,7 +3647,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Uint8Array#reduce (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/REDUCE<~lib/typedarray/Uint8Array,u8,u8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3742,7 +3735,7 @@ local.get $2 i32.store16 ) - (func $~lib/typedarray/Int32Array#reduce (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/REDUCE<~lib/typedarray/Int32Array,i32,i32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3839,7 +3832,7 @@ local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/REDUCE<~lib/typedarray/Int64Array,i64,i64> (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -3941,7 +3934,7 @@ local.get $1 f64.add ) - (func $~lib/typedarray/Uint8Array#reduceRight (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Uint8Array,u8,u8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3982,7 +3975,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int32Array#reduceRight (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int32Array,i32,i32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4027,7 +4020,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int64Array#reduceRight (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int64Array,i64,i64> (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -4284,13 +4277,7 @@ return end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.tee $6 i32.load local.tee $4 @@ -4314,10 +4301,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 @@ -4347,7 +4334,7 @@ i32.const 16 i32.add local.get $2 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $1 i32.const 8332 i32.ge_u @@ -4866,7 +4853,7 @@ i32.const 2 i32.gt_s ) - (func $~lib/typedarray/Int16Array#filter (param $0 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Int16Array,i16> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4975,7 +4962,7 @@ i32.const 5 call $~lib/typedarray/Int16Array#__set local.get $0 - call $~lib/typedarray/Int16Array#filter + call $~lib/typedarray/FILTER<~lib/typedarray/Int16Array,i16> local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if @@ -5051,7 +5038,7 @@ i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint16Array#filter (param $0 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Uint16Array,u16> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5160,7 +5147,7 @@ i32.const 5 call $~lib/typedarray/Uint16Array#__set local.get $0 - call $~lib/typedarray/Uint16Array#filter + call $~lib/typedarray/FILTER<~lib/typedarray/Uint16Array,u16> local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if @@ -5234,7 +5221,7 @@ i32.const 2 i32.gt_s ) - (func $~lib/typedarray/Int32Array#filter (param $0 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Int32Array,i32> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5341,7 +5328,7 @@ i32.const 5 call $~lib/typedarray/Int32Array#__set local.get $0 - call $~lib/typedarray/Int32Array#filter + call $~lib/typedarray/FILTER<~lib/typedarray/Int32Array,i32> local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if @@ -5415,7 +5402,7 @@ i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint32Array#filter (param $0 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Uint32Array,u32> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5522,7 +5509,7 @@ i32.const 5 call $~lib/typedarray/Uint32Array#__set local.get $0 - call $~lib/typedarray/Uint32Array#filter + call $~lib/typedarray/FILTER<~lib/typedarray/Uint32Array,u32> local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if @@ -5596,7 +5583,7 @@ i64.const 2 i64.gt_s ) - (func $~lib/typedarray/Int64Array#filter (param $0 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Int64Array,i64> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5703,7 +5690,7 @@ i64.const 5 call $~lib/typedarray/Int64Array#__set local.get $0 - call $~lib/typedarray/Int64Array#filter + call $~lib/typedarray/FILTER<~lib/typedarray/Int64Array,i64> local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if @@ -5777,7 +5764,7 @@ i64.const 2 i64.gt_u ) - (func $~lib/typedarray/Uint64Array#filter (param $0 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Uint64Array,u64> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5884,7 +5871,7 @@ i64.const 5 call $~lib/typedarray/Uint64Array#__set local.get $0 - call $~lib/typedarray/Uint64Array#filter + call $~lib/typedarray/FILTER<~lib/typedarray/Uint64Array,u64> local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if @@ -5958,7 +5945,7 @@ f32.const 2 f32.gt ) - (func $~lib/typedarray/Float32Array#filter (param $0 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Float32Array,f32> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6065,7 +6052,7 @@ f32.const 5 call $~lib/typedarray/Float32Array#__set local.get $0 - call $~lib/typedarray/Float32Array#filter + call $~lib/typedarray/FILTER<~lib/typedarray/Float32Array,f32> local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if @@ -6139,7 +6126,7 @@ f64.const 2 f64.gt ) - (func $~lib/typedarray/Float64Array#filter (param $0 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Float64Array,f64> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6246,7 +6233,7 @@ f64.const 5 call $~lib/typedarray/Float64Array#__set local.get $0 - call $~lib/typedarray/Float64Array#filter + call $~lib/typedarray/FILTER<~lib/typedarray/Float64Array,f64> local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if @@ -6322,12 +6309,11 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8> (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 $0 i32.load offset=4 local.set $3 @@ -6339,31 +6325,28 @@ local.get $4 i32.lt_s if - block $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 - local.get $2 - local.get $3 - i32.add - i32.load8_s - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - if - i32.const 1 - local.set $6 - br $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 - end - local.get $2 + local.get $2 + local.get $3 + i32.add + i32.load8_s + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end end - local.get $6 + i32.const 0 ) (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -6371,12 +6354,11 @@ i32.and i32.eqz ) - (func $~lib/typedarray/Uint8Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8> (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 $0 i32.load offset=4 local.set $3 @@ -6388,31 +6370,28 @@ local.get $4 i32.lt_s if - block $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 - local.get $2 - local.get $3 - i32.add - i32.load8_u - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - if - i32.const 1 - local.set $6 - br $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 - end - local.get $2 + local.get $2 + local.get $3 + i32.add + i32.load8_u + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end end - local.get $6 + i32.const 0 ) (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -6421,12 +6400,11 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16> (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 $0 i32.load offset=4 local.set $3 @@ -6440,33 +6418,30 @@ local.get $4 i32.lt_s if - block $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 - local.get $3 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_s - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - if - i32.const 1 - local.set $6 - br $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 - end - local.get $2 + local.get $3 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end end - local.get $6 + i32.const 0 ) (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -6474,12 +6449,11 @@ i32.and i32.eqz ) - (func $~lib/typedarray/Uint16Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16> (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 $0 i32.load offset=4 local.set $3 @@ -6493,45 +6467,41 @@ local.get $4 i32.lt_s if - block $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 - local.get $3 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_u - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - if - i32.const 1 - local.set $6 - br $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 - end - local.get $2 + local.get $3 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_u + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end end - local.get $6 + i32.const 0 ) (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> (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 $0 i32.load offset=4 local.set $3 @@ -6545,33 +6515,30 @@ local.get $4 i32.lt_s if - block $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 - local.get $3 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - if - i32.const 1 - local.set $6 - br $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 - end - local.get $2 + local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end end - local.get $6 + i32.const 0 ) (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -6582,12 +6549,11 @@ i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) - (local $6 i32) local.get $0 i32.load offset=4 local.set $3 @@ -6601,33 +6567,30 @@ local.get $4 i32.lt_s if - block $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 - local.get $3 - local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i64_i32_i32_=>_i32) - if - i32.const 1 - local.set $6 - br $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 - end - local.get $2 + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i64_i32_i32_=>_i32) + if i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end end - local.get $6 + i32.const 0 ) (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -6638,12 +6601,11 @@ f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 f32) - (local $6 i32) local.get $0 i32.load offset=4 local.set $3 @@ -6657,33 +6619,30 @@ local.get $4 i32.lt_s if - block $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 - local.get $3 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $f32_i32_i32_=>_i32) - if - i32.const 1 - local.set $6 - br $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 - end - local.get $2 + local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + f32.load + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $f32_i32_i32_=>_i32) + if i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end end - local.get $6 + i32.const 0 ) (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -6695,12 +6654,11 @@ f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) - (local $6 i32) local.get $0 i32.load offset=4 local.set $3 @@ -6714,40 +6672,37 @@ local.get $4 i32.lt_s if - block $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $3 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $f64_i32_i32_=>_i32) - if - i32.const 1 - local.set $6 - br $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 - end - local.get $2 + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + f64.load + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $f64_i32_i32_=>_i32) + if i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end end - local.get $6 + i32.const 0 ) (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $~lib/typedarray/Int8Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6758,34 +6713,33 @@ local.get $0 i32.load offset=8 local.set $4 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 - loop $for-loop|0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if local.get $2 - local.get $4 - i32.lt_s + local.get $3 + i32.add + i32.load8_s + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) if local.get $2 - local.get $3 - i32.add - i32.load8_s - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - i32.const -1 - local.set $2 end - local.get $2 + i32.const -1 ) (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -6794,7 +6748,7 @@ i32.const 4 i32.eq ) - (func $~lib/typedarray/Uint8Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6805,36 +6759,35 @@ local.get $0 i32.load offset=8 local.set $4 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 - loop $for-loop|0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if local.get $2 - local.get $4 - i32.lt_s + local.get $3 + i32.add + i32.load8_u + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) if local.get $2 - local.get $3 - i32.add - i32.load8_u - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - i32.const -1 - local.set $2 end - local.get $2 + i32.const -1 ) - (func $~lib/typedarray/Int16Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6847,36 +6800,35 @@ i32.const 1 i32.shr_u local.set $4 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 - loop $for-loop|0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $3 local.get $2 - local.get $4 - i32.lt_s + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) if - local.get $3 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_s - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - i32.const -1 - local.set $2 end - local.get $2 + i32.const -1 ) (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -6885,7 +6837,7 @@ i32.const 4 i32.eq ) - (func $~lib/typedarray/Uint16Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6898,38 +6850,37 @@ i32.const 1 i32.shr_u local.set $4 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 - loop $for-loop|0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $3 local.get $2 - local.get $4 - i32.lt_s + i32.const 1 + i32.shl + i32.add + i32.load16_u + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) if - local.get $3 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_u - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - i32.const -1 - local.set $2 end - local.get $2 + i32.const -1 ) - (func $~lib/typedarray/Int32Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6942,43 +6893,42 @@ i32.const 2 i32.shr_u local.set $4 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 - loop $for-loop|0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $3 local.get $2 - local.get $4 - i32.lt_s + i32.const 2 + i32.shl + i32.add + i32.load + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) if - local.get $3 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - i32.const -1 - local.set $2 end - local.get $2 + i32.const -1 ) (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $~lib/typedarray/Int64Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6991,43 +6941,42 @@ i32.const 3 i32.shr_u local.set $4 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 - loop $for-loop|0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $3 local.get $2 - local.get $4 - i32.lt_s + i32.const 3 + i32.shl + i32.add + i64.load + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i64_i32_i32_=>_i32) if - local.get $3 - local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i64_i32_i32_=>_i32) - br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - i32.const -1 - local.set $2 end - local.get $2 + i32.const -1 ) (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $~lib/typedarray/Float32Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7040,43 +6989,42 @@ i32.const 2 i32.shr_u local.set $4 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 - loop $for-loop|0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $3 local.get $2 - local.get $4 - i32.lt_s + i32.const 2 + i32.shl + i32.add + f32.load + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $f32_i32_i32_=>_i32) if - local.get $3 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $f32_i32_i32_=>_i32) - br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - i32.const -1 - local.set $2 end - local.get $2 + i32.const -1 ) (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $~lib/typedarray/Float64Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7089,36 +7037,35 @@ i32.const 3 i32.shr_u local.set $4 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 - loop $for-loop|0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $3 local.get $2 - local.get $4 - i32.lt_s + i32.const 3 + i32.shl + i32.add + f64.load + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $f64_i32_i32_=>_i32) if - local.get $3 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $f64_i32_i32_=>_i32) - br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - i32.const -1 - local.set $2 end - local.get $2 + i32.const -1 ) (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -7135,47 +7082,45 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int8Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8> (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 $0 i32.load offset=4 local.set $3 local.get $0 i32.load offset=8 local.set $4 - block $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 - loop $for-loop|0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if local.get $2 - local.get $4 - i32.lt_s + local.get $3 + i32.add + i32.load8_s + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + i32.eqz if - local.get $2 - local.get $3 - i32.add - i32.load8_s - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - i32.eqz - br_if $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + i32.const 0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - i32.const 1 - local.set $6 end - local.get $6 + i32.const 1 ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -7183,47 +7128,45 @@ i32.and i32.eqz ) - (func $~lib/typedarray/Uint8Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8> (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 $0 i32.load offset=4 local.set $3 local.get $0 i32.load offset=8 local.set $4 - block $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 - loop $for-loop|0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if local.get $2 - local.get $4 - i32.lt_s + local.get $3 + i32.add + i32.load8_u + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + i32.eqz if - local.get $2 - local.get $3 - i32.add - i32.load8_u - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - i32.eqz - br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + i32.const 0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - i32.const 1 - local.set $6 end - local.get $6 + i32.const 1 ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -7235,12 +7178,11 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int16Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16> (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 $0 i32.load offset=4 local.set $3 @@ -7249,44 +7191,42 @@ i32.const 1 i32.shr_u local.set $4 - block $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 - loop $for-loop|0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $3 local.get $2 - local.get $4 - i32.lt_s + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + i32.eqz if - local.get $3 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_s - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - i32.eqz - br_if $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + i32.const 0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - i32.const 1 - local.set $6 end - local.get $6 + i32.const 1 ) - (func $~lib/typedarray/Uint16Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16> (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 $0 i32.load offset=4 local.set $3 @@ -7295,37 +7235,36 @@ i32.const 1 i32.shr_u local.set $4 - block $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 - loop $for-loop|0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $3 local.get $2 - local.get $4 - i32.lt_s + i32.const 1 + i32.shl + i32.add + i32.load16_u + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + i32.eqz if - local.get $3 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_u - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - i32.eqz - br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + i32.const 0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - i32.const 1 - local.set $6 end - local.get $6 + i32.const 1 ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -7333,12 +7272,11 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int32Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> (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 $0 i32.load offset=4 local.set $3 @@ -7347,37 +7285,36 @@ i32.const 2 i32.shr_u local.set $4 - block $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 - loop $for-loop|0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $3 local.get $2 - local.get $4 - i32.lt_s + i32.const 2 + i32.shl + i32.add + i32.load + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + i32.eqz if - local.get $3 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - i32.eqz - br_if $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + i32.const 0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - i32.const 1 - local.set $6 end - local.get $6 + i32.const 1 ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -7385,12 +7322,11 @@ i64.rem_s i64.eqz ) - (func $~lib/typedarray/Int64Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) - (local $6 i32) local.get $0 i32.load offset=4 local.set $3 @@ -7399,37 +7335,36 @@ i32.const 3 i32.shr_u local.set $4 - block $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 - loop $for-loop|0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $3 local.get $2 - local.get $4 - i32.lt_s + i32.const 3 + i32.shl + i32.add + i64.load + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i64_i32_i32_=>_i32) + i32.eqz if - local.get $3 - local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i64_i32_i32_=>_i32) - i32.eqz - br_if $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + i32.const 0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - i32.const 1 - local.set $6 end - local.get $6 + i32.const 1 ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -7590,12 +7525,11 @@ f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 f32) - (local $6 i32) local.get $0 i32.load offset=4 local.set $3 @@ -7604,37 +7538,36 @@ i32.const 2 i32.shr_u local.set $4 - block $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 - loop $for-loop|0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $3 local.get $2 - local.get $4 - i32.lt_s + i32.const 2 + i32.shl + i32.add + f32.load + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $f32_i32_i32_=>_i32) + i32.eqz if - local.get $3 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $f32_i32_i32_=>_i32) - i32.eqz - br_if $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + i32.const 0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - i32.const 1 - local.set $6 end - local.get $6 + i32.const 1 ) (func $~lib/math/NativeMath.mod (param $0 f64) (result f64) (local $1 i64) @@ -7796,12 +7729,11 @@ f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) - (local $6 i32) local.get $0 i32.load offset=4 local.set $3 @@ -7810,37 +7742,36 @@ i32.const 3 i32.shr_u local.set $4 - block $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 - loop $for-loop|0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $3 local.get $2 - local.get $4 - i32.lt_s + i32.const 3 + i32.shl + i32.add + f64.load + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $f64_i32_i32_=>_i32) + i32.eqz if - local.get $3 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $f64_i32_i32_=>_i32) - i32.eqz - br_if $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + i32.const 0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - i32.const 1 - local.set $6 end - local.get $6 + i32.const 1 ) (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 @@ -7887,7 +7818,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8Array#forEach (param $0 i32) (param $1 i32) + (func $~lib/typedarray/FOREACH<~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8007,7 +7938,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (param $0 i32) (param $1 i32) + (func $~lib/typedarray/FOREACH<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8087,7 +8018,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (param $0 i32) (param $1 i32) + (func $~lib/typedarray/FOREACH<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8209,7 +8140,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Int8Array,i8> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8309,7 +8240,7 @@ end end local.get $2 - call $~lib/typedarray/Int8Array#reverse + call $~lib/typedarray/REVERSE<~lib/typedarray/Int8Array,i8> call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -8351,9 +8282,10 @@ local.get $3 i32.const 4 i32.const 8 - call $~lib/typedarray/Int8Array#subarray - local.tee $1 - call $~lib/typedarray/Int8Array#reverse + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> + local.tee $0 + local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Int8Array,i8> local.tee $0 i32.const 0 call $~lib/typedarray/Int8Array#__get @@ -8410,12 +8342,11 @@ call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $1 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Uint8Array,u8> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8465,7 +8396,7 @@ end local.get $3 ) - (func $~lib/typedarray/Uint8Array#subarray (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -8572,7 +8503,7 @@ end end local.get $2 - call $~lib/typedarray/Uint8Array#reverse + call $~lib/typedarray/REVERSE<~lib/typedarray/Uint8Array,u8> call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -8611,9 +8542,10 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Uint8Array#subarray - local.tee $1 - call $~lib/typedarray/Uint8Array#reverse + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8Array,u8> + local.tee $0 + local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Uint8Array,u8> local.tee $0 i32.const 0 call $~lib/typedarray/Uint8Array#__get @@ -8670,12 +8602,11 @@ call $~lib/rt/pure/__release local.get $5 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#subarray (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8ClampedArray,u8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -8782,7 +8713,7 @@ end end local.get $2 - call $~lib/typedarray/Uint8Array#reverse + call $~lib/typedarray/REVERSE<~lib/typedarray/Uint8Array,u8> call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -8821,9 +8752,10 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Uint8ClampedArray#subarray - local.tee $1 - call $~lib/typedarray/Uint8Array#reverse + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8ClampedArray,u8> + local.tee $0 + local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Uint8Array,u8> local.tee $0 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#__get @@ -8880,12 +8812,11 @@ call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $1 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Int16Array,i16> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8941,7 +8872,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int16Array#subarray (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -9058,7 +8989,7 @@ end end local.get $2 - call $~lib/typedarray/Int16Array#reverse + call $~lib/typedarray/REVERSE<~lib/typedarray/Int16Array,i16> call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -9099,9 +9030,10 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Int16Array#subarray - local.tee $1 - call $~lib/typedarray/Int16Array#reverse + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int16Array,i16> + local.tee $0 + local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Int16Array,i16> local.tee $0 i32.const 0 call $~lib/typedarray/Int16Array#__get @@ -9158,12 +9090,11 @@ call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $1 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Uint16Array,u16> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9219,7 +9150,7 @@ end local.get $3 ) - (func $~lib/typedarray/Uint16Array#subarray (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint16Array,u16> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -9332,7 +9263,7 @@ end end local.get $2 - call $~lib/typedarray/Uint16Array#reverse + call $~lib/typedarray/REVERSE<~lib/typedarray/Uint16Array,u16> call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -9371,9 +9302,10 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Uint16Array#subarray - local.tee $1 - call $~lib/typedarray/Uint16Array#reverse + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint16Array,u16> + local.tee $0 + local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Uint16Array,u16> local.tee $0 i32.const 0 call $~lib/typedarray/Uint16Array#__get @@ -9430,12 +9362,11 @@ call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $1 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Int32Array,i32> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9533,7 +9464,7 @@ end end local.get $2 - call $~lib/typedarray/Int32Array#reverse + call $~lib/typedarray/REVERSE<~lib/typedarray/Int32Array,i32> call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -9571,9 +9502,10 @@ local.get $3 i32.const 4 i32.const 8 - call $~lib/typedarray/Int32Array#subarray - local.tee $1 - call $~lib/typedarray/Int32Array#reverse + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int32Array,i32> + local.tee $0 + local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Int32Array,i32> local.tee $0 i32.const 0 call $~lib/typedarray/Int32Array#__get @@ -9630,12 +9562,11 @@ call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $1 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#subarray (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint32Array,u32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -9744,7 +9675,7 @@ end end local.get $2 - call $~lib/typedarray/Int32Array#reverse + call $~lib/typedarray/REVERSE<~lib/typedarray/Int32Array,i32> call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -9781,9 +9712,10 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Uint32Array#subarray - local.tee $1 - call $~lib/typedarray/Int32Array#reverse + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint32Array,u32> + local.tee $0 + local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Int32Array,i32> local.tee $0 i32.const 0 call $~lib/typedarray/Uint32Array#__get @@ -9840,12 +9772,11 @@ call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $1 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Int64Array,i64> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9901,7 +9832,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int64Array#subarray (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -10012,7 +9943,7 @@ end end local.get $2 - call $~lib/typedarray/Int64Array#reverse + call $~lib/typedarray/REVERSE<~lib/typedarray/Int64Array,i64> call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -10050,9 +9981,10 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Int64Array#subarray - local.tee $1 - call $~lib/typedarray/Int64Array#reverse + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int64Array,i64> + local.tee $0 + local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Int64Array,i64> local.tee $0 i32.const 0 call $~lib/typedarray/Int64Array#__get @@ -10109,12 +10041,11 @@ call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $1 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#subarray (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint64Array,u64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -10225,7 +10156,7 @@ end end local.get $2 - call $~lib/typedarray/Int64Array#reverse + call $~lib/typedarray/REVERSE<~lib/typedarray/Int64Array,i64> call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -10263,9 +10194,10 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Uint64Array#subarray - local.tee $1 - call $~lib/typedarray/Int64Array#reverse + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint64Array,u64> + local.tee $0 + local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Int64Array,i64> local.tee $0 i32.const 0 call $~lib/typedarray/Uint64Array#__get @@ -10322,12 +10254,11 @@ call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $1 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Float32Array,f32> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10383,7 +10314,7 @@ end local.get $3 ) - (func $~lib/typedarray/Float32Array#subarray (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -10494,7 +10425,7 @@ end end local.get $2 - call $~lib/typedarray/Float32Array#reverse + call $~lib/typedarray/REVERSE<~lib/typedarray/Float32Array,f32> call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -10532,9 +10463,10 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Float32Array#subarray - local.tee $1 - call $~lib/typedarray/Float32Array#reverse + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Float32Array,f32> + local.tee $0 + local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Float32Array,f32> local.tee $0 i32.const 0 call $~lib/typedarray/Float32Array#__get @@ -10591,12 +10523,11 @@ call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $1 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Float64Array,f64> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10696,7 +10627,7 @@ end end local.get $2 - call $~lib/typedarray/Float64Array#reverse + call $~lib/typedarray/REVERSE<~lib/typedarray/Float64Array,f64> call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -10735,9 +10666,10 @@ local.get $3 i32.const 4 i32.const 8 - call $~lib/typedarray/Float64Array#subarray - local.tee $1 - call $~lib/typedarray/Float64Array#reverse + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Float64Array,f64> + local.tee $0 + local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Float64Array,f64> local.tee $0 i32.const 0 call $~lib/typedarray/Float64Array#__get @@ -10794,129 +10726,124 @@ call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $1 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 - local.get $0 - i32.load offset=8 - local.tee $3 - if (result i32) - local.get $2 - local.get $3 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - local.set $2 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 - end + local.get $0 + i32.load offset=8 + local.tee $3 + if (result i32) + local.get $2 + local.get $3 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + return + end + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 local.get $2 i32.const 0 + i32.gt_s + select + local.set $2 + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $3 i32.lt_s if + local.get $0 local.get $2 - local.get $3 i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.set $2 - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_s + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq if - local.get $0 - local.get $2 - i32.add - i32.load8_u - local.get $1 - i32.const 255 - i32.and - i32.eq - br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 end - i32.const -1 - local.set $2 end - local.get $2 + i32.const -1 ) - (func $~lib/typedarray/Int8Array#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 - local.get $0 - i32.load offset=8 - local.tee $3 - i32.eqz - if - i32.const -1 - local.set $2 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 - end - local.get $2 - local.get $3 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select + local.get $0 + i32.load offset=8 + local.tee $3 + i32.eqz + if + i32.const -1 + return + end + local.get $2 + local.get $3 + i32.add + local.get $3 + i32.const 1 + i32.sub + local.get $2 + local.get $2 + local.get $3 + i32.ge_s + select + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $2 + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 local.get $2 i32.const 0 - i32.lt_s - select - local.set $2 - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 + i32.ge_s + if + local.get $0 local.get $2 - i32.const 0 - i32.ge_s + i32.add + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq if - local.get $0 - local.get $2 - i32.add - i32.load8_u - local.get $1 - i32.const 255 - i32.and - i32.eq - br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 + return end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 end - i32.const -1 - local.set $2 end - local.get $2 + i32.const -1 ) (func $~lib/typedarray/Int8Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -10937,7 +10864,7 @@ local.get $0 local.get $1 local.get $2 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> (local $0 i32) @@ -10977,7 +10904,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> if i32.const 0 i32.const 1312 @@ -10989,7 +10916,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11003,7 +10930,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11017,7 +10944,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 3 i32.ne if @@ -11031,7 +10958,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 3 i32.ne if @@ -11045,7 +10972,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 3 i32.ne if @@ -11059,7 +10986,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11073,7 +11000,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11087,7 +11014,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 1 i32.ne if @@ -11159,7 +11086,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 3 i32.ne if @@ -11173,7 +11100,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 3 i32.ne if @@ -11187,7 +11114,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11201,7 +11128,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 1 i32.ne if @@ -11215,7 +11142,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 1 i32.ne if @@ -11229,7 +11156,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11243,11 +11170,11 @@ local.get $0 i32.const 4 i32.const 9 - call $~lib/typedarray/Int8Array#subarray + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> local.tee $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11261,7 +11188,7 @@ local.get $0 i32.const 4 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> if i32.const 0 i32.const 1312 @@ -11273,7 +11200,7 @@ local.get $0 i32.const 5 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 1 i32.ne if @@ -11287,7 +11214,7 @@ local.get $0 i32.const 9 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11301,7 +11228,7 @@ local.get $0 i32.const 10 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11315,7 +11242,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11329,7 +11256,7 @@ local.get $0 i32.const 5 i32.const 1 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 1 i32.ne if @@ -11343,7 +11270,7 @@ local.get $0 i32.const 5 i32.const 2 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11395,7 +11322,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> if i32.const 0 i32.const 1312 @@ -11407,7 +11334,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11421,7 +11348,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11435,7 +11362,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 3 i32.ne if @@ -11449,7 +11376,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 3 i32.ne if @@ -11463,7 +11390,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 3 i32.ne if @@ -11477,7 +11404,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11491,7 +11418,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11505,7 +11432,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 1 i32.ne if @@ -11577,7 +11504,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 3 i32.ne if @@ -11591,7 +11518,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 3 i32.ne if @@ -11605,7 +11532,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11619,7 +11546,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 1 i32.ne if @@ -11633,7 +11560,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 1 i32.ne if @@ -11647,7 +11574,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11660,11 +11587,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Uint8Array#subarray + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8Array,u8> local.tee $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11678,7 +11605,7 @@ local.get $0 i32.const 4 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> if i32.const 0 i32.const 1312 @@ -11690,7 +11617,7 @@ local.get $0 i32.const 5 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 1 i32.ne if @@ -11704,7 +11631,7 @@ local.get $0 i32.const 9 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11718,7 +11645,7 @@ local.get $0 i32.const 10 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11732,7 +11659,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11746,7 +11673,7 @@ local.get $0 i32.const 5 i32.const 1 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 1 i32.ne if @@ -11760,7 +11687,7 @@ local.get $0 i32.const 5 i32.const 2 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11812,7 +11739,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> if i32.const 0 i32.const 1312 @@ -11824,7 +11751,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11838,7 +11765,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11852,7 +11779,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 3 i32.ne if @@ -11866,7 +11793,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 3 i32.ne if @@ -11880,7 +11807,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 3 i32.ne if @@ -11894,7 +11821,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11908,7 +11835,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -11922,7 +11849,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 1 i32.ne if @@ -11994,7 +11921,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 3 i32.ne if @@ -12008,7 +11935,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 3 i32.ne if @@ -12022,7 +11949,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -12036,7 +11963,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 1 i32.ne if @@ -12050,7 +11977,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 1 i32.ne if @@ -12064,7 +11991,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -12077,11 +12004,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Uint8ClampedArray#subarray + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8ClampedArray,u8> local.tee $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -12095,7 +12022,7 @@ local.get $0 i32.const 4 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> if i32.const 0 i32.const 1312 @@ -12107,7 +12034,7 @@ local.get $0 i32.const 5 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 1 i32.ne if @@ -12121,7 +12048,7 @@ local.get $0 i32.const 9 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -12135,7 +12062,7 @@ local.get $0 i32.const 10 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -12149,7 +12076,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -12163,7 +12090,7 @@ local.get $0 i32.const 5 i32.const 1 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 1 i32.ne if @@ -12177,7 +12104,7 @@ local.get $0 i32.const 5 i32.const 2 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const -1 i32.ne if @@ -12193,132 +12120,128 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 - local.get $0 - i32.load offset=8 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.tee $3 + if (result i32) + local.get $2 + local.get $3 + i32.ge_s + else i32.const 1 - i32.shr_u - local.tee $3 - if (result i32) - local.get $2 - local.get $3 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - local.set $2 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 - end + end + if + i32.const -1 + return + end + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 local.get $2 i32.const 0 + i32.gt_s + select + local.set $2 + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $3 i32.lt_s if + local.get $0 local.get $2 - local.get $3 + i32.const 1 + i32.shl i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.set $2 - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_s + i32.load16_u + local.get $1 + i32.const 65535 + i32.and + i32.eq if - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.get $1 - i32.const 65535 - i32.and - i32.eq - br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 end - i32.const -1 - local.set $2 end - local.get $2 + i32.const -1 ) - (func $~lib/typedarray/Int16Array#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.tee $3 - i32.eqz - if - i32.const -1 - local.set $2 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 - end - local.get $2 - local.get $3 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.tee $3 + i32.eqz + if + i32.const -1 + return + end + local.get $2 + local.get $3 + i32.add + local.get $3 + i32.const 1 + i32.sub + local.get $2 + local.get $2 + local.get $3 + i32.ge_s + select + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $2 + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 local.get $2 i32.const 0 - i32.lt_s - select - local.set $2 - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 + i32.ge_s + if + local.get $0 local.get $2 - i32.const 0 - i32.ge_s + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $1 + i32.const 65535 + i32.and + i32.eq if - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.get $1 - i32.const 65535 - i32.and - i32.eq - br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 + return end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 end - i32.const -1 - local.set $2 end - local.get $2 + i32.const -1 ) (func $~lib/typedarray/Int16Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -12341,7 +12264,7 @@ local.get $0 local.get $1 local.get $2 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> (local $0 i32) @@ -12381,7 +12304,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> if i32.const 0 i32.const 1312 @@ -12393,7 +12316,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -12407,7 +12330,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -12421,7 +12344,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 3 i32.ne if @@ -12435,7 +12358,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 3 i32.ne if @@ -12449,7 +12372,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 3 i32.ne if @@ -12463,7 +12386,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -12477,7 +12400,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -12491,7 +12414,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 1 i32.ne if @@ -12563,7 +12486,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 3 i32.ne if @@ -12577,7 +12500,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 3 i32.ne if @@ -12591,7 +12514,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -12605,7 +12528,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 1 i32.ne if @@ -12619,7 +12542,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 1 i32.ne if @@ -12633,7 +12556,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -12646,11 +12569,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Int16Array#subarray + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int16Array,i16> local.tee $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -12664,7 +12587,7 @@ local.get $0 i32.const 4 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> if i32.const 0 i32.const 1312 @@ -12676,7 +12599,7 @@ local.get $0 i32.const 5 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 1 i32.ne if @@ -12690,7 +12613,7 @@ local.get $0 i32.const 9 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -12704,7 +12627,7 @@ local.get $0 i32.const 10 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -12718,7 +12641,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -12732,7 +12655,7 @@ local.get $0 i32.const 5 i32.const 1 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 1 i32.ne if @@ -12746,7 +12669,7 @@ local.get $0 i32.const 5 i32.const 2 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -12798,7 +12721,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> if i32.const 0 i32.const 1312 @@ -12810,7 +12733,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -12824,7 +12747,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -12838,7 +12761,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 3 i32.ne if @@ -12852,7 +12775,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 3 i32.ne if @@ -12866,7 +12789,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 3 i32.ne if @@ -12880,7 +12803,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -12894,7 +12817,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -12908,7 +12831,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 1 i32.ne if @@ -12980,7 +12903,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 3 i32.ne if @@ -12994,7 +12917,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 3 i32.ne if @@ -13008,7 +12931,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -13022,7 +12945,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 1 i32.ne if @@ -13036,7 +12959,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 1 i32.ne if @@ -13050,7 +12973,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -13063,11 +12986,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Uint16Array#subarray + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint16Array,u16> local.tee $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -13081,7 +13004,7 @@ local.get $0 i32.const 4 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> if i32.const 0 i32.const 1312 @@ -13093,7 +13016,7 @@ local.get $0 i32.const 5 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 1 i32.ne if @@ -13107,7 +13030,7 @@ local.get $0 i32.const 9 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -13121,7 +13044,7 @@ local.get $0 i32.const 10 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -13135,7 +13058,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -13149,7 +13072,7 @@ local.get $0 i32.const 5 i32.const 1 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 1 i32.ne if @@ -13163,7 +13086,7 @@ local.get $0 i32.const 5 i32.const 2 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -13179,128 +13102,124 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $3 - if (result i32) - local.get $2 - local.get $3 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - local.set $2 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 - end + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $3 + if (result i32) local.get $2 - i32.const 0 - i32.lt_s - if - local.get $2 - local.get $3 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.set $2 - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - i32.eq - br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 - end - end + local.get $3 + i32.ge_s + else + i32.const 1 + end + if i32.const -1 - local.set $2 + return end local.get $2 - ) - (func $~lib/typedarray/Int32Array#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $3 - i32.eqz - if - i32.const -1 - local.set $2 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 - end + i32.const 0 + i32.lt_s + if local.get $2 local.get $3 i32.add - local.get $3 - i32.const 1 - i32.sub - local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select + local.tee $2 + i32.const 0 local.get $2 i32.const 0 - i32.lt_s + i32.gt_s select local.set $2 - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $1 + local.get $0 local.get $2 - i32.const 0 - i32.ge_s + i32.const 2 + i32.shl + i32.add + i32.load + i32.eq if - local.get $1 - local.get $0 local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - i32.eq - br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 end + end + i32.const -1 + ) + (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $3 + i32.eqz + if i32.const -1 - local.set $2 + return end local.get $2 + local.get $3 + i32.add + local.get $3 + i32.const 1 + i32.sub + local.get $2 + local.get $2 + local.get $3 + i32.ge_s + select + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $2 + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + i32.const 0 + i32.ge_s + if + local.get $1 + local.get $0 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + i32.eq + if + local.get $2 + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 + end + end + i32.const -1 ) (func $~lib/typedarray/Int32Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -13323,7 +13242,7 @@ local.get $0 local.get $1 local.get $2 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> (local $0 i32) @@ -13359,7 +13278,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> if i32.const 0 i32.const 1312 @@ -13371,7 +13290,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -13385,7 +13304,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -13399,7 +13318,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 3 i32.ne if @@ -13413,7 +13332,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 3 i32.ne if @@ -13427,7 +13346,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 3 i32.ne if @@ -13441,7 +13360,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -13455,7 +13374,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -13469,7 +13388,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 1 i32.ne if @@ -13541,7 +13460,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 3 i32.ne if @@ -13555,7 +13474,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 3 i32.ne if @@ -13569,7 +13488,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -13583,7 +13502,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 1 i32.ne if @@ -13597,7 +13516,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 1 i32.ne if @@ -13611,7 +13530,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -13625,11 +13544,11 @@ local.get $0 i32.const 4 i32.const 9 - call $~lib/typedarray/Int32Array#subarray + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int32Array,i32> local.tee $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -13643,7 +13562,7 @@ local.get $0 i32.const 4 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> if i32.const 0 i32.const 1312 @@ -13655,7 +13574,7 @@ local.get $0 i32.const 5 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 1 i32.ne if @@ -13669,7 +13588,7 @@ local.get $0 i32.const 9 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -13683,7 +13602,7 @@ local.get $0 i32.const 10 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -13697,7 +13616,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -13711,7 +13630,7 @@ local.get $0 i32.const 5 i32.const 1 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 1 i32.ne if @@ -13725,7 +13644,7 @@ local.get $0 i32.const 5 i32.const 2 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -13775,7 +13694,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> if i32.const 0 i32.const 1312 @@ -13787,7 +13706,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -13801,7 +13720,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -13815,7 +13734,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 3 i32.ne if @@ -13829,7 +13748,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 3 i32.ne if @@ -13843,7 +13762,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 3 i32.ne if @@ -13857,7 +13776,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -13871,7 +13790,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -13885,7 +13804,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 1 i32.ne if @@ -13957,7 +13876,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 3 i32.ne if @@ -13971,7 +13890,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 3 i32.ne if @@ -13985,7 +13904,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -13999,7 +13918,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 1 i32.ne if @@ -14013,7 +13932,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 1 i32.ne if @@ -14027,7 +13946,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -14040,11 +13959,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Uint32Array#subarray + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint32Array,u32> local.tee $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -14058,7 +13977,7 @@ local.get $0 i32.const 4 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> if i32.const 0 i32.const 1312 @@ -14070,7 +13989,7 @@ local.get $0 i32.const 5 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 1 i32.ne if @@ -14084,7 +14003,7 @@ local.get $0 i32.const 9 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -14098,7 +14017,7 @@ local.get $0 i32.const 10 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -14112,7 +14031,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -14126,7 +14045,7 @@ local.get $0 i32.const 5 i32.const 1 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 1 i32.ne if @@ -14140,7 +14059,7 @@ local.get $0 i32.const 5 i32.const 2 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -14156,128 +14075,124 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#indexOf (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - if (result i32) - local.get $2 - local.get $3 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - local.set $2 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 - end + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $3 + if (result i32) + local.get $2 + local.get $3 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + return + end + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 local.get $2 i32.const 0 + i32.gt_s + select + local.set $2 + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $3 i32.lt_s if + local.get $1 + local.get $0 local.get $2 - local.get $3 + i32.const 3 + i32.shl i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.set $2 - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_s + i64.load + i64.eq if - local.get $1 - local.get $0 - local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - i64.eq - br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 end - i32.const -1 - local.set $2 end - local.get $2 + i32.const -1 ) - (func $~lib/typedarray/Int64Array#lastIndexOf (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - i32.eqz - if - i32.const -1 - local.set $2 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 - end - local.get $2 - local.get $3 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $3 + i32.eqz + if + i32.const -1 + return + end + local.get $2 + local.get $3 + i32.add + local.get $3 + i32.const 1 + i32.sub + local.get $2 + local.get $2 + local.get $3 + i32.ge_s + select + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $2 + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 local.get $2 i32.const 0 - i32.lt_s - select - local.set $2 - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 + i32.ge_s + if + local.get $1 + local.get $0 local.get $2 - i32.const 0 - i32.ge_s + i32.const 3 + i32.shl + i32.add + i64.load + i64.eq if - local.get $1 - local.get $0 - local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - i64.eq - br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 + return end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 end - i32.const -1 - local.set $2 end - local.get $2 + i32.const -1 ) (func $~lib/typedarray/Int64Array#lastIndexOf@varargs (param $0 i32) (param $1 i64) (result i32) (local $2 i32) @@ -14300,7 +14215,7 @@ local.get $0 local.get $1 local.get $2 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> (local $0 i32) @@ -14337,7 +14252,7 @@ local.get $0 i64.const 0 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> if i32.const 0 i32.const 1312 @@ -14349,7 +14264,7 @@ local.get $0 i64.const 11 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -14363,7 +14278,7 @@ local.get $0 i64.const -1 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -14377,7 +14292,7 @@ local.get $0 i64.const 3 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 3 i32.ne if @@ -14391,7 +14306,7 @@ local.get $0 i64.const 3 i32.const 2 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 3 i32.ne if @@ -14405,7 +14320,7 @@ local.get $0 i64.const 3 i32.const 3 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 3 i32.ne if @@ -14419,7 +14334,7 @@ local.get $0 i64.const 3 i32.const 4 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -14433,7 +14348,7 @@ local.get $0 i64.const 1 i32.const 10 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -14447,7 +14362,7 @@ local.get $0 i64.const 1 i32.const -100 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 1 i32.ne if @@ -14519,7 +14434,7 @@ local.get $0 i64.const 3 i32.const 4 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 3 i32.ne if @@ -14533,7 +14448,7 @@ local.get $0 i64.const 3 i32.const 3 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 3 i32.ne if @@ -14547,7 +14462,7 @@ local.get $0 i64.const 3 i32.const 2 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -14561,7 +14476,7 @@ local.get $0 i64.const 1 i32.const 100 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 1 i32.ne if @@ -14575,7 +14490,7 @@ local.get $0 i64.const 1 i32.const -10 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 1 i32.ne if @@ -14589,7 +14504,7 @@ local.get $0 i64.const 1 i32.const -11 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -14602,11 +14517,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Int64Array#subarray + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int64Array,i64> local.tee $0 i64.const 3 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -14620,7 +14535,7 @@ local.get $0 i64.const 4 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> if i32.const 0 i32.const 1312 @@ -14632,7 +14547,7 @@ local.get $0 i64.const 5 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 1 i32.ne if @@ -14646,7 +14561,7 @@ local.get $0 i64.const 9 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -14660,7 +14575,7 @@ local.get $0 i64.const 10 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -14674,7 +14589,7 @@ local.get $0 i64.const 11 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -14688,7 +14603,7 @@ local.get $0 i64.const 5 i32.const 1 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 1 i32.ne if @@ -14702,7 +14617,7 @@ local.get $0 i64.const 5 i32.const 2 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -14753,7 +14668,7 @@ local.get $0 i64.const 0 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> if i32.const 0 i32.const 1312 @@ -14765,7 +14680,7 @@ local.get $0 i64.const 11 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -14779,7 +14694,7 @@ local.get $0 i64.const -1 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -14793,7 +14708,7 @@ local.get $0 i64.const 3 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 3 i32.ne if @@ -14807,7 +14722,7 @@ local.get $0 i64.const 3 i32.const 2 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 3 i32.ne if @@ -14821,7 +14736,7 @@ local.get $0 i64.const 3 i32.const 3 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 3 i32.ne if @@ -14835,7 +14750,7 @@ local.get $0 i64.const 3 i32.const 4 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -14849,7 +14764,7 @@ local.get $0 i64.const 1 i32.const 10 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -14863,7 +14778,7 @@ local.get $0 i64.const 1 i32.const -100 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 1 i32.ne if @@ -14935,7 +14850,7 @@ local.get $0 i64.const 3 i32.const 4 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 3 i32.ne if @@ -14949,7 +14864,7 @@ local.get $0 i64.const 3 i32.const 3 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 3 i32.ne if @@ -14963,7 +14878,7 @@ local.get $0 i64.const 3 i32.const 2 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -14977,7 +14892,7 @@ local.get $0 i64.const 1 i32.const 100 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 1 i32.ne if @@ -14991,7 +14906,7 @@ local.get $0 i64.const 1 i32.const -10 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 1 i32.ne if @@ -15005,7 +14920,7 @@ local.get $0 i64.const 1 i32.const -11 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -15018,11 +14933,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Uint64Array#subarray + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint64Array,u64> local.tee $0 i64.const 3 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -15036,7 +14951,7 @@ local.get $0 i64.const 4 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> if i32.const 0 i32.const 1312 @@ -15048,7 +14963,7 @@ local.get $0 i64.const 5 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 1 i32.ne if @@ -15062,7 +14977,7 @@ local.get $0 i64.const 9 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -15076,7 +14991,7 @@ local.get $0 i64.const 10 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -15090,7 +15005,7 @@ local.get $0 i64.const 11 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -15104,7 +15019,7 @@ local.get $0 i64.const 5 i32.const 1 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 1 i32.ne if @@ -15118,7 +15033,7 @@ local.get $0 i64.const 5 i32.const 2 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -15134,128 +15049,124 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#indexOf (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $3 - if (result i32) - local.get $2 - local.get $3 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - local.set $2 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 - end + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $3 + if (result i32) + local.get $2 + local.get $3 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + return + end + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 local.get $2 i32.const 0 + i32.gt_s + select + local.set $2 + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $3 i32.lt_s if + local.get $0 local.get $2 - local.get $3 + i32.const 2 + i32.shl i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.set $2 - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_s + f32.load + local.get $1 + f32.eq if - local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - local.get $1 - f32.eq - br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 end - i32.const -1 - local.set $2 end - local.get $2 + i32.const -1 ) - (func $~lib/typedarray/Float32Array#lastIndexOf (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $3 - i32.eqz - if - i32.const -1 - local.set $2 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 - end - local.get $2 - local.get $3 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $3 + i32.eqz + if + i32.const -1 + return + end + local.get $2 + local.get $3 + i32.add + local.get $3 + i32.const 1 + i32.sub + local.get $2 + local.get $2 + local.get $3 + i32.ge_s + select + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $2 + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 local.get $2 i32.const 0 - i32.lt_s - select - local.set $2 - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 + i32.ge_s + if + local.get $0 local.get $2 - i32.const 0 - i32.ge_s + i32.const 2 + i32.shl + i32.add + f32.load + local.get $1 + f32.eq if - local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - local.get $1 - f32.eq - br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 + return end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 end - i32.const -1 - local.set $2 end - local.get $2 + i32.const -1 ) (func $~lib/typedarray/Float32Array#lastIndexOf@varargs (param $0 i32) (param $1 f32) (result i32) (local $2 i32) @@ -15278,7 +15189,7 @@ local.get $0 local.get $1 local.get $2 - call $~lib/typedarray/Float32Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> (local $0 i32) @@ -15315,7 +15226,7 @@ local.get $0 f32.const 0 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> if i32.const 0 i32.const 1312 @@ -15327,7 +15238,7 @@ local.get $0 f32.const 11 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> i32.const -1 i32.ne if @@ -15341,7 +15252,7 @@ local.get $0 f32.const -1 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> i32.const -1 i32.ne if @@ -15355,7 +15266,7 @@ local.get $0 f32.const 3 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> i32.const 3 i32.ne if @@ -15369,7 +15280,7 @@ local.get $0 f32.const 3 i32.const 2 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> i32.const 3 i32.ne if @@ -15383,7 +15294,7 @@ local.get $0 f32.const 3 i32.const 3 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> i32.const 3 i32.ne if @@ -15397,7 +15308,7 @@ local.get $0 f32.const 3 i32.const 4 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> i32.const -1 i32.ne if @@ -15411,7 +15322,7 @@ local.get $0 f32.const 1 i32.const 10 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> i32.const -1 i32.ne if @@ -15425,7 +15336,7 @@ local.get $0 f32.const 1 i32.const -100 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> i32.const 1 i32.ne if @@ -15497,7 +15408,7 @@ local.get $0 f32.const 3 i32.const 4 - call $~lib/typedarray/Float32Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> i32.const 3 i32.ne if @@ -15511,7 +15422,7 @@ local.get $0 f32.const 3 i32.const 3 - call $~lib/typedarray/Float32Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> i32.const 3 i32.ne if @@ -15525,7 +15436,7 @@ local.get $0 f32.const 3 i32.const 2 - call $~lib/typedarray/Float32Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> i32.const -1 i32.ne if @@ -15539,7 +15450,7 @@ local.get $0 f32.const 1 i32.const 100 - call $~lib/typedarray/Float32Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> i32.const 1 i32.ne if @@ -15553,7 +15464,7 @@ local.get $0 f32.const 1 i32.const -10 - call $~lib/typedarray/Float32Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> i32.const 1 i32.ne if @@ -15567,7 +15478,7 @@ local.get $0 f32.const 1 i32.const -11 - call $~lib/typedarray/Float32Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> i32.const -1 i32.ne if @@ -15580,11 +15491,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Float32Array#subarray + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Float32Array,f32> local.tee $0 f32.const 3 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> i32.const -1 i32.ne if @@ -15598,7 +15509,7 @@ local.get $0 f32.const 4 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> if i32.const 0 i32.const 1312 @@ -15610,7 +15521,7 @@ local.get $0 f32.const 5 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> i32.const 1 i32.ne if @@ -15624,7 +15535,7 @@ local.get $0 f32.const 9 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> i32.const -1 i32.ne if @@ -15638,7 +15549,7 @@ local.get $0 f32.const 10 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> i32.const -1 i32.ne if @@ -15652,7 +15563,7 @@ local.get $0 f32.const 11 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> i32.const -1 i32.ne if @@ -15666,7 +15577,7 @@ local.get $0 f32.const 5 i32.const 1 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> i32.const 1 i32.ne if @@ -15680,7 +15591,7 @@ local.get $0 f32.const 5 i32.const 2 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> i32.const -1 i32.ne if @@ -15696,128 +15607,124 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#indexOf (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - if (result i32) - local.get $2 - local.get $3 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - local.set $2 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - end + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $3 + if (result i32) + local.get $2 + local.get $3 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + return + end + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 local.get $2 i32.const 0 + i32.gt_s + select + local.set $2 + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $3 i32.lt_s if + local.get $0 local.get $2 - local.get $3 + i32.const 3 + i32.shl i32.add - local.tee $2 - i32.const 0 + f64.load + local.get $1 + f64.eq + if + local.get $2 + return + end local.get $2 - i32.const 0 - i32.gt_s - select + i32.const 1 + i32.add local.set $2 + br $while-continue|0 end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - local.get $1 - f64.eq - br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - local.set $2 end - local.get $2 + i32.const -1 ) - (func $~lib/typedarray/Float64Array#lastIndexOf (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - i32.eqz - if - i32.const -1 - local.set $2 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - end - local.get $2 - local.get $3 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $3 + i32.eqz + if + i32.const -1 + return + end + local.get $2 + local.get $3 + i32.add + local.get $3 + i32.const 1 + i32.sub + local.get $2 + local.get $2 + local.get $3 + i32.ge_s + select + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $2 + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 local.get $2 i32.const 0 - i32.lt_s - select - local.set $2 - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 + i32.ge_s + if + local.get $0 local.get $2 - i32.const 0 - i32.ge_s + i32.const 3 + i32.shl + i32.add + f64.load + local.get $1 + f64.eq if - local.get $0 local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - local.get $1 - f64.eq - br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 + return end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 end - i32.const -1 - local.set $2 end - local.get $2 + i32.const -1 ) (func $~lib/typedarray/Float64Array#lastIndexOf@varargs (param $0 i32) (param $1 f64) (result i32) (local $2 i32) @@ -15840,7 +15747,7 @@ local.get $0 local.get $1 local.get $2 - call $~lib/typedarray/Float64Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> (local $0 i32) @@ -15877,7 +15784,7 @@ local.get $0 f64.const 0 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> if i32.const 0 i32.const 1312 @@ -15889,7 +15796,7 @@ local.get $0 f64.const 11 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const -1 i32.ne if @@ -15903,7 +15810,7 @@ local.get $0 f64.const -1 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const -1 i32.ne if @@ -15917,7 +15824,7 @@ local.get $0 f64.const 3 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const 3 i32.ne if @@ -15931,7 +15838,7 @@ local.get $0 f64.const 3 i32.const 2 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const 3 i32.ne if @@ -15945,7 +15852,7 @@ local.get $0 f64.const 3 i32.const 3 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const 3 i32.ne if @@ -15959,7 +15866,7 @@ local.get $0 f64.const 3 i32.const 4 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const -1 i32.ne if @@ -15973,7 +15880,7 @@ local.get $0 f64.const 1 i32.const 10 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const -1 i32.ne if @@ -15987,7 +15894,7 @@ local.get $0 f64.const 1 i32.const -100 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const 1 i32.ne if @@ -16059,7 +15966,7 @@ local.get $0 f64.const 3 i32.const 4 - call $~lib/typedarray/Float64Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const 3 i32.ne if @@ -16073,7 +15980,7 @@ local.get $0 f64.const 3 i32.const 3 - call $~lib/typedarray/Float64Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const 3 i32.ne if @@ -16087,7 +15994,7 @@ local.get $0 f64.const 3 i32.const 2 - call $~lib/typedarray/Float64Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const -1 i32.ne if @@ -16101,7 +16008,7 @@ local.get $0 f64.const 1 i32.const 100 - call $~lib/typedarray/Float64Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const 1 i32.ne if @@ -16115,7 +16022,7 @@ local.get $0 f64.const 1 i32.const -10 - call $~lib/typedarray/Float64Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const 1 i32.ne if @@ -16129,7 +16036,7 @@ local.get $0 f64.const 1 i32.const -11 - call $~lib/typedarray/Float64Array#lastIndexOf + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const -1 i32.ne if @@ -16143,11 +16050,11 @@ local.get $0 i32.const 4 i32.const 9 - call $~lib/typedarray/Float64Array#subarray + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Float64Array,f64> local.tee $0 f64.const 3 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const -1 i32.ne if @@ -16161,7 +16068,7 @@ local.get $0 f64.const 4 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> if i32.const 0 i32.const 1312 @@ -16173,7 +16080,7 @@ local.get $0 f64.const 5 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const 1 i32.ne if @@ -16187,7 +16094,7 @@ local.get $0 f64.const 9 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const -1 i32.ne if @@ -16201,7 +16108,7 @@ local.get $0 f64.const 10 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const -1 i32.ne if @@ -16215,7 +16122,7 @@ local.get $0 f64.const 11 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const -1 i32.ne if @@ -16229,7 +16136,7 @@ local.get $0 f64.const 5 i32.const 1 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const 1 i32.ne if @@ -16243,7 +16150,7 @@ local.get $0 f64.const 5 i32.const 2 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const -1 i32.ne if @@ -16301,7 +16208,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -16360,7 +16267,7 @@ local.tee $2 local.get $0 local.get $3 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core local.get $1 if local.get $2 @@ -16441,7 +16348,7 @@ local.get $0 local.get $2 local.get $1 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core local.get $1 ) (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) @@ -16514,7 +16421,7 @@ local.get $1 i32.add local.get $3 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 call $~lib/rt/pure/__retain ) @@ -16584,7 +16491,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.get $4 i32.add @@ -16753,7 +16660,7 @@ local.tee $2 local.get $0 local.get $1 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core local.get $2 call $~lib/rt/pure/__retain ) @@ -16789,7 +16696,7 @@ local.get $0 local.get $2 local.get $1 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core local.get $1 ) (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) @@ -16858,7 +16765,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.get $4 i32.add @@ -16963,7 +16870,7 @@ local.get $0 local.get $2 local.get $1 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core local.get $1 ) (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) @@ -17034,7 +16941,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.get $4 i32.add @@ -17112,7 +17019,7 @@ local.get $0 local.get $2 local.get $1 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core local.get $1 ) (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) @@ -17183,7 +17090,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.get $4 i32.add @@ -17274,7 +17181,7 @@ local.get $1 i32.add local.tee $0 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core local.get $0 ) (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) @@ -17345,7 +17252,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.get $4 i32.add @@ -17415,7 +17322,7 @@ local.get $2 call $~lib/util/number/decimalCount32 local.tee $0 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core local.get $0 ) (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) @@ -17486,7 +17393,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.get $4 i32.add @@ -17578,7 +17485,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_core (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -17661,7 +17568,7 @@ local.get $1 local.get $3 local.get $0 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core else local.get $1 local.get $2 @@ -17670,7 +17577,7 @@ local.get $0 i32.add local.tee $0 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa64_core end local.get $0 ) @@ -17731,7 +17638,7 @@ local.tee $1 local.get $2 local.get $4 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core else local.get $3 call $~lib/util/number/decimalCount64High @@ -17745,7 +17652,7 @@ local.tee $1 local.get $3 local.get $2 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa64_core end local.get $0 if @@ -17802,7 +17709,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.get $5 i32.add @@ -17880,14 +17787,14 @@ local.get $0 local.get $3 local.get $1 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core else local.get $0 local.get $2 local.get $2 call $~lib/util/number/decimalCount64High local.tee $1 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa64_core end local.get $1 ) @@ -17935,7 +17842,7 @@ local.tee $0 local.get $1 local.get $2 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa32_core else local.get $4 call $~lib/util/number/decimalCount64High @@ -17947,7 +17854,7 @@ local.tee $0 local.get $4 local.get $1 - call $~lib/util/number/utoa_simple + call $~lib/util/number/utoa64_core end local.get $0 call $~lib/rt/pure/__retain @@ -17998,7 +17905,7 @@ local.get $5 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.get $5 i32.add @@ -18044,14 +17951,121 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) + (func $~lib/util/number/umul64f (param $0 i64) (param $1 i64) (result i64) + (local $2 i64) + (local $3 i64) + local.get $1 + i64.const 4294967295 + i64.and + local.tee $2 + local.get $0 + i64.const 32 + i64.shr_u + local.tee $3 + i64.mul + local.get $2 + local.get $0 + i64.const 4294967295 + i64.and + local.tee $2 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.set $0 + local.get $3 + local.get $1 + i64.const 32 + i64.shr_u + local.tee $1 + i64.mul + local.get $0 + i64.const 32 + i64.shr_u + i64.add + local.get $1 + local.get $2 + i64.mul + local.get $0 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + i64.add + ) + (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.add + i32.const -64 + i32.sub + ) + (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) + local.get $0 + local.get $1 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.tee $0 + i32.load16_u + local.set $1 + loop $while-continue|1 + i32.const 1 + local.get $5 + local.get $3 + i64.sub + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.sub + i64.gt_u + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.lt_u + select + i32.const 0 + local.get $2 + local.get $3 + i64.sub + local.get $4 + i64.ge_u + i32.const 0 + local.get $3 + local.get $5 + i64.lt_u + select + select + if + local.get $1 + i32.const 1 + i32.sub + local.set $1 + local.get $3 + local.get $4 + i64.add + local.set $3 + br $while-continue|1 + end + end + local.get $0 + local.get $1 + i32.store16 + ) (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) - (local $8 i64) + (local $8 i32) (local $9 i64) - (local $10 i32) + (local $10 i64) (local $11 i64) (local $12 i64) - (local $13 i64) local.get $3 local.get $1 i64.sub @@ -18061,25 +18075,25 @@ i32.const 0 local.get $4 i32.sub - local.tee $10 + local.tee $8 i64.extend_i32_s i64.shl - local.tee $11 + local.tee $10 i64.const 1 i64.sub - local.tee $12 + local.tee $11 i64.and - local.set $8 + local.set $1 local.get $3 - local.get $10 + local.get $8 i64.extend_i32_s i64.shr_u i32.wrap_i64 - local.tee $7 + local.tee $2 call $~lib/util/number/decimalCount32 - local.set $4 + local.set $7 loop $while-continue|0 - local.get $4 + local.get $7 i32.const 0 i32.gt_s if @@ -18094,116 +18108,116 @@ block $case3|1 block $case2|1 block $case1|1 - local.get $4 - local.tee $2 + local.get $7 + local.tee $4 i32.const 10 i32.ne if - local.get $2 + local.get $4 i32.const 1 i32.sub br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 end - local.get $7 + local.get $2 i32.const 1000000000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 1000000000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 100000000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 100000000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 10000000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 10000000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 1000000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 1000000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 100000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 100000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 10000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 10000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 1000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 1000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 100 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 100 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 10 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 10 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 - local.set $2 + local.get $2 + local.set $4 i32.const 0 - local.set $7 + local.set $2 br $break|1 end i32.const 0 - local.set $2 + local.set $4 end - local.get $2 + local.get $4 local.get $6 i32.or if @@ -18212,7 +18226,7 @@ i32.const 1 i32.shl i32.add - local.get $2 + local.get $4 i32.const 65535 i32.and i32.const 48 @@ -18223,110 +18237,61 @@ i32.add local.set $6 end - local.get $4 + local.get $7 i32.const 1 i32.sub - local.set $4 - local.get $8 - local.get $7 + local.set $7 + local.get $1 + local.get $2 i64.extend_i32_u - local.get $10 + local.get $8 i64.extend_i32_s i64.shl i64.add - local.tee $1 + local.tee $3 local.get $5 i64.le_u if - local.get $4 + local.get $7 global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $4 + local.get $0 + local.get $6 + local.get $5 + local.get $3 + local.get $7 i32.const 2 i32.shl i32.const 4056 i32.add i64.load32_u - local.get $10 + local.get $8 i64.extend_i32_s i64.shl - local.set $3 - local.get $0 - local.get $6 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_u - local.set $4 - loop $while-continue|3 - i32.const 1 - local.get $9 - local.get $1 - i64.sub - local.get $1 - local.get $3 - i64.add - local.get $9 - i64.sub - i64.gt_u - local.get $1 - local.get $3 - i64.add - local.get $9 - i64.lt_u - select - i32.const 0 - local.get $5 - local.get $1 - i64.sub - local.get $3 - i64.ge_u - i32.const 0 - local.get $1 - local.get $9 - i64.lt_u - select - select - if - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.get $3 - i64.add - local.set $1 - br $while-continue|3 - end - end - local.get $2 - local.get $4 - i32.store16 + local.get $9 + call $~lib/util/number/grisuRound local.get $6 return end br $while-continue|0 end end - local.get $10 + local.get $8 i64.extend_i32_s - local.set $13 - loop $while-continue|4 (result i32) + local.set $3 + loop $while-continue|2 (result i32) local.get $5 i64.const 10 i64.mul local.set $5 - local.get $8 + local.get $1 i64.const 10 i64.mul - local.tee $3 - local.get $13 - i64.shr_u local.tee $1 + local.get $3 + i64.shr_u + local.tee $12 local.get $6 i64.extend_i32_s i64.or @@ -18335,41 +18300,45 @@ if local.get $0 local.get $6 + local.tee $2 i32.const 1 i32.shl i32.add - local.get $1 + local.get $12 i32.wrap_i64 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 - local.get $6 + local.get $2 i32.const 1 i32.add local.set $6 end - local.get $4 + local.get $7 i32.const 1 i32.sub - local.set $4 - local.get $3 - local.get $12 + local.set $7 + local.get $1 + local.get $11 i64.and - local.tee $8 + local.tee $1 local.get $5 i64.ge_u - br_if $while-continue|4 - local.get $4 + br_if $while-continue|2 + local.get $7 global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $8 - local.set $1 + local.get $0 + local.get $6 + local.get $5 + local.get $1 + local.get $10 local.get $9 i32.const 0 - local.get $4 + local.get $7 i32.sub i32.const 2 i32.shl @@ -18377,102 +18346,223 @@ i32.add i64.load32_u i64.mul - local.set $3 - local.get $0 - local.get $6 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_u - local.set $4 - loop $while-continue|6 - i32.const 1 - local.get $3 - local.get $1 - i64.sub - local.get $1 - local.get $11 - i64.add - local.get $3 - i64.sub - i64.gt_u - local.get $1 - local.get $11 - i64.add - local.get $3 - i64.lt_u - select - i32.const 0 - local.get $5 - local.get $1 - i64.sub - local.get $11 - i64.ge_u - i32.const 0 - local.get $1 - local.get $3 - i64.lt_u - select - select - if - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.get $11 - i64.add - local.set $1 - br $while-continue|6 - end - end - local.get $2 - local.get $4 - i32.store16 + call $~lib/util/number/grisuRound local.get $6 end ) - (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/grisu2 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - local.get $2 - i32.eqz - if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 3145774 - i32.store - local.get $1 - i32.const 2 - i32.add - return - end - local.get $1 - local.get $1 - local.get $2 + (local $4 i64) + (local $5 i32) + (local $6 i64) + (local $7 i32) + local.get $0 + i64.reinterpret_f64 + local.tee $4 + i64.const 9218868437227405312 + i64.and + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.tee $5 + i32.const 0 + i32.ne + i64.extend_i32_u + i64.const 52 + i64.shl + local.get $4 + i64.const 4503599627370495 + i64.and + i64.add + local.tee $4 + i64.const 1 + i64.shl + i64.const 1 + i64.add + local.tee $6 + i64.clz + i32.wrap_i64 + local.set $3 + local.get $6 + local.get $3 + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_plus + local.get $5 + i32.const 1 + local.get $5 + select + i32.const 1075 + i32.sub + local.tee $5 + i32.const 1 + i32.sub + local.get $3 + i32.sub + local.set $3 + local.get $4 + local.get $4 + i64.const 4503599627370496 + i64.eq + i32.const 1 i32.add + local.tee $7 + i64.extend_i32_s + i64.shl + i64.const 1 + i64.sub + local.get $5 + local.get $7 + i32.sub + local.get $3 + i32.sub + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_minus + local.get $3 + global.set $~lib/util/number/_exp + i32.const 348 + i32.const -61 + global.get $~lib/util/number/_exp + i32.sub + f64.convert_i32_s + f64.const 0.30102999566398114 + f64.mul + f64.const 347 + f64.add + local.tee $0 + i32.trunc_f64_s local.tee $3 - i32.le_s - if (result i32) - local.get $3 - i32.const 21 - i32.le_s - else - i32.const 0 - end - if (result i32) - loop $for-loop|0 - local.get $1 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $1 + local.get $3 + f64.convert_i32_s + local.get $0 + f64.ne + i32.add + i32.const 3 + i32.shr_s + i32.const 1 + i32.add + local.tee $3 + i32.const 3 + i32.shl + local.tee $7 + i32.sub + global.set $~lib/util/number/_K + local.get $7 + i32.const 3184 + i32.add + i64.load + global.set $~lib/util/number/_frc_pow + local.get $3 + i32.const 1 + i32.shl + i32.const 3880 + i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow + global.get $~lib/util/number/_exp_pow + local.set $3 + local.get $1 + local.get $4 + local.get $4 + i64.clz + i32.wrap_i64 + local.tee $1 + i64.extend_i32_s + i64.shl + global.get $~lib/util/number/_frc_pow + local.tee $4 + call $~lib/util/number/umul64f + local.get $5 + local.get $1 + i32.sub + local.get $3 + call $~lib/util/number/umul64e + global.get $~lib/util/number/_frc_plus + local.get $4 + call $~lib/util/number/umul64f + i64.const 1 + i64.sub + local.tee $6 + global.get $~lib/util/number/_exp + local.get $3 + call $~lib/util/number/umul64e + local.get $6 + global.get $~lib/util/number/_frc_minus + local.get $4 + call $~lib/util/number/umul64f + i64.const 1 + i64.add + i64.sub + local.get $2 + call $~lib/util/number/genDigits + ) + (func $~lib/util/number/genExponent (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.const 0 + i32.lt_s + local.tee $2 + if + i32.const 0 + local.get $1 + i32.sub + local.set $1 + end + local.get $1 + local.get $1 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.tee $1 + call $~lib/util/number/utoa32_core + local.get $0 + i32.const 45 + i32.const 43 + local.get $2 + select + i32.store16 + local.get $1 + ) + (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $2 + i32.eqz + if + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 3145774 + i32.store + local.get $1 + i32.const 2 + i32.add + return + end + local.get $1 + local.get $1 + local.get $2 + i32.add + local.tee $3 + i32.le_s + if (result i32) + local.get $3 + i32.const 21 + i32.le_s + else + i32.const 0 + end + if (result i32) + loop $for-loop|0 + local.get $1 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $1 i32.const 1 i32.shl i32.add @@ -18519,7 +18609,7 @@ i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $0 i32.const 46 i32.store16 @@ -18548,7 +18638,7 @@ local.get $1 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $0 i32.const 3014704 i32.store @@ -18585,36 +18675,12 @@ i32.const 101 i32.store16 offset=2 local.get $0 - local.tee $1 i32.const 4 i32.add local.get $3 i32.const 1 i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $2 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $1 - i32.const 45 - i32.const 43 - local.get $2 - select - i32.store16 offset=4 - local.get $0 + call $~lib/util/number/genExponent i32.const 2 i32.add else @@ -18630,7 +18696,7 @@ local.tee $2 i32.const 2 i32.sub - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $0 i32.const 46 i32.store16 offset=2 @@ -18641,36 +18707,12 @@ i32.const 101 i32.store16 offset=2 local.get $0 - local.tee $2 i32.const 4 i32.add local.get $3 i32.const 1 i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $3 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $2 - i32.const 45 - i32.const 43 - local.get $3 - select - i32.store16 offset=4 - local.get $0 + call $~lib/util/number/genExponent local.get $1 i32.add i32.const 2 @@ -18681,294 +18723,33 @@ end ) (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) - (local $2 i64) - (local $3 i64) - (local $4 i32) - (local $5 i64) - (local $6 i32) - (local $7 i64) - (local $8 i32) - (local $9 i32) - (local $10 i64) + (local $2 i32) local.get $1 f64.const 0 f64.lt - local.tee $8 - if (result f64) + local.tee $2 + if local.get $0 i32.const 45 i32.store16 local.get $1 f64.neg - else - local.get $1 + local.set $1 end - i64.reinterpret_f64 - local.tee $3 - i64.const 9218868437227405312 - i64.and - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.tee $6 - i32.const 0 - i32.ne - i64.extend_i32_u - i64.const 52 - i64.shl - local.get $3 - i64.const 4503599627370495 - i64.and - i64.add - local.tee $2 - i64.const 1 - i64.shl - i64.const 1 - i64.add - local.tee $3 - local.get $3 - i64.clz - i32.wrap_i64 - local.tee $4 - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_plus - local.get $6 - i32.const 1 - local.get $6 - select - i32.const 1075 - i32.sub - local.tee $6 - i32.const 1 - i32.sub - local.get $4 - i32.sub - local.set $4 - local.get $2 + local.get $0 local.get $2 - i64.const 4503599627370496 - i64.eq i32.const 1 + i32.shl i32.add - local.tee $9 - i64.extend_i32_s - i64.shl - i64.const 1 - i64.sub - local.get $6 - local.get $9 - i32.sub - local.get $4 - i32.sub - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_minus - local.get $4 - global.set $~lib/util/number/_exp - i32.const 348 - i32.const -61 - global.get $~lib/util/number/_exp - i32.sub - f64.convert_i32_s - f64.const 0.30102999566398114 - f64.mul - f64.const 347 - f64.add - local.tee $1 - i32.trunc_f64_s - local.tee $4 - local.get $4 - f64.convert_i32_s local.get $1 - f64.ne - i32.add - i32.const 3 - i32.shr_s - i32.const 1 - i32.add - local.tee $4 - i32.const 3 - i32.shl - local.tee $9 - i32.sub - global.set $~lib/util/number/_K - local.get $9 - i32.const 3184 - i32.add - i64.load - global.set $~lib/util/number/_frc_pow - local.get $4 - i32.const 1 - i32.shl - i32.const 3880 - i32.add - i32.load16_s - global.set $~lib/util/number/_exp_pow - global.get $~lib/util/number/_frc_pow - local.tee $3 - i64.const 4294967295 - i64.and - local.set $5 - local.get $0 - local.get $8 - i32.const 1 - i32.shl - i32.add - local.get $0 - local.get $2 - local.get $2 - i64.clz - i32.wrap_i64 - local.tee $0 - i64.extend_i32_s - i64.shl - local.tee $2 - i64.const 32 - i64.shr_u - local.tee $7 - local.get $3 - i64.const 32 - i64.shr_u - local.tee $10 - i64.mul - local.get $5 - local.get $7 - i64.mul - local.get $2 - i64.const 4294967295 - i64.and - local.tee $2 - local.get $5 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $5 - i64.const 32 - i64.shr_u - i64.add - local.get $2 - local.get $10 - i64.mul - local.get $5 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - global.get $~lib/util/number/_exp_pow - local.tee $4 - local.get $6 local.get $0 - i32.sub - i32.add - i32.const -64 - i32.sub - global.get $~lib/util/number/_frc_plus - local.tee $2 - i64.const 32 - i64.shr_u - local.tee $5 - local.get $3 - i64.const 32 - i64.shr_u - local.tee $7 - i64.mul - local.get $3 - i64.const 4294967295 - i64.and - local.tee $10 - local.get $5 - i64.mul - local.get $2 - i64.const 4294967295 - i64.and - local.tee $2 - local.get $10 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $5 - i64.const 32 - i64.shr_u - i64.add - local.get $2 - local.get $7 - i64.mul - local.get $5 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - i64.const 1 - i64.sub - local.tee $2 - local.get $4 - global.get $~lib/util/number/_exp - i32.add - i32.const -64 - i32.sub - local.get $2 - global.get $~lib/util/number/_frc_minus - local.tee $2 - i64.const 32 - i64.shr_u - local.tee $5 - local.get $3 - i64.const 32 - i64.shr_u - local.tee $7 - i64.mul - local.get $3 - i64.const 4294967295 - i64.and - local.tee $3 - local.get $5 - i64.mul local.get $2 - i64.const 4294967295 - i64.and - local.tee $2 - local.get $3 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $3 - i64.const 32 - i64.shr_u - i64.add + call $~lib/util/number/grisu2 local.get $2 - local.get $7 - i64.mul - local.get $3 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - i64.const 1 - i64.add - i64.sub - local.get $8 - call $~lib/util/number/genDigits - local.get $8 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.get $8 + local.get $2 i32.add ) (func $~lib/util/number/dtoa (param $0 f64) (result i32) @@ -19170,7 +18951,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.get $4 i32.add @@ -19285,7 +19066,7 @@ local.get $4 i32.const 1 i32.shl - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $2 local.get $4 i32.add @@ -19350,7 +19131,7 @@ local.tee $1 i32.const 0 local.get $0 - call $~lib/memory/memory.fill + call $~lib/util/memory/memset local.get $1 call $~lib/rt/pure/__retain ) @@ -19384,7 +19165,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1741 + i32.const 1705 i32.const 5 call $~lib/builtins/abort unreachable @@ -19403,7 +19184,7 @@ else i32.const 1040 i32.const 1440 - i32.const 1750 + i32.const 1714 i32.const 7 call $~lib/builtins/abort unreachable @@ -19418,7 +19199,7 @@ if i32.const 1040 i32.const 1440 - i32.const 1755 + i32.const 1719 i32.const 7 call $~lib/builtins/abort unreachable @@ -19508,7 +19289,7 @@ local.get $1 i32.add local.get $2 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $3 call $~lib/rt/pure/__retain ) @@ -19522,88 +19303,88 @@ (local $6 i32) i32.const 4252 i32.load - local.tee $4 - call $~lib/typedarray/Int8Array#constructor local.tee $5 - local.set $2 + call $~lib/typedarray/Int8Array#constructor + local.tee $6 + local.set $3 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $2 + local.get $5 i32.lt_s if + local.get $3 local.get $2 - local.get $0 i32.const 4240 - local.get $0 + local.get $2 call $~lib/array/Array#__get i32.const 24 i32.shl i32.const 24 i32.shr_s call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end - local.get $2 + local.get $3 i32.load - local.get $2 + local.get $3 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 + local.get $3 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 + local.get $3 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 + local.set $2 i32.const 1 global.set $~argumentsLength - local.get $0 + i32.const 0 + local.get $2 i32.const 16 i32.sub i32.load offset=12 local.tee $1 - local.set $6 - i32.const 0 - local.get $1 i32.gt_u if i32.const 1376 i32.const 1440 - i32.const 1741 + i32.const 1705 i32.const 5 call $~lib/builtins/abort unreachable end + local.get $1 + local.set $0 i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc local.tee $1 - local.get $0 + local.get $2 call $~lib/rt/pure/__retain i32.store local.get $1 - local.get $6 + local.get $0 i32.store offset=8 local.get $1 - local.get $0 + local.get $2 i32.store offset=4 local.get $1 call $~lib/rt/pure/__retain - local.set $1 + local.set $0 loop $for-loop|1 - local.get $3 local.get $4 + local.get $5 i32.lt_s if - local.get $2 local.get $3 + local.get $4 call $~lib/typedarray/Int8Array#__get - local.get $1 - local.get $3 + local.get $0 + local.get $4 call $~lib/typedarray/Int8Array#__get i32.ne if @@ -19614,18 +19395,18 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|1 end end - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $0 + local.get $2 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> @@ -19722,86 +19503,86 @@ (local $6 i32) i32.const 4252 i32.load - local.tee $4 - call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $5 - local.set $2 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $6 + local.set $3 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $2 + local.get $5 i32.lt_s if + local.get $3 local.get $2 - local.get $0 i32.const 4240 - local.get $0 + local.get $2 call $~lib/array/Array#__get i32.const 255 i32.and call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end - local.get $2 + local.get $3 i32.load - local.get $2 + local.get $3 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 + local.get $3 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 + local.get $3 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 + local.set $2 i32.const 1 global.set $~argumentsLength - local.get $0 + i32.const 0 + local.get $2 i32.const 16 i32.sub i32.load offset=12 local.tee $1 - local.set $6 - i32.const 0 - local.get $1 i32.gt_u if i32.const 1376 i32.const 1440 - i32.const 1741 + i32.const 1705 i32.const 5 call $~lib/builtins/abort unreachable end + local.get $1 + local.set $0 i32.const 12 i32.const 5 call $~lib/rt/tlsf/__alloc local.tee $1 - local.get $0 + local.get $2 call $~lib/rt/pure/__retain i32.store local.get $1 - local.get $6 + local.get $0 i32.store offset=8 local.get $1 - local.get $0 + local.get $2 i32.store offset=4 local.get $1 call $~lib/rt/pure/__retain - local.set $1 + local.set $0 loop $for-loop|1 - local.get $3 local.get $4 + local.get $5 i32.lt_s if - local.get $2 local.get $3 + local.get $4 call $~lib/typedarray/Uint8ClampedArray#__get - local.get $1 - local.get $3 + local.get $0 + local.get $4 call $~lib/typedarray/Uint8ClampedArray#__get i32.ne if @@ -19812,18 +19593,18 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|1 end end - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $0 + local.get $2 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> @@ -19885,7 +19666,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1741 + i32.const 1705 i32.const 5 call $~lib/builtins/abort unreachable @@ -19896,7 +19677,7 @@ if i32.const 1040 i32.const 1440 - i32.const 1746 + i32.const 1710 i32.const 9 call $~lib/builtins/abort unreachable @@ -20008,7 +19789,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1741 + i32.const 1705 i32.const 5 call $~lib/builtins/abort unreachable @@ -20019,7 +19800,7 @@ if i32.const 1040 i32.const 1440 - i32.const 1746 + i32.const 1710 i32.const 9 call $~lib/builtins/abort unreachable @@ -20129,7 +19910,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1741 + i32.const 1705 i32.const 5 call $~lib/builtins/abort unreachable @@ -20140,7 +19921,7 @@ if i32.const 1040 i32.const 1440 - i32.const 1746 + i32.const 1710 i32.const 9 call $~lib/builtins/abort unreachable @@ -20250,7 +20031,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1741 + i32.const 1705 i32.const 5 call $~lib/builtins/abort unreachable @@ -20261,7 +20042,7 @@ if i32.const 1040 i32.const 1440 - i32.const 1746 + i32.const 1710 i32.const 9 call $~lib/builtins/abort unreachable @@ -20372,7 +20153,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1741 + i32.const 1705 i32.const 5 call $~lib/builtins/abort unreachable @@ -20383,7 +20164,7 @@ if i32.const 1040 i32.const 1440 - i32.const 1746 + i32.const 1710 i32.const 9 call $~lib/builtins/abort unreachable @@ -20494,7 +20275,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1741 + i32.const 1705 i32.const 5 call $~lib/builtins/abort unreachable @@ -20505,7 +20286,7 @@ if i32.const 1040 i32.const 1440 - i32.const 1746 + i32.const 1710 i32.const 9 call $~lib/builtins/abort unreachable @@ -20616,7 +20397,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1741 + i32.const 1705 i32.const 5 call $~lib/builtins/abort unreachable @@ -20627,7 +20408,7 @@ if i32.const 1040 i32.const 1440 - i32.const 1746 + i32.const 1710 i32.const 9 call $~lib/builtins/abort unreachable @@ -20738,7 +20519,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1741 + i32.const 1705 i32.const 5 call $~lib/builtins/abort unreachable @@ -20749,7 +20530,7 @@ if i32.const 1040 i32.const 1440 - i32.const 1746 + i32.const 1710 i32.const 9 call $~lib/builtins/abort unreachable @@ -20804,7 +20585,7 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,i32> (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -20816,7 +20597,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -20913,7 +20694,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -20928,7 +20709,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -20969,7 +20750,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 local.get $0 @@ -20978,7 +20759,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -20989,9 +20770,9 @@ i32.load offset=4 local.get $1 i32.load offset=8 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -21006,7 +20787,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -21047,7 +20828,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,i8> (param $0 i32) i32.const 4524 i32.load i32.const 7 @@ -21058,7 +20839,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -21071,7 +20852,7 @@ i32.load i32.const 4520 i32.load - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove ) (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> (local $0 i32) @@ -21136,7 +20917,7 @@ i32.const 10 call $~lib/typedarray/Int8Array#constructor local.tee $1 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,i32> local.get $1 i32.const 10 i32.const 0 @@ -21210,7 +20991,7 @@ call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> local.get $1 local.get $3 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Int64Array,i64> local.get $1 i32.const 10 i32.const 0 @@ -21287,12 +21068,12 @@ call $~lib/rt/pure/__release local.get $1 local.get $2 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Uint8Array,u8> local.get $1 local.get $4 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Int16Array,i16> local.get $1 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,i8> local.get $1 i32.const 10 i32.const 0 @@ -21322,7 +21103,7 @@ end i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -21457,7 +21238,7 @@ i32.const 10 call $~lib/typedarray/Uint8Array#constructor local.tee $1 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,i32> local.get $1 i32.const 10 i32.const 0 @@ -21531,7 +21312,7 @@ call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> local.get $1 local.get $3 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Int64Array,i64> local.get $1 i32.const 10 i32.const 0 @@ -21608,12 +21389,12 @@ call $~lib/rt/pure/__release local.get $1 local.get $2 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Uint8Array,u8> local.get $1 local.get $4 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Int16Array,i16> local.get $1 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,i8> local.get $1 i32.const 10 i32.const 0 @@ -21643,7 +21424,7 @@ end i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -21708,7 +21489,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) local.get $2 @@ -21717,7 +21498,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable @@ -21734,7 +21515,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -21792,7 +21573,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -21801,7 +21582,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable @@ -21818,7 +21599,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -22067,7 +21848,7 @@ local.get $1 local.get $7 i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> + call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int64Array,i64> local.get $1 i32.const 10 i32.const 0 @@ -22158,11 +21939,11 @@ i32.load offset=4 local.get $2 i32.load offset=8 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $1 local.get $8 i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> + call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int16Array,i16> i32.const 0 local.set $0 i32.const 4524 @@ -22246,12 +22027,12 @@ end i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,i32> (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -22265,7 +22046,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -22370,7 +22151,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -22387,7 +22168,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -22430,7 +22211,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -22443,7 +22224,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -22480,7 +22261,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 i32.const 1 @@ -22495,7 +22276,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -22508,9 +22289,9 @@ i32.load offset=4 local.get $1 i32.load offset=8 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,i8> (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -22526,7 +22307,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -22628,7 +22409,7 @@ i32.const 10 call $~lib/typedarray/Int16Array#constructor local.tee $1 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,i32> local.get $1 i32.const 10 i32.const 1 @@ -22706,7 +22487,7 @@ call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> local.get $1 local.get $3 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int64Array,i64> local.get $1 i32.const 10 i32.const 1 @@ -22787,12 +22568,12 @@ call $~lib/rt/pure/__release local.get $1 local.get $2 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Uint8Array,u8> local.get $1 local.get $4 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int16Array,i16> local.get $1 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,i8> local.get $1 i32.const 10 i32.const 1 @@ -22822,7 +22603,7 @@ end i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -22956,7 +22737,7 @@ i32.const 10 call $~lib/typedarray/Uint16Array#constructor local.tee $1 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,i32> local.get $1 i32.const 10 i32.const 1 @@ -23034,7 +22815,7 @@ call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> local.get $1 local.get $3 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int64Array,i64> local.get $1 i32.const 10 i32.const 1 @@ -23115,12 +22896,12 @@ call $~lib/rt/pure/__release local.get $1 local.get $2 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Uint8Array,u8> local.get $1 local.get $4 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int16Array,i16> local.get $1 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,i8> local.get $1 i32.const 10 i32.const 1 @@ -23150,12 +22931,12 @@ end i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,i32> (param $0 i32) i32.const 4316 i32.load local.get $0 @@ -23166,7 +22947,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -23177,7 +22958,7 @@ i32.load i32.const 4312 i32.load - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove ) (func $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> (param $0 i32) (param $1 i32) (local $2 i32) @@ -23241,7 +23022,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -23258,7 +23039,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -23301,7 +23082,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -23314,7 +23095,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -23351,7 +23132,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -23368,7 +23149,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -23411,7 +23192,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,i8> (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -23427,7 +23208,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -23529,7 +23310,7 @@ i32.const 10 call $~lib/typedarray/Int32Array#constructor local.tee $0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,i32> local.get $0 i32.const 10 i32.const 2 @@ -23606,7 +23387,7 @@ call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> local.get $0 local.get $3 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int64Array,i64> local.get $0 i32.const 10 i32.const 2 @@ -23687,12 +23468,12 @@ call $~lib/rt/pure/__release local.get $0 local.get $2 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Uint8Array,u8> local.get $0 local.get $4 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int16Array,i16> local.get $0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,i8> local.get $0 i32.const 10 i32.const 2 @@ -23722,7 +23503,7 @@ end i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -23852,7 +23633,7 @@ i32.const 10 call $~lib/typedarray/Uint32Array#constructor local.tee $0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,i32> local.get $0 i32.const 10 i32.const 2 @@ -23929,7 +23710,7 @@ call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> local.get $0 local.get $3 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int64Array,i64> local.get $0 i32.const 10 i32.const 2 @@ -24010,12 +23791,12 @@ call $~lib/rt/pure/__release local.get $0 local.get $2 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Uint8Array,u8> local.get $0 local.get $4 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int16Array,i16> local.get $0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,i8> local.get $0 i32.const 10 i32.const 2 @@ -24045,12 +23826,12 @@ end i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,i32> (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -24064,7 +23845,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -24174,7 +23955,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 i32.const 3 @@ -24189,7 +23970,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -24202,9 +23983,9 @@ i32.load offset=4 local.get $1 i32.load offset=8 - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -24217,7 +23998,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -24254,7 +24035,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -24271,7 +24052,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -24314,7 +24095,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,i8> (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -24330,7 +24111,7 @@ if i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -24433,7 +24214,7 @@ i32.const 10 call $~lib/typedarray/Int64Array#constructor local.tee $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,i32> local.get $0 i32.const 10 i32.const 3 @@ -24511,7 +24292,7 @@ call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> local.get $0 local.get $3 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int64Array,i64> local.get $0 i32.const 10 i32.const 3 @@ -24591,12 +24372,12 @@ call $~lib/rt/pure/__release local.get $0 local.get $2 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Uint8Array,u8> local.get $0 local.get $4 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int16Array,i16> local.get $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,i8> local.get $0 i32.const 10 i32.const 3 @@ -24626,7 +24407,7 @@ end i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -24757,7 +24538,7 @@ i32.const 10 call $~lib/typedarray/Uint64Array#constructor local.tee $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,i32> local.get $0 i32.const 10 i32.const 3 @@ -24835,7 +24616,7 @@ call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> local.get $0 local.get $3 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int64Array,i64> local.get $0 i32.const 10 i32.const 3 @@ -24915,12 +24696,12 @@ call $~lib/rt/pure/__release local.get $0 local.get $2 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Uint8Array,u8> local.get $0 local.get $4 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int16Array,i16> local.get $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,i8> local.get $0 i32.const 10 i32.const 3 @@ -24950,7 +24731,7 @@ end i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -25152,7 +24933,7 @@ i32.load i32.const 4376 i32.load - call $~lib/memory/memory.copy + call $~lib/util/memory/memmove local.get $1 i32.const 10 i32.const 2 @@ -25392,7 +25173,7 @@ end i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -25861,7 +25642,7 @@ end i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -25994,7 +25775,7 @@ local.get $1 i32.const 1 i32.const 2 - call $~lib/typedarray/Int32Array#subarray + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int32Array,i32> local.set $0 local.get $1 call $~lib/rt/pure/__release @@ -26088,7 +25869,7 @@ local.get $1 i32.const 2 i32.const 6 - call $~lib/typedarray/Float64Array#subarray + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Float64Array,f64> local.set $0 local.get $1 call $~lib/rt/pure/__release @@ -26132,7 +25913,7 @@ end i32.const 0 global.set $~argumentsLength - block $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + block $__inlined_func$~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64> local.get $0 call $~lib/rt/pure/__retain local.tee $29 @@ -26142,7 +25923,7 @@ local.tee $30 i32.const 1 i32.le_s - br_if $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + br_if $__inlined_func$~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64> local.get $29 i32.load offset=4 local.set $1 @@ -26171,7 +25952,7 @@ local.get $23 f64.store end - br $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + br $__inlined_func$~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64> end local.get $30 i32.const 256 @@ -26429,7 +26210,7 @@ local.get $1 i32.const 1 i32.const 4 - call $~lib/typedarray/Int8Array#subarray + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> local.tee $0 i32.const 0 i32.const 0 @@ -26671,7 +26452,7 @@ local.get $1 i32.const 1 i32.const 4 - call $~lib/typedarray/Int32Array#subarray + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int32Array,i32> local.tee $0 i32.const 0 i32.const 0 @@ -26799,7 +26580,7 @@ local.get $1 i32.const 1 i32.const 6 - call $~lib/typedarray/Int8Array#subarray + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> local.tee $0 i32.const 0 call $~lib/typedarray/Int8Array#__get @@ -26852,7 +26633,7 @@ local.get $0 i32.const 1 i32.const 5 - call $~lib/typedarray/Int8Array#subarray + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> local.tee $30 i32.const 0 call $~lib/typedarray/Int8Array#__get @@ -26905,7 +26686,7 @@ local.get $30 i32.const 1 i32.const 4 - call $~lib/typedarray/Int8Array#subarray + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> local.tee $29 i32.const 0 call $~lib/typedarray/Int8Array#__get @@ -26988,7 +26769,7 @@ local.get $1 i32.const 0 i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> local.set $30 local.get $1 i32.const 0 @@ -27016,7 +26797,7 @@ local.get $30 i32.const 0 i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> local.set $0 local.get $1 call $~lib/rt/pure/__release @@ -27046,7 +26827,7 @@ local.get $30 i32.const 0 i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> local.set $29 local.get $0 call $~lib/rt/pure/__release @@ -27076,7 +26857,7 @@ local.get $30 i32.const 0 i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> local.get $29 call $~lib/rt/pure/__release local.tee $0 @@ -27105,7 +26886,7 @@ local.get $30 i32.const 0 i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> local.get $0 call $~lib/rt/pure/__release local.tee $0 @@ -27134,7 +26915,7 @@ local.get $30 i32.const 0 i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> local.get $0 call $~lib/rt/pure/__release local.tee $0 @@ -27163,7 +26944,7 @@ local.get $30 i32.const 0 i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> local.get $0 call $~lib/rt/pure/__release local.tee $0 @@ -27192,7 +26973,7 @@ local.get $30 i32.const 0 i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> local.get $0 call $~lib/rt/pure/__release local.tee $0 @@ -27221,7 +27002,7 @@ local.get $30 i32.const 0 i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> local.get $0 call $~lib/rt/pure/__release local.tee $0 @@ -27250,7 +27031,7 @@ local.get $30 i32.const 0 i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> local.get $0 call $~lib/rt/pure/__release local.tee $0 @@ -27279,7 +27060,7 @@ local.get $30 i32.const 0 i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> local.get $0 call $~lib/rt/pure/__release local.tee $0 @@ -27308,7 +27089,7 @@ local.get $30 i32.const 0 i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> local.set $1 local.get $0 call $~lib/rt/pure/__release @@ -27412,7 +27193,7 @@ local.get $1 i32.const 1 i32.const 4 - call $~lib/typedarray/Int32Array#subarray + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int32Array,i32> local.tee $30 i32.load offset=8 i32.const 2 @@ -27454,7 +27235,7 @@ local.get $1 i32.const 1 i32.const 3 - call $~lib/typedarray/Int32Array#slice + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> local.tee $0 i32.const 0 call $~lib/typedarray/Int32Array#__get @@ -27520,7 +27301,7 @@ local.get $30 i32.const 1 i32.const 2 - call $~lib/typedarray/Int32Array#slice + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> local.tee $29 i32.const 0 call $~lib/typedarray/Int32Array#__get @@ -27574,7 +27355,7 @@ local.get $1 i32.const 0 i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> local.tee $28 i32.eq if @@ -27685,373 +27466,796 @@ br $for-loop|0 end end - block $folding-inner19 - block $folding-inner18 - block $folding-inner0 - block $folding-inner17 - block $folding-inner16 - block $folding-inner13 - block $folding-inner12 - 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-inner22 + block $folding-inner21 + block $folding-inner20 + block $folding-inner19 + block $folding-inner18 + block $folding-inner17 + block $folding-inner16 + block $folding-inner15 + block $folding-inner14 + block $folding-inner13 + block $folding-inner12 + block $folding-inner0 + local.get $1 + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $30 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + 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 + call $~lib/typedarray/REDUCE<~lib/typedarray/Uint8Array,u8,u8> + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 4 + call $~lib/typedarray/REDUCE<~lib/typedarray/Uint8Array,u8,u8> + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $30 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $30 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $30 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $0 + i32.const 0 + local.set $1 + local.get $30 + i32.load offset=4 + local.set $29 + local.get $30 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $28 + loop $for-loop|00 + local.get $0 + local.get $28 + i32.lt_s + if + local.get $29 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.set $27 + i32.const 4 + global.set $~argumentsLength + local.get $1 + local.get $27 + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $1 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $30 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $30 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set + local.get $30 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $30 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint16Array#__set + i32.const 0 + local.set $0 + i32.const 0 + local.set $1 + local.get $30 + i32.load offset=4 + local.set $29 + local.get $30 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $28 + loop $for-loop|01 + local.get $0 + local.get $28 + i32.lt_s + if + local.get $29 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.set $27 + i32.const 4 + global.set $~argumentsLength + local.get $1 + local.get $27 + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|01 + end + end + local.get $1 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $30 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + 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 + local.get $1 + i32.const 7 + call $~lib/typedarray/REDUCE<~lib/typedarray/Int32Array,i32,i32> + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + 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 + local.get $1 + i32.const 8 + call $~lib/typedarray/REDUCE<~lib/typedarray/Int32Array,i32,i32> + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + 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 + local.get $1 + i32.const 9 + call $~lib/typedarray/REDUCE<~lib/typedarray/Int64Array,i64,i64> + i64.const 6 + i64.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + 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 + local.get $1 + i32.const 10 + call $~lib/typedarray/REDUCE<~lib/typedarray/Int64Array,i64,i64> + i64.const 6 + i64.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + 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 + i32.load offset=4 + local.set $30 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $29 + loop $for-loop|02 + local.get $0 + local.get $29 + i32.lt_s + if + local.get $30 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $16 + i32.const 4 + global.set $~argumentsLength + local.get $22 + local.get $16 + f32.add + local.set $22 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|02 + end + end + local.get $22 + f32.const 6 + f32.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + 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 + f64.const 0 + local.set $23 + local.get $1 + i32.load offset=4 + local.set $30 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $29 + loop $for-loop|03 + local.get $0 + local.get $29 + i32.lt_s + if + local.get $30 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $21 + i32.const 4 + global.set $~argumentsLength + local.get $23 + local.get $21 + f64.add + local.set $23 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|03 + end + end + local.get $23 + f64.const 6 + f64.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $30 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set + local.get $30 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $30 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int8Array#__set + i32.const 0 + local.set $0 + local.get $30 + i32.load offset=4 + local.set $29 + local.get $30 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|04 + local.get $1 + i32.const 0 + i32.ge_s + if + local.get $1 + local.get $29 + i32.add + i32.load8_s + local.set $28 + i32.const 4 + global.set $~argumentsLength + local.get $0 + local.get $28 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $for-loop|04 + end + end + local.get $0 + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner12 + local.get $30 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + 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 14 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Uint8Array,u8,u8> + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner12 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 15 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Uint8Array,u8,u8> + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner12 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $30 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $30 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $30 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $0 + local.get $30 + i32.load offset=4 + local.set $29 + local.get $30 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|05 + local.get $1 + i32.const 0 + i32.ge_s + if + local.get $29 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.set $28 + i32.const 4 + global.set $~argumentsLength + local.get $0 + local.get $28 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $for-loop|05 + end + end + local.get $0 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner12 + local.get $30 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $30 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set + local.get $30 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $30 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint16Array#__set + i32.const 0 + local.set $0 + local.get $30 + i32.load offset=4 + local.set $29 + local.get $30 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|06 + local.get $1 + i32.const 0 + i32.ge_s + if + local.get $29 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.set $28 + i32.const 4 + global.set $~argumentsLength + local.get $0 + local.get $28 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $for-loop|06 + end + end + local.get $0 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner12 + local.get $30 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + 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 + block $folding-inner11 + block $folding-inner10 + block $folding-inner6 + block $folding-inner5 + block $folding-inner4 local.get $1 - i32.const 255 - i32.and + i32.const 18 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int32Array,i32,i32> i32.const 6 i32.ne - br_if $folding-inner2 - local.get $30 + br_if $folding-inner12 + local.get $1 call $~lib/rt/pure/__release i32.const 3 - call $~lib/typedarray/Uint8Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $1 i32.const 0 i32.const 1 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $1 i32.const 1 i32.const 2 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $1 i32.const 2 i32.const 3 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $1 - i32.const 3 - call $~lib/typedarray/Uint8Array#reduce - i32.const 255 - i32.and + i32.const 19 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int32Array,i32,i32> i32.const 6 i32.ne - br_if $folding-inner2 + br_if $folding-inner12 local.get $1 call $~lib/rt/pure/__release i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $1 i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set + i64.const 1 + call $~lib/typedarray/Int64Array#__set local.get $1 i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set + i64.const 2 + call $~lib/typedarray/Int64Array#__set local.get $1 i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set + i64.const 3 + call $~lib/typedarray/Int64Array#__set local.get $1 - i32.const 4 - call $~lib/typedarray/Uint8Array#reduce - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner2 + i32.const 20 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int64Array,i64,i64> + i64.const 6 + i64.ne + br_if $folding-inner12 local.get $1 call $~lib/rt/pure/__release i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $30 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 i32.const 0 + i64.const 1 + call $~lib/typedarray/Uint64Array#__set + local.get $1 i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $30 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $30 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $1 i32.const 2 + i64.const 3 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 21 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int64Array,i64,i64> + i64.const 6 + i64.ne + br_if $folding-inner12 + local.get $1 + call $~lib/rt/pure/__release i32.const 3 - call $~lib/typedarray/Int16Array#__set - i32.const 0 - local.set $0 + call $~lib/typedarray/Float32Array#constructor + local.tee $0 i32.const 0 - local.set $1 - local.get $30 + 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 + f32.const 0 + local.set $22 + local.get $0 i32.load offset=4 - local.set $29 - local.get $30 + local.set $30 + local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u - local.set $28 - loop $for-loop|00 - local.get $0 - local.get $28 - i32.lt_s + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|07 + local.get $1 + i32.const 0 + i32.ge_s if - local.get $29 - local.get $0 - i32.const 1 + local.get $30 + local.get $1 + i32.const 2 i32.shl i32.add - i32.load16_s - local.set $27 + f32.load + local.set $16 i32.const 4 global.set $~argumentsLength + local.get $22 + local.get $16 + f32.add + local.set $22 local.get $1 - local.get $27 - i32.add - local.set $1 - local.get $0 i32.const 1 - i32.add - local.set $0 - br $for-loop|00 - end - end - local.get $1 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner2 - local.get $30 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $30 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $30 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $30 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - i32.const 0 - local.set $0 - i32.const 0 - local.set $1 - local.get $30 - i32.load offset=4 - local.set $29 - local.get $30 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $28 - loop $for-loop|01 - local.get $0 - local.get $28 - i32.lt_s - if - local.get $29 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.set $27 - i32.const 4 - global.set $~argumentsLength - local.get $1 - local.get $27 - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|01 - end - end - local.get $1 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner2 - local.get $30 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - 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 - local.get $1 - i32.const 7 - call $~lib/typedarray/Int32Array#reduce - i32.const 6 - i32.ne - br_if $folding-inner2 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - 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 - local.get $1 - i32.const 8 - call $~lib/typedarray/Int32Array#reduce - i32.const 6 - i32.ne - br_if $folding-inner2 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - 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 - local.get $1 - i32.const 9 - call $~lib/typedarray/Int64Array#reduce - i64.const 6 - i64.ne - br_if $folding-inner2 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - 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 - local.get $1 - i32.const 10 - call $~lib/typedarray/Int64Array#reduce - i64.const 6 - i64.ne - br_if $folding-inner2 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - 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 - i32.load offset=4 - local.set $30 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $29 - loop $for-loop|02 - local.get $0 - local.get $29 - i32.lt_s - if - local.get $30 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $16 - i32.const 4 - global.set $~argumentsLength - local.get $22 - local.get $16 - f32.add - local.set $22 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|02 + i32.sub + local.set $1 + br $for-loop|07 end end local.get $22 f32.const 6 f32.ne - br_if $folding-inner2 - local.get $1 + br_if $folding-inner12 + local.get $0 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Float64Array#constructor - local.tee $1 + local.tee $0 i32.const 0 f64.const 1 call $~lib/typedarray/Float64Array#__set - local.get $1 + local.get $0 i32.const 1 f64.const 2 call $~lib/typedarray/Float64Array#__set - local.get $1 + local.get $0 i32.const 2 f64.const 3 call $~lib/typedarray/Float64Array#__set - i32.const 0 - local.set $0 f64.const 0 local.set $23 - local.get $1 + local.get $0 i32.load offset=4 local.set $30 - local.get $1 + local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $29 - loop $for-loop|03 - local.get $0 - local.get $29 - i32.lt_s + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|08 + local.get $1 + i32.const 0 + i32.ge_s if local.get $30 - local.get $0 + local.get $1 i32.const 3 i32.shl i32.add @@ -28063,4053 +28267,3619 @@ local.get $21 f64.add local.set $23 - local.get $0 + local.get $1 i32.const 1 - i32.add - local.set $0 - br $for-loop|03 + i32.sub + local.set $1 + br $for-loop|08 end end local.get $23 f64.const 6 f64.ne - br_if $folding-inner2 - local.get $1 + br_if $folding-inner12 + local.get $0 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $30 + local.tee $0 i32.const 0 i32.const 1 call $~lib/typedarray/Int8Array#__set - local.get $30 + local.get $0 i32.const 1 i32.const 2 call $~lib/typedarray/Int8Array#__set - local.get $30 + local.get $0 i32.const 2 i32.const 3 call $~lib/typedarray/Int8Array#__set i32.const 0 - local.set $0 - local.get $30 - i32.load offset=4 - local.set $29 - local.get $30 - i32.load offset=8 - i32.const 1 - i32.sub local.set $1 - loop $for-loop|04 + local.get $0 + i32.load offset=8 + local.set $29 + local.get $0 + i32.load offset=4 + local.set $26 + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/__alloc + local.set $30 + local.get $29 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $28 + loop $for-loop|09 local.get $1 - i32.const 0 - i32.ge_s + local.get $29 + i32.lt_s if local.get $1 - local.get $29 + local.get $26 i32.add i32.load8_s - local.set $28 - i32.const 4 + local.set $27 + i32.const 3 global.set $~argumentsLength - local.get $0 + local.get $1 local.get $28 i32.add - local.set $0 - local.get $1 + local.get $27 + local.get $27 + i32.mul + i32.store8 + local.get $1 i32.const 1 - i32.sub + i32.add local.set $1 - br $for-loop|04 + br $for-loop|09 end end - local.get $0 - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner3 local.get $30 + local.get $28 + call $~lib/rt/pure/__retain + i32.store + local.get $30 + local.get $28 + i32.store offset=4 + local.get $30 + local.get $29 + i32.store offset=8 + local.get $30 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + call $~lib/typedarray/Int8Array#__get + i32.const 1 + i32.ne + br_if $folding-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Int8Array#__get + i32.const 4 + i32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Int8Array#__get + i32.const 9 + i32.ne + br_if $folding-inner6 + 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 $1 + local.tee $0 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $0 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $0 i32.const 2 i32.const 3 call $~lib/typedarray/Uint8Array#__set + i32.const 0 + local.set $1 + local.get $0 + i32.load offset=8 + local.set $29 + local.get $0 + i32.load offset=4 + local.set $26 + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/__alloc + local.set $30 + local.get $29 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $28 + loop $for-loop|010 + local.get $1 + local.get $29 + i32.lt_s + if + local.get $1 + local.get $26 + i32.add + i32.load8_u + local.set $27 + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $28 + i32.add + local.get $27 + local.get $27 + i32.mul + i32.store8 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|010 + end + end + local.get $30 + local.get $28 + call $~lib/rt/pure/__retain + i32.store + local.get $30 + local.get $28 + i32.store offset=4 + local.get $30 + local.get $29 + i32.store offset=8 + local.get $30 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + call $~lib/typedarray/Uint8Array#__get + i32.const 1 + i32.ne + br_if $folding-inner4 local.get $1 - i32.const 14 - call $~lib/typedarray/Uint8Array#reduceRight - i32.const 255 - i32.and - i32.const 6 + i32.const 1 + call $~lib/typedarray/Uint8Array#__get + i32.const 4 + i32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint8Array#__get + i32.const 9 i32.ne - br_if $folding-inner3 + br_if $folding-inner6 + 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 $1 + local.tee $0 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 + local.get $0 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 + local.get $0 i32.const 2 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set + i32.const 0 + local.set $1 + local.get $0 + i32.load offset=8 + local.set $29 + local.get $0 + i32.load offset=4 + local.set $26 + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/__alloc + local.set $30 + local.get $29 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $28 + loop $for-loop|011 + local.get $1 + local.get $29 + i32.lt_s + if + local.get $1 + local.get $26 + i32.add + i32.load8_u + local.set $27 + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $28 + i32.add + local.get $27 + local.get $27 + i32.mul + i32.store8 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|011 + end + end + local.get $30 + local.get $28 + call $~lib/rt/pure/__retain + i32.store + local.get $30 + local.get $28 + i32.store offset=4 + local.get $30 + local.get $29 + i32.store offset=8 + local.get $30 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 1 + i32.ne + br_if $folding-inner4 local.get $1 - i32.const 15 - call $~lib/typedarray/Uint8Array#reduceRight - i32.const 255 - i32.and - i32.const 6 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 4 + i32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 9 i32.ne - br_if $folding-inner3 + br_if $folding-inner6 + 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 $30 + local.tee $0 i32.const 0 i32.const 1 call $~lib/typedarray/Int16Array#__set - local.get $30 + local.get $0 i32.const 1 i32.const 2 call $~lib/typedarray/Int16Array#__set - local.get $30 + local.get $0 i32.const 2 i32.const 3 call $~lib/typedarray/Int16Array#__set i32.const 0 - local.set $0 - local.get $30 - i32.load offset=4 - local.set $29 - local.get $30 + local.set $1 + local.get $0 i32.load offset=8 i32.const 1 i32.shr_u + local.set $28 + local.get $0 + i32.load offset=4 + local.set $26 + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/__alloc + local.set $30 + local.get $28 i32.const 1 - i32.sub - local.set $1 - loop $for-loop|05 + i32.shl + local.tee $25 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $29 + loop $for-loop|012 local.get $1 - i32.const 0 - i32.ge_s + local.get $28 + i32.lt_s if - local.get $29 + local.get $26 local.get $1 i32.const 1 i32.shl + local.tee $24 i32.add i32.load16_s - local.set $28 - i32.const 4 + local.set $27 + i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $28 + local.get $24 + local.get $29 i32.add - local.set $0 + local.get $27 + local.get $27 + i32.mul + i32.store16 local.get $1 i32.const 1 - i32.sub + i32.add local.set $1 - br $for-loop|05 + br $for-loop|012 end end - local.get $0 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner3 local.get $30 + local.get $29 + call $~lib/rt/pure/__retain + i32.store + local.get $30 + local.get $29 + i32.store offset=4 + local.get $30 + local.get $25 + i32.store offset=8 + local.get $30 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + call $~lib/typedarray/Int16Array#__get + i32.const 1 + i32.ne + br_if $folding-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Int16Array#__get + i32.const 4 + i32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Int16Array#__get + i32.const 9 + i32.ne + br_if $folding-inner6 + 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 $30 + local.tee $0 i32.const 0 i32.const 1 call $~lib/typedarray/Uint16Array#__set - local.get $30 + local.get $0 i32.const 1 i32.const 2 call $~lib/typedarray/Uint16Array#__set - local.get $30 + local.get $0 i32.const 2 i32.const 3 call $~lib/typedarray/Uint16Array#__set i32.const 0 - local.set $0 - local.get $30 - i32.load offset=4 - local.set $29 - local.get $30 + local.set $1 + local.get $0 i32.load offset=8 i32.const 1 i32.shr_u + local.set $28 + local.get $0 + i32.load offset=4 + local.set $26 + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/__alloc + local.set $30 + local.get $28 i32.const 1 - i32.sub - local.set $1 - loop $for-loop|06 + i32.shl + local.tee $25 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $29 + loop $for-loop|013 local.get $1 - i32.const 0 - i32.ge_s + local.get $28 + i32.lt_s if - local.get $29 + local.get $26 local.get $1 i32.const 1 i32.shl + local.tee $24 i32.add i32.load16_u - local.set $28 - i32.const 4 + local.set $27 + i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $28 + local.get $24 + local.get $29 i32.add - local.set $0 + local.get $27 + local.get $27 + i32.mul + i32.store16 local.get $1 i32.const 1 - i32.sub + i32.add local.set $1 - br $for-loop|06 + br $for-loop|013 end end - local.get $0 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner3 local.get $30 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor + local.get $29 + call $~lib/rt/pure/__retain + i32.store + local.get $30 + local.get $29 + i32.store offset=4 + local.get $30 + local.get $25 + i32.store offset=8 + local.get $30 + call $~lib/rt/pure/__retain local.tee $1 i32.const 0 + call $~lib/typedarray/Uint16Array#__get i32.const 1 - call $~lib/typedarray/Int32Array#__set + i32.ne + br_if $folding-inner4 local.get $1 i32.const 1 + call $~lib/typedarray/Uint16Array#__get + i32.const 4 + i32.ne + br_if $folding-inner5 + local.get $1 i32.const 2 - call $~lib/typedarray/Int32Array#__set + call $~lib/typedarray/Uint16Array#__get + i32.const 9 + i32.ne + br_if $folding-inner6 + 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 $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 - block $folding-inner1 - local.get $1 - i32.const 18 - call $~lib/typedarray/Int32Array#reduceRight - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - 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 - local.get $1 - i32.const 19 - call $~lib/typedarray/Int32Array#reduceRight - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - 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 - local.get $1 - i32.const 20 - call $~lib/typedarray/Int64Array#reduceRight - i64.const 6 - i64.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - 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 - local.get $1 - i32.const 21 - call $~lib/typedarray/Int64Array#reduceRight - i64.const 6 - i64.ne - br_if $folding-inner1 + i32.const 0 + local.set $1 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $28 + local.get $0 + i32.load offset=4 + local.set $26 + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/__alloc + local.set $30 + local.get $28 + i32.const 2 + i32.shl + local.tee $25 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $29 + loop $for-loop|014 local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - 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 - f32.const 0 - local.set $22 - local.get $0 - i32.load offset=4 - local.set $30 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|07 - local.get $1 - i32.const 0 - i32.ge_s - if - local.get $30 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $16 - i32.const 4 - global.set $~argumentsLength - local.get $22 - local.get $16 - f32.add - local.set $22 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|07 - end - end - local.get $22 - f32.const 6 - f32.ne - br_if $folding-inner1 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - 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 - f64.const 0 - local.set $23 - local.get $0 - i32.load offset=4 - local.set $30 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|08 - local.get $1 - i32.const 0 - i32.ge_s - if - local.get $30 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $21 - i32.const 4 - global.set $~argumentsLength - local.get $23 - local.get $21 - f64.add - local.set $23 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|08 - end - end - local.get $23 - f64.const 6 - f64.ne - br_if $folding-inner1 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - 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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - local.set $29 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/__alloc - local.set $30 - local.get $29 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $28 - loop $for-loop|09 + local.get $28 + i32.lt_s + if + local.get $26 local.get $1 + i32.const 2 + i32.shl + local.tee $24 + i32.add + i32.load + local.set $27 + i32.const 3 + global.set $~argumentsLength + local.get $24 local.get $29 - i32.lt_s - if - local.get $1 - local.get $26 - i32.add - i32.load8_s - local.set $27 - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $28 - i32.add - local.get $27 - local.get $27 - i32.mul - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|09 - end + i32.add + local.get $27 + local.get $27 + i32.mul + i32.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|014 end - local.get $30 - local.get $28 - call $~lib/rt/pure/__retain - i32.store - local.get $30 - local.get $28 - i32.store offset=4 - local.get $30 - local.get $29 - i32.store offset=8 - local.get $30 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Int8Array#__get - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int8Array#__get - i32.const 4 - i32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int8Array#__get - i32.const 9 - i32.ne - br_if $folding-inner6 - local.get $0 - call $~lib/rt/pure/__release + end + local.get $30 + local.get $29 + call $~lib/rt/pure/__retain + i32.store + local.get $30 + local.get $29 + i32.store offset=4 + local.get $30 + local.get $25 + i32.store offset=8 + local.get $30 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + call $~lib/typedarray/Int32Array#__get + i32.const 1 + i32.ne + br_if $folding-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Int32Array#__get + i32.const 4 + i32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Int32Array#__get + i32.const 9 + i32.ne + br_if $folding-inner6 + 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 $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 + i32.const 0 + local.set $1 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $28 + local.get $0 + i32.load offset=4 + local.set $26 + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/__alloc + local.set $30 + local.get $28 + i32.const 2 + i32.shl + local.tee $25 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $29 + loop $for-loop|015 local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - 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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - local.set $29 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/__alloc - local.set $30 - local.get $29 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $28 - loop $for-loop|010 + local.get $28 + i32.lt_s + if + local.get $26 local.get $1 + i32.const 2 + i32.shl + local.tee $24 + i32.add + i32.load + local.set $27 + i32.const 3 + global.set $~argumentsLength + local.get $24 local.get $29 - i32.lt_s - if - local.get $1 - local.get $26 - i32.add - i32.load8_u - local.set $27 - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $28 - i32.add - local.get $27 - local.get $27 - i32.mul - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|010 - end - end - local.get $30 - local.get $28 - call $~lib/rt/pure/__retain - i32.store - local.get $30 - local.get $28 - i32.store offset=4 - local.get $30 - local.get $29 - i32.store offset=8 - local.get $30 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Uint8Array#__get - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint8Array#__get - i32.const 4 - i32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__get - i32.const 9 - i32.ne - br_if $folding-inner6 - 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 $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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - local.set $29 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/__alloc - local.set $30 - local.get $29 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $28 - loop $for-loop|011 + i32.add + local.get $27 + local.get $27 + i32.mul + i32.store local.get $1 - local.get $29 - i32.lt_s - if - local.get $1 - local.get $26 - i32.add - i32.load8_u - local.set $27 - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $28 - i32.add - local.get $27 - local.get $27 - i32.mul - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|011 - end + i32.const 1 + i32.add + local.set $1 + br $for-loop|015 end - local.get $30 - local.get $28 - call $~lib/rt/pure/__retain - i32.store - local.get $30 - local.get $28 - i32.store offset=4 - local.get $30 - local.get $29 - i32.store offset=8 - local.get $30 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 4 - i32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 9 - i32.ne - br_if $folding-inner6 - local.get $0 - call $~lib/rt/pure/__release + end + local.get $30 + local.get $29 + call $~lib/rt/pure/__retain + i32.store + local.get $30 + local.get $29 + i32.store offset=4 + local.get $30 + local.get $25 + i32.store offset=8 + local.get $30 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + call $~lib/typedarray/Uint32Array#__get + i32.const 1 + i32.ne + br_if $folding-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint32Array#__get + i32.const 4 + i32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint32Array#__get + i32.const 9 + i32.ne + br_if $folding-inner6 + 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 $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 + i32.const 0 + local.set $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $28 + local.get $0 + i32.load offset=4 + local.set $27 + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/__alloc + local.set $30 + local.get $28 + i32.const 3 + i32.shl + local.tee $26 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $29 + loop $for-loop|016 local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - 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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $28 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/__alloc - local.set $30 local.get $28 - i32.const 1 - i32.shl - local.tee $25 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $29 - loop $for-loop|012 + i32.lt_s + if + local.get $27 local.get $1 - local.get $28 - i32.lt_s - if - local.get $26 - local.get $1 - i32.const 1 - i32.shl - local.tee $24 - i32.add - i32.load16_s - local.set $27 - i32.const 3 - global.set $~argumentsLength - local.get $24 - local.get $29 - i32.add - local.get $27 - local.get $27 - i32.mul - i32.store16 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|012 - end + i32.const 3 + i32.shl + local.tee $25 + i32.add + i64.load + local.set $20 + i32.const 3 + global.set $~argumentsLength + local.get $25 + local.get $29 + i32.add + local.get $20 + local.get $20 + i64.mul + i64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|016 end - local.get $30 - local.get $29 - call $~lib/rt/pure/__retain - i32.store - local.get $30 - local.get $29 - i32.store offset=4 - local.get $30 - local.get $25 - i32.store offset=8 - local.get $30 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Int16Array#__get - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int16Array#__get - i32.const 4 - i32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int16Array#__get - i32.const 9 - i32.ne - br_if $folding-inner6 - local.get $0 - call $~lib/rt/pure/__release + end + local.get $30 + local.get $29 + call $~lib/rt/pure/__retain + i32.store + local.get $30 + local.get $29 + i32.store offset=4 + local.get $30 + local.get $26 + i32.store offset=8 + local.get $30 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + call $~lib/typedarray/Int64Array#__get + i64.const 1 + i64.ne + br_if $folding-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Int64Array#__get + i64.const 4 + i64.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Int64Array#__get + i64.const 9 + i64.ne + br_if $folding-inner6 + 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 $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 + i32.const 0 + local.set $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $28 + local.get $0 + i32.load offset=4 + local.set $27 + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/__alloc + local.set $30 + local.get $28 + i32.const 3 + i32.shl + local.tee $26 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $29 + loop $for-loop|017 local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - 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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $28 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/__alloc - local.set $30 local.get $28 - i32.const 1 - i32.shl - local.tee $25 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $29 - loop $for-loop|013 + i32.lt_s + if + local.get $27 local.get $1 - local.get $28 - i32.lt_s - if - local.get $26 - local.get $1 - i32.const 1 - i32.shl - local.tee $24 - i32.add - i32.load16_u - local.set $27 - i32.const 3 - global.set $~argumentsLength - local.get $24 - local.get $29 - i32.add - local.get $27 - local.get $27 - i32.mul - i32.store16 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|013 - end - end - local.get $30 - local.get $29 - call $~lib/rt/pure/__retain - i32.store - local.get $30 - local.get $29 - i32.store offset=4 - local.get $30 - local.get $25 - i32.store offset=8 - local.get $30 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Uint16Array#__get - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint16Array#__get - i32.const 4 - i32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__get - i32.const 9 - i32.ne - br_if $folding-inner6 - 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 $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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $28 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/__alloc - local.set $30 - local.get $28 - i32.const 2 - i32.shl - local.tee $25 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $29 - loop $for-loop|014 + i32.const 3 + i32.shl + local.tee $25 + i32.add + i64.load + local.set $20 + i32.const 3 + global.set $~argumentsLength + local.get $25 + local.get $29 + i32.add + local.get $20 + local.get $20 + i64.mul + i64.store local.get $1 - local.get $28 - i32.lt_s - if - local.get $26 - local.get $1 - i32.const 2 - i32.shl - local.tee $24 - i32.add - i32.load - local.set $27 - i32.const 3 - global.set $~argumentsLength - local.get $24 - local.get $29 - i32.add - local.get $27 - local.get $27 - i32.mul - i32.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|014 - end + i32.const 1 + i32.add + local.set $1 + br $for-loop|017 end - local.get $30 - local.get $29 - call $~lib/rt/pure/__retain - i32.store - local.get $30 - local.get $29 - i32.store offset=4 - local.get $30 - local.get $25 - i32.store offset=8 - local.get $30 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int32Array#__get - i32.const 4 - i32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int32Array#__get - i32.const 9 - i32.ne - br_if $folding-inner6 - local.get $0 - call $~lib/rt/pure/__release + end + local.get $30 + local.get $29 + call $~lib/rt/pure/__retain + i32.store + local.get $30 + local.get $29 + i32.store offset=4 + local.get $30 + local.get $26 + i32.store offset=8 + local.get $30 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + call $~lib/typedarray/Uint64Array#__get + i64.const 1 + i64.ne + br_if $folding-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint64Array#__get + i64.const 4 + i64.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint64Array#__get + i64.const 9 + i64.ne + br_if $folding-inner6 + 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 $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 + i32.const 0 + local.set $1 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $28 + local.get $0 + i32.load offset=4 + local.set $27 + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/__alloc + local.set $30 + local.get $28 + i32.const 2 + i32.shl + local.tee $26 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $29 + loop $for-loop|018 local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - 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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $28 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/__alloc - local.set $30 local.get $28 - i32.const 2 - i32.shl - local.tee $25 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $29 - loop $for-loop|015 + i32.lt_s + if + local.get $27 local.get $1 - local.get $28 - i32.lt_s - if - local.get $26 - local.get $1 - i32.const 2 - i32.shl - local.tee $24 - i32.add - i32.load - local.set $27 - i32.const 3 - global.set $~argumentsLength - local.get $24 - local.get $29 - i32.add - local.get $27 - local.get $27 - i32.mul - i32.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|015 - end + i32.const 2 + i32.shl + local.tee $25 + i32.add + f32.load + local.set $22 + i32.const 3 + global.set $~argumentsLength + local.get $25 + local.get $29 + i32.add + local.get $22 + local.get $22 + f32.mul + f32.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|018 end - local.get $30 - local.get $29 - call $~lib/rt/pure/__retain - i32.store - local.get $30 - local.get $29 - i32.store offset=4 - local.get $30 - local.get $25 - i32.store offset=8 - local.get $30 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Uint32Array#__get - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint32Array#__get - i32.const 4 - i32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint32Array#__get - i32.const 9 - i32.ne - br_if $folding-inner6 - local.get $0 - call $~lib/rt/pure/__release + end + local.get $30 + local.get $29 + call $~lib/rt/pure/__retain + i32.store + local.get $30 + local.get $29 + i32.store offset=4 + local.get $30 + local.get $26 + i32.store offset=8 + local.get $30 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + call $~lib/typedarray/Float32Array#__get + f32.const 1 + f32.ne + br_if $folding-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float32Array#__get + f32.const 4 + f32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float32Array#__get + f32.const 9 + f32.ne + br_if $folding-inner6 + 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 $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 + i32.const 0 + local.set $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $28 + local.get $0 + i32.load offset=4 + local.set $27 + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/__alloc + local.set $30 + local.get $28 + i32.const 3 + i32.shl + local.tee $26 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $29 + loop $for-loop|019 local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - 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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $28 - local.get $0 - i32.load offset=4 - local.set $27 - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/__alloc - local.set $30 local.get $28 - i32.const 3 - i32.shl - local.tee $26 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $29 - loop $for-loop|016 + i32.lt_s + if + local.get $27 local.get $1 - local.get $28 - i32.lt_s - if - local.get $27 - local.get $1 - i32.const 3 - i32.shl - local.tee $25 - i32.add - i64.load - local.set $20 - i32.const 3 - global.set $~argumentsLength - local.get $25 - local.get $29 - i32.add - local.get $20 - local.get $20 - i64.mul - i64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|016 - end - end - local.get $30 - local.get $29 - call $~lib/rt/pure/__retain - i32.store - local.get $30 - local.get $29 - i32.store offset=4 - local.get $30 - local.get $26 - i32.store offset=8 - local.get $30 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Int64Array#__get - i64.const 1 - i64.ne - br_if $folding-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int64Array#__get - i64.const 4 - i64.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int64Array#__get - i64.const 9 - i64.ne - br_if $folding-inner6 - 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 $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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $28 - local.get $0 - i32.load offset=4 - local.set $27 - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/__alloc - local.set $30 - local.get $28 - i32.const 3 - i32.shl - local.tee $26 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $29 - loop $for-loop|017 - local.get $1 - local.get $28 - i32.lt_s - if - local.get $27 - local.get $1 - i32.const 3 - i32.shl - local.tee $25 - i32.add - i64.load - local.set $20 - i32.const 3 - global.set $~argumentsLength - local.get $25 - local.get $29 - i32.add - local.get $20 - local.get $20 - i64.mul - i64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|017 - end - end - local.get $30 - local.get $29 - call $~lib/rt/pure/__retain - i32.store - local.get $30 - local.get $29 - i32.store offset=4 - local.get $30 - local.get $26 - i32.store offset=8 - local.get $30 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Uint64Array#__get - i64.const 1 - i64.ne - br_if $folding-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint64Array#__get - i64.const 4 - i64.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint64Array#__get - i64.const 9 - i64.ne - br_if $folding-inner6 - 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 $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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $28 - local.get $0 - i32.load offset=4 - local.set $27 - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/__alloc - local.set $30 - local.get $28 - i32.const 2 - i32.shl - local.tee $26 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $29 - loop $for-loop|018 - local.get $1 - local.get $28 - i32.lt_s - if - local.get $27 - local.get $1 - i32.const 2 - i32.shl - local.tee $25 - i32.add - f32.load - local.set $22 - i32.const 3 - global.set $~argumentsLength - local.get $25 - local.get $29 - i32.add - local.get $22 - local.get $22 - f32.mul - f32.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|018 - end - end - local.get $30 - local.get $29 - call $~lib/rt/pure/__retain - i32.store - local.get $30 - local.get $29 - i32.store offset=4 - local.get $30 - local.get $26 - i32.store offset=8 - local.get $30 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Float32Array#__get - f32.const 1 - f32.ne - br_if $folding-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float32Array#__get - f32.const 4 - f32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float32Array#__get - f32.const 9 - f32.ne - br_if $folding-inner6 - 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 $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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $28 - local.get $0 - i32.load offset=4 - local.set $27 - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/__alloc - local.set $30 - local.get $28 - i32.const 3 - i32.shl - local.tee $26 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $29 - loop $for-loop|019 + i32.const 3 + i32.shl + local.tee $25 + i32.add + f64.load + local.set $23 + i32.const 3 + global.set $~argumentsLength + local.get $25 + local.get $29 + i32.add + local.get $23 + local.get $23 + f64.mul + f64.store local.get $1 - local.get $28 - i32.lt_s - if - local.get $27 - local.get $1 - i32.const 3 - i32.shl - local.tee $25 - i32.add - f64.load - local.set $23 - i32.const 3 - global.set $~argumentsLength - local.get $25 - local.get $29 - i32.add - local.get $23 - local.get $23 - f64.mul - f64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|019 - end - end - local.get $30 - local.get $29 - call $~lib/rt/pure/__retain - i32.store - local.get $30 - local.get $29 - i32.store offset=4 - local.get $30 - local.get $26 - i32.store offset=8 - local.get $30 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 1 - f64.ne - br_if $folding-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 4 - f64.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 9 - f64.ne - br_if $folding-inner6 - 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 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 46 - call $~lib/typedarray/Int8Array#some - i32.eqz - br_if $folding-inner7 - local.get $1 - i32.const 47 - call $~lib/typedarray/Int8Array#some - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 48 - call $~lib/typedarray/Uint8Array#some - i32.eqz - br_if $folding-inner7 - local.get $1 - i32.const 49 - call $~lib/typedarray/Uint8Array#some - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 50 - call $~lib/typedarray/Uint8Array#some - i32.eqz - br_if $folding-inner7 - local.get $1 - i32.const 51 - call $~lib/typedarray/Uint8Array#some - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 52 - call $~lib/typedarray/Int16Array#some - i32.eqz - br_if $folding-inner7 - local.get $1 - i32.const 53 - call $~lib/typedarray/Int16Array#some - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 54 - call $~lib/typedarray/Uint16Array#some - i32.eqz - br_if $folding-inner7 - local.get $1 - i32.const 55 - call $~lib/typedarray/Uint16Array#some - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 56 - call $~lib/typedarray/Int32Array#some - i32.eqz - br_if $folding-inner7 - local.get $1 - i32.const 57 - call $~lib/typedarray/Int32Array#some - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 58 - call $~lib/typedarray/Int32Array#some - i32.eqz - br_if $folding-inner7 - local.get $1 - i32.const 59 - call $~lib/typedarray/Int32Array#some - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 60 - call $~lib/typedarray/Int64Array#some - i32.eqz - br_if $folding-inner7 - local.get $1 - i32.const 61 - call $~lib/typedarray/Int64Array#some - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 62 - call $~lib/typedarray/Int64Array#some - i32.eqz - br_if $folding-inner7 - local.get $1 - i32.const 63 - call $~lib/typedarray/Int64Array#some - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - i32.const 0 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 1 - f32.const 4 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 2 - f32.const 6 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 64 - call $~lib/typedarray/Float32Array#some - i32.eqz - br_if $folding-inner7 - local.get $1 - i32.const 65 - call $~lib/typedarray/Float32Array#some - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - i32.const 0 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - f64.const 6 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 66 - call $~lib/typedarray/Float64Array#some - i32.eqz - br_if $folding-inner7 - local.get $1 - i32.const 67 - call $~lib/typedarray/Float64Array#some - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - 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 68 - call $~lib/typedarray/Int8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner9 - local.get $1 - i32.const 69 - call $~lib/typedarray/Int8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - 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 70 - call $~lib/typedarray/Uint8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner9 - local.get $1 - i32.const 71 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - 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 72 - call $~lib/typedarray/Uint8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner9 - local.get $1 - i32.const 73 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - 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 - local.get $1 - i32.const 74 - call $~lib/typedarray/Int16Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner9 - local.get $1 - i32.const 75 - call $~lib/typedarray/Int16Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - 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 - local.get $1 - i32.const 76 - call $~lib/typedarray/Uint16Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner9 - local.get $1 - i32.const 77 - call $~lib/typedarray/Uint16Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - 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 - local.get $1 - i32.const 78 - call $~lib/typedarray/Int32Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner9 - local.get $1 - i32.const 79 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - 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 - local.get $1 - i32.const 80 - call $~lib/typedarray/Int32Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner9 - local.get $1 - i32.const 81 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - 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 - local.get $1 - i32.const 82 - call $~lib/typedarray/Int64Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner9 - local.get $1 - i32.const 83 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - 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 - local.get $1 - i32.const 84 - call $~lib/typedarray/Int64Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner9 - local.get $1 - i32.const 85 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - 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 - local.get $1 - i32.const 86 - call $~lib/typedarray/Float32Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner9 - local.get $1 - i32.const 87 - call $~lib/typedarray/Float32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - 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 - local.get $1 - i32.const 88 - call $~lib/typedarray/Float64Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner9 - local.get $1 - i32.const 89 - call $~lib/typedarray/Float64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 90 - call $~lib/typedarray/Int8Array#every - i32.eqz - br_if $folding-inner11 - local.get $1 - i32.const 91 - call $~lib/typedarray/Int8Array#every - br_if $folding-inner12 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 92 - call $~lib/typedarray/Uint8Array#every - i32.eqz - br_if $folding-inner11 - local.get $1 - i32.const 93 - call $~lib/typedarray/Uint8Array#every - br_if $folding-inner12 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 94 - call $~lib/typedarray/Uint8Array#every - i32.eqz - br_if $folding-inner11 - local.get $1 - i32.const 95 - call $~lib/typedarray/Uint8Array#every - br_if $folding-inner12 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 96 - call $~lib/typedarray/Int16Array#every - i32.eqz - br_if $folding-inner11 - local.get $1 - i32.const 97 - call $~lib/typedarray/Int16Array#every - br_if $folding-inner12 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 98 - call $~lib/typedarray/Uint16Array#every - i32.eqz - br_if $folding-inner11 - local.get $1 - i32.const 99 - call $~lib/typedarray/Uint16Array#every - br_if $folding-inner12 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 100 - call $~lib/typedarray/Int32Array#every - i32.eqz - br_if $folding-inner11 - local.get $1 - i32.const 101 - call $~lib/typedarray/Int32Array#every - br_if $folding-inner12 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 102 - call $~lib/typedarray/Int32Array#every - i32.eqz - br_if $folding-inner11 - local.get $1 - i32.const 103 - call $~lib/typedarray/Int32Array#every - br_if $folding-inner12 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 104 - call $~lib/typedarray/Int64Array#every - i32.eqz - br_if $folding-inner11 - local.get $1 - i32.const 105 - call $~lib/typedarray/Int64Array#every - br_if $folding-inner12 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 106 - call $~lib/typedarray/Int64Array#every - i32.eqz - br_if $folding-inner11 - local.get $1 - i32.const 107 - call $~lib/typedarray/Int64Array#every - br_if $folding-inner12 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - i32.const 0 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 1 - f32.const 4 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 2 - f32.const 6 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 108 - call $~lib/typedarray/Float32Array#every - i32.eqz - br_if $folding-inner11 - local.get $1 - i32.const 109 - call $~lib/typedarray/Float32Array#every - br_if $folding-inner12 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - i32.const 0 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - f64.const 6 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 110 - call $~lib/typedarray/Float64Array#every - i32.eqz - br_if $folding-inner11 - local.get $1 - i32.const 111 - call $~lib/typedarray/Float64Array#every - br_if $folding-inner12 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 2704 - 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 2704 - 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 2704 - 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 - i32.load offset=4 - local.set $30 - local.get $0 - i32.load offset=8 - local.set $29 - loop $for-loop|020 - local.get $1 - local.get $29 - i32.lt_s - if - local.get $1 - local.get $30 - i32.add - i32.load8_s - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|020 - end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner13 - 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 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 113 - call $~lib/typedarray/Uint8Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner13 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 114 - call $~lib/typedarray/Uint8Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner13 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 2704 - 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 2704 - 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 2704 - 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 - i32.load offset=4 - local.set $30 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $29 - loop $for-loop|021 - local.get $1 - local.get $29 - i32.lt_s - if - local.get $30 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_s - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|021 - end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner13 - 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 $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 2704 - 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 2704 - 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 2704 - 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 - i32.load offset=4 - local.set $30 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $29 - loop $for-loop|022 - local.get $1 - local.get $29 - i32.lt_s - if - local.get $30 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_u - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|022 - end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner13 - 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 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 117 - call $~lib/typedarray/Int32Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner13 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 118 - call $~lib/typedarray/Int32Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner13 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 119 - call $~lib/typedarray/Int64Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner13 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 120 - call $~lib/typedarray/Int64Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner13 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - i32.const 0 - local.set $0 - local.get $1 - i32.load offset=4 - local.set $30 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $29 - loop $for-loop|023 - local.get $0 - local.get $29 - i32.lt_s - if - local.get $30 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - i32.const 3 - global.set $~argumentsLength - local.get $0 - local.get $1 - call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|023 - end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner13 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - i32.const 0 - local.set $0 - local.get $1 - i32.load offset=4 - local.set $30 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $29 - loop $for-loop|024 - local.get $0 - local.get $29 - i32.lt_s - if - local.get $30 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - i32.const 3 - global.set $~argumentsLength - local.get $0 - local.get $1 - call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|024 - end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner13 - local.get $1 - 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 $30 - i32.const 0 - f64.const nan:0x8000000000000 - call $~lib/typedarray/Float64Array#__set - local.get $30 - f64.const nan:0x8000000000000 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 607 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $0 - i32.const 0 - local.set $1 - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $30 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $29 - if (result i32) - i32.const 0 - local.get $29 - i32.ge_s - else - i32.const 1 - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $30 - i32.load offset=4 - local.set $27 - loop $while-continue|0 - local.get $0 - local.get $29 - i32.lt_s - if - local.get $27 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $23 - f64.const nan:0x8000000000000 - f64.eq - if (result i32) - i32.const 1 - else - local.get $23 - local.get $23 - f64.ne - end - if - i32.const 1 - local.set $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 + i32.const 1 + i32.add + local.set $1 + br $for-loop|019 end + end + local.get $30 + local.get $29 + call $~lib/rt/pure/__retain + i32.store + local.get $30 + local.get $29 + i32.store offset=4 + local.get $30 + local.get $26 + i32.store offset=8 + local.get $30 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 1 + f64.ne + br_if $folding-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 4 + f64.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 9 + f64.ne + br_if $folding-inner6 + 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 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 46 + call $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8> + i32.eqz + br_if $folding-inner13 + i32.const 47 + call $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8> + br_if $folding-inner14 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 48 + call $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8> + i32.eqz + br_if $folding-inner13 + i32.const 49 + call $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8> + br_if $folding-inner14 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 50 + call $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8> + i32.eqz + br_if $folding-inner13 + i32.const 51 + call $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8> + br_if $folding-inner14 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 52 + call $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16> + i32.eqz + br_if $folding-inner13 + i32.const 53 + call $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16> + br_if $folding-inner14 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 54 + call $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16> + i32.eqz + br_if $folding-inner13 + i32.const 55 + call $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16> + br_if $folding-inner14 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 56 + call $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> + i32.eqz + br_if $folding-inner13 + i32.const 57 + call $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> + br_if $folding-inner14 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 58 + call $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> + i32.eqz + br_if $folding-inner13 + i32.const 59 + call $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> + br_if $folding-inner14 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 60 + call $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> + i32.eqz + br_if $folding-inner13 + i32.const 61 + call $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> + br_if $folding-inner14 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 62 + call $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> + i32.eqz + br_if $folding-inner13 + i32.const 63 + call $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> + br_if $folding-inner14 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 1 + f32.const 4 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 2 + f32.const 6 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 64 + call $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32> + i32.eqz + br_if $folding-inner13 + i32.const 65 + call $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32> + br_if $folding-inner14 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + f64.const 4 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + f64.const 6 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 66 + call $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64> + i32.eqz + br_if $folding-inner13 + i32.const 67 + call $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64> + br_if $folding-inner14 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + local.get $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 68 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8> + i32.const 1 + i32.ne + br_if $folding-inner15 + i32.const 69 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8> + i32.const -1 + i32.ne + br_if $folding-inner16 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + local.get $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 70 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8> + i32.const 1 + i32.ne + br_if $folding-inner15 + i32.const 71 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8> + i32.const -1 + i32.ne + br_if $folding-inner16 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + local.get $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 72 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8> + i32.const 1 + i32.ne + br_if $folding-inner15 + i32.const 73 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8> + i32.const -1 + i32.ne + br_if $folding-inner16 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 74 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16> + i32.const 1 + i32.ne + br_if $folding-inner15 + i32.const 75 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16> + i32.const -1 + i32.ne + br_if $folding-inner16 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 76 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16> + i32.const 1 + i32.ne + br_if $folding-inner15 + i32.const 77 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16> + i32.const -1 + i32.ne + br_if $folding-inner16 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 78 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> + i32.const 1 + i32.ne + br_if $folding-inner15 + i32.const 79 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> + i32.const -1 + i32.ne + br_if $folding-inner16 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 80 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> + i32.const 1 + i32.ne + br_if $folding-inner15 + i32.const 81 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> + i32.const -1 + i32.ne + br_if $folding-inner16 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 82 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> + i32.const 1 + i32.ne + br_if $folding-inner15 + i32.const 83 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> + i32.const -1 + i32.ne + br_if $folding-inner16 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 84 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> + i32.const 1 + i32.ne + br_if $folding-inner15 + i32.const 85 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> + i32.const -1 + i32.ne + br_if $folding-inner16 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 86 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32> + i32.const 1 + i32.ne + br_if $folding-inner15 + i32.const 87 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32> + i32.const -1 + i32.ne + br_if $folding-inner16 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 88 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64> + i32.const 1 + i32.ne + br_if $folding-inner15 + i32.const 89 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64> + i32.const -1 + i32.ne + br_if $folding-inner16 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 90 + call $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8> + i32.eqz + br_if $folding-inner17 + i32.const 91 + call $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8> + br_if $folding-inner18 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 92 + call $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8> + i32.eqz + br_if $folding-inner17 + i32.const 93 + call $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8> + br_if $folding-inner18 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 94 + call $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8> + i32.eqz + br_if $folding-inner17 + i32.const 95 + call $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8> + br_if $folding-inner18 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 96 + call $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16> + i32.eqz + br_if $folding-inner17 + i32.const 97 + call $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16> + br_if $folding-inner18 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 98 + call $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16> + i32.eqz + br_if $folding-inner17 + i32.const 99 + call $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16> + br_if $folding-inner18 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 100 + call $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> + i32.eqz + br_if $folding-inner17 + i32.const 101 + call $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> + br_if $folding-inner18 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 102 + call $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> + i32.eqz + br_if $folding-inner17 + i32.const 103 + call $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> + br_if $folding-inner18 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 104 + call $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> + i32.eqz + br_if $folding-inner17 + i32.const 105 + call $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> + br_if $folding-inner18 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 106 + call $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> + i32.eqz + br_if $folding-inner17 + i32.const 107 + call $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> + br_if $folding-inner18 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 1 + f32.const 4 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 2 + f32.const 6 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 108 + call $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32> + i32.eqz + br_if $folding-inner17 + i32.const 109 + call $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32> + br_if $folding-inner18 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + f64.const 4 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + f64.const 6 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 110 + call $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64> + i32.eqz + br_if $folding-inner17 + i32.const 111 + call $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64> + br_if $folding-inner18 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 2704 + 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 2704 + 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 2704 + 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 + i32.load offset=4 + local.set $30 + local.get $0 + i32.load offset=8 + local.set $29 + loop $for-loop|020 local.get $1 - i32.const 0 - i32.ne - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 608 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - call $~lib/typedarray/Float32Array#constructor - local.tee $29 - i32.const 0 - f32.const nan:0x400000 - call $~lib/typedarray/Float32Array#__set local.get $29 - f32.const nan:0x400000 - i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 613 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $1 - i32.const 0 - local.set $0 - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - local.get $29 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $28 - if (result i32) - i32.const 0 - local.get $28 - i32.ge_s - else - i32.const 1 - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - local.get $29 - i32.load offset=4 - local.set $26 - loop $while-continue|025 - local.get $1 - local.get $28 - i32.lt_s - if - local.get $26 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $22 - f32.const nan:0x400000 - f32.eq - if (result i32) - i32.const 1 - else - local.get $22 - local.get $22 - f32.ne - end - if - i32.const 1 - local.set $0 - br $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|025 - end - end - end - local.get $0 - i32.const 0 - i32.ne - i32.const 1 - i32.ne + i32.lt_s if - i32.const 0 - i32.const 1312 - i32.const 614 + local.get $1 + local.get $30 + i32.add + i32.load8_s i32.const 3 - call $~lib/builtins/abort - unreachable + global.set $~argumentsLength + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|020 end - local.get $30 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int8Array#constructor - 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 4 - i32.const 5 - call $~lib/typedarray/Int8Array#__set - local.get $1 - call $~lib/typedarray/Int8Array#join - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - local.get $1 - call $~lib/typedarray/Int8Array#join - local.tee $30 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner18 - local.get $0 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - local.get $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 4 - i32.const 5 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - call $~lib/typedarray/Uint8Array#join - local.tee $30 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - call $~lib/typedarray/Uint8Array#join - local.tee $0 - local.get $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner18 - local.get $30 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - local.get $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 4 - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - call $~lib/typedarray/Uint8Array#join - local.tee $30 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - call $~lib/typedarray/Uint8Array#join - local.tee $0 - local.get $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner18 - local.get $30 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int16Array#constructor - 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 - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Int16Array#__set - local.get $1 - call $~lib/typedarray/Int16Array#join - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - local.get $1 - call $~lib/typedarray/Int16Array#join - local.tee $30 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner18 - local.get $0 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint16Array#constructor - 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 - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - call $~lib/typedarray/Uint16Array#join - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - local.get $1 - call $~lib/typedarray/Uint16Array#join - local.tee $30 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner18 - local.get $0 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int32Array#constructor - 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 - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Int32Array#__set - local.get $1 - call $~lib/typedarray/Int32Array#join - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - local.get $1 - call $~lib/typedarray/Int32Array#join - local.tee $30 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner18 - local.get $0 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint32Array#constructor - 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 - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - call $~lib/typedarray/Uint32Array#join - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - local.get $1 - call $~lib/typedarray/Uint32Array#join - local.tee $30 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner18 - local.get $0 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int64Array#constructor - 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 - local.get $1 - i32.const 3 - i64.const 4 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 4 - i64.const 5 - call $~lib/typedarray/Int64Array#__set - local.get $1 - call $~lib/typedarray/Int64Array#join - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - local.get $1 - call $~lib/typedarray/Int64Array#join - local.tee $30 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner18 - local.get $0 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint64Array#constructor - 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 - local.get $1 - i32.const 3 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 4 - i64.const 5 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - call $~lib/typedarray/Uint64Array#join - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - local.get $1 - call $~lib/typedarray/Uint64Array#join - local.tee $30 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner18 - local.get $0 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Float32Array#constructor - 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 - local.get $1 - i32.const 3 - f32.const 4 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 4 - f32.const 5 - call $~lib/typedarray/Float32Array#__set - local.get $1 - call $~lib/typedarray/Float32Array#join - local.tee $0 - i32.const 4112 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $1 - call $~lib/typedarray/Float32Array#join - local.tee $30 - i32.const 4112 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - local.get $0 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Float64Array#constructor - 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 - local.get $1 - i32.const 3 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 4 - f64.const 5 - call $~lib/typedarray/Float64Array#__set + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner19 + 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 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + i32.const 2 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 113 + call $~lib/typedarray/FOREACH<~lib/typedarray/Uint8Array,u8> + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner19 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 2 + i32.const 2704 + i32.const 2 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 114 + call $~lib/typedarray/FOREACH<~lib/typedarray/Uint8Array,u8> + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner19 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 2704 + 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 2704 + 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 2704 + 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 + i32.load offset=4 + local.set $30 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $29 + loop $for-loop|021 local.get $1 - call $~lib/typedarray/Float64Array#join - local.tee $0 - i32.const 4112 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 + local.get $29 + i32.lt_s + if + local.get $30 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|021 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner19 + 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 $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 2704 + 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 2704 + 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 2704 + 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 + i32.load offset=4 + local.set $30 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $29 + loop $for-loop|022 local.get $1 - call $~lib/typedarray/Float64Array#join - local.tee $30 - i32.const 4112 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 + local.get $29 + i32.lt_s + if + local.get $30 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_u + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|022 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner19 + 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 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 117 + call $~lib/typedarray/FOREACH<~lib/typedarray/Int32Array,i32> + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner19 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 118 + call $~lib/typedarray/FOREACH<~lib/typedarray/Int32Array,i32> + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner19 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + i32.const 2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 119 + call $~lib/typedarray/FOREACH<~lib/typedarray/Int64Array,i64> + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner19 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + i32.const 2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 120 + call $~lib/typedarray/FOREACH<~lib/typedarray/Int64Array,i64> + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner19 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + i32.const 2 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + i32.const 0 + local.set $0 + local.get $1 + i32.load offset=4 + local.set $30 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $29 + loop $for-loop|023 local.get $0 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - i32.const 2 - global.set $~argumentsLength - local.get $1 - i32.const 0 - call $~lib/typedarray/Uint8Array.wrap@varargs - local.tee $30 - i32.load offset=8 + local.get $29 + i32.lt_s if - i32.const 0 - i32.const 1312 - i32.const 691 + local.get $30 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load i32.const 3 - call $~lib/builtins/abort - unreachable + global.set $~argumentsLength + local.get $0 + local.get $1 + call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|023 end - i32.const 2 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 2 - global.set $~argumentsLength + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner19 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + i32.const 2 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + i32.const 0 + local.set $0 + local.get $1 + i32.load offset=4 + local.set $30 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $29 + loop $for-loop|024 local.get $0 - i32.const 2 - call $~lib/typedarray/Uint8Array.wrap@varargs - local.set $1 - local.get $30 - call $~lib/rt/pure/__release - local.get $1 - i32.load offset=8 + local.get $29 + i32.lt_s if - i32.const 0 - i32.const 1312 - i32.const 695 + local.get $30 + local.get $0 i32.const 3 - call $~lib/builtins/abort - unreachable + i32.shl + i32.add + f64.load + i32.const 3 + global.set $~argumentsLength + local.get $0 + local.get $1 + call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|024 end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - 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 $30 - i32.const 0 - f32.const 400 - call $~lib/typedarray/Float32Array#__set - local.get $30 - i32.const 1 - f32.const nan:0x400000 - call $~lib/typedarray/Float32Array#__set - local.get $30 - i32.const 2 - f32.const inf - call $~lib/typedarray/Float32Array#__set - i32.const 4 - call $~lib/typedarray/Int64Array#constructor - local.tee $29 + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner19 + local.get $1 + 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 $30 + i32.const 0 + f64.const nan:0x8000000000000 + call $~lib/typedarray/Float64Array#__set + local.get $30 + f64.const nan:0x8000000000000 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + i32.const -1 + i32.ne + if i32.const 0 - i64.const -10 - call $~lib/typedarray/Int64Array#__set - local.get $29 - i32.const 1 - i64.const 100 - call $~lib/typedarray/Int64Array#__set - local.get $29 - i32.const 2 - i64.const 10 - call $~lib/typedarray/Int64Array#__set - local.get $29 + i32.const 1312 + i32.const 607 i32.const 3 - i64.const 300 - call $~lib/typedarray/Int64Array#__set - i32.const 2 - call $~lib/typedarray/Int32Array#constructor - local.tee $28 - i32.const 0 - i32.const 300 - call $~lib/typedarray/Int32Array#__set - local.get $28 - i32.const 1 - i32.const -1 - call $~lib/typedarray/Int32Array#__set + call $~lib/builtins/abort + unreachable + end + block $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64> (result i32) i32.const 0 local.set $1 + i32.const 0 local.get $30 i32.load offset=8 - i32.const 2 + i32.const 3 i32.shr_u - i32.const 1 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - br_if $folding-inner19 - local.get $0 - i32.load offset=4 - i32.const 1 - i32.add - local.set $26 + local.tee $29 + if (result i32) + i32.const 0 + local.get $29 + i32.ge_s + else + i32.const 1 + end + br_if $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64> + drop local.get $30 i32.load offset=4 - local.set $25 - local.get $30 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $24 - loop $for-loop|026 + local.set $27 + loop $while-continue|0 local.get $1 - local.get $24 + local.get $29 i32.lt_s if + i32.const 1 + local.get $27 local.get $1 - local.get $26 - i32.add - local.get $25 - local.get $1 - i32.const 2 + i32.const 3 i32.shl i32.add - f32.load - local.tee $22 - local.get $22 - f32.sub - f32.const 0 - f32.eq + f64.load + local.tee $23 + f64.const nan:0x8000000000000 + f64.eq if (result i32) - f32.const 0 - f32.const 255 - local.get $22 - f32.min - f32.max - i32.trunc_f32_u + i32.const 1 else - i32.const 0 + local.get $23 + local.get $23 + f64.ne end - i32.store8 + br_if $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64> + drop local.get $1 i32.const 1 i32.add local.set $1 - br $for-loop|026 + br $while-continue|0 end end - local.get $0 - local.get $29 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> i32.const 0 - local.set $1 - local.get $28 + end + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 608 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + i32.const 0 + f32.const nan:0x400000 + call $~lib/typedarray/Float32Array#__set + local.get $1 + f32.const nan:0x400000 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 613 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + block $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32> (result i32) + i32.const 0 + local.set $0 + i32.const 0 + local.get $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 - br_if $folding-inner19 - local.get $0 + local.tee $28 + if (result i32) + i32.const 0 + local.get $28 + i32.ge_s + else + i32.const 1 + end + br_if $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32> + drop + local.get $1 i32.load offset=4 - i32.const 8 - i32.add local.set $26 - local.get $28 - i32.load offset=4 - local.set $25 - local.get $28 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $24 - loop $for-loop|027 - local.get $1 - local.get $24 + loop $while-continue|025 + local.get $0 + local.get $28 i32.lt_s if - local.get $1 + i32.const 1 local.get $26 - i32.add - local.get $25 - local.get $1 + local.get $0 i32.const 2 i32.shl i32.add - i32.load - local.tee $27 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $27 - i32.const 255 - local.get $27 - i32.sub - i32.const 31 - i32.shr_s - i32.or - i32.and - i32.store8 - local.get $1 + f32.load + local.tee $22 + f32.const nan:0x400000 + f32.eq + if (result i32) + i32.const 1 + else + local.get $22 + local.get $22 + f32.ne + end + br_if $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32> + drop + local.get $0 i32.const 1 i32.add - local.set $1 - br $for-loop|027 + local.set $0 + br $while-continue|025 end end - local.get $0 - i32.const 10 i32.const 0 - i32.const 18 - i32.const 8288 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $25 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - i32.const 4 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 + end + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 614 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $30 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int8Array#constructor + 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 4 + i32.const 5 + call $~lib/typedarray/Int8Array#__set + local.get $1 + call $~lib/typedarray/Int8Array#join + local.tee $0 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner20 + local.get $1 + call $~lib/typedarray/Int8Array#join + local.tee $30 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner21 + local.get $0 + call $~lib/rt/pure/__release + local.get $30 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + local.get $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 4 + i32.const 5 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + call $~lib/typedarray/Uint8Array#join + local.tee $30 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner20 + call $~lib/typedarray/Uint8Array#join + local.tee $0 + local.get $0 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner21 + local.get $30 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + local.get $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 4 + i32.const 5 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + call $~lib/typedarray/Uint8Array#join + local.tee $30 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner20 + call $~lib/typedarray/Uint8Array#join + local.tee $0 + local.get $0 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner21 + local.get $30 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int16Array#constructor + 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 + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Int16Array#__set + local.get $1 + call $~lib/typedarray/Int16Array#join + local.tee $0 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner20 + local.get $1 + call $~lib/typedarray/Int16Array#join + local.tee $30 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner21 + local.get $0 + call $~lib/rt/pure/__release + local.get $30 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint16Array#constructor + 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 + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + call $~lib/typedarray/Uint16Array#join + local.tee $0 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner20 + local.get $1 + call $~lib/typedarray/Uint16Array#join + local.tee $30 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner21 + local.get $0 + call $~lib/rt/pure/__release + local.get $30 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int32Array#constructor + 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 + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Int32Array#__set + local.get $1 + call $~lib/typedarray/Int32Array#join + local.tee $0 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner20 + local.get $1 + call $~lib/typedarray/Int32Array#join + local.tee $30 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner21 + local.get $0 + call $~lib/rt/pure/__release + local.get $30 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint32Array#constructor + 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 + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + call $~lib/typedarray/Uint32Array#join + local.tee $0 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner20 + local.get $1 + call $~lib/typedarray/Uint32Array#join + local.tee $30 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner21 + local.get $0 + call $~lib/rt/pure/__release + local.get $30 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int64Array#constructor + 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 + local.get $1 + i32.const 3 + i64.const 4 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 4 + i64.const 5 + call $~lib/typedarray/Int64Array#__set + local.get $1 + call $~lib/typedarray/Int64Array#join + local.tee $0 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner20 + local.get $1 + call $~lib/typedarray/Int64Array#join + local.tee $30 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner21 + local.get $0 + call $~lib/rt/pure/__release + local.get $30 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint64Array#constructor + 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 + local.get $1 + i32.const 3 + i64.const 4 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 4 + i64.const 5 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + call $~lib/typedarray/Uint64Array#join + local.tee $0 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner20 + local.get $1 + call $~lib/typedarray/Uint64Array#join + local.tee $30 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner21 + local.get $0 + call $~lib/rt/pure/__release + local.get $30 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Float32Array#constructor + 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 + local.get $1 + i32.const 3 + f32.const 4 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 4 + f32.const 5 + call $~lib/typedarray/Float32Array#__set + local.get $1 + call $~lib/typedarray/Float32Array#join + local.tee $0 + i32.const 4112 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner10 + local.get $1 + call $~lib/typedarray/Float32Array#join + local.tee $30 + i32.const 4112 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner11 + local.get $0 + call $~lib/rt/pure/__release + local.get $30 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Float64Array#constructor + 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 + local.get $1 + i32.const 3 + f64.const 4 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 4 + f64.const 5 + call $~lib/typedarray/Float64Array#__set + local.get $1 + call $~lib/typedarray/Float64Array#join + local.tee $0 + i32.const 4112 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner10 + local.get $1 + call $~lib/typedarray/Float64Array#join + local.tee $30 + i32.const 4112 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner11 + local.get $0 + call $~lib/rt/pure/__release + local.get $30 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 + i32.const 2 + global.set $~argumentsLength + local.get $1 + i32.const 0 + call $~lib/typedarray/Uint8Array.wrap@varargs + local.tee $30 + i32.load offset=8 + if i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 1 - i32.const 300 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 2 - i32.const 100 - call $~lib/typedarray/Uint32Array#__set - local.get $1 + i32.const 1312 + i32.const 691 i32.const 3 - i32.const -1 - call $~lib/typedarray/Uint32Array#__set - i32.const 4 - call $~lib/typedarray/Int16Array#constructor - local.tee $27 + call $~lib/builtins/abort + unreachable + end + i32.const 2 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $0 + local.get $1 + call $~lib/rt/pure/__release + i32.const 2 + global.set $~argumentsLength + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint8Array.wrap@varargs + local.set $1 + local.get $30 + call $~lib/rt/pure/__release + local.get $1 + i32.load offset=8 + if i32.const 0 - i32.const -10 - call $~lib/typedarray/Int16Array#__set - local.get $27 - i32.const 1 - i32.const 100 - call $~lib/typedarray/Int16Array#__set - local.get $27 - i32.const 2 - i32.const 10 - call $~lib/typedarray/Int16Array#__set - local.get $27 + i32.const 1312 + i32.const 695 i32.const 3 - i32.const 300 - call $~lib/typedarray/Int16Array#__set - i32.const 0 - local.set $26 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.get $0 - i32.load offset=8 - i32.gt_s - br_if $folding-inner19 - local.get $0 - i32.load offset=4 - local.set $24 - local.get $1 - i32.load offset=4 - local.set $19 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + 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 $30 + i32.const 0 + f32.const 400 + call $~lib/typedarray/Float32Array#__set + local.get $30 + i32.const 1 + f32.const nan:0x400000 + call $~lib/typedarray/Float32Array#__set + local.get $30 + i32.const 2 + f32.const inf + call $~lib/typedarray/Float32Array#__set + i32.const 4 + call $~lib/typedarray/Int64Array#constructor + local.tee $29 + i32.const 0 + i64.const -10 + call $~lib/typedarray/Int64Array#__set + local.get $29 + i32.const 1 + i64.const 100 + call $~lib/typedarray/Int64Array#__set + local.get $29 + i32.const 2 + i64.const 10 + call $~lib/typedarray/Int64Array#__set + local.get $29 + i32.const 3 + i64.const 300 + call $~lib/typedarray/Int64Array#__set + i32.const 2 + call $~lib/typedarray/Int32Array#constructor + local.tee $28 + i32.const 0 + i32.const 300 + call $~lib/typedarray/Int32Array#__set + local.get $28 + i32.const 1 + i32.const -1 + call $~lib/typedarray/Int32Array#__set + i32.const 0 + local.set $1 + local.get $30 + 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 + br_if $folding-inner22 + local.get $0 + i32.load offset=4 + i32.const 1 + i32.add + local.set $26 + local.get $30 + i32.load offset=4 + local.set $25 + local.get $30 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $24 + loop $for-loop|026 local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $18 - loop $for-loop|028 + local.get $24 + i32.lt_s + if + local.get $1 local.get $26 - local.get $18 - i32.lt_s - if - local.get $24 - local.get $26 - i32.add - i32.const 255 - local.get $19 - local.get $26 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $17 - i32.const 255 - local.get $17 - i32.lt_u - select - i32.store8 - local.get $26 - i32.const 1 - i32.add - local.set $26 - br $for-loop|028 + i32.add + local.get $25 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $22 + local.get $22 + f32.sub + f32.const 0 + f32.eq + if (result i32) + f32.const 0 + f32.const 255 + local.get $22 + 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|026 end - local.get $0 - local.get $27 - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 18 - i32.const 8320 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $26 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $0 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $28 - call $~lib/rt/pure/__release - local.get $25 - call $~lib/rt/pure/__release + end + local.get $0 + local.get $29 + i32.const 4 + call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int64Array,i64> + i32.const 0 + local.set $1 + local.get $28 + 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 + br_if $folding-inner22 + local.get $0 + i32.load offset=4 + i32.const 8 + i32.add + local.set $26 + local.get $28 + i32.load offset=4 + local.set $25 + local.get $28 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $24 + loop $for-loop|027 local.get $1 - call $~lib/rt/pure/__release - local.get $27 - call $~lib/rt/pure/__release + local.get $24 + i32.lt_s + if + local.get $1 + local.get $26 + i32.add + local.get $25 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $27 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $27 + i32.const 255 + local.get $27 + 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|027 + end + end + local.get $0 + i32.const 10 + i32.const 0 + i32.const 18 + i32.const 8288 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $25 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + i32.const 4 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 1 + i32.const 300 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 2 + i32.const 100 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 3 + i32.const -1 + call $~lib/typedarray/Uint32Array#__set + i32.const 4 + call $~lib/typedarray/Int16Array#constructor + local.tee $27 + i32.const 0 + i32.const -10 + call $~lib/typedarray/Int16Array#__set + local.get $27 + i32.const 1 + i32.const 100 + call $~lib/typedarray/Int16Array#__set + local.get $27 + i32.const 2 + i32.const 10 + call $~lib/typedarray/Int16Array#__set + local.get $27 + i32.const 3 + i32.const 300 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $26 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.get $0 + i32.load offset=8 + i32.gt_s + br_if $folding-inner22 + local.get $0 + i32.load offset=4 + local.set $24 + local.get $1 + i32.load offset=4 + local.set $19 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $18 + loop $for-loop|028 local.get $26 - call $~lib/rt/pure/__release - return + local.get $18 + i32.lt_s + if + local.get $24 + local.get $26 + i32.add + i32.const 255 + local.get $19 + local.get $26 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $17 + i32.const 255 + local.get $17 + i32.lt_u + select + i32.store8 + local.get $26 + i32.const 1 + i32.add + local.set $26 + br $for-loop|028 + end end - br $folding-inner3 + local.get $0 + local.get $27 + i32.const 5 + call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int16Array,i16> + local.get $0 + i32.const 10 + i32.const 0 + i32.const 18 + i32.const 8320 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $26 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + local.get $0 + call $~lib/rt/pure/__release + local.get $30 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $28 + call $~lib/rt/pure/__release + local.get $25 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $27 + call $~lib/rt/pure/__release + local.get $26 + call $~lib/rt/pure/__release + return end i32.const 0 i32.const 1312 - i32.const 323 + i32.const 365 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 344 + i32.const 366 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 365 + i32.const 367 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 366 - i32.const 3 + i32.const 626 + i32.const 5 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 367 - i32.const 3 + i32.const 627 + i32.const 5 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 415 + i32.const 323 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 417 + i32.const 344 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 438 + i32.const 415 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 440 + i32.const 417 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 461 + i32.const 438 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 463 + i32.const 440 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 495 + i32.const 461 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 626 - i32.const 5 + i32.const 463 + i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 627 - i32.const 5 + i32.const 495 + i32.const 3 call $~lib/builtins/abort unreachable end @@ -32129,7 +31899,7 @@ end i32.const 1376 i32.const 1440 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 6100b1c993..91ae78a28f 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -1,48 +1,51 @@ (module (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result 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 $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result 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))) (type $i32_=>_none (func (param i32))) - (type $i64_i64_i32_i32_=>_i64 (func (param i64 i64 i32 i32) (result i64))) + (type $f32_i32_i32_=>_i32 (func (param f32 i32 i32) (result i32))) (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) + (type $i32_i32_i64_=>_i64 (func (param i32 i32 i64) (result i64))) + (type $i64_i64_i32_i32_=>_i64 (func (param i64 i64 i32 i32) (result i64))) + (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) + (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i64_=>_i32 (func (param i64) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (type $i64_i32_i32_=>_none (func (param i64 i32 i32))) - (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) - (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) - (type $i32_i32_i64_=>_i64 (func (param i32 i32 i64) (result i64))) (type $i64_i32_i32_=>_i64 (func (param i64 i32 i32) (result i64))) + (type $i32_i32_f32_=>_f32 (func (param i32 i32 f32) (result f32))) (type $f32_f32_i32_i32_=>_f32 (func (param f32 f32 i32 i32) (result f32))) + (type $i32_i32_f64_=>_f64 (func (param i32 i32 f64) (result f64))) (type $f64_f64_i32_i32_=>_f64 (func (param f64 f64 i32 i32) (result f64))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) + (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) (type $f32_i32_i32_=>_none (func (param f32 i32 i32))) (type $f64_i32_i32_=>_none (func (param f64 i32 i32))) + (type $none_=>_i32 (func (result i32))) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) - (type $i32_i32_f32_=>_f32 (func (param i32 i32 f32) (result f32))) (type $f32_i32_i32_=>_f32 (func (param f32 i32 i32) (result f32))) (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) - (type $i32_i32_f64_=>_f64 (func (param i32 i32 f64) (result f64))) (type $f64_i32_i32_=>_f64 (func (param f64 i32 i32) (result f64))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) (type $i32_i32_f64_f64_f64_f64_f64_=>_none (func (param i32 i32 f64 f64 f64 f64 f64))) - (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) - (type $none_=>_i32 (func (result i32))) + (type $i64_i32_=>_none (func (param i64 i32))) (type $i32_i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32 i32) (result i32))) (type $i32_i32_f64_=>_i32 (func (param i32 i32 f64) (result i32))) (type $i32_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $f64_=>_i32 (func (param f64) (result i32))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (type $f32_f32_=>_f32 (func (param f32 f32) (result f32))) (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -225,6 +228,69 @@ (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "_start" (func $~start)) (export "memory" (memory $0)) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -233,9 +299,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -248,7 +311,7 @@ if i32.const 0 i32.const 144 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -275,7 +338,7 @@ if i32.const 0 i32.const 144 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -329,7 +392,7 @@ if i32.const 0 i32.const 144 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -354,77 +417,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -441,6 +462,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -452,8 +479,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -461,7 +486,7 @@ if i32.const 0 i32.const 144 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -478,28 +503,18 @@ if i32.const 0 i32.const 144 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -510,44 +525,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -555,30 +560,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 144 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -597,22 +598,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -638,7 +639,7 @@ if i32.const 0 i32.const 144 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -650,18 +651,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 144 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -715,27 +716,15 @@ if i32.const 0 i32.const 144 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -750,24 +739,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -777,31 +752,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -809,8 +768,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -836,24 +793,22 @@ if i32.const 0 i32.const 144 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -861,7 +816,7 @@ if i32.const 0 i32.const 144 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -869,16 +824,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -894,7 +849,7 @@ if i32.const 0 i32.const 144 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -903,8 +858,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -915,49 +870,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -970,10 +921,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -1023,73 +970,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -1102,11 +1022,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -1126,7 +1046,7 @@ if i32.const 192 i32.const 144 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -1152,9 +1072,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1222,31 +1139,24 @@ if i32.const 0 i32.const 144 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1259,79 +1169,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 144 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1368,9 +1247,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1384,12 +1261,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1399,7 +1276,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1436,7 +1313,7 @@ if i32.const 0 i32.const 144 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1487,29 +1364,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1529,7 +1386,7 @@ if i32.const 0 i32.const 144 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1576,7 +1433,7 @@ if i32.const 0 i32.const 144 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1597,7 +1454,7 @@ if i32.const 0 i32.const 144 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1618,7 +1475,7 @@ if i32.const 0 i32.const 144 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -1653,344 +1510,339 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + (local $6 i64) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - block $~lib/util/memory/memset|inlined.0 - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - i32.const 0 - i32.const 1 - i32.gt_s - drop - local.get $3 - i32.eqz - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $3 - i32.add - i32.const 4 - i32.sub - local.set $6 - local.get $5 - local.get $4 - i32.store8 - local.get $6 - local.get $4 - i32.store8 offset=3 - local.get $3 - i32.const 2 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=1 - local.get $5 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=2 - local.get $6 - local.get $4 - i32.store8 offset=1 - local.get $3 - i32.const 6 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $4 - i32.store8 offset=3 - local.get $6 - local.get $4 - i32.store8 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - i32.const 0 - local.get $5 - i32.sub - i32.const 3 - i32.and - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $3 - i32.const -4 - i32.and - local.set $3 - i32.const -1 - i32.const 255 - i32.div_u - local.get $4 - i32.const 255 - i32.and - i32.mul - local.set $8 - local.get $5 - local.get $3 - i32.add - i32.const 28 - i32.sub - local.set $6 - local.get $5 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=24 - local.get $3 - i32.const 8 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=16 - local.get $6 - local.get $8 - i32.store offset=20 - local.get $3 - i32.const 24 - i32.le_u - if - br $~lib/util/memory/memset|inlined.0 - end - local.get $5 - local.get $8 - i32.store offset=12 - local.get $5 - local.get $8 - i32.store offset=16 - local.get $5 - local.get $8 - i32.store offset=20 - local.get $5 - local.get $8 - i32.store offset=24 - local.get $6 - local.get $8 - i32.store - local.get $6 - local.get $8 - i32.store offset=4 - local.get $6 - local.get $8 - i32.store offset=8 - local.get $6 - local.get $8 - i32.store offset=12 - i32.const 24 - local.get $5 - i32.const 4 - i32.and - i32.add - local.set $7 - local.get $5 - local.get $7 - i32.add - local.set $5 - local.get $3 - local.get $7 - i32.sub - local.set $3 - local.get $8 - i64.extend_i32_u - local.get $8 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $9 - loop $while-continue|0 - local.get $3 - i32.const 32 - i32.ge_u - local.set $10 - local.get $10 - if - local.get $5 - local.get $9 - i64.store - local.get $5 - local.get $9 - i64.store offset=8 - local.get $5 - local.get $9 - i64.store offset=16 - local.get $5 - local.get $9 - i64.store offset=24 - local.get $3 - i32.const 32 - i32.sub - local.set $3 - local.get $5 - i32.const 32 - i32.add - local.set $5 - br $while-continue|0 - end - end - end - ) - (func $~lib/rt/pure/increment (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - local.get $1 + i32.const 0 i32.const 1 - i32.add - i32.const 268435455 - i32.const -1 - i32.xor - i32.and - i32.eq + i32.gt_s + drop + local.get $2 i32.eqz if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 3 - call $~lib/builtins/abort - unreachable + return end local.get $0 - local.get $1 - i32.const 1 + local.get $2 i32.add - i32.store offset=4 - i32.const 1 - drop - local.get $0 - call $~lib/rt/rtrace/onincrement - i32.const 1 - drop - local.get $0 - i32.load - i32.const 1 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (param $0 i32) (result i32) + i32.const 4 + i32.sub + local.set $3 local.get $0 - global.get $~lib/heap/__heap_base - i32.gt_u + local.get $1 + i32.store8 + local.get $3 + local.get $1 + i32.store8 offset=3 + local.get $2 + i32.const 2 + i32.le_u if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/increment + return end local.get $0 - ) - (func $~lib/rt/pure/__release (param $0 i32) + local.get $1 + i32.store8 offset=1 local.get $0 - global.get $~lib/heap/__heap_base - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (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 $1 - i32.const 1073741808 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=2 + local.get $3 + local.get $1 + i32.store8 offset=1 local.get $2 - i32.shr_u - i32.gt_u + i32.const 6 + i32.le_u if - i32.const 32 - i32.const 80 - i32.const 18 - i32.const 57 - call $~lib/builtins/abort - unreachable + return end + local.get $0 local.get $1 - local.get $2 - i32.shl - local.tee $1 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $3 + i32.store8 offset=3 local.get $3 - i32.const 0 local.get $1 - call $~lib/memory/memory.fill - local.get $0 - i32.eqz + i32.store8 + local.get $2 + i32.const 8 + i32.le_u if - i32.const 12 - i32.const 2 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $0 + return 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.sub + i32.const 3 + i32.and + local.set $4 local.get $0 - local.tee $4 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $5 + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.set $3 + local.get $0 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=24 + local.get $2 + i32.const 8 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=16 + local.get $3 + local.get $5 + i32.store offset=20 + local.get $2 + i32.const 24 + i32.le_u + if + return + end + local.get $0 + local.get $5 + i32.store offset=12 + local.get $0 + local.get $5 + i32.store offset=16 + local.get $0 + local.get $5 + i32.store offset=20 + local.get $0 + local.get $5 + i32.store offset=24 + local.get $3 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $5 + i32.store offset=8 + local.get $3 + local.get $5 + i32.store offset=12 + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $4 + local.get $0 + local.get $4 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $5 + i64.extend_i32_u + local.get $5 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $6 + loop $while-continue|0 + local.get $2 + i32.const 32 + i32.ge_u + local.set $7 + local.get $7 + if + local.get $0 + local.get $6 + i64.store + local.get $0 + local.get $6 + i64.store offset=8 + local.get $0 + local.get $6 + i64.store offset=16 + local.get $0 + local.get $6 + i64.store offset=24 + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $while-continue|0 + end + end + ) + (func $~lib/memory/memory.fill (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memset + ) + (func $~lib/rt/pure/increment (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + i32.const 268435455 + i32.const -1 + i32.xor + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const 268435455 + i32.const -1 + i32.xor + i32.and + i32.eq + i32.eqz + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + i32.const 1 + drop + local.get $0 + call $~lib/rt/rtrace/onincrement + i32.const 1 + drop + local.get $0 + i32.load + i32.const 1 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (param $0 i32) (result i32) + local.get $0 + global.get $~lib/heap/__heap_base + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/increment + end + local.get $0 + ) + (func $~lib/rt/pure/__release (param $0 i32) + local.get $0 + global.get $~lib/heap/__heap_base + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/arraybuffer/ArrayBufferView#constructor (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 $1 + i32.const 1073741808 + local.get $2 + i32.shr_u + i32.gt_u + if + i32.const 32 + i32.const 80 + i32.const 18 + i32.const 57 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.shl + local.tee $1 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $3 + local.get $3 + i32.const 0 + local.get $1 + call $~lib/memory/memory.fill + local.get $0 + i32.eqz + if + i32.const 12 + i32.const 2 + call $~lib/rt/tlsf/__alloc + 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 + local.tee $4 local.get $3 local.tee $5 local.get $4 @@ -2834,112 +2686,112 @@ i32.add i32.load ) - (func $~lib/typedarray/Int32Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 call $~lib/typedarray/Int32Array#get:length - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.const 0 i32.lt_s if (result i32) - local.get $6 - local.get $4 + local.get $3 + local.get $1 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $1 + local.tee $4 + local.get $3 + local.tee $5 local.get $4 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.lt_s select end - local.set $4 - local.get $3 + local.set $1 + local.get $2 i32.const 0 i32.lt_s if (result i32) - local.get $6 local.get $3 + local.get $2 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $2 + local.tee $4 local.get $3 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.lt_s select end - local.set $3 - local.get $3 - local.tee $7 + local.set $2 + local.get $2 + local.tee $4 + local.get $1 + local.tee $5 local.get $4 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.gt_s select - local.set $3 + local.set $2 i32.const 12 i32.const 8 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $7 - local.get $5 + local.set $6 + local.get $6 + local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $7 - local.get $5 + local.get $6 + local.get $0 i32.load offset=4 - local.get $4 + local.get $1 i32.const 2 i32.shl i32.add i32.store offset=4 - local.get $7 - local.get $3 - local.get $4 + local.get $6 + local.get $2 + local.get $1 i32.sub i32.const 2 i32.shl i32.store offset=8 - local.get $7 + local.get $6 call $~lib/rt/pure/__retain - local.set $8 - local.get $5 + local.set $4 + local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $4 + ) + (func $~lib/typedarray/Int32Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int32Array,i32> ) (func $~lib/typedarray/Float64Array#__set (param $0 i32) (param $1 i32) (param $2 f64) local.get $1 @@ -2965,112 +2817,112 @@ local.get $2 f64.store ) - (func $~lib/typedarray/Float64Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 call $~lib/typedarray/Float64Array#get:length - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.const 0 i32.lt_s if (result i32) - local.get $6 - local.get $4 + local.get $3 + local.get $1 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $1 + local.tee $4 + local.get $3 + local.tee $5 local.get $4 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.lt_s select end - local.set $4 - local.get $3 + local.set $1 + local.get $2 i32.const 0 i32.lt_s if (result i32) - local.get $6 local.get $3 + local.get $2 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $2 + local.tee $4 local.get $3 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.lt_s select end - local.set $3 - local.get $3 - local.tee $7 + local.set $2 + local.get $2 + local.tee $4 + local.get $1 + local.tee $5 local.get $4 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.gt_s select - local.set $3 + local.set $2 i32.const 12 i32.const 13 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $7 - local.get $5 + local.set $6 + local.get $6 + local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $7 - local.get $5 + local.get $6 + local.get $0 i32.load offset=4 - local.get $4 + local.get $1 i32.const 3 i32.shl i32.add i32.store offset=4 - local.get $7 - local.get $3 - local.get $4 + local.get $6 + local.get $2 + local.get $1 i32.sub i32.const 3 i32.shl i32.store offset=8 - local.get $7 + local.get $6 call $~lib/rt/pure/__retain - local.set $8 - local.get $5 + local.set $4 + local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $4 + ) + (func $~lib/typedarray/Float64Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Float64Array,f64> ) (func $~setArgumentsLength (param $0 i32) local.get $0 @@ -3207,7 +3059,7 @@ if i32.const 0 i32.const 144 - i32.const 581 + i32.const 573 i32.const 3 call $~lib/builtins/abort unreachable @@ -3527,88 +3379,84 @@ local.get $12 f64.store ) - (func $~lib/typedarray/Float64Array#sort (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 0 + drop + local.get $1 + i32.const 256 + i32.lt_s + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/sort/insertionSort + else + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/sort/weakHeapSort + end + ) + (func $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64> (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + (local $4 f64) + (local $5 f64) + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + call $~lib/typedarray/Float64Array#get:length + local.set $2 + local.get $2 + i32.const 1 + i32.le_s + if local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + return + end + local.get $0 + i32.load offset=4 + local.set $3 + local.get $2 + i32.const 2 + i32.eq + if local.get $3 - call $~lib/typedarray/Float64Array#get:length + f64.load offset=8 local.set $4 - local.get $4 - i32.const 1 - i32.le_s - if - local.get $3 - br $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - end local.get $3 - i32.load offset=4 + f64.load local.set $5 local.get $4 - i32.const 2 - i32.eq - if - local.get $5 - f64.load offset=8 - local.set $6 - local.get $5 - f64.load - local.set $7 - local.get $6 - local.get $7 - i32.const 2 - global.set $~argumentsLength - local.get $2 - call_indirect (type $f64_f64_=>_i32) - i32.const 0 - i32.lt_s - if - local.get $5 - local.get $7 - f64.store offset=8 - local.get $5 - local.get $6 - f64.store - end - local.get $3 - br $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - end local.get $5 - local.set $10 - local.get $4 - local.set $9 - local.get $2 - local.set $8 + i32.const 2 + global.set $~argumentsLength + local.get $1 + call_indirect (type $f64_f64_=>_i32) i32.const 0 - drop - local.get $9 - i32.const 256 i32.lt_s if - local.get $10 - local.get $9 - local.get $8 - call $~lib/util/sort/insertionSort - else - local.get $10 - local.get $9 - local.get $8 - call $~lib/util/sort/weakHeapSort + local.get $3 + local.get $5 + f64.store offset=8 + local.get $3 + local.get $4 + f64.store end - local.get $3 + local.get $0 + return end + local.get $3 + local.get $2 + local.get $1 + call $~lib/util/sort/SORT + local.get $0 + ) + (func $~lib/typedarray/Float64Array#sort (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64> ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f64) (param $1 f64) (result i32) (local $2 i64) @@ -3643,6 +3491,18 @@ i64.lt_s i32.sub ) + (func $~lib/util/sort/COMPARATOR (result i32) + i32.const 0 + drop + i32.const 1 + drop + i32.const 8 + i32.const 4 + i32.eq + drop + i32.const 1 + return + ) (func $~lib/typedarray/Float64Array#sort@varargs (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 @@ -3652,18 +3512,7 @@ end unreachable end - block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) - i32.const 0 - drop - i32.const 1 - drop - i32.const 8 - i32.const 4 - i32.eq - drop - i32.const 1 - br $~lib/util/sort/COMPARATOR|inlined.0 - end + call $~lib/util/sort/COMPARATOR local.set $1 end local.get $0 @@ -3764,98 +3613,95 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Int8Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/FILL<~lib/typedarray/Int8Array,i8> (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $7 - local.get $1 - local.set $6 - local.get $2 - local.set $5 - local.get $3 - local.set $4 - local.get $7 + local.set $0 + local.get $0 i32.load offset=4 - local.set $8 - local.get $7 + local.set $4 + local.get $0 call $~lib/typedarray/Int8Array#get:length - local.set $9 - local.get $5 + local.set $5 + local.get $2 i32.const 0 i32.lt_s if (result i32) - local.get $9 local.get $5 + local.get $2 i32.add - local.tee $10 + local.tee $6 i32.const 0 - local.tee $11 - local.get $10 - local.get $11 + local.tee $7 + local.get $6 + local.get $7 i32.gt_s select else + local.get $2 + local.tee $6 local.get $5 - local.tee $10 - local.get $9 - local.tee $11 - local.get $10 - local.get $11 + local.tee $7 + local.get $6 + local.get $7 i32.lt_s select end - local.set $5 - local.get $4 + local.set $2 + local.get $3 i32.const 0 i32.lt_s if (result i32) - local.get $9 - local.get $4 + local.get $5 + local.get $3 i32.add - local.tee $10 + local.tee $6 i32.const 0 - local.tee $11 - local.get $10 - local.get $11 + local.tee $7 + local.get $6 + local.get $7 i32.gt_s select else - local.get $4 - local.tee $10 - local.get $9 - local.tee $11 - local.get $10 - local.get $11 + local.get $3 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 i32.lt_s select end - local.set $4 + local.set $3 i32.const 1 i32.const 1 i32.eq drop - local.get $5 - local.get $4 + local.get $2 + local.get $3 i32.lt_s if - local.get $8 - local.get $5 - i32.add - local.get $6 local.get $4 - local.get $5 + local.get $2 + i32.add + local.get $1 + local.get $3 + local.get $2 i32.sub call $~lib/memory/memory.fill end - local.get $7 + local.get $0 + ) + (func $~lib/typedarray/Int8Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/typedarray/FILL<~lib/typedarray/Int8Array,i8> ) (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -4881,238 +4727,233 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if local.get $0 - local.set $5 local.get $1 - local.set $4 local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if i32.const 0 - i32.const 1 + i32.const 2 i32.lt_s drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.tee $7 + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 i32.const 1 i32.add - local.set $5 - local.get $7 + local.set $0 local.get $4 - local.tee $7 + local.get $1 + local.tee $4 i32.const 1 i32.add - local.set $4 - local.get $7 + local.set $1 + local.get $4 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 + br $while-continue|0 end end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) (func $~lib/rt/__allocBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 @@ -5284,213 +5125,210 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Int8Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 call $~lib/typedarray/Int8Array#get:length - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.const 0 i32.lt_s if (result i32) - local.get $6 - local.get $4 + local.get $3 + local.get $1 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $1 + local.tee $4 + local.get $3 + local.tee $5 local.get $4 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.lt_s select end - local.set $4 - local.get $3 + local.set $1 + local.get $2 i32.const 0 i32.lt_s if (result i32) - local.get $6 local.get $3 + local.get $2 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $2 + local.tee $4 local.get $3 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.lt_s select end - local.set $3 - local.get $3 - local.tee $7 + local.set $2 + local.get $2 + local.tee $4 + local.get $1 + local.tee $5 local.get $4 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.gt_s select - local.set $3 + local.set $2 i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $7 - local.get $5 + local.set $6 + local.get $6 + local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $7 - local.get $5 + local.get $6 + local.get $0 i32.load offset=4 - local.get $4 + local.get $1 i32.const 0 i32.shl i32.add i32.store offset=4 - local.get $7 - local.get $3 - local.get $4 + local.get $6 + local.get $2 + local.get $1 i32.sub i32.const 0 i32.shl i32.store offset=8 - local.get $7 + local.get $6 call $~lib/rt/pure/__retain - local.set $8 - local.get $5 + local.set $4 + local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $4 ) - (func $~lib/typedarray/Int32Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> + ) + (func $~lib/typedarray/FILL<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $7 - local.get $1 - local.set $6 - local.get $2 - local.set $5 - local.get $3 - local.set $4 - local.get $7 + local.set $0 + local.get $0 i32.load offset=4 - local.set $8 - local.get $7 + local.set $4 + local.get $0 call $~lib/typedarray/Int32Array#get:length - local.set $9 - local.get $5 + local.set $5 + local.get $2 i32.const 0 i32.lt_s if (result i32) - local.get $9 local.get $5 + local.get $2 i32.add - local.tee $10 + local.tee $6 i32.const 0 - local.tee $11 - local.get $10 - local.get $11 + local.tee $7 + local.get $6 + local.get $7 i32.gt_s select else + local.get $2 + local.tee $6 local.get $5 - local.tee $10 - local.get $9 - local.tee $11 - local.get $10 - local.get $11 + local.tee $7 + local.get $6 + local.get $7 i32.lt_s select end - local.set $5 - local.get $4 + local.set $2 + local.get $3 i32.const 0 i32.lt_s if (result i32) - local.get $9 - local.get $4 + local.get $5 + local.get $3 i32.add - local.tee $10 + local.tee $6 i32.const 0 - local.tee $11 - local.get $10 - local.get $11 + local.tee $7 + local.get $6 + local.get $7 i32.gt_s select else - local.get $4 - local.tee $10 - local.get $9 - local.tee $11 - local.get $10 - local.get $11 + local.get $3 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 i32.lt_s select end - local.set $4 + local.set $3 i32.const 4 i32.const 1 i32.eq drop loop $for-loop|0 - local.get $5 - local.get $4 + local.get $2 + local.get $3 i32.lt_s - local.set $10 - local.get $10 + local.set $6 + local.get $6 if - local.get $8 - local.get $5 + local.get $4 + local.get $2 i32.const 2 i32.shl i32.add - local.get $6 + local.get $1 i32.store - local.get $5 + local.get $2 i32.const 1 i32.add - local.set $5 + local.set $2 br $for-loop|0 end end - local.get $7 + local.get $0 + ) + (func $~lib/typedarray/Int32Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/typedarray/FILL<~lib/typedarray/Int32Array,i32> ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) local.get $0 @@ -5597,112 +5435,111 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Int32Array#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 call $~lib/typedarray/Int32Array#get:length - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.const 0 i32.lt_s if (result i32) - local.get $4 - local.get $6 + local.get $1 + local.get $3 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $1 + local.tee $4 + local.get $3 + local.tee $5 local.get $4 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.lt_s select end - local.set $4 - local.get $3 + local.set $1 + local.get $2 i32.const 0 i32.lt_s if (result i32) + local.get $2 local.get $3 - local.get $6 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $2 + local.tee $4 local.get $3 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.lt_s select end - local.set $3 - local.get $3 - local.get $4 + local.set $2 + local.get $2 + local.get $1 i32.sub - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select - local.set $6 + local.set $3 i32.const 0 - local.get $6 + local.get $3 call $~lib/typedarray/Int32Array#constructor - local.tee $7 + local.tee $4 call $~lib/rt/pure/__retain - local.set $8 - local.get $8 + local.set $6 + local.get $6 i32.load offset=4 - local.get $5 + local.get $0 i32.load offset=4 - local.get $4 + local.get $1 i32.const 2 i32.shl i32.add - local.get $6 + local.get $3 i32.const 2 i32.shl call $~lib/memory/memory.copy - local.get $8 - local.set $9 - local.get $5 + local.get $6 + local.set $5 + local.get $4 call $~lib/rt/pure/__release - local.get $7 + local.get $0 call $~lib/rt/pure/__release - local.get $9 + local.get $5 ) - (func $~lib/typedarray/Int32Array#copyWithin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> + ) + (func $~lib/typedarray/COPY_WITHIN<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -5711,136 +5548,134 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $7 - local.get $1 - local.set $6 - local.get $2 - local.set $5 - local.get $3 - local.set $4 - local.get $7 + local.set $0 + local.get $0 call $~lib/typedarray/Int32Array#get:length - local.set $8 - local.get $7 + local.set $4 + local.get $0 i32.load offset=4 - local.set $9 + local.set $5 + local.get $3 + local.tee $6 local.get $4 - local.tee $10 - local.get $8 - local.tee $11 - local.get $10 - local.get $11 + local.tee $7 + local.get $6 + local.get $7 i32.lt_s select - local.set $4 - local.get $6 + local.set $3 + local.get $1 i32.const 0 i32.lt_s if (result i32) - local.get $8 - local.get $6 + local.get $4 + local.get $1 i32.add - local.tee $10 + local.tee $6 i32.const 0 - local.tee $11 - local.get $10 - local.get $11 + local.tee $7 + local.get $6 + local.get $7 i32.gt_s select else + local.get $1 + local.tee $6 + local.get $4 + local.tee $7 local.get $6 - local.tee $10 - local.get $8 - local.tee $11 - local.get $10 - local.get $11 + local.get $7 i32.lt_s select end - local.set $10 - local.get $5 + local.set $8 + local.get $2 i32.const 0 i32.lt_s if (result i32) - local.get $8 - local.get $5 + local.get $4 + local.get $2 i32.add - local.tee $11 + local.tee $6 i32.const 0 - local.tee $12 - local.get $11 - local.get $12 + local.tee $7 + local.get $6 + local.get $7 i32.gt_s select else - local.get $5 - local.tee $11 - local.get $8 - local.tee $12 - local.get $11 - local.get $12 + local.get $2 + local.tee $6 + local.get $4 + local.tee $7 + local.get $6 + local.get $7 i32.lt_s select end - local.set $11 - local.get $4 + local.set $9 + local.get $3 i32.const 0 i32.lt_s if (result i32) - local.get $8 local.get $4 + local.get $3 i32.add - local.tee $12 + local.tee $6 i32.const 0 - local.tee $13 - local.get $12 - local.get $13 + local.tee $7 + local.get $6 + local.get $7 i32.gt_s select else + local.get $3 + local.tee $6 local.get $4 - local.tee $12 - local.get $8 - local.tee $13 - local.get $12 - local.get $13 + local.tee $7 + local.get $6 + local.get $7 i32.lt_s select end - local.set $12 - local.get $12 - local.get $11 + local.set $10 + local.get $10 + local.get $9 i32.sub - local.tee $13 + local.tee $6 + local.get $4 local.get $8 - local.get $10 i32.sub - local.tee $14 - local.get $13 - local.get $14 + local.tee $7 + local.get $6 + local.get $7 i32.lt_s select - local.set $13 - local.get $9 - local.get $10 + local.set $11 + local.get $5 + local.get $8 i32.const 2 i32.shl i32.add + local.get $5 local.get $9 - local.get $11 i32.const 2 i32.shl i32.add - local.get $13 + local.get $11 i32.const 2 i32.shl call $~lib/memory/memory.copy - local.get $7 + local.get $0 + ) + (func $~lib/typedarray/Int32Array#copyWithin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/typedarray/COPY_WITHIN<~lib/typedarray/Int32Array,i32> ) (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) @@ -5855,62 +5690,61 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Int8Array#reduce (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/REDUCE<~lib/typedarray/Int8Array,i8,i8> (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 i32.load offset=4 - local.set $6 + local.set $3 i32.const 0 - local.set $7 - local.get $5 + local.set $4 + local.get $0 call $~lib/typedarray/Int8Array#get:length - local.set $8 + local.set $5 loop $for-loop|0 - local.get $7 - local.get $8 + local.get $4 + local.get $5 i32.lt_s - local.set $9 - local.get $9 + local.set $6 + local.get $6 if + local.get $2 local.get $3 - local.get $6 - local.get $7 + local.get $4 i32.const 0 i32.shl i32.add i32.load8_s - local.get $7 - local.get $5 + local.get $4 + local.get $0 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $1 call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $2 + local.get $4 i32.const 1 i32.add - local.set $7 + local.set $4 br $for-loop|0 end end - local.get $3 - local.set $8 - local.get $5 + local.get $2 + local.set $5 + local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $5 + ) + (func $~lib/typedarray/Int8Array#reduce (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/REDUCE<~lib/typedarray/Int8Array,i8,i8> ) (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (local $0 i32) @@ -5993,62 +5827,61 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Uint8Array#reduce (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/REDUCE<~lib/typedarray/Uint8Array,u8,u8> (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 i32.load offset=4 - local.set $6 + local.set $3 i32.const 0 - local.set $7 - local.get $5 + local.set $4 + local.get $0 call $~lib/typedarray/Uint8Array#get:length - local.set $8 + local.set $5 loop $for-loop|0 - local.get $7 - local.get $8 + local.get $4 + local.get $5 i32.lt_s - local.set $9 - local.get $9 + local.set $6 + local.get $6 if + local.get $2 local.get $3 - local.get $6 - local.get $7 + local.get $4 i32.const 0 i32.shl i32.add i32.load8_u - local.get $7 - local.get $5 + local.get $4 + local.get $0 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $1 call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $2 + local.get $4 i32.const 1 i32.add - local.set $7 + local.set $4 br $for-loop|0 end end - local.get $3 - local.set $8 - local.get $5 + local.get $2 + local.set $5 + local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $5 + ) + (func $~lib/typedarray/Uint8Array#reduce (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/REDUCE<~lib/typedarray/Uint8Array,u8,u8> ) (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (local $0 i32) @@ -6109,62 +5942,61 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Uint8ClampedArray#reduce (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/REDUCE<~lib/typedarray/Uint8ClampedArray,u8,u8> (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 i32.load offset=4 - local.set $6 + local.set $3 i32.const 0 - local.set $7 - local.get $5 + local.set $4 + local.get $0 call $~lib/typedarray/Uint8ClampedArray#get:length - local.set $8 + local.set $5 loop $for-loop|0 - local.get $7 - local.get $8 + local.get $4 + local.get $5 i32.lt_s - local.set $9 - local.get $9 + local.set $6 + local.get $6 if + local.get $2 local.get $3 - local.get $6 - local.get $7 + local.get $4 i32.const 0 i32.shl i32.add i32.load8_u - local.get $7 - local.get $5 + local.get $4 + local.get $0 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $1 call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $2 + local.get $4 i32.const 1 i32.add - local.set $7 + local.set $4 br $for-loop|0 end end - local.get $3 - local.set $8 - local.get $5 + local.get $2 + local.set $5 + local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $5 + ) + (func $~lib/typedarray/Uint8ClampedArray#reduce (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/REDUCE<~lib/typedarray/Uint8ClampedArray,u8,u8> ) (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (local $0 i32) @@ -6249,62 +6081,61 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Int16Array#reduce (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/REDUCE<~lib/typedarray/Int16Array,i16,i16> (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 i32.load offset=4 - local.set $6 + local.set $3 i32.const 0 - local.set $7 - local.get $5 + local.set $4 + local.get $0 call $~lib/typedarray/Int16Array#get:length - local.set $8 + local.set $5 loop $for-loop|0 - local.get $7 - local.get $8 + local.get $4 + local.get $5 i32.lt_s - local.set $9 - local.get $9 + local.set $6 + local.get $6 if + local.get $2 local.get $3 - local.get $6 - local.get $7 + local.get $4 i32.const 1 i32.shl i32.add i32.load16_s - local.get $7 - local.get $5 + local.get $4 + local.get $0 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $1 call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $2 + local.get $4 i32.const 1 i32.add - local.set $7 + local.set $4 br $for-loop|0 end end - local.get $3 - local.set $8 - local.get $5 + local.get $2 + local.set $5 + local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $5 + ) + (func $~lib/typedarray/Int16Array#reduce (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/REDUCE<~lib/typedarray/Int16Array,i16,i16> ) (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (local $0 i32) @@ -6391,62 +6222,61 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Uint16Array#reduce (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/REDUCE<~lib/typedarray/Uint16Array,u16,u16> (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 i32.load offset=4 - local.set $6 + local.set $3 i32.const 0 - local.set $7 - local.get $5 + local.set $4 + local.get $0 call $~lib/typedarray/Uint16Array#get:length - local.set $8 + local.set $5 loop $for-loop|0 - local.get $7 - local.get $8 + local.get $4 + local.get $5 i32.lt_s - local.set $9 - local.get $9 + local.set $6 + local.get $6 if + local.get $2 local.get $3 - local.get $6 - local.get $7 + local.get $4 i32.const 1 i32.shl i32.add i32.load16_u - local.get $7 - local.get $5 + local.get $4 + local.get $0 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $1 call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $2 + local.get $4 i32.const 1 i32.add - local.set $7 + local.set $4 br $for-loop|0 end end - local.get $3 - local.set $8 - local.get $5 + local.get $2 + local.set $5 + local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $5 + ) + (func $~lib/typedarray/Uint16Array#reduce (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/REDUCE<~lib/typedarray/Uint16Array,u16,u16> ) (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (local $0 i32) @@ -6507,62 +6337,61 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Int32Array#reduce (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/REDUCE<~lib/typedarray/Int32Array,i32,i32> (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 i32.load offset=4 - local.set $6 + local.set $3 i32.const 0 - local.set $7 - local.get $5 + local.set $4 + local.get $0 call $~lib/typedarray/Int32Array#get:length - local.set $8 + local.set $5 loop $for-loop|0 - local.get $7 - local.get $8 + local.get $4 + local.get $5 i32.lt_s - local.set $9 - local.get $9 + local.set $6 + local.get $6 if + local.get $2 local.get $3 - local.get $6 - local.get $7 + local.get $4 i32.const 2 i32.shl i32.add i32.load - local.get $7 - local.get $5 + local.get $4 + local.get $0 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $1 call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $2 + local.get $4 i32.const 1 i32.add - local.set $7 + local.set $4 br $for-loop|0 end end - local.get $3 - local.set $8 - local.get $5 + local.get $2 + local.set $5 + local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $5 + ) + (func $~lib/typedarray/Int32Array#reduce (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/REDUCE<~lib/typedarray/Int32Array,i32,i32> ) (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (local $0 i32) @@ -6645,62 +6474,61 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Uint32Array#reduce (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/REDUCE<~lib/typedarray/Uint32Array,u32,u32> (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 i32.load offset=4 - local.set $6 + local.set $3 i32.const 0 - local.set $7 - local.get $5 + local.set $4 + local.get $0 call $~lib/typedarray/Uint32Array#get:length - local.set $8 + local.set $5 loop $for-loop|0 - local.get $7 - local.get $8 + local.get $4 + local.get $5 i32.lt_s - local.set $9 - local.get $9 + local.set $6 + local.get $6 if + local.get $2 local.get $3 - local.get $6 - local.get $7 + local.get $4 i32.const 2 i32.shl i32.add i32.load - local.get $7 - local.get $5 + local.get $4 + local.get $0 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $1 call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $2 + local.get $4 i32.const 1 i32.add - local.set $7 + local.set $4 br $for-loop|0 end end - local.get $3 - local.set $8 - local.get $5 + local.get $2 + local.set $5 + local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $5 + ) + (func $~lib/typedarray/Uint32Array#reduce (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/REDUCE<~lib/typedarray/Uint32Array,u32,u32> ) (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (local $0 i32) @@ -6783,63 +6611,62 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Int64Array#reduce (param $0 i32) (param $1 i32) (param $2 i64) (result i64) - (local $3 i64) + (func $~lib/typedarray/REDUCE<~lib/typedarray/Int64Array,i64,i64> (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i64) + (local $7 i64) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 i32.load offset=4 - local.set $6 + local.set $3 i32.const 0 - local.set $7 - local.get $5 + local.set $4 + local.get $0 call $~lib/typedarray/Int64Array#get:length - local.set $8 + local.set $5 loop $for-loop|0 - local.get $7 - local.get $8 + local.get $4 + local.get $5 i32.lt_s - local.set $9 - local.get $9 + local.set $6 + local.get $6 if + local.get $2 local.get $3 - local.get $6 - local.get $7 + local.get $4 i32.const 3 i32.shl i32.add i64.load - local.get $7 - local.get $5 + local.get $4 + local.get $0 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $1 call_indirect (type $i64_i64_i32_i32_=>_i64) - local.set $3 - local.get $7 + local.set $2 + local.get $4 i32.const 1 i32.add - local.set $7 + local.set $4 br $for-loop|0 end end - local.get $3 - local.set $10 - local.get $5 + local.get $2 + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $10 + local.get $7 + ) + (func $~lib/typedarray/Int64Array#reduce (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/REDUCE<~lib/typedarray/Int64Array,i64,i64> ) (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (local $0 i32) @@ -6922,63 +6749,62 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Uint64Array#reduce (param $0 i32) (param $1 i32) (param $2 i64) (result i64) - (local $3 i64) + (func $~lib/typedarray/REDUCE<~lib/typedarray/Uint64Array,u64,u64> (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i64) + (local $7 i64) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 i32.load offset=4 - local.set $6 + local.set $3 i32.const 0 - local.set $7 - local.get $5 + local.set $4 + local.get $0 call $~lib/typedarray/Uint64Array#get:length - local.set $8 + local.set $5 loop $for-loop|0 - local.get $7 - local.get $8 + local.get $4 + local.get $5 i32.lt_s - local.set $9 - local.get $9 + local.set $6 + local.get $6 if + local.get $2 local.get $3 - local.get $6 - local.get $7 + local.get $4 i32.const 3 i32.shl i32.add i64.load - local.get $7 - local.get $5 + local.get $4 + local.get $0 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $1 call_indirect (type $i64_i64_i32_i32_=>_i64) - local.set $3 - local.get $7 + local.set $2 + local.get $4 i32.const 1 i32.add - local.set $7 + local.set $4 br $for-loop|0 end end - local.get $3 - local.set $10 - local.get $5 + local.get $2 + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $10 + local.get $7 + ) + (func $~lib/typedarray/Uint64Array#reduce (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/REDUCE<~lib/typedarray/Uint64Array,u64,u64> ) (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (local $0 i32) @@ -7061,63 +6887,62 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Float32Array#reduce (param $0 i32) (param $1 i32) (param $2 f32) (result f32) - (local $3 f32) + (func $~lib/typedarray/REDUCE<~lib/typedarray/Float32Array,f32,f32> (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 f32) + (local $7 f32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 i32.load offset=4 - local.set $6 + local.set $3 i32.const 0 - local.set $7 - local.get $5 + local.set $4 + local.get $0 call $~lib/typedarray/Float32Array#get:length - local.set $8 + local.set $5 loop $for-loop|0 - local.get $7 - local.get $8 + local.get $4 + local.get $5 i32.lt_s - local.set $9 - local.get $9 + local.set $6 + local.get $6 if + local.get $2 local.get $3 - local.get $6 - local.get $7 + local.get $4 i32.const 2 i32.shl i32.add f32.load - local.get $7 - local.get $5 + local.get $4 + local.get $0 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $1 call_indirect (type $f32_f32_i32_i32_=>_f32) - local.set $3 - local.get $7 + local.set $2 + local.get $4 i32.const 1 i32.add - local.set $7 + local.set $4 br $for-loop|0 end end - local.get $3 - local.set $10 - local.get $5 + local.get $2 + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $10 + local.get $7 + ) + (func $~lib/typedarray/Float32Array#reduce (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/REDUCE<~lib/typedarray/Float32Array,f32,f32> ) (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (local $0 i32) @@ -7176,63 +7001,62 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Float64Array#reduce (param $0 i32) (param $1 i32) (param $2 f64) (result f64) - (local $3 f64) + (func $~lib/typedarray/REDUCE<~lib/typedarray/Float64Array,f64,f64> (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 f64) + (local $7 f64) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 i32.load offset=4 - local.set $6 + local.set $3 i32.const 0 - local.set $7 - local.get $5 + local.set $4 + local.get $0 call $~lib/typedarray/Float64Array#get:length - local.set $8 + local.set $5 loop $for-loop|0 - local.get $7 - local.get $8 + local.get $4 + local.get $5 i32.lt_s - local.set $9 - local.get $9 + local.set $6 + local.get $6 if + local.get $2 local.get $3 - local.get $6 - local.get $7 + local.get $4 i32.const 3 i32.shl i32.add f64.load - local.get $7 - local.get $5 + local.get $4 + local.get $0 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $1 call_indirect (type $f64_f64_i32_i32_=>_f64) - local.set $3 - local.get $7 + local.set $2 + local.get $4 i32.const 1 i32.add - local.set $7 + local.set $4 br $for-loop|0 end end - local.get $3 - local.set $10 - local.get $5 + local.get $2 + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $10 + local.get $7 + ) + (func $~lib/typedarray/Float64Array#reduce (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/REDUCE<~lib/typedarray/Float64Array,f64,f64> ) (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (local $0 i32) @@ -7291,61 +7115,60 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Int8Array#reduceRight (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int8Array,i8,i8> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 i32.load offset=4 - local.set $6 - local.get $5 + local.set $3 + local.get $0 call $~lib/typedarray/Int8Array#get:length i32.const 1 i32.sub - local.set $7 + local.set $4 loop $for-loop|0 - local.get $7 + local.get $4 i32.const 0 i32.ge_s - local.set $8 - local.get $8 + local.set $5 + local.get $5 if + local.get $2 local.get $3 - local.get $6 - local.get $7 + local.get $4 i32.const 0 i32.shl i32.add i32.load8_s - local.get $7 - local.get $5 + local.get $4 + local.get $0 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $1 call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $2 + local.get $4 i32.const 1 i32.sub - local.set $7 + local.set $4 br $for-loop|0 end end - local.get $3 - local.set $7 - local.get $5 + local.get $2 + local.set $4 + local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $4 + ) + (func $~lib/typedarray/Int8Array#reduceRight (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int8Array,i8,i8> ) (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (local $0 i32) @@ -7408,61 +7231,60 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Uint8Array#reduceRight (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Uint8Array,u8,u8> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 i32.load offset=4 - local.set $6 - local.get $5 + local.set $3 + local.get $0 call $~lib/typedarray/Uint8Array#get:length i32.const 1 i32.sub - local.set $7 + local.set $4 loop $for-loop|0 - local.get $7 + local.get $4 i32.const 0 i32.ge_s - local.set $8 - local.get $8 + local.set $5 + local.get $5 if + local.get $2 local.get $3 - local.get $6 - local.get $7 + local.get $4 i32.const 0 i32.shl i32.add i32.load8_u - local.get $7 - local.get $5 + local.get $4 + local.get $0 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $1 call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $2 + local.get $4 i32.const 1 i32.sub - local.set $7 + local.set $4 br $for-loop|0 end end - local.get $3 - local.set $7 - local.get $5 + local.get $2 + local.set $4 + local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $4 + ) + (func $~lib/typedarray/Uint8Array#reduceRight (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Uint8Array,u8,u8> ) (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (local $0 i32) @@ -7523,61 +7345,60 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Uint8ClampedArray#reduceRight (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Uint8ClampedArray,u8,u8> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 i32.load offset=4 - local.set $6 - local.get $5 + local.set $3 + local.get $0 call $~lib/typedarray/Uint8ClampedArray#get:length i32.const 1 i32.sub - local.set $7 + local.set $4 loop $for-loop|0 - local.get $7 + local.get $4 i32.const 0 i32.ge_s - local.set $8 - local.get $8 + local.set $5 + local.get $5 if + local.get $2 local.get $3 - local.get $6 - local.get $7 + local.get $4 i32.const 0 i32.shl i32.add i32.load8_u - local.get $7 - local.get $5 + local.get $4 + local.get $0 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $1 call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $2 + local.get $4 i32.const 1 i32.sub - local.set $7 + local.set $4 br $for-loop|0 end end - local.get $3 - local.set $7 - local.get $5 + local.get $2 + local.set $4 + local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $4 + ) + (func $~lib/typedarray/Uint8ClampedArray#reduceRight (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Uint8ClampedArray,u8,u8> ) (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (local $0 i32) @@ -7638,61 +7459,60 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Int16Array#reduceRight (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int16Array,i16,i16> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 i32.load offset=4 - local.set $6 - local.get $5 + local.set $3 + local.get $0 call $~lib/typedarray/Int16Array#get:length i32.const 1 i32.sub - local.set $7 + local.set $4 loop $for-loop|0 - local.get $7 + local.get $4 i32.const 0 i32.ge_s - local.set $8 - local.get $8 + local.set $5 + local.get $5 if + local.get $2 local.get $3 - local.get $6 - local.get $7 + local.get $4 i32.const 1 i32.shl i32.add i32.load16_s - local.get $7 - local.get $5 + local.get $4 + local.get $0 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $1 call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $2 + local.get $4 i32.const 1 i32.sub - local.set $7 + local.set $4 br $for-loop|0 end end - local.get $3 - local.set $7 - local.get $5 + local.get $2 + local.set $4 + local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $4 + ) + (func $~lib/typedarray/Int16Array#reduceRight (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int16Array,i16,i16> ) (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (local $0 i32) @@ -7755,61 +7575,60 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Uint16Array#reduceRight (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Uint16Array,u16,u16> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 i32.load offset=4 - local.set $6 - local.get $5 + local.set $3 + local.get $0 call $~lib/typedarray/Uint16Array#get:length i32.const 1 i32.sub - local.set $7 + local.set $4 loop $for-loop|0 - local.get $7 + local.get $4 i32.const 0 i32.ge_s - local.set $8 - local.get $8 + local.set $5 + local.get $5 if + local.get $2 local.get $3 - local.get $6 - local.get $7 + local.get $4 i32.const 1 i32.shl i32.add i32.load16_u - local.get $7 - local.get $5 + local.get $4 + local.get $0 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $1 call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $2 + local.get $4 i32.const 1 i32.sub - local.set $7 + local.set $4 br $for-loop|0 end end - local.get $3 - local.set $7 - local.get $5 + local.get $2 + local.set $4 + local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $4 + ) + (func $~lib/typedarray/Uint16Array#reduceRight (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Uint16Array,u16,u16> ) (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (local $0 i32) @@ -7870,61 +7689,60 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Int32Array#reduceRight (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int32Array,i32,i32> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 i32.load offset=4 - local.set $6 - local.get $5 + local.set $3 + local.get $0 call $~lib/typedarray/Int32Array#get:length i32.const 1 i32.sub - local.set $7 + local.set $4 loop $for-loop|0 - local.get $7 + local.get $4 i32.const 0 i32.ge_s - local.set $8 - local.get $8 + local.set $5 + local.get $5 if + local.get $2 local.get $3 - local.get $6 - local.get $7 + local.get $4 i32.const 2 i32.shl i32.add i32.load - local.get $7 - local.get $5 + local.get $4 + local.get $0 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $1 call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $2 + local.get $4 i32.const 1 i32.sub - local.set $7 + local.set $4 br $for-loop|0 end end - local.get $3 - local.set $7 - local.get $5 + local.get $2 + local.set $4 + local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $4 + ) + (func $~lib/typedarray/Int32Array#reduceRight (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int32Array,i32,i32> ) (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (local $0 i32) @@ -7983,61 +7801,60 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Uint32Array#reduceRight (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Uint32Array,u32,u32> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 i32.load offset=4 - local.set $6 - local.get $5 + local.set $3 + local.get $0 call $~lib/typedarray/Uint32Array#get:length i32.const 1 i32.sub - local.set $7 + local.set $4 loop $for-loop|0 - local.get $7 + local.get $4 i32.const 0 i32.ge_s - local.set $8 - local.get $8 + local.set $5 + local.get $5 if + local.get $2 local.get $3 - local.get $6 - local.get $7 + local.get $4 i32.const 2 i32.shl i32.add i32.load - local.get $7 - local.get $5 + local.get $4 + local.get $0 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $1 call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $2 + local.get $4 i32.const 1 i32.sub - local.set $7 + local.set $4 br $for-loop|0 end end - local.get $3 - local.set $7 - local.get $5 + local.get $2 + local.set $4 + local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $4 + ) + (func $~lib/typedarray/Uint32Array#reduceRight (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Uint32Array,u32,u32> ) (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (local $0 i32) @@ -8096,62 +7913,61 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Int64Array#reduceRight (param $0 i32) (param $1 i32) (param $2 i64) (result i64) - (local $3 i64) + (func $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int64Array,i64,i64> (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) + (local $6 i64) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 i32.load offset=4 - local.set $6 - local.get $5 + local.set $3 + local.get $0 call $~lib/typedarray/Int64Array#get:length i32.const 1 i32.sub - local.set $7 + local.set $4 loop $for-loop|0 - local.get $7 + local.get $4 i32.const 0 i32.ge_s - local.set $8 - local.get $8 + local.set $5 + local.get $5 if + local.get $2 local.get $3 - local.get $6 - local.get $7 + local.get $4 i32.const 3 i32.shl i32.add i64.load - local.get $7 - local.get $5 + local.get $4 + local.get $0 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $1 call_indirect (type $i64_i64_i32_i32_=>_i64) - local.set $3 - local.get $7 + local.set $2 + local.get $4 i32.const 1 i32.sub - local.set $7 + local.set $4 br $for-loop|0 end end - local.get $3 - local.set $9 - local.get $5 + local.get $2 + local.set $6 + local.get $0 call $~lib/rt/pure/__release - local.get $9 + local.get $6 + ) + (func $~lib/typedarray/Int64Array#reduceRight (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int64Array,i64,i64> ) (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (local $0 i32) @@ -8210,62 +8026,61 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Uint64Array#reduceRight (param $0 i32) (param $1 i32) (param $2 i64) (result i64) - (local $3 i64) + (func $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Uint64Array,u64,u64> (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) + (local $6 i64) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 i32.load offset=4 - local.set $6 - local.get $5 + local.set $3 + local.get $0 call $~lib/typedarray/Uint64Array#get:length i32.const 1 i32.sub - local.set $7 + local.set $4 loop $for-loop|0 - local.get $7 + local.get $4 i32.const 0 i32.ge_s - local.set $8 - local.get $8 + local.set $5 + local.get $5 if + local.get $2 local.get $3 - local.get $6 - local.get $7 + local.get $4 i32.const 3 i32.shl i32.add i64.load - local.get $7 - local.get $5 + local.get $4 + local.get $0 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $1 call_indirect (type $i64_i64_i32_i32_=>_i64) - local.set $3 - local.get $7 + local.set $2 + local.get $4 i32.const 1 i32.sub - local.set $7 + local.set $4 br $for-loop|0 end end - local.get $3 - local.set $9 - local.get $5 + local.get $2 + local.set $6 + local.get $0 call $~lib/rt/pure/__release - local.get $9 + local.get $6 + ) + (func $~lib/typedarray/Uint64Array#reduceRight (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Uint64Array,u64,u64> ) (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (local $0 i32) @@ -8324,62 +8139,61 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Float32Array#reduceRight (param $0 i32) (param $1 i32) (param $2 f32) (result f32) - (local $3 f32) + (func $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Float32Array,f32,f32> (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 f32) + (local $6 f32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 i32.load offset=4 - local.set $6 - local.get $5 + local.set $3 + local.get $0 call $~lib/typedarray/Float32Array#get:length i32.const 1 i32.sub - local.set $7 + local.set $4 loop $for-loop|0 - local.get $7 + local.get $4 i32.const 0 i32.ge_s - local.set $8 - local.get $8 + local.set $5 + local.get $5 if + local.get $2 local.get $3 - local.get $6 - local.get $7 + local.get $4 i32.const 2 i32.shl i32.add f32.load - local.get $7 - local.get $5 + local.get $4 + local.get $0 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $1 call_indirect (type $f32_f32_i32_i32_=>_f32) - local.set $3 - local.get $7 + local.set $2 + local.get $4 i32.const 1 i32.sub - local.set $7 + local.set $4 br $for-loop|0 end end - local.get $3 - local.set $9 - local.get $5 + local.get $2 + local.set $6 + local.get $0 call $~lib/rt/pure/__release - local.get $9 + local.get $6 + ) + (func $~lib/typedarray/Float32Array#reduceRight (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Float32Array,f32,f32> ) (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (local $0 i32) @@ -8438,62 +8252,61 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Float64Array#reduceRight (param $0 i32) (param $1 i32) (param $2 f64) (result f64) - (local $3 f64) + (func $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Float64Array,f64,f64> (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 f64) + (local $6 f64) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 i32.load offset=4 - local.set $6 - local.get $5 + local.set $3 + local.get $0 call $~lib/typedarray/Float64Array#get:length i32.const 1 i32.sub - local.set $7 + local.set $4 loop $for-loop|0 - local.get $7 + local.get $4 i32.const 0 i32.ge_s - local.set $8 - local.get $8 + local.set $5 + local.get $5 if + local.get $2 local.get $3 - local.get $6 - local.get $7 + local.get $4 i32.const 3 i32.shl i32.add f64.load - local.get $7 - local.get $5 + local.get $4 + local.get $0 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $1 call_indirect (type $f64_f64_i32_i32_=>_f64) - local.set $3 - local.get $7 + local.set $2 + local.get $4 i32.const 1 i32.sub - local.set $7 + local.set $4 br $for-loop|0 end end - local.get $3 - local.set $9 - local.get $5 + local.get $2 + local.set $6 + local.get $0 call $~lib/rt/pure/__release - local.get $9 + local.get $6 + ) + (func $~lib/typedarray/Float64Array#reduceRight (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Float64Array,f64,f64> ) (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (local $0 i32) @@ -8552,7 +8365,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Int8Array#map (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/MAP<~lib/typedarray/Int8Array,i8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8560,81 +8373,82 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 call $~lib/typedarray/Int8Array#get:length - local.set $4 - local.get $3 + local.set $2 + local.get $0 i32.load offset=4 - local.set $5 - local.get $4 + local.set $3 + local.get $2 i32.const 0 i32.shl - local.set $6 + local.set $4 i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $6 + local.set $5 + local.get $4 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $8 + local.set $6 i32.const 0 - local.set $9 + local.set $7 loop $for-loop|0 - local.get $9 - local.get $4 + local.get $7 + local.get $2 i32.lt_s - local.set $10 - local.get $10 + local.set $8 + local.get $8 if - local.get $8 - local.get $9 + local.get $6 + local.get $7 i32.const 0 i32.shl i32.add - local.get $5 - local.get $9 + local.get $3 + local.get $7 i32.const 0 i32.shl i32.add i32.load8_s - local.get $9 - local.get $3 + local.get $7 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i32_i32_i32_=>_i32) i32.store8 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $for-loop|0 end end - local.get $7 - local.get $8 + local.get $5 + local.get $6 call $~lib/rt/pure/__retain i32.store - local.get $7 - local.get $8 - i32.store offset=4 - local.get $7 + local.get $5 local.get $6 + i32.store offset=4 + local.get $5 + local.get $4 i32.store offset=8 - local.get $7 + local.get $5 call $~lib/rt/pure/__retain - local.set $9 - local.get $3 + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $9 + local.get $7 + ) + (func $~lib/typedarray/Int8Array#map (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/MAP<~lib/typedarray/Int8Array,i8> ) (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (local $0 i32) @@ -8724,7 +8538,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint8Array#map (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/MAP<~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8732,81 +8546,82 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 call $~lib/typedarray/Uint8Array#get:length - local.set $4 - local.get $3 + local.set $2 + local.get $0 i32.load offset=4 - local.set $5 - local.get $4 + local.set $3 + local.get $2 i32.const 0 i32.shl - local.set $6 + local.set $4 i32.const 12 i32.const 4 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $6 + local.set $5 + local.get $4 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $8 + local.set $6 i32.const 0 - local.set $9 + local.set $7 loop $for-loop|0 - local.get $9 - local.get $4 + local.get $7 + local.get $2 i32.lt_s - local.set $10 - local.get $10 + local.set $8 + local.get $8 if - local.get $8 - local.get $9 + local.get $6 + local.get $7 i32.const 0 i32.shl i32.add - local.get $5 - local.get $9 + local.get $3 + local.get $7 i32.const 0 i32.shl i32.add i32.load8_u - local.get $9 - local.get $3 + local.get $7 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i32_i32_i32_=>_i32) i32.store8 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $for-loop|0 end end - local.get $7 - local.get $8 + local.get $5 + local.get $6 call $~lib/rt/pure/__retain i32.store - local.get $7 - local.get $8 - i32.store offset=4 - local.get $7 + local.get $5 local.get $6 + i32.store offset=4 + local.get $5 + local.get $4 i32.store offset=8 - local.get $7 + local.get $5 call $~lib/rt/pure/__retain - local.set $9 - local.get $3 + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $9 + local.get $7 + ) + (func $~lib/typedarray/Uint8Array#map (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/MAP<~lib/typedarray/Uint8Array,u8> ) (func $~lib/typedarray/Uint8Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 @@ -8915,7 +8730,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint8ClampedArray#map (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/MAP<~lib/typedarray/Uint8ClampedArray,u8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8923,81 +8738,82 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 call $~lib/typedarray/Uint8ClampedArray#get:length - local.set $4 - local.get $3 + local.set $2 + local.get $0 i32.load offset=4 - local.set $5 - local.get $4 + local.set $3 + local.get $2 i32.const 0 i32.shl - local.set $6 + local.set $4 i32.const 12 i32.const 5 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $6 + local.set $5 + local.get $4 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $8 + local.set $6 i32.const 0 - local.set $9 + local.set $7 loop $for-loop|0 - local.get $9 - local.get $4 + local.get $7 + local.get $2 i32.lt_s - local.set $10 - local.get $10 + local.set $8 + local.get $8 if - local.get $8 - local.get $9 + local.get $6 + local.get $7 i32.const 0 i32.shl i32.add - local.get $5 - local.get $9 + local.get $3 + local.get $7 i32.const 0 i32.shl i32.add i32.load8_u - local.get $9 - local.get $3 + local.get $7 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i32_i32_i32_=>_i32) i32.store8 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $for-loop|0 end end - local.get $7 - local.get $8 + local.get $5 + local.get $6 call $~lib/rt/pure/__retain i32.store - local.get $7 - local.get $8 - i32.store offset=4 - local.get $7 + local.get $5 local.get $6 + i32.store offset=4 + local.get $5 + local.get $4 i32.store offset=8 - local.get $7 + local.get $5 call $~lib/rt/pure/__retain - local.set $9 - local.get $3 + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $9 + local.get $7 + ) + (func $~lib/typedarray/Uint8ClampedArray#map (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/MAP<~lib/typedarray/Uint8ClampedArray,u8> ) (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (local $0 i32) @@ -9087,7 +8903,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Int16Array#map (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/MAP<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9095,81 +8911,82 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 call $~lib/typedarray/Int16Array#get:length - local.set $4 - local.get $3 + local.set $2 + local.get $0 i32.load offset=4 - local.set $5 - local.get $4 + local.set $3 + local.get $2 i32.const 1 i32.shl - local.set $6 + local.set $4 i32.const 12 i32.const 6 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $6 + local.set $5 + local.get $4 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $8 + local.set $6 i32.const 0 - local.set $9 + local.set $7 loop $for-loop|0 - local.get $9 - local.get $4 + local.get $7 + local.get $2 i32.lt_s - local.set $10 - local.get $10 + local.set $8 + local.get $8 if - local.get $8 - local.get $9 + local.get $6 + local.get $7 i32.const 1 i32.shl i32.add - local.get $5 - local.get $9 + local.get $3 + local.get $7 i32.const 1 i32.shl i32.add i32.load16_s - local.get $9 - local.get $3 + local.get $7 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i32_i32_i32_=>_i32) i32.store16 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $for-loop|0 end end - local.get $7 - local.get $8 + local.get $5 + local.get $6 call $~lib/rt/pure/__retain i32.store - local.get $7 - local.get $8 - i32.store offset=4 - local.get $7 + local.get $5 local.get $6 + i32.store offset=4 + local.get $5 + local.get $4 i32.store offset=8 - local.get $7 + local.get $5 call $~lib/rt/pure/__retain - local.set $9 - local.get $3 + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $9 + local.get $7 + ) + (func $~lib/typedarray/Int16Array#map (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/MAP<~lib/typedarray/Int16Array,i16> ) (func $~lib/typedarray/Int16Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 @@ -9282,7 +9099,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint16Array#map (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/MAP<~lib/typedarray/Uint16Array,u16> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9290,81 +9107,82 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 call $~lib/typedarray/Uint16Array#get:length - local.set $4 - local.get $3 + local.set $2 + local.get $0 i32.load offset=4 - local.set $5 - local.get $4 + local.set $3 + local.get $2 i32.const 1 i32.shl - local.set $6 + local.set $4 i32.const 12 i32.const 7 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $6 + local.set $5 + local.get $4 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $8 + local.set $6 i32.const 0 - local.set $9 + local.set $7 loop $for-loop|0 - local.get $9 - local.get $4 + local.get $7 + local.get $2 i32.lt_s - local.set $10 - local.get $10 + local.set $8 + local.get $8 if - local.get $8 - local.get $9 + local.get $6 + local.get $7 i32.const 1 i32.shl i32.add - local.get $5 - local.get $9 + local.get $3 + local.get $7 i32.const 1 i32.shl i32.add i32.load16_u - local.get $9 - local.get $3 + local.get $7 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i32_i32_i32_=>_i32) i32.store16 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $for-loop|0 end end - local.get $7 - local.get $8 + local.get $5 + local.get $6 call $~lib/rt/pure/__retain i32.store - local.get $7 - local.get $8 - i32.store offset=4 - local.get $7 + local.get $5 local.get $6 + i32.store offset=4 + local.get $5 + local.get $4 i32.store offset=8 - local.get $7 + local.get $5 call $~lib/rt/pure/__retain - local.set $9 - local.get $3 + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $9 + local.get $7 + ) + (func $~lib/typedarray/Uint16Array#map (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/MAP<~lib/typedarray/Uint16Array,u16> ) (func $~lib/typedarray/Uint16Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 @@ -9477,7 +9295,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Int32Array#map (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/MAP<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9485,81 +9303,82 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 call $~lib/typedarray/Int32Array#get:length - local.set $4 - local.get $3 + local.set $2 + local.get $0 i32.load offset=4 - local.set $5 - local.get $4 + local.set $3 + local.get $2 i32.const 2 i32.shl - local.set $6 + local.set $4 i32.const 12 i32.const 8 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $6 + local.set $5 + local.get $4 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $8 + local.set $6 i32.const 0 - local.set $9 + local.set $7 loop $for-loop|0 - local.get $9 - local.get $4 + local.get $7 + local.get $2 i32.lt_s - local.set $10 - local.get $10 + local.set $8 + local.get $8 if - local.get $8 - local.get $9 + local.get $6 + local.get $7 i32.const 2 i32.shl i32.add - local.get $5 - local.get $9 + local.get $3 + local.get $7 i32.const 2 i32.shl i32.add i32.load - local.get $9 - local.get $3 + local.get $7 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i32_i32_i32_=>_i32) i32.store - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $for-loop|0 end end - local.get $7 - local.get $8 + local.get $5 + local.get $6 call $~lib/rt/pure/__retain i32.store - local.get $7 - local.get $8 - i32.store offset=4 - local.get $7 + local.get $5 local.get $6 + i32.store offset=4 + local.get $5 + local.get $4 i32.store offset=8 - local.get $7 + local.get $5 call $~lib/rt/pure/__retain - local.set $9 - local.get $3 + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $9 + local.get $7 + ) + (func $~lib/typedarray/Int32Array#map (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/MAP<~lib/typedarray/Int32Array,i32> ) (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (local $0 i32) @@ -9649,7 +9468,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint32Array#map (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/MAP<~lib/typedarray/Uint32Array,u32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9657,81 +9476,82 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 call $~lib/typedarray/Uint32Array#get:length - local.set $4 - local.get $3 + local.set $2 + local.get $0 i32.load offset=4 - local.set $5 - local.get $4 + local.set $3 + local.get $2 i32.const 2 i32.shl - local.set $6 + local.set $4 i32.const 12 i32.const 9 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $6 + local.set $5 + local.get $4 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $8 + local.set $6 i32.const 0 - local.set $9 + local.set $7 loop $for-loop|0 - local.get $9 - local.get $4 + local.get $7 + local.get $2 i32.lt_s - local.set $10 - local.get $10 + local.set $8 + local.get $8 if - local.get $8 - local.get $9 + local.get $6 + local.get $7 i32.const 2 i32.shl i32.add - local.get $5 - local.get $9 + local.get $3 + local.get $7 i32.const 2 i32.shl i32.add i32.load - local.get $9 - local.get $3 + local.get $7 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i32_i32_i32_=>_i32) i32.store - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $for-loop|0 end end - local.get $7 - local.get $8 + local.get $5 + local.get $6 call $~lib/rt/pure/__retain i32.store - local.get $7 - local.get $8 - i32.store offset=4 - local.get $7 + local.get $5 local.get $6 + i32.store offset=4 + local.get $5 + local.get $4 i32.store offset=8 - local.get $7 + local.get $5 call $~lib/rt/pure/__retain - local.set $9 - local.get $3 + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $9 + local.get $7 + ) + (func $~lib/typedarray/Uint32Array#map (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/MAP<~lib/typedarray/Uint32Array,u32> ) (func $~lib/typedarray/Uint32Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 @@ -9844,7 +9664,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Int64Array#map (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/MAP<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9852,81 +9672,82 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 call $~lib/typedarray/Int64Array#get:length - local.set $4 - local.get $3 + local.set $2 + local.get $0 i32.load offset=4 - local.set $5 - local.get $4 + local.set $3 + local.get $2 i32.const 3 i32.shl - local.set $6 + local.set $4 i32.const 12 i32.const 10 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $6 + local.set $5 + local.get $4 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $8 + local.set $6 i32.const 0 - local.set $9 + local.set $7 loop $for-loop|0 - local.get $9 - local.get $4 + local.get $7 + local.get $2 i32.lt_s - local.set $10 - local.get $10 + local.set $8 + local.get $8 if - local.get $8 - local.get $9 + local.get $6 + local.get $7 i32.const 3 i32.shl i32.add - local.get $5 - local.get $9 + local.get $3 + local.get $7 i32.const 3 i32.shl i32.add i64.load - local.get $9 - local.get $3 + local.get $7 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i64_i32_i32_=>_i64) i64.store - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $for-loop|0 end end - local.get $7 - local.get $8 + local.get $5 + local.get $6 call $~lib/rt/pure/__retain i32.store - local.get $7 - local.get $8 - i32.store offset=4 - local.get $7 + local.get $5 local.get $6 + i32.store offset=4 + local.get $5 + local.get $4 i32.store offset=8 - local.get $7 + local.get $5 call $~lib/rt/pure/__retain - local.set $9 - local.get $3 + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $9 + local.get $7 + ) + (func $~lib/typedarray/Int64Array#map (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/MAP<~lib/typedarray/Int64Array,i64> ) (func $~lib/typedarray/Int64Array#__get (param $0 i32) (param $1 i32) (result i64) local.get $1 @@ -10039,7 +9860,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint64Array#map (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/MAP<~lib/typedarray/Uint64Array,u64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10047,81 +9868,82 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 call $~lib/typedarray/Uint64Array#get:length - local.set $4 - local.get $3 + local.set $2 + local.get $0 i32.load offset=4 - local.set $5 - local.get $4 + local.set $3 + local.get $2 i32.const 3 i32.shl - local.set $6 + local.set $4 i32.const 12 i32.const 11 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $6 + local.set $5 + local.get $4 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $8 + local.set $6 i32.const 0 - local.set $9 + local.set $7 loop $for-loop|0 - local.get $9 - local.get $4 + local.get $7 + local.get $2 i32.lt_s - local.set $10 - local.get $10 + local.set $8 + local.get $8 if - local.get $8 - local.get $9 + local.get $6 + local.get $7 i32.const 3 i32.shl i32.add - local.get $5 - local.get $9 + local.get $3 + local.get $7 i32.const 3 i32.shl i32.add i64.load - local.get $9 - local.get $3 + local.get $7 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i64_i32_i32_=>_i64) i64.store - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $for-loop|0 end end - local.get $7 - local.get $8 + local.get $5 + local.get $6 call $~lib/rt/pure/__retain i32.store - local.get $7 - local.get $8 - i32.store offset=4 - local.get $7 + local.get $5 local.get $6 + i32.store offset=4 + local.get $5 + local.get $4 i32.store offset=8 - local.get $7 + local.get $5 call $~lib/rt/pure/__retain - local.set $9 - local.get $3 + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $9 + local.get $7 + ) + (func $~lib/typedarray/Uint64Array#map (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/MAP<~lib/typedarray/Uint64Array,u64> ) (func $~lib/typedarray/Uint64Array#__get (param $0 i32) (param $1 i32) (result i64) local.get $1 @@ -10234,7 +10056,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Float32Array#map (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/MAP<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10242,81 +10064,82 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 call $~lib/typedarray/Float32Array#get:length - local.set $4 - local.get $3 + local.set $2 + local.get $0 i32.load offset=4 - local.set $5 - local.get $4 + local.set $3 + local.get $2 i32.const 2 i32.shl - local.set $6 + local.set $4 i32.const 12 i32.const 12 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $6 + local.set $5 + local.get $4 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $8 + local.set $6 i32.const 0 - local.set $9 + local.set $7 loop $for-loop|0 - local.get $9 - local.get $4 + local.get $7 + local.get $2 i32.lt_s - local.set $10 - local.get $10 + local.set $8 + local.get $8 if - local.get $8 - local.get $9 + local.get $6 + local.get $7 i32.const 2 i32.shl i32.add - local.get $5 - local.get $9 + local.get $3 + local.get $7 i32.const 2 i32.shl i32.add f32.load - local.get $9 - local.get $3 + local.get $7 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $f32_i32_i32_=>_f32) f32.store - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $for-loop|0 end end - local.get $7 - local.get $8 + local.get $5 + local.get $6 call $~lib/rt/pure/__retain i32.store - local.get $7 - local.get $8 - i32.store offset=4 - local.get $7 + local.get $5 local.get $6 + i32.store offset=4 + local.get $5 + local.get $4 i32.store offset=8 - local.get $7 + local.get $5 call $~lib/rt/pure/__retain - local.set $9 - local.get $3 + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $9 + local.get $7 + ) + (func $~lib/typedarray/Float32Array#map (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/MAP<~lib/typedarray/Float32Array,f32> ) (func $~lib/typedarray/Float32Array#__get (param $0 i32) (param $1 i32) (result f32) local.get $1 @@ -10429,7 +10252,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Float64Array#map (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/MAP<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10437,81 +10260,82 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 call $~lib/typedarray/Float64Array#get:length - local.set $4 - local.get $3 + local.set $2 + local.get $0 i32.load offset=4 - local.set $5 - local.get $4 + local.set $3 + local.get $2 i32.const 3 i32.shl - local.set $6 + local.set $4 i32.const 12 i32.const 13 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $6 + local.set $5 + local.get $4 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $8 + local.set $6 i32.const 0 - local.set $9 + local.set $7 loop $for-loop|0 - local.get $9 - local.get $4 + local.get $7 + local.get $2 i32.lt_s - local.set $10 - local.get $10 + local.set $8 + local.get $8 if - local.get $8 - local.get $9 + local.get $6 + local.get $7 i32.const 3 i32.shl i32.add - local.get $5 - local.get $9 + local.get $3 + local.get $7 i32.const 3 i32.shl i32.add f64.load - local.get $9 - local.get $3 + local.get $7 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $f64_i32_i32_=>_f64) f64.store - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $for-loop|0 end end - local.get $7 - local.get $8 + local.get $5 + local.get $6 call $~lib/rt/pure/__retain i32.store - local.get $7 - local.get $8 - i32.store offset=4 - local.get $7 + local.get $5 local.get $6 + i32.store offset=4 + local.get $5 + local.get $4 i32.store offset=8 - local.get $7 + local.get $5 call $~lib/rt/pure/__retain - local.set $9 - local.get $3 + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $9 + local.get $7 + ) + (func $~lib/typedarray/Float64Array#map (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/MAP<~lib/typedarray/Float64Array,f64> ) (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (local $0 i32) @@ -10637,22 +10461,12 @@ return end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $5 local.get $5 - i32.const 16 - i32.add - local.get $5 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $6 local.get $6 - i32.load - local.set $7 - local.get $7 i32.const 1 i32.and if @@ -10663,25 +10477,25 @@ i32.and i32.const 16 i32.add - local.get $7 + local.get $6 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $5 - local.get $5 + local.set $7 + local.get $7 local.get $3 i32.ge_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $4 i32.const 3 i32.and - local.get $5 + local.get $7 i32.or i32.store local.get $1 @@ -10737,7 +10551,7 @@ i32.const 16 i32.add ) - (func $~lib/typedarray/Int8Array#filter (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Int8Array,i8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10751,95 +10565,98 @@ (local $12 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 call $~lib/typedarray/Int8Array#get:length - local.set $4 + local.set $2 i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $4 + local.set $3 + local.get $2 i32.const 0 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $3 + local.set $4 + local.get $0 i32.load offset=4 - local.set $7 + local.set $5 i32.const 0 - local.set $8 + local.set $6 i32.const 0 - local.set $9 + local.set $7 loop $for-loop|0 - local.get $9 - local.get $4 + local.get $7 + local.get $2 i32.lt_s - local.set $10 - local.get $10 + local.set $8 + local.get $8 if + local.get $5 local.get $7 - local.get $9 i32.const 0 i32.shl i32.add i32.load8_s - local.set $11 - local.get $11 + local.set $9 local.get $9 - local.get $3 + local.get $7 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i32_i32_i32_=>_i32) if + local.get $4 local.get $6 - local.get $8 - local.tee $12 + local.tee $10 i32.const 1 i32.add - local.set $8 - local.get $12 + local.set $6 + local.get $10 i32.const 0 i32.shl i32.add - local.get $11 + local.get $9 i32.store8 end - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $for-loop|0 end end - local.get $8 + local.get $6 i32.const 0 i32.shl - local.set $9 - local.get $6 - local.get $9 + local.set $11 + local.get $4 + local.get $11 call $~lib/rt/tlsf/__realloc - local.set $10 - local.get $5 - local.get $10 + local.set $12 + local.get $3 + local.get $12 call $~lib/rt/pure/__retain i32.store - local.get $5 - local.get $9 + local.get $3 + local.get $11 i32.store offset=8 - local.get $5 - local.get $10 + local.get $3 + local.get $12 i32.store offset=4 - local.get $5 - call $~lib/rt/pure/__retain - local.set $11 local.get $3 + call $~lib/rt/pure/__retain + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $11 + local.get $7 + ) + (func $~lib/typedarray/Int8Array#filter (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FILTER<~lib/typedarray/Int8Array,i8> ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (local $0 i32) @@ -10965,7 +10782,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint8Array#filter (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10979,95 +10796,98 @@ (local $12 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 call $~lib/typedarray/Uint8Array#get:length - local.set $4 + local.set $2 i32.const 12 i32.const 4 call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $4 + local.set $3 + local.get $2 i32.const 0 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $3 + local.set $4 + local.get $0 i32.load offset=4 - local.set $7 + local.set $5 i32.const 0 - local.set $8 + local.set $6 i32.const 0 - local.set $9 + local.set $7 loop $for-loop|0 - local.get $9 - local.get $4 + local.get $7 + local.get $2 i32.lt_s - local.set $10 - local.get $10 + local.set $8 + local.get $8 if + local.get $5 local.get $7 - local.get $9 i32.const 0 i32.shl i32.add i32.load8_u - local.set $11 - local.get $11 + local.set $9 local.get $9 - local.get $3 + local.get $7 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i32_i32_i32_=>_i32) if + local.get $4 local.get $6 - local.get $8 - local.tee $12 + local.tee $10 i32.const 1 i32.add - local.set $8 - local.get $12 + local.set $6 + local.get $10 i32.const 0 i32.shl i32.add - local.get $11 + local.get $9 i32.store8 end - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $for-loop|0 end end - local.get $8 + local.get $6 i32.const 0 i32.shl - local.set $9 - local.get $6 - local.get $9 + local.set $11 + local.get $4 + local.get $11 call $~lib/rt/tlsf/__realloc - local.set $10 - local.get $5 - local.get $10 + local.set $12 + local.get $3 + local.get $12 call $~lib/rt/pure/__retain i32.store - local.get $5 - local.get $9 + local.get $3 + local.get $11 i32.store offset=8 - local.get $5 - local.get $10 + local.get $3 + local.get $12 i32.store offset=4 - local.get $5 - call $~lib/rt/pure/__retain - local.set $11 local.get $3 + call $~lib/rt/pure/__retain + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $11 + local.get $7 + ) + (func $~lib/typedarray/Uint8Array#filter (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FILTER<~lib/typedarray/Uint8Array,u8> ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> (local $0 i32) @@ -11193,7 +11013,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint8ClampedArray#filter (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Uint8ClampedArray,u8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11207,95 +11027,98 @@ (local $12 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 call $~lib/typedarray/Uint8ClampedArray#get:length - local.set $4 + local.set $2 i32.const 12 i32.const 5 call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $4 + local.set $3 + local.get $2 i32.const 0 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $3 + local.set $4 + local.get $0 i32.load offset=4 - local.set $7 + local.set $5 i32.const 0 - local.set $8 + local.set $6 i32.const 0 - local.set $9 + local.set $7 loop $for-loop|0 - local.get $9 - local.get $4 + local.get $7 + local.get $2 i32.lt_s - local.set $10 - local.get $10 + local.set $8 + local.get $8 if + local.get $5 local.get $7 - local.get $9 i32.const 0 i32.shl i32.add i32.load8_u - local.set $11 - local.get $11 + local.set $9 local.get $9 - local.get $3 + local.get $7 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i32_i32_i32_=>_i32) if + local.get $4 local.get $6 - local.get $8 - local.tee $12 + local.tee $10 i32.const 1 i32.add - local.set $8 - local.get $12 + local.set $6 + local.get $10 i32.const 0 i32.shl i32.add - local.get $11 + local.get $9 i32.store8 end - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $for-loop|0 end end - local.get $8 + local.get $6 i32.const 0 i32.shl - local.set $9 - local.get $6 - local.get $9 + local.set $11 + local.get $4 + local.get $11 call $~lib/rt/tlsf/__realloc - local.set $10 - local.get $5 - local.get $10 + local.set $12 + local.get $3 + local.get $12 call $~lib/rt/pure/__retain i32.store - local.get $5 - local.get $9 + local.get $3 + local.get $11 i32.store offset=8 - local.get $5 - local.get $10 + local.get $3 + local.get $12 i32.store offset=4 - local.get $5 - call $~lib/rt/pure/__retain - local.set $11 local.get $3 + call $~lib/rt/pure/__retain + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $11 + local.get $7 + ) + (func $~lib/typedarray/Uint8ClampedArray#filter (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FILTER<~lib/typedarray/Uint8ClampedArray,u8> ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> (local $0 i32) @@ -11423,7 +11246,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Int16Array#filter (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11437,95 +11260,98 @@ (local $12 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 call $~lib/typedarray/Int16Array#get:length - local.set $4 + local.set $2 i32.const 12 i32.const 6 call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $4 + local.set $3 + local.get $2 i32.const 1 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $3 + local.set $4 + local.get $0 i32.load offset=4 - local.set $7 + local.set $5 i32.const 0 - local.set $8 + local.set $6 i32.const 0 - local.set $9 + local.set $7 loop $for-loop|0 - local.get $9 - local.get $4 + local.get $7 + local.get $2 i32.lt_s - local.set $10 - local.get $10 + local.set $8 + local.get $8 if + local.get $5 local.get $7 - local.get $9 i32.const 1 i32.shl i32.add i32.load16_s - local.set $11 - local.get $11 + local.set $9 local.get $9 - local.get $3 + local.get $7 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i32_i32_i32_=>_i32) if + local.get $4 local.get $6 - local.get $8 - local.tee $12 + local.tee $10 i32.const 1 i32.add - local.set $8 - local.get $12 + local.set $6 + local.get $10 i32.const 1 i32.shl i32.add - local.get $11 + local.get $9 i32.store16 end - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $for-loop|0 end end - local.get $8 + local.get $6 i32.const 1 i32.shl - local.set $9 - local.get $6 - local.get $9 + local.set $11 + local.get $4 + local.get $11 call $~lib/rt/tlsf/__realloc - local.set $10 - local.get $5 - local.get $10 + local.set $12 + local.get $3 + local.get $12 call $~lib/rt/pure/__retain i32.store - local.get $5 - local.get $9 + local.get $3 + local.get $11 i32.store offset=8 - local.get $5 - local.get $10 + local.get $3 + local.get $12 i32.store offset=4 - local.get $5 - call $~lib/rt/pure/__retain - local.set $11 local.get $3 + call $~lib/rt/pure/__retain + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $11 + local.get $7 + ) + (func $~lib/typedarray/Int16Array#filter (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FILTER<~lib/typedarray/Int16Array,i16> ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> (local $0 i32) @@ -11651,7 +11477,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint16Array#filter (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Uint16Array,u16> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11665,95 +11491,98 @@ (local $12 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 call $~lib/typedarray/Uint16Array#get:length - local.set $4 + local.set $2 i32.const 12 i32.const 7 call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $4 + local.set $3 + local.get $2 i32.const 1 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $3 + local.set $4 + local.get $0 i32.load offset=4 - local.set $7 + local.set $5 i32.const 0 - local.set $8 + local.set $6 i32.const 0 - local.set $9 + local.set $7 loop $for-loop|0 - local.get $9 - local.get $4 + local.get $7 + local.get $2 i32.lt_s - local.set $10 - local.get $10 + local.set $8 + local.get $8 if + local.get $5 local.get $7 - local.get $9 i32.const 1 i32.shl i32.add i32.load16_u - local.set $11 - local.get $11 + local.set $9 local.get $9 - local.get $3 + local.get $7 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i32_i32_i32_=>_i32) if + local.get $4 local.get $6 - local.get $8 - local.tee $12 + local.tee $10 i32.const 1 i32.add - local.set $8 - local.get $12 + local.set $6 + local.get $10 i32.const 1 i32.shl i32.add - local.get $11 + local.get $9 i32.store16 end - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $for-loop|0 end end - local.get $8 + local.get $6 i32.const 1 i32.shl - local.set $9 - local.get $6 - local.get $9 + local.set $11 + local.get $4 + local.get $11 call $~lib/rt/tlsf/__realloc - local.set $10 - local.get $5 - local.get $10 + local.set $12 + local.get $3 + local.get $12 call $~lib/rt/pure/__retain i32.store - local.get $5 - local.get $9 + local.get $3 + local.get $11 i32.store offset=8 - local.get $5 - local.get $10 + local.get $3 + local.get $12 i32.store offset=4 - local.get $5 - call $~lib/rt/pure/__retain - local.set $11 local.get $3 + call $~lib/rt/pure/__retain + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $11 + local.get $7 + ) + (func $~lib/typedarray/Uint16Array#filter (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FILTER<~lib/typedarray/Uint16Array,u16> ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> (local $0 i32) @@ -11877,7 +11706,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Int32Array#filter (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11891,95 +11720,98 @@ (local $12 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 call $~lib/typedarray/Int32Array#get:length - local.set $4 + local.set $2 i32.const 12 i32.const 8 call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $4 + local.set $3 + local.get $2 i32.const 2 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $3 + local.set $4 + local.get $0 i32.load offset=4 - local.set $7 + local.set $5 i32.const 0 - local.set $8 + local.set $6 i32.const 0 - local.set $9 + local.set $7 loop $for-loop|0 - local.get $9 - local.get $4 + local.get $7 + local.get $2 i32.lt_s - local.set $10 - local.get $10 + local.set $8 + local.get $8 if + local.get $5 local.get $7 - local.get $9 i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $11 + local.set $9 local.get $9 - local.get $3 + local.get $7 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i32_i32_i32_=>_i32) if + local.get $4 local.get $6 - local.get $8 - local.tee $12 + local.tee $10 i32.const 1 i32.add - local.set $8 - local.get $12 + local.set $6 + local.get $10 i32.const 2 i32.shl i32.add - local.get $11 + local.get $9 i32.store end - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $for-loop|0 end end - local.get $8 + local.get $6 i32.const 2 i32.shl - local.set $9 - local.get $6 - local.get $9 + local.set $11 + local.get $4 + local.get $11 call $~lib/rt/tlsf/__realloc - local.set $10 - local.get $5 - local.get $10 + local.set $12 + local.get $3 + local.get $12 call $~lib/rt/pure/__retain i32.store - local.get $5 - local.get $9 + local.get $3 + local.get $11 i32.store offset=8 - local.get $5 - local.get $10 + local.get $3 + local.get $12 i32.store offset=4 - local.get $5 - call $~lib/rt/pure/__retain - local.set $11 local.get $3 + call $~lib/rt/pure/__retain + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $11 + local.get $7 + ) + (func $~lib/typedarray/Int32Array#filter (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FILTER<~lib/typedarray/Int32Array,i32> ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> (local $0 i32) @@ -12103,7 +11935,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint32Array#filter (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Uint32Array,u32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12117,95 +11949,98 @@ (local $12 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 call $~lib/typedarray/Uint32Array#get:length - local.set $4 + local.set $2 i32.const 12 i32.const 9 call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $4 + local.set $3 + local.get $2 i32.const 2 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $3 + local.set $4 + local.get $0 i32.load offset=4 - local.set $7 + local.set $5 i32.const 0 - local.set $8 + local.set $6 i32.const 0 - local.set $9 + local.set $7 loop $for-loop|0 - local.get $9 - local.get $4 + local.get $7 + local.get $2 i32.lt_s - local.set $10 - local.get $10 + local.set $8 + local.get $8 if + local.get $5 local.get $7 - local.get $9 i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $11 + local.set $9 local.get $9 - local.get $3 + local.get $7 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i32_i32_i32_=>_i32) if + local.get $4 local.get $6 - local.get $8 - local.tee $12 + local.tee $10 i32.const 1 i32.add - local.set $8 - local.get $12 + local.set $6 + local.get $10 i32.const 2 i32.shl i32.add - local.get $11 + local.get $9 i32.store end - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $for-loop|0 end end - local.get $8 + local.get $6 i32.const 2 i32.shl - local.set $9 - local.get $6 - local.get $9 + local.set $11 + local.get $4 + local.get $11 call $~lib/rt/tlsf/__realloc - local.set $10 - local.get $5 - local.get $10 + local.set $12 + local.get $3 + local.get $12 call $~lib/rt/pure/__retain i32.store - local.get $5 - local.get $9 + local.get $3 + local.get $11 i32.store offset=8 - local.get $5 - local.get $10 + local.get $3 + local.get $12 i32.store offset=4 - local.get $5 - call $~lib/rt/pure/__retain - local.set $11 local.get $3 + call $~lib/rt/pure/__retain + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $11 + local.get $7 + ) + (func $~lib/typedarray/Uint32Array#filter (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FILTER<~lib/typedarray/Uint32Array,u32> ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> (local $0 i32) @@ -12329,7 +12164,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Int64Array#filter (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12337,101 +12172,104 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) + (local $9 i64) (local $10 i32) - (local $11 i64) + (local $11 i32) (local $12 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 call $~lib/typedarray/Int64Array#get:length - local.set $4 + local.set $2 i32.const 12 i32.const 10 call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $4 + local.set $3 + local.get $2 i32.const 3 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $3 + local.set $4 + local.get $0 i32.load offset=4 - local.set $7 + local.set $5 i32.const 0 - local.set $8 + local.set $6 i32.const 0 - local.set $9 + local.set $7 loop $for-loop|0 - local.get $9 - local.get $4 + local.get $7 + local.get $2 i32.lt_s - local.set $10 - local.get $10 + local.set $8 + local.get $8 if + local.get $5 local.get $7 - local.get $9 i32.const 3 i32.shl i32.add i64.load - local.set $11 - local.get $11 + local.set $9 local.get $9 - local.get $3 + local.get $7 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i64_i32_i32_=>_i32) if + local.get $4 local.get $6 - local.get $8 - local.tee $12 + local.tee $10 i32.const 1 i32.add - local.set $8 - local.get $12 + local.set $6 + local.get $10 i32.const 3 i32.shl i32.add - local.get $11 + local.get $9 i64.store end - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $for-loop|0 end end - local.get $8 + local.get $6 i32.const 3 i32.shl - local.set $9 - local.get $6 - local.get $9 + local.set $11 + local.get $4 + local.get $11 call $~lib/rt/tlsf/__realloc - local.set $10 - local.get $5 - local.get $10 + local.set $12 + local.get $3 + local.get $12 call $~lib/rt/pure/__retain i32.store - local.get $5 - local.get $9 + local.get $3 + local.get $11 i32.store offset=8 - local.get $5 - local.get $10 + local.get $3 + local.get $12 i32.store offset=4 - local.get $5 - call $~lib/rt/pure/__retain - local.set $12 local.get $3 + call $~lib/rt/pure/__retain + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $12 + local.get $7 + ) + (func $~lib/typedarray/Int64Array#filter (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FILTER<~lib/typedarray/Int64Array,i64> ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> (local $0 i32) @@ -12555,7 +12393,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint64Array#filter (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Uint64Array,u64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12563,101 +12401,104 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) + (local $9 i64) (local $10 i32) - (local $11 i64) + (local $11 i32) (local $12 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 call $~lib/typedarray/Uint64Array#get:length - local.set $4 + local.set $2 i32.const 12 i32.const 11 call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $4 + local.set $3 + local.get $2 i32.const 3 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $3 + local.set $4 + local.get $0 i32.load offset=4 - local.set $7 + local.set $5 i32.const 0 - local.set $8 + local.set $6 i32.const 0 - local.set $9 + local.set $7 loop $for-loop|0 - local.get $9 - local.get $4 + local.get $7 + local.get $2 i32.lt_s - local.set $10 - local.get $10 + local.set $8 + local.get $8 if + local.get $5 local.get $7 - local.get $9 i32.const 3 i32.shl i32.add i64.load - local.set $11 - local.get $11 + local.set $9 local.get $9 - local.get $3 + local.get $7 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i64_i32_i32_=>_i32) if + local.get $4 local.get $6 - local.get $8 - local.tee $12 + local.tee $10 i32.const 1 i32.add - local.set $8 - local.get $12 + local.set $6 + local.get $10 i32.const 3 i32.shl i32.add - local.get $11 + local.get $9 i64.store end - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $for-loop|0 end end - local.get $8 + local.get $6 i32.const 3 i32.shl - local.set $9 - local.get $6 - local.get $9 + local.set $11 + local.get $4 + local.get $11 call $~lib/rt/tlsf/__realloc - local.set $10 - local.get $5 - local.get $10 + local.set $12 + local.get $3 + local.get $12 call $~lib/rt/pure/__retain i32.store - local.get $5 - local.get $9 + local.get $3 + local.get $11 i32.store offset=8 - local.get $5 - local.get $10 + local.get $3 + local.get $12 i32.store offset=4 - local.get $5 - call $~lib/rt/pure/__retain - local.set $12 local.get $3 + call $~lib/rt/pure/__retain + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $12 + local.get $7 + ) + (func $~lib/typedarray/Uint64Array#filter (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FILTER<~lib/typedarray/Uint64Array,u64> ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> (local $0 i32) @@ -12781,7 +12622,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Float32Array#filter (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12789,101 +12630,104 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) + (local $9 f32) (local $10 i32) - (local $11 f32) + (local $11 i32) (local $12 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 call $~lib/typedarray/Float32Array#get:length - local.set $4 + local.set $2 i32.const 12 i32.const 12 call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $4 + local.set $3 + local.get $2 i32.const 2 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $3 + local.set $4 + local.get $0 i32.load offset=4 - local.set $7 + local.set $5 i32.const 0 - local.set $8 + local.set $6 i32.const 0 - local.set $9 + local.set $7 loop $for-loop|0 - local.get $9 - local.get $4 + local.get $7 + local.get $2 i32.lt_s - local.set $10 - local.get $10 + local.set $8 + local.get $8 if + local.get $5 local.get $7 - local.get $9 i32.const 2 i32.shl i32.add f32.load - local.set $11 - local.get $11 + local.set $9 local.get $9 - local.get $3 + local.get $7 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $f32_i32_i32_=>_i32) if + local.get $4 local.get $6 - local.get $8 - local.tee $12 + local.tee $10 i32.const 1 i32.add - local.set $8 - local.get $12 + local.set $6 + local.get $10 i32.const 2 i32.shl i32.add - local.get $11 + local.get $9 f32.store end - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $for-loop|0 end end - local.get $8 + local.get $6 i32.const 2 i32.shl - local.set $9 - local.get $6 - local.get $9 + local.set $11 + local.get $4 + local.get $11 call $~lib/rt/tlsf/__realloc - local.set $10 - local.get $5 - local.get $10 + local.set $12 + local.get $3 + local.get $12 call $~lib/rt/pure/__retain i32.store - local.get $5 - local.get $9 + local.get $3 + local.get $11 i32.store offset=8 - local.get $5 - local.get $10 + local.get $3 + local.get $12 i32.store offset=4 - local.get $5 - call $~lib/rt/pure/__retain - local.set $12 local.get $3 + call $~lib/rt/pure/__retain + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $12 + local.get $7 + ) + (func $~lib/typedarray/Float32Array#filter (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FILTER<~lib/typedarray/Float32Array,f32> ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> (local $0 i32) @@ -13007,7 +12851,7 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Float64Array#filter (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13015,101 +12859,104 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) + (local $9 f64) (local $10 i32) - (local $11 f64) + (local $11 i32) (local $12 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 call $~lib/typedarray/Float64Array#get:length - local.set $4 + local.set $2 i32.const 12 i32.const 13 call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $4 + local.set $3 + local.get $2 i32.const 3 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $3 + local.set $4 + local.get $0 i32.load offset=4 - local.set $7 + local.set $5 i32.const 0 - local.set $8 + local.set $6 i32.const 0 - local.set $9 + local.set $7 loop $for-loop|0 - local.get $9 - local.get $4 + local.get $7 + local.get $2 i32.lt_s - local.set $10 - local.get $10 + local.set $8 + local.get $8 if + local.get $5 local.get $7 - local.get $9 i32.const 3 i32.shl i32.add f64.load - local.set $11 - local.get $11 + local.set $9 local.get $9 - local.get $3 + local.get $7 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $f64_i32_i32_=>_i32) if + local.get $4 local.get $6 - local.get $8 - local.tee $12 + local.tee $10 i32.const 1 i32.add - local.set $8 - local.get $12 + local.set $6 + local.get $10 i32.const 3 i32.shl i32.add - local.get $11 + local.get $9 f64.store end - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $for-loop|0 end end - local.get $8 + local.get $6 i32.const 3 i32.shl - local.set $9 - local.get $6 - local.get $9 + local.set $11 + local.get $4 + local.get $11 call $~lib/rt/tlsf/__realloc - local.set $10 - local.get $5 - local.get $10 + local.set $12 + local.get $3 + local.get $12 call $~lib/rt/pure/__retain i32.store - local.get $5 - local.get $9 + local.get $3 + local.get $11 i32.store offset=8 - local.get $5 - local.get $10 + local.get $3 + local.get $12 i32.store offset=4 - local.get $5 - call $~lib/rt/pure/__retain - local.set $12 local.get $3 + call $~lib/rt/pure/__retain + local.set $7 + local.get $0 call $~lib/rt/pure/__release - local.get $12 + local.get $7 + ) + (func $~lib/typedarray/Float64Array#filter (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FILTER<~lib/typedarray/Float64Array,f64> ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> (local $0 i32) @@ -13237,68 +13084,67 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Int8Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Int8Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Int8Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 + local.get $5 + if + local.get $2 + local.get $3 + i32.const 0 + i32.shl + i32.add + i32.load8_s + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) if - local.get $4 - local.get $5 - i32.const 0 - i32.shl - i32.add - i32.load8_s - local.get $5 - local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i32_i32_i32_=>_i32) - if - i32.const 1 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 - end - local.get $5 i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 0 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const 0 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Int8Array#some (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8> ) (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -13345,8 +13191,6 @@ call $~lib/typedarray/Int8Array#some local.set $2 local.get $2 - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -13391,68 +13235,67 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint8Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint8Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Uint8Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 + local.get $5 + if + local.get $2 + local.get $3 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) if - local.get $4 - local.get $5 - i32.const 0 - i32.shl - i32.add - i32.load8_u - local.get $5 - local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i32_i32_i32_=>_i32) - if - i32.const 1 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 - end - local.get $5 i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 0 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const 0 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Uint8Array#some (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8> ) (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -13497,8 +13340,6 @@ call $~lib/typedarray/Uint8Array#some local.set $2 local.get $2 - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -13543,68 +13384,67 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint8ClampedArray#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Uint8ClampedArray,u8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint8ClampedArray#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Uint8ClampedArray#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 + local.get $5 + if + local.get $2 + local.get $3 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) if - local.get $4 - local.get $5 - i32.const 0 - i32.shl - i32.add - i32.load8_u - local.get $5 - local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i32_i32_i32_=>_i32) - if - i32.const 1 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/SOME<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 - end - local.get $5 i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 0 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const 0 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Uint8ClampedArray#some (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/SOME<~lib/typedarray/Uint8ClampedArray,u8> ) (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -13649,8 +13489,6 @@ call $~lib/typedarray/Uint8ClampedArray#some local.set $2 local.get $2 - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -13697,68 +13535,67 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Int16Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Int16Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Int16Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 + local.get $5 + if + local.get $2 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) if - local.get $4 - local.get $5 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.get $5 - local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i32_i32_i32_=>_i32) - if - i32.const 1 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 - end - local.get $5 i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 0 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const 0 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Int16Array#some (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16> ) (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -13805,8 +13642,6 @@ call $~lib/typedarray/Int16Array#some local.set $2 local.get $2 - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -13851,68 +13686,67 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint16Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint16Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Uint16Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 - if - local.get $4 - local.get $5 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.get $5 - local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i32_i32_i32_=>_i32) - if - i32.const 1 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 - end - local.get $5 + local.get $5 + if + local.get $2 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 0 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const 0 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Uint16Array#some (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16> ) (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -13957,8 +13791,6 @@ call $~lib/typedarray/Uint16Array#some local.set $2 local.get $2 - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -14001,68 +13833,67 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Int32Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Int32Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Int32Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 + local.get $5 + if + local.get $2 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) if - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - i32.load - local.get $5 - local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i32_i32_i32_=>_i32) - if - i32.const 1 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 - end - local.get $5 i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 0 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const 0 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Int32Array#some (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> ) (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -14105,8 +13936,6 @@ call $~lib/typedarray/Int32Array#some local.set $2 local.get $2 - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -14149,68 +13978,67 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint32Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Uint32Array,u32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Uint32Array,u32>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint32Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Uint32Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 + local.get $5 + if + local.get $2 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) if - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - i32.load - local.get $5 - local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i32_i32_i32_=>_i32) - if - i32.const 1 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/SOME<~lib/typedarray/Uint32Array,u32>|inlined.0 - end - local.get $5 i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 0 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const 0 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Uint32Array#some (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/SOME<~lib/typedarray/Uint32Array,u32> ) (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -14253,8 +14081,6 @@ call $~lib/typedarray/Uint32Array#some local.set $2 local.get $2 - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -14297,68 +14123,67 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Int64Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Int64Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Int64Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 + local.get $5 + if + local.get $2 + local.get $3 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i64_i32_i32_=>_i32) if - local.get $4 - local.get $5 - i32.const 3 - i32.shl - i32.add - i64.load - local.get $5 - local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i64_i32_i32_=>_i32) - if - i32.const 1 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 - end - local.get $5 i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 0 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const 0 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Int64Array#some (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> ) (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -14401,8 +14226,6 @@ call $~lib/typedarray/Int64Array#some local.set $2 local.get $2 - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -14445,68 +14268,67 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint64Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Uint64Array,u64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Uint64Array,u64>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint64Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Uint64Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 + local.get $5 + if + local.get $2 + local.get $3 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i64_i32_i32_=>_i32) if - local.get $4 - local.get $5 - i32.const 3 - i32.shl - i32.add - i64.load - local.get $5 - local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i64_i32_i32_=>_i32) - if - i32.const 1 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/SOME<~lib/typedarray/Uint64Array,u64>|inlined.0 - end - local.get $5 i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 0 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const 0 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Uint64Array#some (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/SOME<~lib/typedarray/Uint64Array,u64> ) (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -14549,8 +14371,6 @@ call $~lib/typedarray/Uint64Array#some local.set $2 local.get $2 - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -14593,68 +14413,67 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Float32Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Float32Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Float32Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 + local.get $5 + if + local.get $2 + local.get $3 + i32.const 2 + i32.shl + i32.add + f32.load + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $f32_i32_i32_=>_i32) if - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - f32.load - local.get $5 - local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $f32_i32_i32_=>_i32) - if - i32.const 1 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 - end - local.get $5 i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 0 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const 0 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Float32Array#some (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32> ) (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -14697,8 +14516,6 @@ call $~lib/typedarray/Float32Array#some local.set $2 local.get $2 - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -14741,68 +14558,67 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Float64Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Float64Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Float64Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 + local.get $5 + if + local.get $2 + local.get $3 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $f64_i32_i32_=>_i32) if - local.get $4 - local.get $5 - i32.const 3 - i32.shl - i32.add - f64.load - local.get $5 - local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $f64_i32_i32_=>_i32) - if - i32.const 1 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 - end - local.get $5 i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 0 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const 0 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Float64Array#some (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64> ) (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -14845,8 +14661,6 @@ call $~lib/typedarray/Float64Array#some local.set $2 local.get $2 - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -14893,68 +14707,67 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Int8Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Int8Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Int8Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 + local.get $5 + if + local.get $2 + local.get $3 + i32.const 0 + i32.shl + i32.add + i32.load8_s + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) if - local.get $4 - local.get $5 - i32.const 0 - i32.shl - i32.add - i32.load8_s - local.get $5 local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i32_i32_i32_=>_i32) - if - local.get $5 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const -1 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const -1 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Int8Array#findIndex (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8> ) (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -15048,68 +14861,67 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint8Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint8Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Uint8Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 + local.get $5 + if + local.get $2 + local.get $3 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) if - local.get $4 - local.get $5 - i32.const 0 - i32.shl - i32.add - i32.load8_u - local.get $5 local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i32_i32_i32_=>_i32) - if - local.get $5 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const -1 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const -1 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Uint8Array#findIndex (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8> ) (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -15201,68 +15013,67 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint8ClampedArray#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8ClampedArray,u8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint8ClampedArray#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Uint8ClampedArray#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 + local.get $5 + if + local.get $2 + local.get $3 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) if - local.get $4 - local.get $5 - i32.const 0 - i32.shl - i32.add - i32.load8_u - local.get $5 local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i32_i32_i32_=>_i32) - if - local.get $5 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const -1 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const -1 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Uint8ClampedArray#findIndex (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8ClampedArray,u8> ) (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -15356,68 +15167,67 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Int16Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Int16Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Int16Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 + local.get $5 + if + local.get $2 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) if - local.get $4 - local.get $5 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.get $5 local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i32_i32_i32_=>_i32) - if - local.get $5 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const -1 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const -1 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Int16Array#findIndex (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16> ) (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -15511,68 +15321,67 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint16Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 - local.set $5 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint16Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - call $~lib/typedarray/Uint16Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 + local.get $4 + i32.lt_s + local.set $5 + local.get $5 + if + local.get $2 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) if - local.get $4 - local.get $5 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.get $5 local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i32_i32_i32_=>_i32) - if - local.get $5 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const -1 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const -1 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Uint16Array#findIndex (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16> ) (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -15662,68 +15471,67 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Int32Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Int32Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Int32Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 + local.get $5 + if + local.get $2 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) if - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - i32.load - local.get $5 local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i32_i32_i32_=>_i32) - if - local.get $5 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const -1 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const -1 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Int32Array#findIndex (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> ) (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -15811,68 +15619,67 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint32Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint32Array,u32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint32Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Uint32Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 + local.get $5 + if + local.get $2 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) if - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - i32.load - local.get $5 local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i32_i32_i32_=>_i32) - if - local.get $5 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.0 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const -1 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const -1 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Uint32Array#findIndex (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint32Array,u32> ) (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -15960,68 +15767,67 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Int64Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Int64Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Int64Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 + local.get $5 + if + local.get $2 + local.get $3 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i64_i32_i32_=>_i32) if - local.get $4 - local.get $5 - i32.const 3 - i32.shl - i32.add - i64.load - local.get $5 local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i64_i32_i32_=>_i32) - if - local.get $5 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const -1 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const -1 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Int64Array#findIndex (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> ) (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -16109,68 +15915,67 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint64Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint64Array,u64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint64Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Uint64Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 + local.get $5 + if + local.get $2 + local.get $3 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i64_i32_i32_=>_i32) if - local.get $4 - local.get $5 - i32.const 3 - i32.shl - i32.add - i64.load - local.get $5 local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i64_i32_i32_=>_i32) - if - local.get $5 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.0 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const -1 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const -1 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Uint64Array#findIndex (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint64Array,u64> ) (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -16258,68 +16063,67 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Float32Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Float32Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Float32Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 + local.get $5 + if + local.get $2 + local.get $3 + i32.const 2 + i32.shl + i32.add + f32.load + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $f32_i32_i32_=>_i32) if - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - f32.load - local.get $5 local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $f32_i32_i32_=>_i32) - if - local.get $5 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const -1 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const -1 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Float32Array#findIndex (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32> ) (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -16407,68 +16211,67 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Float64Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Float64Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Float64Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 + local.get $5 + if + local.get $2 + local.get $3 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $f64_i32_i32_=>_i32) if - local.get $4 - local.get $5 - i32.const 3 - i32.shl - i32.add - f64.load - local.get $5 local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $f64_i32_i32_=>_i32) - if - local.get $5 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const -1 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const -1 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Float64Array#findIndex (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64> ) (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -16562,71 +16365,70 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Int8Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Int8Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Int8Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 - if - block $for-continue|0 - local.get $4 - local.get $5 - i32.const 0 - i32.shl - i32.add - i32.load8_s - local.get $5 - local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i32_i32_i32_=>_i32) - if - br $for-continue|0 - end - i32.const 0 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 - end - local.get $5 - i32.const 1 + local.get $5 + if + block $for-continue|0 + local.get $2 + local.get $3 + i32.const 0 + i32.shl i32.add - local.set $5 - br $for-loop|0 + i32.load8_s + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if + br $for-continue|0 + end + i32.const 0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 1 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const 1 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Int8Array#every (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8> ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -16673,8 +16475,6 @@ call $~lib/typedarray/Int8Array#every local.set $2 local.get $2 - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -16721,71 +16521,70 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint8Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint8Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Uint8Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 - if - block $for-continue|0 - local.get $4 - local.get $5 - i32.const 0 - i32.shl - i32.add - i32.load8_u - local.get $5 - local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i32_i32_i32_=>_i32) - if - br $for-continue|0 - end - i32.const 0 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 - end - local.get $5 - i32.const 1 + local.get $5 + if + block $for-continue|0 + local.get $2 + local.get $3 + i32.const 0 + i32.shl i32.add - local.set $5 - br $for-loop|0 + i32.load8_u + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if + br $for-continue|0 + end + i32.const 0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 1 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const 1 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Uint8Array#every (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8> ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -16830,8 +16629,6 @@ call $~lib/typedarray/Uint8Array#every local.set $2 local.get $2 - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -16878,71 +16675,70 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint8ClampedArray#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Uint8ClampedArray,u8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint8ClampedArray#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Uint8ClampedArray#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 - if - block $for-continue|0 - local.get $4 - local.get $5 - i32.const 0 - i32.shl - i32.add - i32.load8_u - local.get $5 - local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i32_i32_i32_=>_i32) - if - br $for-continue|0 - end - i32.const 0 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/EVERY<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 - end - local.get $5 - i32.const 1 + local.get $5 + if + block $for-continue|0 + local.get $2 + local.get $3 + i32.const 0 + i32.shl i32.add - local.set $5 - br $for-loop|0 + i32.load8_u + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if + br $for-continue|0 + end + i32.const 0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 1 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const 1 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Uint8ClampedArray#every (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/EVERY<~lib/typedarray/Uint8ClampedArray,u8> ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -16987,8 +16783,6 @@ call $~lib/typedarray/Uint8ClampedArray#every local.set $2 local.get $2 - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -17037,71 +16831,70 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Int16Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Int16Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Int16Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 - if - block $for-continue|0 - local.get $4 - local.get $5 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.get $5 - local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i32_i32_i32_=>_i32) - if - br $for-continue|0 - end - i32.const 0 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 - end - local.get $5 + local.get $5 + if + block $for-continue|0 + local.get $2 + local.get $3 i32.const 1 + i32.shl i32.add - local.set $5 - br $for-loop|0 + i32.load16_s + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if + br $for-continue|0 + end + i32.const 0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 1 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const 1 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Int16Array#every (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16> ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -17148,8 +16941,6 @@ call $~lib/typedarray/Int16Array#every local.set $2 local.get $2 - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -17196,71 +16987,70 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint16Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint16Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Uint16Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 - if - block $for-continue|0 - local.get $4 - local.get $5 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.get $5 - local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i32_i32_i32_=>_i32) - if - br $for-continue|0 - end - i32.const 0 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 - end - local.get $5 + local.get $5 + if + block $for-continue|0 + local.get $2 + local.get $3 i32.const 1 + i32.shl i32.add - local.set $5 - br $for-loop|0 + i32.load16_u + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if + br $for-continue|0 + end + i32.const 0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 1 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const 1 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Uint16Array#every (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16> ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -17305,8 +17095,6 @@ call $~lib/typedarray/Uint16Array#every local.set $2 local.get $2 - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -17351,71 +17139,70 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Int32Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Int32Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Int32Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 - if - block $for-continue|0 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - i32.load - local.get $5 - local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i32_i32_i32_=>_i32) - if - br $for-continue|0 - end - i32.const 0 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 - end - local.get $5 - i32.const 1 + local.get $5 + if + block $for-continue|0 + local.get $2 + local.get $3 + i32.const 2 + i32.shl i32.add - local.set $5 - br $for-loop|0 + i32.load + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if + br $for-continue|0 + end + i32.const 0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 1 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const 1 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Int32Array#every (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -17458,8 +17245,6 @@ call $~lib/typedarray/Int32Array#every local.set $2 local.get $2 - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -17504,71 +17289,70 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint32Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Uint32Array,u32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Uint32Array,u32>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint32Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Uint32Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 - if - block $for-continue|0 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - i32.load - local.get $5 - local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i32_i32_i32_=>_i32) - if - br $for-continue|0 - end - i32.const 0 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/EVERY<~lib/typedarray/Uint32Array,u32>|inlined.0 - end - local.get $5 - i32.const 1 + local.get $5 + if + block $for-continue|0 + local.get $2 + local.get $3 + i32.const 2 + i32.shl i32.add - local.set $5 - br $for-loop|0 + i32.load + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if + br $for-continue|0 + end + i32.const 0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 1 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const 1 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Uint32Array#every (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/EVERY<~lib/typedarray/Uint32Array,u32> ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -17611,8 +17395,6 @@ call $~lib/typedarray/Uint32Array#every local.set $2 local.get $2 - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -17657,71 +17439,70 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Int64Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Int64Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Int64Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 - if - block $for-continue|0 - local.get $4 - local.get $5 - i32.const 3 - i32.shl - i32.add - i64.load - local.get $5 - local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i64_i32_i32_=>_i32) - if - br $for-continue|0 - end - i32.const 0 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 - end - local.get $5 - i32.const 1 + local.get $5 + if + block $for-continue|0 + local.get $2 + local.get $3 + i32.const 3 + i32.shl i32.add - local.set $5 - br $for-loop|0 + i64.load + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i64_i32_i32_=>_i32) + if + br $for-continue|0 + end + i32.const 0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 1 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const 1 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Int64Array#every (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -17764,8 +17545,6 @@ call $~lib/typedarray/Int64Array#every local.set $2 local.get $2 - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -17810,71 +17589,70 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Uint64Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Uint64Array,u64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Uint64Array,u64>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint64Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Uint64Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 - if - block $for-continue|0 - local.get $4 - local.get $5 - i32.const 3 - i32.shl - i32.add - i64.load - local.get $5 - local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $i64_i32_i32_=>_i32) - if - br $for-continue|0 - end - i32.const 0 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/EVERY<~lib/typedarray/Uint64Array,u64>|inlined.0 - end - local.get $5 - i32.const 1 + local.get $5 + if + block $for-continue|0 + local.get $2 + local.get $3 + i32.const 3 + i32.shl i32.add - local.set $5 - br $for-loop|0 + i64.load + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i64_i32_i32_=>_i32) + if + br $for-continue|0 + end + i32.const 0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 1 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const 1 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Uint64Array#every (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/EVERY<~lib/typedarray/Uint64Array,u64> ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -17917,8 +17695,6 @@ call $~lib/typedarray/Uint64Array#every local.set $2 local.get $2 - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -18211,71 +17987,70 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Float32Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Float32Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Float32Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 - if - block $for-continue|0 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - f32.load - local.get $5 - local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $f32_i32_i32_=>_i32) - if - br $for-continue|0 - end - i32.const 0 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 - end - local.get $5 - i32.const 1 + local.get $5 + if + block $for-continue|0 + local.get $2 + local.get $3 + i32.const 2 + i32.shl i32.add - local.set $5 - br $for-loop|0 + f32.load + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $f32_i32_i32_=>_i32) + if + br $for-continue|0 + end + i32.const 0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 1 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const 1 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Float32Array#every (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32> ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -18318,8 +18093,6 @@ call $~lib/typedarray/Float32Array#every local.set $2 local.get $2 - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -18618,71 +18391,70 @@ call $~lib/rt/pure/__release local.get $3 ) - (func $~lib/typedarray/Float64Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + call $~lib/typedarray/Float64Array#get:length + local.set $4 + loop $for-loop|0 local.get $3 - i32.load offset=4 - local.set $4 - i32.const 0 + local.get $4 + i32.lt_s local.set $5 - local.get $3 - call $~lib/typedarray/Float64Array#get:length - local.set $6 - loop $for-loop|0 - local.get $5 - local.get $6 - i32.lt_s - local.set $7 - local.get $7 - if - block $for-continue|0 - local.get $4 - local.get $5 - i32.const 3 - i32.shl - i32.add - f64.load - local.get $5 - local.get $3 - i32.const 3 - global.set $~argumentsLength - local.get $2 - call_indirect (type $f64_i32_i32_=>_i32) - if - br $for-continue|0 - end - i32.const 0 - local.set $8 - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 - end - local.get $5 - i32.const 1 + local.get $5 + if + block $for-continue|0 + local.get $2 + local.get $3 + i32.const 3 + i32.shl i32.add - local.set $5 - br $for-loop|0 + f64.load + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $f64_i32_i32_=>_i32) + if + br $for-continue|0 + end + i32.const 0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 1 - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 end + i32.const 1 + local.set $4 + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/typedarray/Float64Array#every (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64> ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -18725,8 +18497,6 @@ call $~lib/typedarray/Float64Array#every local.set $2 local.get $2 - i32.const 0 - i32.ne i32.eqz if i32.const 0 @@ -18816,55 +18586,56 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#forEach (param $0 i32) (param $1 i32) + (func $~lib/typedarray/FOREACH<~lib/typedarray/Int8Array,i8> (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 $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 i32.load offset=4 - local.set $4 + local.set $2 i32.const 0 - local.set $5 - local.get $3 + local.set $3 + local.get $0 call $~lib/typedarray/Int8Array#get:length - local.set $6 + local.set $4 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $3 + local.get $4 i32.lt_s - local.set $7 - local.get $7 + local.set $5 + local.get $5 if - local.get $4 - local.get $5 + local.get $2 + local.get $3 i32.const 0 i32.shl i32.add i32.load8_s - local.get $5 local.get $3 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i32_i32_i32_=>_none) - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $for-loop|0 end end - local.get $3 + local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/typedarray/Int8Array#forEach (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FOREACH<~lib/typedarray/Int8Array,i8> + ) (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (local $0 i32) (local $1 i32) @@ -18984,55 +18755,56 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#forEach (param $0 i32) (param $1 i32) + (func $~lib/typedarray/FOREACH<~lib/typedarray/Uint8Array,u8> (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 $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 i32.load offset=4 - local.set $4 + local.set $2 i32.const 0 - local.set $5 - local.get $3 + local.set $3 + local.get $0 call $~lib/typedarray/Uint8Array#get:length - local.set $6 + local.set $4 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $3 + local.get $4 i32.lt_s - local.set $7 - local.get $7 + local.set $5 + local.get $5 if - local.get $4 - local.get $5 + local.get $2 + local.get $3 i32.const 0 i32.shl i32.add i32.load8_u - local.get $5 local.get $3 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i32_i32_i32_=>_none) - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $for-loop|0 end end - local.get $3 + local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/typedarray/Uint8Array#forEach (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FOREACH<~lib/typedarray/Uint8Array,u8> + ) (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (local $0 i32) (local $1 i32) @@ -19146,55 +18918,56 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#forEach (param $0 i32) (param $1 i32) + (func $~lib/typedarray/FOREACH<~lib/typedarray/Uint8ClampedArray,u8> (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 $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 i32.load offset=4 - local.set $4 + local.set $2 i32.const 0 - local.set $5 - local.get $3 + local.set $3 + local.get $0 call $~lib/typedarray/Uint8ClampedArray#get:length - local.set $6 + local.set $4 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $3 + local.get $4 i32.lt_s - local.set $7 - local.get $7 + local.set $5 + local.get $5 if - local.get $4 - local.get $5 + local.get $2 + local.get $3 i32.const 0 i32.shl i32.add i32.load8_u - local.get $5 local.get $3 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i32_i32_i32_=>_none) - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $for-loop|0 end end - local.get $3 + local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/typedarray/Uint8ClampedArray#forEach (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FOREACH<~lib/typedarray/Uint8ClampedArray,u8> + ) (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (local $0 i32) (local $1 i32) @@ -19312,55 +19085,56 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#forEach (param $0 i32) (param $1 i32) + (func $~lib/typedarray/FOREACH<~lib/typedarray/Int16Array,i16> (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 $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 i32.load offset=4 - local.set $4 + local.set $2 i32.const 0 - local.set $5 - local.get $3 + local.set $3 + local.get $0 call $~lib/typedarray/Int16Array#get:length - local.set $6 + local.set $4 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $3 + local.get $4 i32.lt_s - local.set $7 - local.get $7 + local.set $5 + local.get $5 if - local.get $4 - local.get $5 + local.get $2 + local.get $3 i32.const 1 i32.shl i32.add i32.load16_s - local.get $5 local.get $3 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i32_i32_i32_=>_none) - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $for-loop|0 end end - local.get $3 + local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/typedarray/Int16Array#forEach (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FOREACH<~lib/typedarray/Int16Array,i16> + ) (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (local $0 i32) (local $1 i32) @@ -19480,55 +19254,56 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#forEach (param $0 i32) (param $1 i32) + (func $~lib/typedarray/FOREACH<~lib/typedarray/Uint16Array,u16> (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 $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 i32.load offset=4 - local.set $4 + local.set $2 i32.const 0 - local.set $5 - local.get $3 + local.set $3 + local.get $0 call $~lib/typedarray/Uint16Array#get:length - local.set $6 + local.set $4 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $3 + local.get $4 i32.lt_s - local.set $7 - local.get $7 + local.set $5 + local.get $5 if - local.get $4 - local.get $5 + local.get $2 + local.get $3 i32.const 1 i32.shl i32.add i32.load16_u - local.get $5 local.get $3 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i32_i32_i32_=>_none) - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $for-loop|0 end end - local.get $3 + local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/typedarray/Uint16Array#forEach (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FOREACH<~lib/typedarray/Uint16Array,u16> + ) (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (local $0 i32) (local $1 i32) @@ -19638,55 +19413,56 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#forEach (param $0 i32) (param $1 i32) + (func $~lib/typedarray/FOREACH<~lib/typedarray/Int32Array,i32> (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 $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 i32.load offset=4 - local.set $4 + local.set $2 i32.const 0 - local.set $5 - local.get $3 + local.set $3 + local.get $0 call $~lib/typedarray/Int32Array#get:length - local.set $6 + local.set $4 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $3 + local.get $4 i32.lt_s - local.set $7 - local.get $7 + local.set $5 + local.get $5 if - local.get $4 - local.get $5 + local.get $2 + local.get $3 i32.const 2 i32.shl i32.add i32.load - local.get $5 local.get $3 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i32_i32_i32_=>_none) - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $for-loop|0 end end - local.get $3 + local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/typedarray/Int32Array#forEach (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FOREACH<~lib/typedarray/Int32Array,i32> + ) (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (local $0 i32) (local $1 i32) @@ -19790,55 +19566,56 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#forEach (param $0 i32) (param $1 i32) + (func $~lib/typedarray/FOREACH<~lib/typedarray/Uint32Array,u32> (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 $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 i32.load offset=4 - local.set $4 + local.set $2 i32.const 0 - local.set $5 - local.get $3 + local.set $3 + local.get $0 call $~lib/typedarray/Uint32Array#get:length - local.set $6 + local.set $4 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $3 + local.get $4 i32.lt_s - local.set $7 - local.get $7 + local.set $5 + local.get $5 if - local.get $4 - local.get $5 + local.get $2 + local.get $3 i32.const 2 i32.shl i32.add i32.load - local.get $5 local.get $3 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i32_i32_i32_=>_none) - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $for-loop|0 end end - local.get $3 + local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/typedarray/Uint32Array#forEach (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FOREACH<~lib/typedarray/Uint32Array,u32> + ) (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (local $0 i32) (local $1 i32) @@ -19943,55 +19720,56 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#forEach (param $0 i32) (param $1 i32) + (func $~lib/typedarray/FOREACH<~lib/typedarray/Int64Array,i64> (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 $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 i32.load offset=4 - local.set $4 + local.set $2 i32.const 0 - local.set $5 - local.get $3 + local.set $3 + local.get $0 call $~lib/typedarray/Int64Array#get:length - local.set $6 + local.set $4 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $3 + local.get $4 i32.lt_s - local.set $7 - local.get $7 + local.set $5 + local.get $5 if - local.get $4 - local.get $5 + local.get $2 + local.get $3 i32.const 3 i32.shl i32.add i64.load - local.get $5 local.get $3 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i64_i32_i32_=>_none) - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $for-loop|0 end end - local.get $3 + local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/typedarray/Int64Array#forEach (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FOREACH<~lib/typedarray/Int64Array,i64> + ) (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (local $0 i32) (local $1 i32) @@ -20099,55 +19877,56 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#forEach (param $0 i32) (param $1 i32) + (func $~lib/typedarray/FOREACH<~lib/typedarray/Uint64Array,u64> (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 $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 i32.load offset=4 - local.set $4 + local.set $2 i32.const 0 - local.set $5 - local.get $3 + local.set $3 + local.get $0 call $~lib/typedarray/Uint64Array#get:length - local.set $6 + local.set $4 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $3 + local.get $4 i32.lt_s - local.set $7 - local.get $7 + local.set $5 + local.get $5 if - local.get $4 - local.get $5 + local.get $2 + local.get $3 i32.const 3 i32.shl i32.add i64.load - local.get $5 local.get $3 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $i64_i32_i32_=>_none) - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $for-loop|0 end end - local.get $3 + local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/typedarray/Uint64Array#forEach (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FOREACH<~lib/typedarray/Uint64Array,u64> + ) (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (local $0 i32) (local $1 i32) @@ -20255,55 +20034,56 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#forEach (param $0 i32) (param $1 i32) + (func $~lib/typedarray/FOREACH<~lib/typedarray/Float32Array,f32> (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 $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 i32.load offset=4 - local.set $4 + local.set $2 i32.const 0 - local.set $5 - local.get $3 + local.set $3 + local.get $0 call $~lib/typedarray/Float32Array#get:length - local.set $6 + local.set $4 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $3 + local.get $4 i32.lt_s - local.set $7 - local.get $7 + local.set $5 + local.get $5 if - local.get $4 - local.get $5 + local.get $2 + local.get $3 i32.const 2 i32.shl i32.add f32.load - local.get $5 local.get $3 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $f32_i32_i32_=>_none) - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $for-loop|0 end end - local.get $3 + local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/typedarray/Float32Array#forEach (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FOREACH<~lib/typedarray/Float32Array,f32> + ) (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (local $0 i32) (local $1 i32) @@ -20411,55 +20191,56 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#forEach (param $0 i32) (param $1 i32) + (func $~lib/typedarray/FOREACH<~lib/typedarray/Float64Array,f64> (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 $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.set $0 + local.get $0 i32.load offset=4 - local.set $4 + local.set $2 i32.const 0 - local.set $5 - local.get $3 + local.set $3 + local.get $0 call $~lib/typedarray/Float64Array#get:length - local.set $6 + local.set $4 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $3 + local.get $4 i32.lt_s - local.set $7 - local.get $7 + local.set $5 + local.get $5 if - local.get $4 - local.get $5 + local.get $2 + local.get $3 i32.const 3 i32.shl i32.add f64.load - local.get $5 local.get $3 + local.get $0 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $1 call_indirect (type $f64_i32_i32_=>_none) - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $for-loop|0 end end - local.get $3 + local.get $0 call $~lib/rt/pure/__release ) + (func $~lib/typedarray/Float64Array#forEach (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/typedarray/FOREACH<~lib/typedarray/Float64Array,f64> + ) (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (local $0 i32) (local $1 i32) @@ -20514,7 +20295,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Int8Array,i8> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -20522,61 +20303,64 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $1 - local.get $1 + local.set $0 + local.get $0 i32.load offset=4 - local.set $2 + local.set $1 i32.const 0 - local.set $3 - local.get $1 + local.set $2 + local.get $0 call $~lib/typedarray/Int8Array#get:length i32.const 1 i32.sub - local.set $4 + local.set $3 loop $for-loop|0 + local.get $2 local.get $3 - local.get $4 i32.lt_u - local.set $5 - local.get $5 + local.set $4 + local.get $4 if + local.get $1 local.get $2 - local.get $3 i32.const 0 i32.shl i32.add - local.set $6 - local.get $2 - local.get $4 + local.set $5 + local.get $1 + local.get $3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.load8_s - local.set $8 + local.set $7 + local.get $5 local.get $6 - local.get $7 i32.load8_s i32.store8 + local.get $6 local.get $7 - local.get $8 i32.store8 - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 - local.get $4 + local.set $2 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $for-loop|0 end end - local.get $1 + local.get $0 + ) + (func $~lib/typedarray/Int8Array#reverse (param $0 i32) (result i32) + local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Int8Array,i8> ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (local $0 i32) @@ -20763,7 +20547,7 @@ local.get $8 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Uint8Array,u8> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -20771,168 +20555,171 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $1 - local.get $1 + local.set $0 + local.get $0 i32.load offset=4 - local.set $2 + local.set $1 i32.const 0 - local.set $3 - local.get $1 + local.set $2 + local.get $0 call $~lib/typedarray/Uint8Array#get:length i32.const 1 i32.sub - local.set $4 + local.set $3 loop $for-loop|0 + local.get $2 local.get $3 - local.get $4 i32.lt_u - local.set $5 - local.get $5 + local.set $4 + local.get $4 if + local.get $1 local.get $2 - local.get $3 i32.const 0 i32.shl i32.add - local.set $6 - local.get $2 - local.get $4 + local.set $5 + local.get $1 + local.get $3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.load8_u - local.set $8 + local.set $7 + local.get $5 local.get $6 - local.get $7 i32.load8_u i32.store8 + local.get $6 local.get $7 - local.get $8 i32.store8 - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 - local.get $4 + local.set $2 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $for-loop|0 end end - local.get $1 + local.get $0 ) - (func $~lib/typedarray/Uint8Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (param $0 i32) (result i32) + local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Uint8Array,u8> + ) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 call $~lib/typedarray/Uint8Array#get:length - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.const 0 i32.lt_s if (result i32) - local.get $6 - local.get $4 + local.get $3 + local.get $1 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $1 + local.tee $4 + local.get $3 + local.tee $5 local.get $4 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.lt_s select end - local.set $4 - local.get $3 + local.set $1 + local.get $2 i32.const 0 i32.lt_s if (result i32) - local.get $6 local.get $3 + local.get $2 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $2 + local.tee $4 local.get $3 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.lt_s select end - local.set $3 - local.get $3 - local.tee $7 + local.set $2 + local.get $2 + local.tee $4 + local.get $1 + local.tee $5 local.get $4 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.gt_s select - local.set $3 + local.set $2 i32.const 12 i32.const 4 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $7 - local.get $5 + local.set $6 + local.get $6 + local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $7 - local.get $5 + local.get $6 + local.get $0 i32.load offset=4 - local.get $4 + local.get $1 i32.const 0 i32.shl i32.add i32.store offset=4 - local.get $7 - local.get $3 - local.get $4 + local.get $6 + local.get $2 + local.get $1 i32.sub i32.const 0 i32.shl i32.store offset=8 - local.get $7 + local.get $6 call $~lib/rt/pure/__retain - local.set $8 - local.get $5 + local.set $4 + local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $4 + ) + (func $~lib/typedarray/Uint8Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8Array,u8> ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (local $0 i32) @@ -21113,7 +20900,7 @@ local.get $8 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Uint8ClampedArray,u8> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -21121,168 +20908,171 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $1 - local.get $1 + local.set $0 + local.get $0 i32.load offset=4 - local.set $2 + local.set $1 i32.const 0 - local.set $3 - local.get $1 + local.set $2 + local.get $0 call $~lib/typedarray/Uint8ClampedArray#get:length i32.const 1 i32.sub - local.set $4 + local.set $3 loop $for-loop|0 + local.get $2 local.get $3 - local.get $4 i32.lt_u - local.set $5 - local.get $5 + local.set $4 + local.get $4 if + local.get $1 local.get $2 - local.get $3 i32.const 0 i32.shl i32.add - local.set $6 - local.get $2 - local.get $4 + local.set $5 + local.get $1 + local.get $3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.load8_u - local.set $8 + local.set $7 + local.get $5 local.get $6 - local.get $7 i32.load8_u i32.store8 + local.get $6 local.get $7 - local.get $8 i32.store8 - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 - local.get $4 + local.set $2 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $for-loop|0 end end - local.get $1 + local.get $0 ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reverse (param $0 i32) (result i32) + local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Uint8ClampedArray,u8> + ) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8ClampedArray,u8> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 call $~lib/typedarray/Uint8ClampedArray#get:length - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.const 0 i32.lt_s if (result i32) - local.get $6 - local.get $4 + local.get $3 + local.get $1 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $1 + local.tee $4 + local.get $3 + local.tee $5 local.get $4 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.lt_s select end - local.set $4 - local.get $3 + local.set $1 + local.get $2 i32.const 0 i32.lt_s if (result i32) - local.get $6 local.get $3 + local.get $2 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $2 + local.tee $4 local.get $3 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.lt_s select end - local.set $3 - local.get $3 - local.tee $7 + local.set $2 + local.get $2 + local.tee $4 + local.get $1 + local.tee $5 local.get $4 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.gt_s select - local.set $3 + local.set $2 i32.const 12 i32.const 5 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $7 - local.get $5 + local.set $6 + local.get $6 + local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $7 - local.get $5 + local.get $6 + local.get $0 i32.load offset=4 - local.get $4 + local.get $1 i32.const 0 i32.shl i32.add i32.store offset=4 - local.get $7 - local.get $3 - local.get $4 + local.get $6 + local.get $2 + local.get $1 i32.sub i32.const 0 i32.shl i32.store offset=8 - local.get $7 + local.get $6 call $~lib/rt/pure/__retain - local.set $8 - local.get $5 + local.set $4 + local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $4 + ) + (func $~lib/typedarray/Uint8ClampedArray#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8ClampedArray,u8> ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (local $0 i32) @@ -21463,7 +21253,7 @@ local.get $8 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Int16Array,i16> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -21471,168 +21261,171 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $1 - local.get $1 + local.set $0 + local.get $0 i32.load offset=4 - local.set $2 + local.set $1 i32.const 0 - local.set $3 - local.get $1 + local.set $2 + local.get $0 call $~lib/typedarray/Int16Array#get:length i32.const 1 i32.sub - local.set $4 + local.set $3 loop $for-loop|0 + local.get $2 local.get $3 - local.get $4 i32.lt_u - local.set $5 - local.get $5 + local.set $4 + local.get $4 if + local.get $1 local.get $2 - local.get $3 i32.const 1 i32.shl i32.add - local.set $6 - local.get $2 - local.get $4 + local.set $5 + local.get $1 + local.get $3 i32.const 1 i32.shl i32.add - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.load16_s - local.set $8 + local.set $7 + local.get $5 local.get $6 - local.get $7 i32.load16_s i32.store16 + local.get $6 local.get $7 - local.get $8 i32.store16 - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 - local.get $4 + local.set $2 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $for-loop|0 end end - local.get $1 + local.get $0 ) - (func $~lib/typedarray/Int16Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (param $0 i32) (result i32) + local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Int16Array,i16> + ) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 call $~lib/typedarray/Int16Array#get:length - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.const 0 i32.lt_s if (result i32) - local.get $6 - local.get $4 + local.get $3 + local.get $1 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $1 + local.tee $4 + local.get $3 + local.tee $5 local.get $4 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.lt_s select end - local.set $4 - local.get $3 + local.set $1 + local.get $2 i32.const 0 i32.lt_s if (result i32) - local.get $6 local.get $3 + local.get $2 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $2 + local.tee $4 local.get $3 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.lt_s select end - local.set $3 - local.get $3 - local.tee $7 + local.set $2 + local.get $2 + local.tee $4 + local.get $1 + local.tee $5 local.get $4 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.gt_s select - local.set $3 + local.set $2 i32.const 12 i32.const 6 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $7 - local.get $5 + local.set $6 + local.get $6 + local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $7 - local.get $5 + local.get $6 + local.get $0 i32.load offset=4 - local.get $4 + local.get $1 i32.const 1 i32.shl i32.add i32.store offset=4 - local.get $7 - local.get $3 - local.get $4 + local.get $6 + local.get $2 + local.get $1 i32.sub i32.const 1 i32.shl i32.store offset=8 - local.get $7 + local.get $6 call $~lib/rt/pure/__retain - local.set $8 - local.get $5 + local.set $4 + local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $4 + ) + (func $~lib/typedarray/Int16Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int16Array,i16> ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (local $0 i32) @@ -21819,7 +21612,7 @@ local.get $8 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Uint16Array,u16> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -21827,168 +21620,171 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $1 - local.get $1 + local.set $0 + local.get $0 i32.load offset=4 - local.set $2 + local.set $1 i32.const 0 - local.set $3 - local.get $1 + local.set $2 + local.get $0 call $~lib/typedarray/Uint16Array#get:length i32.const 1 i32.sub - local.set $4 + local.set $3 loop $for-loop|0 + local.get $2 local.get $3 - local.get $4 i32.lt_u - local.set $5 - local.get $5 + local.set $4 + local.get $4 if + local.get $1 local.get $2 - local.get $3 i32.const 1 i32.shl i32.add - local.set $6 - local.get $2 - local.get $4 + local.set $5 + local.get $1 + local.get $3 i32.const 1 i32.shl i32.add - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.load16_u - local.set $8 + local.set $7 + local.get $5 local.get $6 - local.get $7 i32.load16_u i32.store16 + local.get $6 local.get $7 - local.get $8 i32.store16 - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 - local.get $4 + local.set $2 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $for-loop|0 end end - local.get $1 + local.get $0 ) - (func $~lib/typedarray/Uint16Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (param $0 i32) (result i32) + local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Uint16Array,u16> + ) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint16Array,u16> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 call $~lib/typedarray/Uint16Array#get:length - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.const 0 i32.lt_s if (result i32) - local.get $6 - local.get $4 + local.get $3 + local.get $1 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $1 + local.tee $4 + local.get $3 + local.tee $5 local.get $4 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.lt_s select end - local.set $4 - local.get $3 + local.set $1 + local.get $2 i32.const 0 i32.lt_s if (result i32) - local.get $6 local.get $3 + local.get $2 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $2 + local.tee $4 local.get $3 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.lt_s select end - local.set $3 - local.get $3 - local.tee $7 + local.set $2 + local.get $2 + local.tee $4 + local.get $1 + local.tee $5 local.get $4 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.gt_s select - local.set $3 + local.set $2 i32.const 12 i32.const 7 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $7 - local.get $5 + local.set $6 + local.get $6 + local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $7 - local.get $5 + local.get $6 + local.get $0 i32.load offset=4 - local.get $4 + local.get $1 i32.const 1 i32.shl i32.add i32.store offset=4 - local.get $7 - local.get $3 - local.get $4 + local.get $6 + local.get $2 + local.get $1 i32.sub i32.const 1 i32.shl i32.store offset=8 - local.get $7 + local.get $6 call $~lib/rt/pure/__retain - local.set $8 - local.get $5 + local.set $4 + local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $4 + ) + (func $~lib/typedarray/Uint16Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint16Array,u16> ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (local $0 i32) @@ -22169,7 +21965,7 @@ local.get $8 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Int32Array,i32> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -22177,61 +21973,64 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $1 - local.get $1 + local.set $0 + local.get $0 i32.load offset=4 - local.set $2 + local.set $1 i32.const 0 - local.set $3 - local.get $1 + local.set $2 + local.get $0 call $~lib/typedarray/Int32Array#get:length i32.const 1 i32.sub - local.set $4 + local.set $3 loop $for-loop|0 + local.get $2 local.get $3 - local.get $4 i32.lt_u - local.set $5 - local.get $5 + local.set $4 + local.get $4 if + local.get $1 local.get $2 - local.get $3 i32.const 2 i32.shl i32.add - local.set $6 - local.get $2 - local.get $4 + local.set $5 + local.get $1 + local.get $3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.load - local.set $8 + local.set $7 + local.get $5 local.get $6 - local.get $7 i32.load i32.store + local.get $6 local.get $7 - local.get $8 i32.store - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 - local.get $4 + local.set $2 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $for-loop|0 end end - local.get $1 + local.get $0 + ) + (func $~lib/typedarray/Int32Array#reverse (param $0 i32) (result i32) + local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Int32Array,i32> ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (local $0 i32) @@ -22406,7 +22205,7 @@ local.get $8 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Uint32Array,u32> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -22414,168 +22213,171 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $1 - local.get $1 + local.set $0 + local.get $0 i32.load offset=4 - local.set $2 + local.set $1 i32.const 0 - local.set $3 - local.get $1 + local.set $2 + local.get $0 call $~lib/typedarray/Uint32Array#get:length i32.const 1 i32.sub - local.set $4 + local.set $3 loop $for-loop|0 + local.get $2 local.get $3 - local.get $4 i32.lt_u - local.set $5 - local.get $5 + local.set $4 + local.get $4 if + local.get $1 local.get $2 - local.get $3 i32.const 2 i32.shl i32.add - local.set $6 - local.get $2 - local.get $4 + local.set $5 + local.get $1 + local.get $3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.load - local.set $8 + local.set $7 + local.get $5 local.get $6 - local.get $7 i32.load i32.store + local.get $6 local.get $7 - local.get $8 i32.store - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 - local.get $4 + local.set $2 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $for-loop|0 end end - local.get $1 + local.get $0 ) - (func $~lib/typedarray/Uint32Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reverse (param $0 i32) (result i32) + local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Uint32Array,u32> + ) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint32Array,u32> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 call $~lib/typedarray/Uint32Array#get:length - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.const 0 i32.lt_s if (result i32) - local.get $6 - local.get $4 + local.get $3 + local.get $1 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $1 + local.tee $4 + local.get $3 + local.tee $5 local.get $4 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.lt_s select end - local.set $4 - local.get $3 + local.set $1 + local.get $2 i32.const 0 i32.lt_s if (result i32) - local.get $6 local.get $3 + local.get $2 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $2 + local.tee $4 local.get $3 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.lt_s select end - local.set $3 - local.get $3 - local.tee $7 + local.set $2 + local.get $2 + local.tee $4 + local.get $1 + local.tee $5 local.get $4 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.gt_s select - local.set $3 + local.set $2 i32.const 12 i32.const 9 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $7 - local.get $5 + local.set $6 + local.get $6 + local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $7 - local.get $5 + local.get $6 + local.get $0 i32.load offset=4 - local.get $4 + local.get $1 i32.const 2 i32.shl i32.add i32.store offset=4 - local.get $7 - local.get $3 - local.get $4 + local.get $6 + local.get $2 + local.get $1 i32.sub i32.const 2 i32.shl i32.store offset=8 - local.get $7 + local.get $6 call $~lib/rt/pure/__retain - local.set $8 - local.get $5 + local.set $4 + local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $4 + ) + (func $~lib/typedarray/Uint32Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint32Array,u32> ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (local $0 i32) @@ -22750,176 +22552,179 @@ local.get $8 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Int64Array,i64> (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 i64) + (local $7 i64) local.get $0 call $~lib/rt/pure/__retain - local.set $1 - local.get $1 + local.set $0 + local.get $0 i32.load offset=4 - local.set $2 + local.set $1 i32.const 0 - local.set $3 - local.get $1 + local.set $2 + local.get $0 call $~lib/typedarray/Int64Array#get:length i32.const 1 i32.sub - local.set $4 + local.set $3 loop $for-loop|0 + local.get $2 local.get $3 - local.get $4 i32.lt_u - local.set $5 - local.get $5 + local.set $4 + local.get $4 if + local.get $1 local.get $2 - local.get $3 i32.const 3 i32.shl i32.add - local.set $6 - local.get $2 - local.get $4 + local.set $5 + local.get $1 + local.get $3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $6 + local.set $6 + local.get $5 i64.load - local.set $8 + local.set $7 + local.get $5 local.get $6 - local.get $7 i64.load i64.store + local.get $6 local.get $7 - local.get $8 i64.store - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 - local.get $4 + local.set $2 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $for-loop|0 end end - local.get $1 + local.get $0 ) - (func $~lib/typedarray/Int64Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (param $0 i32) (result i32) + local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Int64Array,i64> + ) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 call $~lib/typedarray/Int64Array#get:length - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.const 0 i32.lt_s if (result i32) - local.get $6 - local.get $4 + local.get $3 + local.get $1 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $1 + local.tee $4 + local.get $3 + local.tee $5 local.get $4 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.lt_s select end - local.set $4 - local.get $3 + local.set $1 + local.get $2 i32.const 0 i32.lt_s if (result i32) - local.get $6 local.get $3 + local.get $2 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $2 + local.tee $4 local.get $3 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.lt_s select end - local.set $3 - local.get $3 - local.tee $7 + local.set $2 + local.get $2 + local.tee $4 + local.get $1 + local.tee $5 local.get $4 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.gt_s select - local.set $3 + local.set $2 i32.const 12 i32.const 10 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $7 - local.get $5 + local.set $6 + local.get $6 + local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $7 - local.get $5 + local.get $6 + local.get $0 i32.load offset=4 - local.get $4 + local.get $1 i32.const 3 i32.shl i32.add i32.store offset=4 - local.get $7 - local.get $3 - local.get $4 + local.get $6 + local.get $2 + local.get $1 i32.sub i32.const 3 i32.shl i32.store offset=8 - local.get $7 + local.get $6 call $~lib/rt/pure/__retain - local.set $8 - local.get $5 + local.set $4 + local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $4 + ) + (func $~lib/typedarray/Int64Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int64Array,i64> ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (local $0 i32) @@ -23097,176 +22902,179 @@ local.get $8 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Uint64Array,u64> (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 i64) + (local $7 i64) local.get $0 call $~lib/rt/pure/__retain - local.set $1 - local.get $1 + local.set $0 + local.get $0 i32.load offset=4 - local.set $2 + local.set $1 i32.const 0 - local.set $3 - local.get $1 + local.set $2 + local.get $0 call $~lib/typedarray/Uint64Array#get:length i32.const 1 i32.sub - local.set $4 + local.set $3 loop $for-loop|0 + local.get $2 local.get $3 - local.get $4 i32.lt_u - local.set $5 - local.get $5 + local.set $4 + local.get $4 if + local.get $1 local.get $2 - local.get $3 i32.const 3 i32.shl i32.add - local.set $6 - local.get $2 - local.get $4 + local.set $5 + local.get $1 + local.get $3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $6 + local.set $6 + local.get $5 i64.load - local.set $8 + local.set $7 + local.get $5 local.get $6 - local.get $7 i64.load i64.store + local.get $6 local.get $7 - local.get $8 i64.store - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 - local.get $4 + local.set $2 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $for-loop|0 end end - local.get $1 + local.get $0 ) - (func $~lib/typedarray/Uint64Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint64Array#reverse (param $0 i32) (result i32) + local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Uint64Array,u64> + ) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint64Array,u64> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 call $~lib/typedarray/Uint64Array#get:length - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.const 0 i32.lt_s if (result i32) - local.get $6 - local.get $4 + local.get $3 + local.get $1 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $1 + local.tee $4 + local.get $3 + local.tee $5 local.get $4 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.lt_s select end - local.set $4 - local.get $3 + local.set $1 + local.get $2 i32.const 0 i32.lt_s if (result i32) - local.get $6 local.get $3 + local.get $2 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $2 + local.tee $4 local.get $3 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.lt_s select end - local.set $3 - local.get $3 - local.tee $7 + local.set $2 + local.get $2 + local.tee $4 + local.get $1 + local.tee $5 local.get $4 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.gt_s select - local.set $3 + local.set $2 i32.const 12 i32.const 11 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $7 - local.get $5 + local.set $6 + local.get $6 + local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $7 - local.get $5 + local.get $6 + local.get $0 i32.load offset=4 - local.get $4 + local.get $1 i32.const 3 i32.shl i32.add i32.store offset=4 - local.get $7 - local.get $3 - local.get $4 + local.get $6 + local.get $2 + local.get $1 i32.sub i32.const 3 i32.shl i32.store offset=8 - local.get $7 + local.get $6 call $~lib/rt/pure/__retain - local.set $8 - local.get $5 + local.set $4 + local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $4 + ) + (func $~lib/typedarray/Uint64Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint64Array,u64> ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (local $0 i32) @@ -23444,176 +23252,179 @@ local.get $8 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Float32Array,f32> (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 f32) + (local $7 f32) local.get $0 call $~lib/rt/pure/__retain - local.set $1 - local.get $1 + local.set $0 + local.get $0 i32.load offset=4 - local.set $2 + local.set $1 i32.const 0 - local.set $3 - local.get $1 + local.set $2 + local.get $0 call $~lib/typedarray/Float32Array#get:length i32.const 1 i32.sub - local.set $4 + local.set $3 loop $for-loop|0 + local.get $2 local.get $3 - local.get $4 i32.lt_u - local.set $5 - local.get $5 + local.set $4 + local.get $4 if + local.get $1 local.get $2 - local.get $3 i32.const 2 i32.shl i32.add - local.set $6 - local.get $2 - local.get $4 + local.set $5 + local.get $1 + local.get $3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $6 + local.set $6 + local.get $5 f32.load - local.set $8 + local.set $7 + local.get $5 local.get $6 - local.get $7 f32.load f32.store + local.get $6 local.get $7 - local.get $8 f32.store - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 - local.get $4 + local.set $2 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $for-loop|0 end end - local.get $1 + local.get $0 ) - (func $~lib/typedarray/Float32Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (param $0 i32) (result i32) + local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Float32Array,f32> + ) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.set $0 + local.get $0 call $~lib/typedarray/Float32Array#get:length - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.const 0 i32.lt_s if (result i32) - local.get $6 - local.get $4 + local.get $3 + local.get $1 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $1 + local.tee $4 + local.get $3 + local.tee $5 local.get $4 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.lt_s select end - local.set $4 - local.get $3 + local.set $1 + local.get $2 i32.const 0 i32.lt_s if (result i32) - local.get $6 local.get $3 + local.get $2 i32.add - local.tee $7 + local.tee $4 i32.const 0 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.gt_s select else + local.get $2 + local.tee $4 local.get $3 - local.tee $7 - local.get $6 - local.tee $8 - local.get $7 - local.get $8 + local.tee $5 + local.get $4 + local.get $5 i32.lt_s select end - local.set $3 - local.get $3 - local.tee $7 + local.set $2 + local.get $2 + local.tee $4 + local.get $1 + local.tee $5 local.get $4 - local.tee $8 - local.get $7 - local.get $8 + local.get $5 i32.gt_s select - local.set $3 + local.set $2 i32.const 12 i32.const 12 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $7 - local.get $5 + local.set $6 + local.get $6 + local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $7 - local.get $5 + local.get $6 + local.get $0 i32.load offset=4 - local.get $4 + local.get $1 i32.const 2 i32.shl i32.add i32.store offset=4 - local.get $7 - local.get $3 - local.get $4 + local.get $6 + local.get $2 + local.get $1 i32.sub i32.const 2 i32.shl i32.store offset=8 - local.get $7 + local.get $6 call $~lib/rt/pure/__retain - local.set $8 - local.get $5 + local.set $4 + local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $4 + ) + (func $~lib/typedarray/Float32Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Float32Array,f32> ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (local $0 i32) @@ -23791,69 +23602,72 @@ local.get $8 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Float64Array,f64> (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 f64) + (local $7 f64) local.get $0 call $~lib/rt/pure/__retain - local.set $1 - local.get $1 + local.set $0 + local.get $0 i32.load offset=4 - local.set $2 + local.set $1 i32.const 0 - local.set $3 - local.get $1 + local.set $2 + local.get $0 call $~lib/typedarray/Float64Array#get:length i32.const 1 i32.sub - local.set $4 + local.set $3 loop $for-loop|0 + local.get $2 local.get $3 - local.get $4 i32.lt_u - local.set $5 - local.get $5 + local.set $4 + local.get $4 if + local.get $1 local.get $2 - local.get $3 i32.const 3 i32.shl i32.add - local.set $6 - local.get $2 - local.get $4 + local.set $5 + local.get $1 + local.get $3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $6 + local.set $6 + local.get $5 f64.load - local.set $8 + local.set $7 + local.get $5 local.get $6 - local.get $7 f64.load f64.store + local.get $6 local.get $7 - local.get $8 f64.store - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 - local.get $4 + local.set $2 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $for-loop|0 end end - local.get $1 + local.get $0 + ) + (func $~lib/typedarray/Float64Array#reverse (param $0 i32) (result i32) + local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Float64Array,f64> ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (local $0 i32) @@ -24031,201 +23845,195 @@ local.get $8 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> (param $0 i32) (param $1 i32) (param $2 i32) (result 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) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Int8Array#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else local.get $3 - local.set $6 + local.get $4 + i32.ge_s + end + if + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release local.get $5 - call $~lib/typedarray/Int8Array#get:length - local.set $7 - local.get $7 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add + local.tee $5 i32.const 0 - i32.eq - if (result i32) - i32.const 1 - else - local.get $6 - local.get $7 - i32.ge_s - end - if - i32.const -1 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 - end + local.tee $6 + local.get $5 local.get $6 - i32.const 0 + i32.gt_s + select + local.set $3 + end + local.get $0 + i32.load offset=4 + local.set $7 + loop $while-continue|0 + local.get $3 + local.get $4 i32.lt_s + local.set $5 + local.get $5 if local.get $7 - local.get $6 - i32.add - local.tee $8 + local.get $3 i32.const 0 - local.tee $9 - local.get $8 - local.get $9 - i32.gt_s - select - local.set $6 - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.lt_s - local.set $9 - local.get $9 + i32.shl + i32.add + i32.load8_s + local.get $1 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.eq if - local.get $8 - local.get $6 - i32.const 0 - i32.shl - i32.add - i32.load8_s - local.get $4 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.eq - if - local.get $6 - local.set $10 - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 - end - local.get $6 - i32.const 1 - i32.add + local.get $3 local.set $6 - br $while-continue|0 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $while-continue|0 end - i32.const -1 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 end + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 ) - (func $~lib/typedarray/Int8Array#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> + ) + (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> (param $0 i32) (param $1 i32) (param $2 i32) (result 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) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Int8Array#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if + i32.const -1 local.set $5 - local.get $1 - local.set $4 - local.get $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add local.set $3 + else local.get $3 - local.set $6 - local.get $5 - call $~lib/typedarray/Int8Array#get:length - local.set $7 - local.get $7 - i32.const 0 - i32.eq + local.get $4 + i32.ge_s if - i32.const -1 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 + local.get $4 + i32.const 1 + i32.sub + local.set $3 end - local.get $6 + end + local.get $0 + i32.load offset=4 + local.set $6 + loop $while-continue|0 + local.get $3 i32.const 0 - i32.lt_s + i32.ge_s + local.set $5 + local.get $5 if - local.get $7 local.get $6 + local.get $3 + i32.const 0 + i32.shl i32.add - local.set $6 - else - local.get $6 - local.get $7 - i32.ge_s + i32.load8_s + local.get $1 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.eq if + local.get $3 + local.set $7 + local.get $0 + call $~lib/rt/pure/__release local.get $7 - i32.const 1 - i32.sub - local.set $6 - end - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 - i32.const 0 - i32.ge_s - local.set $9 - local.get $9 - if - local.get $8 - local.get $6 - i32.const 0 - i32.shl - i32.add - i32.load8_s - local.get $4 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.eq - if - local.get $6 - local.set $10 - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 - end - local.get $6 - i32.const 1 - i32.sub - local.set $6 - br $while-continue|0 + return end + local.get $3 + i32.const 1 + i32.sub + local.set $3 + br $while-continue|0 end - i32.const -1 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 end + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + ) + (func $~lib/typedarray/Int8Array#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> ) (func $~lib/typedarray/Int8Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $1of1 @@ -24726,197 +24534,191 @@ local.get $6 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (param $2 i32) (result 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) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint8Array#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else local.get $3 - local.set $6 + local.get $4 + i32.ge_s + end + if + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release local.get $5 - call $~lib/typedarray/Uint8Array#get:length - local.set $7 - local.get $7 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add + local.tee $5 i32.const 0 - i32.eq - if (result i32) - i32.const 1 - else - local.get $6 - local.get $7 - i32.ge_s - end - if - i32.const -1 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 - end + local.tee $6 + local.get $5 local.get $6 - i32.const 0 + i32.gt_s + select + local.set $3 + end + local.get $0 + i32.load offset=4 + local.set $7 + loop $while-continue|0 + local.get $3 + local.get $4 i32.lt_s + local.set $5 + local.get $5 if local.get $7 - local.get $6 - i32.add - local.tee $8 + local.get $3 i32.const 0 - local.tee $9 - local.get $8 - local.get $9 - i32.gt_s - select - local.set $6 - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.lt_s - local.set $9 - local.get $9 + i32.shl + i32.add + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq if - local.get $8 - local.get $6 - i32.const 0 - i32.shl - i32.add - i32.load8_u - local.get $4 - i32.const 255 - i32.and - i32.eq - if - local.get $6 - local.set $10 - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 - end - local.get $6 - i32.const 1 - i32.add + local.get $3 local.set $6 - br $while-continue|0 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $while-continue|0 end - i32.const -1 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 end + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 ) - (func $~lib/typedarray/Uint8Array#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8Array,u8> + ) + (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (param $2 i32) (result 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) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint8Array#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if + i32.const -1 local.set $5 - local.get $1 - local.set $4 - local.get $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add local.set $3 + else local.get $3 - local.set $6 - local.get $5 - call $~lib/typedarray/Uint8Array#get:length - local.set $7 - local.get $7 - i32.const 0 - i32.eq + local.get $4 + i32.ge_s if - i32.const -1 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 + local.get $4 + i32.const 1 + i32.sub + local.set $3 end - local.get $6 + end + local.get $0 + i32.load offset=4 + local.set $6 + loop $while-continue|0 + local.get $3 i32.const 0 - i32.lt_s + i32.ge_s + local.set $5 + local.get $5 if - local.get $7 local.get $6 + local.get $3 + i32.const 0 + i32.shl i32.add - local.set $6 - else - local.get $6 - local.get $7 - i32.ge_s + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq if + local.get $3 + local.set $7 + local.get $0 + call $~lib/rt/pure/__release local.get $7 - i32.const 1 - i32.sub - local.set $6 - end - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 - i32.const 0 - i32.ge_s - local.set $9 - local.get $9 - if - local.get $8 - local.get $6 - i32.const 0 - i32.shl - i32.add - i32.load8_u - local.get $4 - i32.const 255 - i32.and - i32.eq - if - local.get $6 - local.set $10 - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 - end - local.get $6 - i32.const 1 - i32.sub - local.set $6 - br $while-continue|0 + return end + local.get $3 + i32.const 1 + i32.sub + local.set $3 + br $while-continue|0 end - i32.const -1 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 end + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + ) + (func $~lib/typedarray/Uint8Array#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8> ) (func $~lib/typedarray/Uint8Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $1of1 @@ -25415,197 +25217,191 @@ local.get $6 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8ClampedArray,u8> (param $0 i32) (param $1 i32) (param $2 i32) (result 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) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint8ClampedArray#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else local.get $3 - local.set $6 + local.get $4 + i32.ge_s + end + if + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release local.get $5 - call $~lib/typedarray/Uint8ClampedArray#get:length - local.set $7 - local.get $7 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add + local.tee $5 i32.const 0 - i32.eq - if (result i32) - i32.const 1 - else - local.get $6 - local.get $7 - i32.ge_s - end - if - i32.const -1 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 - end + local.tee $6 + local.get $5 local.get $6 - i32.const 0 + i32.gt_s + select + local.set $3 + end + local.get $0 + i32.load offset=4 + local.set $7 + loop $while-continue|0 + local.get $3 + local.get $4 i32.lt_s + local.set $5 + local.get $5 if local.get $7 - local.get $6 - i32.add - local.tee $8 + local.get $3 i32.const 0 - local.tee $9 - local.get $8 - local.get $9 - i32.gt_s - select - local.set $6 - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.lt_s - local.set $9 - local.get $9 + i32.shl + i32.add + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq if - local.get $8 - local.get $6 - i32.const 0 - i32.shl - i32.add - i32.load8_u - local.get $4 - i32.const 255 - i32.and - i32.eq - if - local.get $6 - local.set $10 - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 - end - local.get $6 - i32.const 1 - i32.add + local.get $3 local.set $6 - br $while-continue|0 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $while-continue|0 end - i32.const -1 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 end + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 ) - (func $~lib/typedarray/Uint8ClampedArray#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8ClampedArray,u8> + ) + (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8ClampedArray,u8> (param $0 i32) (param $1 i32) (param $2 i32) (result 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) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint8ClampedArray#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if + i32.const -1 local.set $5 - local.get $1 - local.set $4 - local.get $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add local.set $3 + else local.get $3 - local.set $6 - local.get $5 - call $~lib/typedarray/Uint8ClampedArray#get:length - local.set $7 - local.get $7 - i32.const 0 - i32.eq + local.get $4 + i32.ge_s if - i32.const -1 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 + local.get $4 + i32.const 1 + i32.sub + local.set $3 end - local.get $6 + end + local.get $0 + i32.load offset=4 + local.set $6 + loop $while-continue|0 + local.get $3 i32.const 0 - i32.lt_s + i32.ge_s + local.set $5 + local.get $5 if - local.get $7 local.get $6 + local.get $3 + i32.const 0 + i32.shl i32.add - local.set $6 - else - local.get $6 - local.get $7 - i32.ge_s + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq if + local.get $3 + local.set $7 + local.get $0 + call $~lib/rt/pure/__release local.get $7 - i32.const 1 - i32.sub - local.set $6 - end - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 - i32.const 0 - i32.ge_s - local.set $9 - local.get $9 - if - local.get $8 - local.get $6 - i32.const 0 - i32.shl - i32.add - i32.load8_u - local.get $4 - i32.const 255 - i32.and - i32.eq - if - local.get $6 - local.set $10 - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 - end - local.get $6 - i32.const 1 - i32.sub - local.set $6 - br $while-continue|0 + return end + local.get $3 + i32.const 1 + i32.sub + local.set $3 + br $while-continue|0 end - i32.const -1 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 end + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + ) + (func $~lib/typedarray/Uint8ClampedArray#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8ClampedArray,u8> ) (func $~lib/typedarray/Uint8ClampedArray#lastIndexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $1of1 @@ -26104,201 +25900,195 @@ local.get $6 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (param $2 i32) (result 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) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Int16Array#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else local.get $3 - local.set $6 + local.get $4 + i32.ge_s + end + if + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release local.get $5 - call $~lib/typedarray/Int16Array#get:length - local.set $7 - local.get $7 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add + local.tee $5 i32.const 0 - i32.eq - if (result i32) - i32.const 1 - else - local.get $6 - local.get $7 - i32.ge_s - end - if - i32.const -1 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 - end + local.tee $6 + local.get $5 local.get $6 - i32.const 0 + i32.gt_s + select + local.set $3 + end + local.get $0 + i32.load offset=4 + local.set $7 + loop $while-continue|0 + local.get $3 + local.get $4 i32.lt_s + local.set $5 + local.get $5 if local.get $7 - local.get $6 + local.get $3 + i32.const 1 + i32.shl i32.add - local.tee $8 - i32.const 0 - local.tee $9 - local.get $8 - local.get $9 - i32.gt_s - select - local.set $6 - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.lt_s - local.set $9 - local.get $9 + i32.load16_s + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.eq if - local.get $8 - local.get $6 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.get $4 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.eq - if - local.get $6 - local.set $10 - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 - end - local.get $6 - i32.const 1 - i32.add + local.get $3 local.set $6 - br $while-continue|0 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $while-continue|0 end - i32.const -1 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 end + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 ) - (func $~lib/typedarray/Int16Array#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + ) + (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (param $2 i32) (result 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) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Int16Array#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if + i32.const -1 local.set $5 - local.get $1 - local.set $4 - local.get $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add local.set $3 + else local.get $3 - local.set $6 - local.get $5 - call $~lib/typedarray/Int16Array#get:length - local.set $7 - local.get $7 - i32.const 0 - i32.eq + local.get $4 + i32.ge_s if - i32.const -1 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 + local.get $4 + i32.const 1 + i32.sub + local.set $3 end - local.get $6 + end + local.get $0 + i32.load offset=4 + local.set $6 + loop $while-continue|0 + local.get $3 i32.const 0 - i32.lt_s + i32.ge_s + local.set $5 + local.get $5 if - local.get $7 local.get $6 + local.get $3 + i32.const 1 + i32.shl i32.add - local.set $6 - else - local.get $6 - local.get $7 - i32.ge_s + i32.load16_s + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.eq if + local.get $3 + local.set $7 + local.get $0 + call $~lib/rt/pure/__release local.get $7 - i32.const 1 - i32.sub - local.set $6 - end - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 - i32.const 0 - i32.ge_s - local.set $9 - local.get $9 - if - local.get $8 - local.get $6 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.get $4 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.eq - if - local.get $6 - local.set $10 - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 - end - local.get $6 - i32.const 1 - i32.sub - local.set $6 - br $while-continue|0 + return end + local.get $3 + i32.const 1 + i32.sub + local.set $3 + br $while-continue|0 end - i32.const -1 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 end + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + ) + (func $~lib/typedarray/Int16Array#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> ) (func $~lib/typedarray/Int16Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $1of1 @@ -26799,197 +26589,191 @@ local.get $6 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16> (param $0 i32) (param $1 i32) (param $2 i32) (result 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) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint16Array#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else local.get $3 - local.set $6 + local.get $4 + i32.ge_s + end + if + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release local.get $5 - call $~lib/typedarray/Uint16Array#get:length - local.set $7 - local.get $7 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add + local.tee $5 i32.const 0 - i32.eq - if (result i32) - i32.const 1 - else - local.get $6 - local.get $7 - i32.ge_s - end - if - i32.const -1 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 - end + local.tee $6 + local.get $5 local.get $6 - i32.const 0 + i32.gt_s + select + local.set $3 + end + local.get $0 + i32.load offset=4 + local.set $7 + loop $while-continue|0 + local.get $3 + local.get $4 i32.lt_s + local.set $5 + local.get $5 if local.get $7 - local.get $6 + local.get $3 + i32.const 1 + i32.shl i32.add - local.tee $8 - i32.const 0 - local.tee $9 - local.get $8 - local.get $9 - i32.gt_s - select - local.set $6 - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.lt_s - local.set $9 - local.get $9 + i32.load16_u + local.get $1 + i32.const 65535 + i32.and + i32.eq if - local.get $8 - local.get $6 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.get $4 - i32.const 65535 - i32.and - i32.eq - if - local.get $6 - local.set $10 - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 - end - local.get $6 - i32.const 1 - i32.add + local.get $3 local.set $6 - br $while-continue|0 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $while-continue|0 end - i32.const -1 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 end + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 ) - (func $~lib/typedarray/Uint16Array#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16> + ) + (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16> (param $0 i32) (param $1 i32) (param $2 i32) (result 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) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint16Array#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if + i32.const -1 local.set $5 - local.get $1 - local.set $4 - local.get $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add local.set $3 + else local.get $3 - local.set $6 - local.get $5 - call $~lib/typedarray/Uint16Array#get:length - local.set $7 - local.get $7 - i32.const 0 - i32.eq + local.get $4 + i32.ge_s if - i32.const -1 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 + local.get $4 + i32.const 1 + i32.sub + local.set $3 end - local.get $6 + end + local.get $0 + i32.load offset=4 + local.set $6 + loop $while-continue|0 + local.get $3 i32.const 0 - i32.lt_s + i32.ge_s + local.set $5 + local.get $5 if - local.get $7 local.get $6 + local.get $3 + i32.const 1 + i32.shl i32.add - local.set $6 - else - local.get $6 - local.get $7 - i32.ge_s + i32.load16_u + local.get $1 + i32.const 65535 + i32.and + i32.eq if + local.get $3 + local.set $7 + local.get $0 + call $~lib/rt/pure/__release local.get $7 - i32.const 1 - i32.sub - local.set $6 - end - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 - i32.const 0 - i32.ge_s - local.set $9 - local.get $9 - if - local.get $8 - local.get $6 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.get $4 - i32.const 65535 - i32.and - i32.eq - if - local.get $6 - local.set $10 - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 - end - local.get $6 - i32.const 1 - i32.sub - local.set $6 - br $while-continue|0 + return end + local.get $3 + i32.const 1 + i32.sub + local.set $3 + br $while-continue|0 end - i32.const -1 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 end + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + ) + (func $~lib/typedarray/Uint16Array#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16> ) (func $~lib/typedarray/Uint16Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $1of1 @@ -27488,193 +27272,187 @@ local.get $6 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (param $2 i32) (result 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) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Int32Array#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else local.get $3 - local.set $6 + local.get $4 + i32.ge_s + end + if + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release local.get $5 - call $~lib/typedarray/Int32Array#get:length - local.set $7 - local.get $7 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add + local.tee $5 i32.const 0 - i32.eq - if (result i32) - i32.const 1 - else - local.get $6 - local.get $7 - i32.ge_s - end - if - i32.const -1 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 - end + local.tee $6 + local.get $5 local.get $6 - i32.const 0 + i32.gt_s + select + local.set $3 + end + local.get $0 + i32.load offset=4 + local.set $7 + loop $while-continue|0 + local.get $3 + local.get $4 i32.lt_s + local.set $5 + local.get $5 if local.get $7 - local.get $6 + local.get $3 + i32.const 2 + i32.shl i32.add - local.tee $8 - i32.const 0 - local.tee $9 - local.get $8 - local.get $9 - i32.gt_s - select - local.set $6 - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.lt_s - local.set $9 - local.get $9 + i32.load + local.get $1 + i32.eq if - local.get $8 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load - local.get $4 - i32.eq - if - local.get $6 - local.set $10 - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 - end - local.get $6 - i32.const 1 - i32.add + local.get $3 local.set $6 - br $while-continue|0 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $while-continue|0 end - i32.const -1 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 end + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 ) - (func $~lib/typedarray/Int32Array#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + ) + (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (param $2 i32) (result 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) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Int32Array#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if + i32.const -1 local.set $5 - local.get $1 - local.set $4 - local.get $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add local.set $3 + else local.get $3 - local.set $6 - local.get $5 - call $~lib/typedarray/Int32Array#get:length - local.set $7 - local.get $7 - i32.const 0 - i32.eq + local.get $4 + i32.ge_s if - i32.const -1 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 + local.get $4 + i32.const 1 + i32.sub + local.set $3 end - local.get $6 + end + local.get $0 + i32.load offset=4 + local.set $6 + loop $while-continue|0 + local.get $3 i32.const 0 - i32.lt_s + i32.ge_s + local.set $5 + local.get $5 if - local.get $7 local.get $6 + local.get $3 + i32.const 2 + i32.shl i32.add - local.set $6 - else - local.get $6 - local.get $7 - i32.ge_s + i32.load + local.get $1 + i32.eq if + local.get $3 + local.set $7 + local.get $0 + call $~lib/rt/pure/__release local.get $7 - i32.const 1 - i32.sub - local.set $6 - end - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 - i32.const 0 - i32.ge_s - local.set $9 - local.get $9 - if - local.get $8 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load - local.get $4 - i32.eq - if - local.get $6 - local.set $10 - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 - end - local.get $6 - i32.const 1 - i32.sub - local.set $6 - br $while-continue|0 + return end + local.get $3 + i32.const 1 + i32.sub + local.set $3 + br $while-continue|0 end - i32.const -1 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 end + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + ) + (func $~lib/typedarray/Int32Array#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> ) (func $~lib/typedarray/Int32Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $1of1 @@ -28171,193 +27949,187 @@ local.get $6 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32> (param $0 i32) (param $1 i32) (param $2 i32) (result 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) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint32Array#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else local.get $3 - local.set $6 + local.get $4 + i32.ge_s + end + if + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release local.get $5 - call $~lib/typedarray/Uint32Array#get:length - local.set $7 - local.get $7 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add + local.tee $5 i32.const 0 - i32.eq - if (result i32) - i32.const 1 - else - local.get $6 - local.get $7 - i32.ge_s - end - if - i32.const -1 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.0 - end + local.tee $6 + local.get $5 local.get $6 - i32.const 0 + i32.gt_s + select + local.set $3 + end + local.get $0 + i32.load offset=4 + local.set $7 + loop $while-continue|0 + local.get $3 + local.get $4 i32.lt_s + local.set $5 + local.get $5 if local.get $7 - local.get $6 + local.get $3 + i32.const 2 + i32.shl i32.add - local.tee $8 - i32.const 0 - local.tee $9 - local.get $8 - local.get $9 - i32.gt_s - select - local.set $6 - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.lt_s - local.set $9 - local.get $9 + i32.load + local.get $1 + i32.eq if - local.get $8 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load - local.get $4 - i32.eq - if - local.get $6 - local.set $10 - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.0 - end - local.get $6 - i32.const 1 - i32.add + local.get $3 local.set $6 - br $while-continue|0 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $while-continue|0 end - i32.const -1 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 end + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 ) - (func $~lib/typedarray/Uint32Array#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32> + ) + (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32> (param $0 i32) (param $1 i32) (param $2 i32) (result 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) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint32Array#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if + i32.const -1 local.set $5 - local.get $1 - local.set $4 - local.get $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add local.set $3 + else local.get $3 - local.set $6 - local.get $5 - call $~lib/typedarray/Uint32Array#get:length - local.set $7 - local.get $7 - i32.const 0 - i32.eq + local.get $4 + i32.ge_s if - i32.const -1 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.0 + local.get $4 + i32.const 1 + i32.sub + local.set $3 end - local.get $6 + end + local.get $0 + i32.load offset=4 + local.set $6 + loop $while-continue|0 + local.get $3 i32.const 0 - i32.lt_s + i32.ge_s + local.set $5 + local.get $5 if - local.get $7 local.get $6 + local.get $3 + i32.const 2 + i32.shl i32.add - local.set $6 - else - local.get $6 - local.get $7 - i32.ge_s + i32.load + local.get $1 + i32.eq if + local.get $3 + local.set $7 + local.get $0 + call $~lib/rt/pure/__release local.get $7 - i32.const 1 - i32.sub - local.set $6 - end - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 - i32.const 0 - i32.ge_s - local.set $9 - local.get $9 - if - local.get $8 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load - local.get $4 - i32.eq - if - local.get $6 - local.set $10 - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.0 - end - local.get $6 - i32.const 1 - i32.sub - local.set $6 - br $while-continue|0 + return end + local.get $3 + i32.const 1 + i32.sub + local.set $3 + br $while-continue|0 end - i32.const -1 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 end + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + ) + (func $~lib/typedarray/Uint32Array#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32> ) (func $~lib/typedarray/Uint32Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $1of1 @@ -28854,193 +28626,187 @@ local.get $6 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#indexOf (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Int64Array#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else local.get $3 - local.set $6 + local.get $4 + i32.ge_s + end + if + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release local.get $5 - call $~lib/typedarray/Int64Array#get:length - local.set $7 - local.get $7 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add + local.tee $5 i32.const 0 - i32.eq - if (result i32) - i32.const 1 - else - local.get $6 - local.get $7 - i32.ge_s - end - if - i32.const -1 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 - end + local.tee $6 + local.get $5 local.get $6 - i32.const 0 + i32.gt_s + select + local.set $3 + end + local.get $0 + i32.load offset=4 + local.set $7 + loop $while-continue|0 + local.get $3 + local.get $4 i32.lt_s + local.set $5 + local.get $5 if local.get $7 - local.get $6 + local.get $3 + i32.const 3 + i32.shl i32.add - local.tee $8 - i32.const 0 - local.tee $9 - local.get $8 - local.get $9 - i32.gt_s - select - local.set $6 - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.lt_s - local.set $9 - local.get $9 + i64.load + local.get $1 + i64.eq if - local.get $8 - local.get $6 - i32.const 3 - i32.shl - i32.add - i64.load - local.get $4 - i64.eq - if - local.get $6 - local.set $10 - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 - end - local.get $6 - i32.const 1 - i32.add + local.get $3 local.set $6 - br $while-continue|0 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $while-continue|0 end - i32.const -1 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 end + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 ) - (func $~lib/typedarray/Int64Array#lastIndexOf (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#indexOf (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + ) + (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Int64Array#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if + i32.const -1 local.set $5 - local.get $1 - local.set $4 - local.get $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add local.set $3 + else local.get $3 - local.set $6 - local.get $5 - call $~lib/typedarray/Int64Array#get:length - local.set $7 - local.get $7 - i32.const 0 - i32.eq + local.get $4 + i32.ge_s if - i32.const -1 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 + local.get $4 + i32.const 1 + i32.sub + local.set $3 end - local.get $6 + end + local.get $0 + i32.load offset=4 + local.set $6 + loop $while-continue|0 + local.get $3 i32.const 0 - i32.lt_s + i32.ge_s + local.set $5 + local.get $5 if - local.get $7 local.get $6 + local.get $3 + i32.const 3 + i32.shl i32.add - local.set $6 - else - local.get $6 - local.get $7 - i32.ge_s + i64.load + local.get $1 + i64.eq if + local.get $3 + local.set $7 + local.get $0 + call $~lib/rt/pure/__release local.get $7 - i32.const 1 - i32.sub - local.set $6 - end - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 - i32.const 0 - i32.ge_s - local.set $9 - local.get $9 - if - local.get $8 - local.get $6 - i32.const 3 - i32.shl - i32.add - i64.load - local.get $4 - i64.eq - if - local.get $6 - local.set $10 - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 - end - local.get $6 - i32.const 1 - i32.sub - local.set $6 - br $while-continue|0 + return end + local.get $3 + i32.const 1 + i32.sub + local.set $3 + br $while-continue|0 end - i32.const -1 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 end + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + ) + (func $~lib/typedarray/Int64Array#lastIndexOf (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> ) (func $~lib/typedarray/Int64Array#lastIndexOf@varargs (param $0 i32) (param $1 i64) (param $2 i32) (result i32) block $1of1 @@ -29538,193 +29304,187 @@ local.get $6 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#indexOf (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint64Array,u64> (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint64Array,u64>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint64Array#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else local.get $3 - local.set $6 + local.get $4 + i32.ge_s + end + if + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release local.get $5 - call $~lib/typedarray/Uint64Array#get:length - local.set $7 - local.get $7 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add + local.tee $5 i32.const 0 - i32.eq - if (result i32) - i32.const 1 - else - local.get $6 - local.get $7 - i32.ge_s - end - if - i32.const -1 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint64Array,u64>|inlined.0 - end + local.tee $6 + local.get $5 local.get $6 - i32.const 0 + i32.gt_s + select + local.set $3 + end + local.get $0 + i32.load offset=4 + local.set $7 + loop $while-continue|0 + local.get $3 + local.get $4 i32.lt_s + local.set $5 + local.get $5 if local.get $7 - local.get $6 + local.get $3 + i32.const 3 + i32.shl i32.add - local.tee $8 - i32.const 0 - local.tee $9 - local.get $8 - local.get $9 - i32.gt_s - select - local.set $6 - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.lt_s - local.set $9 - local.get $9 + i64.load + local.get $1 + i64.eq if - local.get $8 - local.get $6 - i32.const 3 - i32.shl - i32.add - i64.load - local.get $4 - i64.eq - if - local.get $6 - local.set $10 - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint64Array,u64>|inlined.0 - end - local.get $6 - i32.const 1 - i32.add + local.get $3 local.set $6 - br $while-continue|0 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $while-continue|0 end - i32.const -1 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 end + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 ) - (func $~lib/typedarray/Uint64Array#lastIndexOf (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint64Array#indexOf (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint64Array,u64> + ) + (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint64Array,u64> (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint64Array,u64>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Uint64Array#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if + i32.const -1 local.set $5 - local.get $1 - local.set $4 - local.get $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add local.set $3 + else local.get $3 - local.set $6 - local.get $5 - call $~lib/typedarray/Uint64Array#get:length - local.set $7 - local.get $7 - i32.const 0 - i32.eq + local.get $4 + i32.ge_s if - i32.const -1 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint64Array,u64>|inlined.0 + local.get $4 + i32.const 1 + i32.sub + local.set $3 end - local.get $6 + end + local.get $0 + i32.load offset=4 + local.set $6 + loop $while-continue|0 + local.get $3 i32.const 0 - i32.lt_s + i32.ge_s + local.set $5 + local.get $5 if - local.get $7 local.get $6 + local.get $3 + i32.const 3 + i32.shl i32.add - local.set $6 - else - local.get $6 - local.get $7 - i32.ge_s + i64.load + local.get $1 + i64.eq if + local.get $3 + local.set $7 + local.get $0 + call $~lib/rt/pure/__release local.get $7 - i32.const 1 - i32.sub - local.set $6 - end - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 - i32.const 0 - i32.ge_s - local.set $9 - local.get $9 - if - local.get $8 - local.get $6 - i32.const 3 - i32.shl - i32.add - i64.load - local.get $4 - i64.eq - if - local.get $6 - local.set $10 - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint64Array,u64>|inlined.0 - end - local.get $6 - i32.const 1 - i32.sub - local.set $6 - br $while-continue|0 + return end + local.get $3 + i32.const 1 + i32.sub + local.set $3 + br $while-continue|0 end - i32.const -1 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 end + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + ) + (func $~lib/typedarray/Uint64Array#lastIndexOf (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint64Array,u64> ) (func $~lib/typedarray/Uint64Array#lastIndexOf@varargs (param $0 i32) (param $1 i64) (param $2 i32) (result i32) block $1of1 @@ -30222,193 +29982,187 @@ local.get $6 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#indexOf (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) - (local $4 f32) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Float32Array#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else local.get $3 - local.set $6 + local.get $4 + i32.ge_s + end + if + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release local.get $5 - call $~lib/typedarray/Float32Array#get:length - local.set $7 - local.get $7 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add + local.tee $5 i32.const 0 - i32.eq - if (result i32) - i32.const 1 - else - local.get $6 - local.get $7 - i32.ge_s - end - if - i32.const -1 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 - end + local.tee $6 + local.get $5 local.get $6 - i32.const 0 + i32.gt_s + select + local.set $3 + end + local.get $0 + i32.load offset=4 + local.set $7 + loop $while-continue|0 + local.get $3 + local.get $4 i32.lt_s + local.set $5 + local.get $5 if local.get $7 - local.get $6 + local.get $3 + i32.const 2 + i32.shl i32.add - local.tee $8 - i32.const 0 - local.tee $9 - local.get $8 - local.get $9 - i32.gt_s - select - local.set $6 - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.lt_s - local.set $9 - local.get $9 + f32.load + local.get $1 + f32.eq if - local.get $8 - local.get $6 - i32.const 2 - i32.shl - i32.add - f32.load - local.get $4 - f32.eq - if - local.get $6 - local.set $10 - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 - end - local.get $6 - i32.const 1 - i32.add + local.get $3 local.set $6 - br $while-continue|0 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $while-continue|0 end - i32.const -1 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 end + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 ) - (func $~lib/typedarray/Float32Array#lastIndexOf (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#indexOf (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + ) + (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) - (local $4 f32) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Float32Array#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if + i32.const -1 local.set $5 - local.get $1 - local.set $4 - local.get $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add local.set $3 + else local.get $3 - local.set $6 - local.get $5 - call $~lib/typedarray/Float32Array#get:length - local.set $7 - local.get $7 - i32.const 0 - i32.eq + local.get $4 + i32.ge_s if - i32.const -1 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 + local.get $4 + i32.const 1 + i32.sub + local.set $3 end - local.get $6 + end + local.get $0 + i32.load offset=4 + local.set $6 + loop $while-continue|0 + local.get $3 i32.const 0 - i32.lt_s + i32.ge_s + local.set $5 + local.get $5 if - local.get $7 local.get $6 + local.get $3 + i32.const 2 + i32.shl i32.add - local.set $6 - else - local.get $6 - local.get $7 - i32.ge_s + f32.load + local.get $1 + f32.eq if + local.get $3 + local.set $7 + local.get $0 + call $~lib/rt/pure/__release local.get $7 - i32.const 1 - i32.sub - local.set $6 - end - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 - i32.const 0 - i32.ge_s - local.set $9 - local.get $9 - if - local.get $8 - local.get $6 - i32.const 2 - i32.shl - i32.add - f32.load - local.get $4 - f32.eq - if - local.get $6 - local.set $10 - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 - end - local.get $6 - i32.const 1 - i32.sub - local.set $6 - br $while-continue|0 + return end + local.get $3 + i32.const 1 + i32.sub + local.set $3 + br $while-continue|0 end - i32.const -1 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 end + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + ) + (func $~lib/typedarray/Float32Array#lastIndexOf (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> ) (func $~lib/typedarray/Float32Array#lastIndexOf@varargs (param $0 i32) (param $1 f32) (param $2 i32) (result i32) block $1of1 @@ -30906,193 +30660,187 @@ local.get $6 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#indexOf (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) - (local $4 f64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Float64Array#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else local.get $3 - local.set $6 + local.get $4 + i32.ge_s + end + if + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release local.get $5 - call $~lib/typedarray/Float64Array#get:length - local.set $7 - local.get $7 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add + local.tee $5 i32.const 0 - i32.eq - if (result i32) - i32.const 1 - else - local.get $6 - local.get $7 - i32.ge_s - end - if - i32.const -1 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - end + local.tee $6 + local.get $5 local.get $6 - i32.const 0 + i32.gt_s + select + local.set $3 + end + local.get $0 + i32.load offset=4 + local.set $7 + loop $while-continue|0 + local.get $3 + local.get $4 i32.lt_s + local.set $5 + local.get $5 if local.get $7 - local.get $6 + local.get $3 + i32.const 3 + i32.shl i32.add - local.tee $8 - i32.const 0 - local.tee $9 - local.get $8 - local.get $9 - i32.gt_s - select - local.set $6 - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 - local.get $7 - i32.lt_s - local.set $9 - local.get $9 + f64.load + local.get $1 + f64.eq if - local.get $8 - local.get $6 - i32.const 3 - i32.shl - i32.add - f64.load - local.get $4 - f64.eq - if - local.get $6 - local.set $10 - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - end - local.get $6 - i32.const 1 - i32.add + local.get $3 local.set $6 - br $while-continue|0 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $while-continue|0 end - i32.const -1 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 end + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 ) - (func $~lib/typedarray/Float64Array#lastIndexOf (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#indexOf (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + ) + (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) - (local $4 f64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Float64Array#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if + i32.const -1 local.set $5 - local.get $1 - local.set $4 - local.get $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add local.set $3 + else local.get $3 - local.set $6 - local.get $5 - call $~lib/typedarray/Float64Array#get:length - local.set $7 - local.get $7 - i32.const 0 - i32.eq + local.get $4 + i32.ge_s if - i32.const -1 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $4 + i32.const 1 + i32.sub + local.set $3 end - local.get $6 + end + local.get $0 + i32.load offset=4 + local.set $6 + loop $while-continue|0 + local.get $3 i32.const 0 - i32.lt_s + i32.ge_s + local.set $5 + local.get $5 if - local.get $7 local.get $6 + local.get $3 + i32.const 3 + i32.shl i32.add - local.set $6 - else - local.get $6 - local.get $7 - i32.ge_s + f64.load + local.get $1 + f64.eq if + local.get $3 + local.set $7 + local.get $0 + call $~lib/rt/pure/__release local.get $7 - i32.const 1 - i32.sub - local.set $6 - end - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 - i32.const 0 - i32.ge_s - local.set $9 - local.get $9 - if - local.get $8 - local.get $6 - i32.const 3 - i32.shl - i32.add - f64.load - local.get $4 - f64.eq - if - local.get $6 - local.set $10 - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - end - local.get $6 - i32.const 1 - i32.sub - local.set $6 - br $while-continue|0 + return end + local.get $3 + i32.const 1 + i32.sub + local.set $3 + br $while-continue|0 end - i32.const -1 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 end + i32.const -1 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + ) + (func $~lib/typedarray/Float64Array#lastIndexOf (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> ) (func $~lib/typedarray/Float64Array#lastIndexOf@varargs (param $0 i32) (param $1 f64) (param $2 i32) (result i32) block $1of1 @@ -31590,231 +31338,225 @@ local.get $6 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#includes (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) - (local $4 f64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) + (local $7 f64) (local $8 i32) - (local $9 i32) - (local $10 f64) - (local $11 i32) - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + i32.const 1 + drop + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Float64Array#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if (result i32) i32.const 1 - drop + else local.get $3 - local.set $6 + local.get $4 + i32.ge_s + end + if + i32.const 0 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release local.get $5 - call $~lib/typedarray/Float64Array#get:length - local.set $7 - local.get $7 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add + local.tee $5 i32.const 0 - i32.eq - if (result i32) - i32.const 1 - else - local.get $6 - local.get $7 - i32.ge_s - end - if - i32.const 0 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - end + local.tee $6 + local.get $5 local.get $6 - i32.const 0 + i32.gt_s + select + local.set $3 + end + local.get $0 + i32.load offset=4 + local.set $5 + loop $while-continue|0 + local.get $3 + local.get $4 i32.lt_s + local.set $6 + local.get $6 if - local.get $7 - local.get $6 + local.get $5 + local.get $3 + i32.const 3 + i32.shl i32.add - local.tee $8 - i32.const 0 - local.tee $9 - local.get $8 - local.get $9 - i32.gt_s - select - local.set $6 - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 + f64.load + local.set $7 local.get $7 - i32.lt_s - local.set $9 - local.get $9 + local.get $1 + f64.eq + if (result i32) + i32.const 1 + else + local.get $7 + local.get $7 + f64.ne + local.get $1 + local.get $1 + f64.ne + i32.and + end if - local.get $8 - local.get $6 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $10 - local.get $10 - local.get $4 - f64.eq - if (result i32) - i32.const 1 - else - local.get $10 - local.get $10 - f64.ne - local.get $4 - local.get $4 - f64.ne - i32.and - end - if - i32.const 1 - local.set $11 - local.get $5 - call $~lib/rt/pure/__release - local.get $11 - br $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - end - local.get $6 i32.const 1 - i32.add - local.set $6 - br $while-continue|0 + local.set $8 + local.get $0 + call $~lib/rt/pure/__release + local.get $8 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $while-continue|0 end - i32.const 0 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 - br $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 end + i32.const 0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return ) - (func $~lib/typedarray/Float32Array#includes (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#includes (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64> + ) + (func $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) - (local $4 f32) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) + (local $7 f32) (local $8 i32) - (local $9 i32) - (local $10 f32) - (local $11 i32) - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + i32.const 1 + drop + local.get $2 + local.set $3 + local.get $0 + call $~lib/typedarray/Float32Array#get:length + local.set $4 + local.get $4 + i32.const 0 + i32.eq + if (result i32) i32.const 1 - drop + else local.get $3 - local.set $6 + local.get $4 + i32.ge_s + end + if + i32.const 0 + local.set $5 + local.get $0 + call $~lib/rt/pure/__release local.get $5 - call $~lib/typedarray/Float32Array#get:length - local.set $7 - local.get $7 + return + end + local.get $3 + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $3 + i32.add + local.tee $5 i32.const 0 - i32.eq - if (result i32) - i32.const 1 - else - local.get $6 - local.get $7 - i32.ge_s - end - if - i32.const 0 - local.set $8 - local.get $5 - call $~lib/rt/pure/__release - local.get $8 - br $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - end + local.tee $6 + local.get $5 local.get $6 - i32.const 0 + i32.gt_s + select + local.set $3 + end + local.get $0 + i32.load offset=4 + local.set $5 + loop $while-continue|0 + local.get $3 + local.get $4 i32.lt_s + local.set $6 + local.get $6 if - local.get $7 - local.get $6 + local.get $5 + local.get $3 + i32.const 2 + i32.shl i32.add - local.tee $8 - i32.const 0 - local.tee $9 - local.get $8 - local.get $9 - i32.gt_s - select - local.set $6 - end - local.get $5 - i32.load offset=4 - local.set $8 - loop $while-continue|0 - local.get $6 + f32.load + local.set $7 local.get $7 - i32.lt_s - local.set $9 - local.get $9 + local.get $1 + f32.eq + if (result i32) + i32.const 1 + else + local.get $7 + local.get $7 + f32.ne + local.get $1 + local.get $1 + f32.ne + i32.and + end if - local.get $8 - local.get $6 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $10 - local.get $10 - local.get $4 - f32.eq - if (result i32) - i32.const 1 - else - local.get $10 - local.get $10 - f32.ne - local.get $4 - local.get $4 - f32.ne - i32.and - end - if - i32.const 1 - local.set $11 - local.get $5 - call $~lib/rt/pure/__release - local.get $11 - br $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - end - local.get $6 i32.const 1 - i32.add - local.set $6 - br $while-continue|0 + local.set $8 + local.get $0 + call $~lib/rt/pure/__release + local.get $8 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $while-continue|0 end - i32.const 0 - local.set $9 - local.get $5 - call $~lib/rt/pure/__release - local.get $9 - br $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 end + i32.const 0 + local.set $6 + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + return + ) + (func $~lib/typedarray/Float32Array#includes (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32> ) (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) local.get $0 @@ -32011,13 +31753,20 @@ i32.store16 end ) + (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 0 + i32.const 1 + i32.ge_s + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa32_lut + ) (func $~lib/util/number/itoa32 (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 i32.eqz if @@ -32047,19 +31796,9 @@ call $~lib/rt/tlsf/__alloc local.set $3 local.get $3 - local.set $6 local.get $0 - local.set $5 local.get $2 - local.set $4 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $6 - local.get $5 - local.get $4 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core local.get $1 if local.get $3 @@ -32098,9 +31837,6 @@ (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) local.get $0 local.get $1 i32.const 1 @@ -32181,23 +31917,13 @@ i32.add local.set $4 local.get $0 - local.set $7 local.get $2 i32.const 24 i32.shl i32.const 24 i32.shr_s - local.set $6 local.get $4 - local.set $5 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $7 - local.get $6 - local.get $5 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core local.get $4 ) (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -32744,9 +32470,6 @@ (func $~lib/util/number/utoa32 (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 i32.eqz if @@ -32763,19 +32486,9 @@ call $~lib/rt/tlsf/__alloc local.set $2 local.get $2 - local.set $5 local.get $0 - local.set $4 local.get $1 - local.set $3 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core local.get $2 call $~lib/rt/pure/__retain ) @@ -32798,9 +32511,6 @@ (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) local.get $0 local.get $1 i32.const 1 @@ -32847,21 +32557,11 @@ i32.add local.set $4 local.get $0 - local.set $7 local.get $2 i32.const 255 i32.and - local.set $6 local.get $4 - local.set $5 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $7 - local.get $6 - local.get $5 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core local.get $4 ) (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -33212,9 +32912,6 @@ (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) local.get $0 local.get $1 i32.const 1 @@ -33295,23 +32992,13 @@ i32.add local.set $4 local.get $0 - local.set $7 local.get $2 i32.const 16 i32.shl i32.const 16 i32.shr_s - local.set $6 local.get $4 - local.set $5 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $7 - local.get $6 - local.get $5 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core local.get $4 ) (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -33568,9 +33255,6 @@ (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) local.get $0 local.get $1 i32.const 1 @@ -33617,21 +33301,11 @@ i32.add local.set $4 local.get $0 - local.set $7 local.get $2 i32.const 65535 i32.and - local.set $6 local.get $4 - local.set $5 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $7 - local.get $6 - local.get $5 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core local.get $4 ) (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -33886,9 +33560,6 @@ (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) local.get $0 local.get $1 i32.const 1 @@ -33953,332 +33624,309 @@ i32.add local.set $4 local.get $0 - local.set $7 local.get $2 + local.get $4 + call $~lib/util/number/utoa32_core + local.get $4 + ) + (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $1 + i32.const 1 + i32.sub + local.set $3 + local.get $3 + i32.const 0 + i32.lt_s + if + i32.const 1920 + local.set $4 + local.get $2 + call $~lib/rt/pure/__release + local.get $4 + return + end + local.get $3 + i32.eqz + if + local.get $0 + i32.load + call $~lib/util/number/itoa + local.tee $4 + local.set $5 + local.get $2 + call $~lib/rt/pure/__release + local.get $5 + return + end + local.get $2 + call $~lib/string/String#get:length local.set $6 + i32.const 11 + local.get $6 + i32.add + local.get $3 + i32.mul + i32.const 11 + i32.add + local.set $7 + local.get $7 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.set $8 + i32.const 0 + local.set $9 + i32.const 0 + local.set $4 + loop $for-loop|0 + local.get $4 + local.get $3 + i32.lt_s + local.set $5 + local.get $5 + if + local.get $0 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $10 + local.get $9 + local.get $8 + local.get $9 + local.get $10 + call $~lib/util/number/itoa_stream + i32.add + local.set $9 + local.get $6 + if + local.get $8 + local.get $9 + i32.const 1 + i32.shl + i32.add + local.get $2 + local.get $6 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $9 + local.get $6 + i32.add + local.set $9 + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 + end + end + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $10 + local.get $9 + local.get $8 + local.get $9 + local.get $10 + call $~lib/util/number/itoa_stream + i32.add + local.set $9 + local.get $7 + local.get $9 + i32.gt_s + if + local.get $8 + i32.const 0 + local.get $9 + call $~lib/string/String#substring + local.set $4 + local.get $2 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + local.get $4 + return + end + local.get $8 + local.set $4 + local.get $2 + call $~lib/rt/pure/__release local.get $4 - local.set $5 + ) + (func $~lib/typedarray/Int32Array#join (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + i32.load offset=4 + local.get $0 + call $~lib/typedarray/Int32Array#get:length + local.get $1 + call $~lib/util/string/joinIntegerArray + local.set $2 + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + ) + (func $~lib/typedarray/Int32Array#toString (param $0 i32) (result i32) + local.get $0 + i32.const 2368 + call $~lib/typedarray/Int32Array#join + ) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 0 + i32.const 5 + call $~lib/typedarray/Int32Array#constructor + local.tee $0 + call $~lib/rt/pure/__retain + local.set $1 + local.get $1 i32.const 0 i32.const 1 - i32.ge_s + 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 + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Int32Array#__set + i32.const 0 + drop + local.get $1 + i32.const 2368 + call $~lib/typedarray/Int32Array#join + local.tee $2 + i32.const 2400 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 629 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/typedarray/Int32Array#toString + local.tee $3 + i32.const 2400 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 630 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/util/number/itoa (param $0 i32) (result i32) + i32.const 1 + i32.eqz + drop + i32.const 0 + drop + i32.const 4 + i32.const 4 + i32.le_u + drop + local.get $0 + call $~lib/util/number/utoa32 + return + ) + (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.set $0 + i32.const 0 + local.set $3 + i32.const 0 + drop + i32.const 0 + i32.const 1 + i32.le_s + drop + i32.const 0 + drop + local.get $2 + i32.const 10 + i32.lt_u + if + local.get $0 + local.get $2 + i32.const 48 + i32.or + i32.store16 + i32.const 1 + return + end + local.get $3 + local.set $4 + i32.const 4 + i32.const 4 + i32.le_u drop - local.get $7 - local.get $6 - local.get $5 - call $~lib/util/number/utoa32_lut + local.get $4 + local.get $2 + call $~lib/util/number/decimalCount32 + i32.add + local.set $4 + local.get $0 + local.get $2 + local.get $4 + call $~lib/util/number/utoa32_core local.get $4 ) - (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $2 - call $~lib/rt/pure/__retain - local.set $2 - local.get $1 - i32.const 1 - i32.sub - local.set $3 - local.get $3 - i32.const 0 - i32.lt_s - if - i32.const 1920 - local.set $4 - local.get $2 - call $~lib/rt/pure/__release - local.get $4 - return - end - local.get $3 - i32.eqz - if - local.get $0 - i32.load - call $~lib/util/number/itoa - local.tee $4 - local.set $5 - local.get $2 - call $~lib/rt/pure/__release - local.get $5 - return - end - local.get $2 - call $~lib/string/String#get:length - local.set $6 - i32.const 11 - local.get $6 - i32.add - local.get $3 - i32.mul - i32.const 11 - i32.add - local.set $7 - local.get $7 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $4 - loop $for-loop|0 - local.get $4 - local.get $3 - i32.lt_s - local.set $5 - local.get $5 - if - local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load - local.set $10 - local.get $9 - local.get $8 - local.get $9 - local.get $10 - call $~lib/util/number/itoa_stream - i32.add - local.set $9 - local.get $6 - if - local.get $8 - local.get $9 - i32.const 1 - i32.shl - i32.add - local.get $2 - local.get $6 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $9 - local.get $6 - i32.add - local.set $9 - end - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 - end - end - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add - i32.load - local.set $10 - local.get $9 - local.get $8 - local.get $9 - local.get $10 - call $~lib/util/number/itoa_stream - i32.add - local.set $9 - local.get $7 - local.get $9 - i32.gt_s - if - local.get $8 - i32.const 0 - local.get $9 - call $~lib/string/String#substring - local.set $4 - local.get $2 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release - local.get $4 - return - end - local.get $8 - local.set $4 - local.get $2 - call $~lib/rt/pure/__release - local.get $4 - ) - (func $~lib/typedarray/Int32Array#join (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - i32.load offset=4 - local.get $0 - call $~lib/typedarray/Int32Array#get:length - local.get $1 - call $~lib/util/string/joinIntegerArray - local.set $2 - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - ) - (func $~lib/typedarray/Int32Array#toString (param $0 i32) (result i32) - local.get $0 - i32.const 2368 - call $~lib/typedarray/Int32Array#join - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 0 - i32.const 5 - call $~lib/typedarray/Int32Array#constructor - local.tee $0 - call $~lib/rt/pure/__retain - local.set $1 - local.get $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 - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Int32Array#__set - i32.const 0 - drop - local.get $1 - i32.const 2368 - call $~lib/typedarray/Int32Array#join - local.tee $2 - i32.const 2400 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 629 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/typedarray/Int32Array#toString - local.tee $3 - i32.const 2400 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 630 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/util/number/itoa (param $0 i32) (result i32) - i32.const 1 - i32.eqz - drop - i32.const 0 - drop - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $0 - call $~lib/util/number/utoa32 - return - ) - (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 - i32.const 0 - local.set $3 - i32.const 0 - drop - i32.const 0 - i32.const 1 - i32.le_s - drop - i32.const 0 - drop - local.get $2 - i32.const 10 - i32.lt_u - if - local.get $0 - local.get $2 - i32.const 48 - i32.or - i32.store16 - i32.const 1 - return - end - local.get $3 - local.set $4 - i32.const 4 - i32.const 4 - i32.le_u - drop - local.get $4 - local.get $2 - call $~lib/util/number/decimalCount32 - i32.add - local.set $4 - local.get $0 - local.set $7 - local.get $2 - local.set $6 - local.get $4 - local.set $5 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $7 - local.get $6 - local.get $5 - call $~lib/util/number/utoa32_lut - local.get $4 - ) - (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -34695,15 +34343,21 @@ local.get $2 call $~lib/util/number/utoa32_lut ) + (func $~lib/util/number/utoa64_core (param $0 i32) (param $1 i64) (param $2 i32) + i32.const 0 + i32.const 1 + i32.ge_s + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa64_lut + ) (func $~lib/util/number/itoa64 (param $0 i64) (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 i64) local.get $0 i64.const 0 i64.ne @@ -34744,19 +34398,9 @@ call $~lib/rt/tlsf/__alloc local.set $2 local.get $2 - local.set $7 local.get $3 - local.set $6 local.get $4 - local.set $5 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $7 - local.get $6 - local.get $5 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core else local.get $0 call $~lib/util/number/decimalCount64High @@ -34770,19 +34414,9 @@ call $~lib/rt/tlsf/__alloc local.set $2 local.get $2 - local.set $6 local.get $0 - local.set $8 local.get $4 - local.set $5 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $6 - local.get $8 - local.get $5 - call $~lib/util/number/utoa64_lut + call $~lib/util/number/utoa64_core end local.get $1 if @@ -34811,10 +34445,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) local.get $0 local.get $1 i32.const 1 @@ -34887,19 +34517,9 @@ i32.add local.set $4 local.get $0 - local.set $8 local.get $5 - local.set $7 local.get $4 - local.set $6 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $8 - local.get $7 - local.get $6 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core else local.get $4 local.get $2 @@ -34907,19 +34527,9 @@ i32.add local.set $4 local.get $0 - local.set $7 local.get $2 - local.set $9 local.get $4 - local.set $6 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $7 - local.get $9 - local.get $6 - call $~lib/util/number/utoa64_lut + call $~lib/util/number/utoa64_core end local.get $4 ) @@ -35162,10 +34772,6 @@ (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i64) local.get $0 i64.const 0 i64.ne @@ -35192,19 +34798,9 @@ call $~lib/rt/tlsf/__alloc local.set $1 local.get $1 - local.set $6 local.get $2 - local.set $5 local.get $3 - local.set $4 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $6 - local.get $5 - local.get $4 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core else local.get $0 call $~lib/util/number/decimalCount64High @@ -35216,19 +34812,9 @@ call $~lib/rt/tlsf/__alloc local.set $1 local.get $1 - local.set $5 local.get $0 - local.set $7 local.get $3 - local.set $4 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $5 - local.get $7 - local.get $4 - call $~lib/util/number/utoa64_lut + call $~lib/util/number/utoa64_core end local.get $1 call $~lib/rt/pure/__retain @@ -35251,10 +34837,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) local.get $0 local.get $1 i32.const 1 @@ -35303,19 +34885,9 @@ i32.add local.set $4 local.get $0 - local.set $8 local.get $5 - local.set $7 local.get $4 - local.set $6 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $8 - local.get $7 - local.get $6 - call $~lib/util/number/utoa32_lut + call $~lib/util/number/utoa32_core else local.get $4 local.get $2 @@ -35323,19 +34895,9 @@ i32.add local.set $4 local.get $0 - local.set $7 local.get $2 - local.set $9 local.get $4 - local.set $6 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $7 - local.get $9 - local.get $6 - call $~lib/util/number/utoa64_lut + call $~lib/util/number/utoa64_core end local.get $4 ) @@ -35574,6 +35136,248 @@ local.get $1 call $~lib/rt/pure/__release ) + (func $~lib/util/number/normalizedBoundaries (param $0 i64) (param $1 i32) + (local $2 i64) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i64.const 1 + i64.shl + i64.const 1 + i64.add + local.set $2 + local.get $1 + i32.const 1 + i32.sub + local.set $3 + local.get $2 + i64.clz + i32.wrap_i64 + local.set $4 + local.get $2 + local.get $4 + i64.extend_i32_s + i64.shl + local.set $2 + local.get $3 + local.get $4 + i32.sub + local.set $3 + i32.const 1 + local.get $0 + i64.const 4503599627370496 + i64.eq + i32.add + local.set $5 + local.get $2 + global.set $~lib/util/number/_frc_plus + local.get $0 + local.get $5 + i64.extend_i32_s + i64.shl + i64.const 1 + i64.sub + local.get $1 + local.get $5 + i32.sub + local.get $3 + i32.sub + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_minus + local.get $3 + global.set $~lib/util/number/_exp + ) + (func $~lib/util/number/getCachedPower (param $0 i32) + (local $1 f64) + (local $2 i32) + (local $3 i32) + i32.const -61 + local.get $0 + i32.sub + f64.convert_i32_s + f64.const 0.30102999566398114 + f64.mul + f64.const 347 + f64.add + local.set $1 + local.get $1 + i32.trunc_f64_s + local.set $2 + local.get $2 + local.get $2 + f64.convert_i32_s + local.get $1 + f64.ne + i32.add + local.set $2 + local.get $2 + i32.const 3 + i32.shr_s + i32.const 1 + i32.add + local.set $3 + i32.const 348 + local.get $3 + i32.const 3 + i32.shl + i32.sub + global.set $~lib/util/number/_K + i32.const 2576 + local.get $3 + i32.const 3 + i32.shl + i32.add + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 3272 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow + ) + (func $~lib/util/number/umul64f (param $0 i64) (param $1 i64) (result i64) + (local $2 i64) + (local $3 i64) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i64) + (local $8 i64) + local.get $0 + i64.const 4294967295 + i64.and + local.set $2 + local.get $1 + i64.const 4294967295 + i64.and + local.set $3 + local.get $0 + i64.const 32 + i64.shr_u + local.set $4 + local.get $1 + i64.const 32 + i64.shr_u + local.set $5 + local.get $2 + local.get $3 + i64.mul + local.set $6 + local.get $4 + local.get $3 + i64.mul + local.get $6 + i64.const 32 + i64.shr_u + i64.add + local.set $7 + local.get $2 + local.get $5 + i64.mul + local.get $7 + i64.const 4294967295 + i64.and + i64.add + local.set $8 + local.get $8 + i64.const 2147483647 + i64.add + local.set $8 + local.get $7 + i64.const 32 + i64.shr_u + local.set $7 + local.get $8 + i64.const 32 + i64.shr_u + local.set $8 + local.get $4 + local.get $5 + i64.mul + local.get $7 + i64.add + local.get $8 + i64.add + ) + (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.add + i32.const 64 + i32.add + ) + (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.set $6 + local.get $6 + i32.load16_u + local.set $7 + loop $while-continue|1 + local.get $3 + local.get $5 + i64.lt_u + if (result i32) + local.get $2 + local.get $3 + i64.sub + local.get $4 + i64.ge_u + else + i32.const 0 + end + if (result i32) + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.lt_u + if (result i32) + i32.const 1 + else + local.get $5 + local.get $3 + i64.sub + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.sub + i64.gt_u + end + else + i32.const 0 + end + local.set $8 + local.get $8 + if + local.get $7 + i32.const 1 + i32.sub + local.set $7 + local.get $3 + local.get $4 + i64.add + local.set $3 + br $while-continue|1 + end + end + local.get $6 + local.get $7 + i32.store16 + ) (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) @@ -35589,14 +35393,6 @@ (local $18 i32) (local $19 i64) (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i32) - (local $25 i32) - (local $26 i32) - (local $27 i32) - (local $28 i64) i32.const 0 local.get $4 i32.sub @@ -35836,13 +35632,9 @@ i32.add global.set $~lib/util/number/_K local.get $0 - local.set $24 local.get $15 - local.set $18 local.get $5 - local.set $23 local.get $19 - local.set $22 i32.const 3448 local.get $14 i32.const 2 @@ -35852,79 +35644,15 @@ local.get $7 i64.extend_i32_s i64.shl - local.set $21 local.get $10 - local.set $20 - local.get $24 - local.get $18 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.set $25 - local.get $25 - i32.load16_u - local.set $26 - loop $while-continue|3 - local.get $22 - local.get $20 - i64.lt_u - if (result i32) - local.get $23 - local.get $22 - i64.sub - local.get $21 - i64.ge_u - else - i32.const 0 - end - if (result i32) - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.lt_u - if (result i32) - i32.const 1 - else - local.get $20 - local.get $22 - i64.sub - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.sub - i64.gt_u - end - else - i32.const 0 - end - local.set $27 - local.get $27 - if - local.get $26 - i32.const 1 - i32.sub - local.set $26 - local.get $22 - local.get $21 - i64.add - local.set $22 - br $while-continue|3 - end - end - local.get $25 - local.get $26 - i32.store16 + call $~lib/util/number/grisuRound local.get $15 return end br $while-continue|0 end end - loop $while-continue|4 + loop $while-continue|2 i32.const 1 local.set $16 local.get $16 @@ -35941,8 +35669,8 @@ local.get $7 i64.extend_i32_s i64.shr_u - local.set $23 - local.get $23 + local.set $20 + local.get $20 local.get $15 i64.extend_i32_s i64.or @@ -35951,16 +35679,16 @@ if local.get $0 local.get $15 - local.tee $26 + local.tee $18 i32.const 1 i32.add local.set $15 - local.get $26 + local.get $18 i32.const 1 i32.shl i32.add i32.const 48 - local.get $23 + local.get $20 i32.wrap_i64 i32.const 65535 i32.and @@ -35995,98 +35723,161 @@ i64.mul local.set $10 local.get $0 - local.set $18 local.get $15 - local.set $27 local.get $5 - local.set $28 local.get $13 - local.set $22 local.get $8 - local.set $21 local.get $10 - local.set $20 - local.get $18 - local.get $27 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.set $26 - local.get $26 - i32.load16_u - local.set $25 - loop $while-continue|6 - local.get $22 - local.get $20 - i64.lt_u - if (result i32) - local.get $28 - local.get $22 - i64.sub - local.get $21 - i64.ge_u - else - i32.const 0 - end - if (result i32) - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.lt_u - if (result i32) - i32.const 1 - else - local.get $20 - local.get $22 - i64.sub - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.sub - i64.gt_u - end - else - i32.const 0 - end - local.set $24 - local.get $24 - if - local.get $25 - i32.const 1 - i32.sub - local.set $25 - local.get $22 - local.get $21 - i64.add - local.set $22 - br $while-continue|6 - end - end - local.get $26 - local.get $25 - i32.store16 + call $~lib/util/number/grisuRound local.get $15 return end - br $while-continue|4 + br $while-continue|2 end end unreachable ) + (func $~lib/util/number/grisu2 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (local $3 i64) + (local $4 i32) + (local $5 i64) + (local $6 i64) + (local $7 i32) + (local $8 i64) + (local $9 i32) + (local $10 i64) + (local $11 i32) + (local $12 i64) + (local $13 i32) + (local $14 i64) + (local $15 i64) + local.get $0 + i64.reinterpret_f64 + local.set $3 + local.get $3 + i64.const 9218868437227405312 + i64.and + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.set $4 + local.get $3 + i64.const 4503599627370495 + i64.and + local.set $5 + local.get $4 + i32.const 0 + i32.ne + i64.extend_i32_u + i64.const 52 + i64.shl + local.get $5 + i64.add + local.set $6 + local.get $4 + i32.const 1 + local.get $4 + select + i32.const 1023 + i32.const 52 + i32.add + i32.sub + local.set $4 + local.get $6 + local.get $4 + call $~lib/util/number/normalizedBoundaries + global.get $~lib/util/number/_exp + call $~lib/util/number/getCachedPower + local.get $6 + i64.clz + i32.wrap_i64 + local.set $7 + local.get $6 + local.get $7 + i64.extend_i32_s + i64.shl + local.set $6 + local.get $4 + local.get $7 + i32.sub + local.set $4 + global.get $~lib/util/number/_frc_pow + local.set $8 + global.get $~lib/util/number/_exp_pow + local.set $9 + local.get $6 + local.get $8 + call $~lib/util/number/umul64f + local.set $10 + local.get $4 + local.get $9 + call $~lib/util/number/umul64e + local.set $11 + global.get $~lib/util/number/_frc_plus + local.get $8 + call $~lib/util/number/umul64f + i64.const 1 + i64.sub + local.set $12 + global.get $~lib/util/number/_exp + local.get $9 + call $~lib/util/number/umul64e + local.set $13 + global.get $~lib/util/number/_frc_minus + local.get $8 + call $~lib/util/number/umul64f + i64.const 1 + i64.add + local.set $14 + local.get $12 + local.get $14 + i64.sub + local.set $15 + local.get $1 + local.get $10 + local.get $11 + local.get $12 + local.get $13 + local.get $15 + local.get $2 + call $~lib/util/number/genDigits + ) + (func $~lib/util/number/genExponent (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.set $2 + local.get $2 + if + i32.const 0 + local.get $1 + i32.sub + local.set $1 + end + local.get $1 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.set $3 + local.get $0 + local.get $1 + local.get $3 + call $~lib/util/number/utoa32_core + local.get $0 + i32.const 45 + i32.const 43 + local.get $2 + select + i32.store16 + local.get $3 + ) (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $11 i32) local.get $2 i32.eqz if @@ -36269,48 +36060,10 @@ local.get $0 i32.const 4 i32.add - local.set $5 local.get $3 i32.const 1 i32.sub - local.set $6 - local.get $6 - i32.const 0 - i32.lt_s - local.set $4 - local.get $4 - if - i32.const 0 - local.get $6 - i32.sub - local.set $6 - end - local.get $6 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.set $7 - local.get $5 - local.set $10 - local.get $6 - local.set $9 - local.get $7 - local.set $8 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $10 - local.get $9 - local.get $8 - call $~lib/util/number/utoa32_lut - local.get $5 - i32.const 45 - i32.const 43 - local.get $4 - select - i32.store16 - local.get $7 + call $~lib/util/number/genExponent local.set $1 local.get $1 i32.const 2 @@ -36320,14 +36073,14 @@ local.get $1 i32.const 1 i32.shl - local.set $7 + local.set $4 local.get $0 i32.const 4 i32.add local.get $0 i32.const 2 i32.add - local.get $7 + local.get $4 i32.const 2 i32.sub call $~lib/memory/memory.copy @@ -36335,58 +36088,20 @@ i32.const 46 i32.store16 offset=2 local.get $0 - local.get $7 + local.get $4 i32.add i32.const 101 i32.store16 offset=2 local.get $1 local.get $0 - local.get $7 + local.get $4 i32.add i32.const 4 i32.add - local.set $9 local.get $3 i32.const 1 i32.sub - local.set $8 - local.get $8 - i32.const 0 - i32.lt_s - local.set $4 - local.get $4 - if - i32.const 0 - local.get $8 - i32.sub - local.set $8 - end - local.get $8 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.set $5 - local.get $9 - local.set $11 - local.get $8 - local.set $6 - local.get $5 - local.set $10 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $11 - local.get $6 - local.get $10 - call $~lib/util/number/utoa32_lut - local.get $9 - i32.const 45 - i32.const 43 - local.get $4 - select - i32.store16 - local.get $5 + call $~lib/util/number/genExponent i32.add local.set $1 local.get $1 @@ -36405,31 +36120,6 @@ (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i64) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i64) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i64) - (local $25 i64) - (local $26 i32) - (local $27 i64) - (local $28 i32) local.get $1 f64.const 0 f64.lt @@ -36444,387 +36134,22 @@ i32.store16 end local.get $1 - local.set $5 local.get $0 - local.set $4 local.get $2 + call $~lib/util/number/grisu2 local.set $3 - local.get $5 - i64.reinterpret_f64 - local.set $6 - local.get $6 - i64.const 9218868437227405312 - i64.and - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.set $7 - local.get $6 - i64.const 4503599627370495 - i64.and - local.set $8 - local.get $7 - i32.const 0 - i32.ne - i64.extend_i32_u - i64.const 52 - i64.shl - local.get $8 - i64.add - local.set $9 - local.get $7 - i32.const 1 - local.get $7 - select - i32.const 1023 - i32.const 52 - i32.add - i32.sub - local.set $7 - local.get $9 - local.set $11 - local.get $7 - local.set $10 - local.get $11 - i64.const 1 - i64.shl - i64.const 1 - i64.add - local.set $12 - local.get $10 - i32.const 1 - i32.sub - local.set $13 - local.get $12 - i64.clz - i32.wrap_i64 - local.set $14 - local.get $12 - local.get $14 - i64.extend_i32_s - i64.shl - local.set $12 - local.get $13 - local.get $14 - i32.sub - local.set $13 - i32.const 1 - local.get $11 - i64.const 4503599627370496 - i64.eq - i32.add - local.set $15 - local.get $12 - global.set $~lib/util/number/_frc_plus - local.get $11 - local.get $15 - i64.extend_i32_s - i64.shl - i64.const 1 - i64.sub - local.get $10 - local.get $15 - i32.sub - local.get $13 - i32.sub - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_minus - local.get $13 - global.set $~lib/util/number/_exp - global.get $~lib/util/number/_exp - local.set $10 - i32.const -61 - local.get $10 - i32.sub - f64.convert_i32_s - f64.const 0.30102999566398114 - f64.mul - f64.const 347 - f64.add - local.set $16 - local.get $16 - i32.trunc_f64_s - local.set $15 - local.get $15 - local.get $15 - f64.convert_i32_s - local.get $16 - f64.ne - i32.add - local.set $15 - local.get $15 - i32.const 3 - i32.shr_s - i32.const 1 - i32.add - local.set $14 - i32.const 348 - local.get $14 - i32.const 3 - i32.shl - i32.sub - global.set $~lib/util/number/_K - i32.const 2576 - local.get $14 - i32.const 3 - i32.shl - i32.add - i64.load - global.set $~lib/util/number/_frc_pow - i32.const 3272 - local.get $14 - i32.const 1 - i32.shl - i32.add - i32.load16_s - global.set $~lib/util/number/_exp_pow - local.get $9 - i64.clz - i32.wrap_i64 - local.set $14 - local.get $9 - local.get $14 - i64.extend_i32_s - i64.shl - local.set $9 - local.get $7 - local.get $14 - i32.sub - local.set $7 - global.get $~lib/util/number/_frc_pow - local.set $12 - global.get $~lib/util/number/_exp_pow - local.set $15 - local.get $9 - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $18 - local.get $11 - i64.const 4294967295 - i64.and - local.set $19 - local.get $17 - i64.const 32 - i64.shr_u - local.set $20 - local.get $11 - i64.const 32 - i64.shr_u - local.set $21 - local.get $18 - local.get $19 - i64.mul - local.set $22 - local.get $20 - local.get $19 - i64.mul - local.get $22 - i64.const 32 - i64.shr_u - i64.add - local.set $23 - local.get $18 - local.get $21 - i64.mul - local.get $23 - i64.const 4294967295 - i64.and - i64.add - local.set $24 - local.get $24 - i64.const 2147483647 - i64.add - local.set $24 - local.get $23 - i64.const 32 - i64.shr_u - local.set $23 - local.get $24 - i64.const 32 - i64.shr_u - local.set $24 - local.get $20 - local.get $21 - i64.mul - local.get $23 - i64.add - local.get $24 - i64.add - local.set $24 - local.get $7 - local.set $10 - local.get $15 - local.set $13 - local.get $10 - local.get $13 - i32.add - i32.const 64 - i32.add - local.set $10 - global.get $~lib/util/number/_frc_plus - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $23 - local.get $11 - i64.const 4294967295 - i64.and - local.set $22 - local.get $17 - i64.const 32 - i64.shr_u - local.set $21 - local.get $11 - i64.const 32 - i64.shr_u - local.set $20 - local.get $23 - local.get $22 - i64.mul - local.set $19 - local.get $21 - local.get $22 - i64.mul - local.get $19 - i64.const 32 - i64.shr_u - i64.add - local.set $18 - local.get $23 - local.get $20 - i64.mul - local.get $18 - i64.const 4294967295 - i64.and - i64.add - local.set $25 - local.get $25 - i64.const 2147483647 - i64.add - local.set $25 - local.get $18 - i64.const 32 - i64.shr_u - local.set $18 - local.get $25 - i64.const 32 - i64.shr_u - local.set $25 - local.get $21 - local.get $20 - i64.mul - local.get $18 - i64.add - local.get $25 - i64.add - i64.const 1 - i64.sub - local.set $25 - global.get $~lib/util/number/_exp - local.set $26 - local.get $15 - local.set $13 - local.get $26 - local.get $13 - i32.add - i32.const 64 - i32.add - local.set $26 - global.get $~lib/util/number/_frc_minus - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $18 - local.get $11 - i64.const 4294967295 - i64.and - local.set $19 - local.get $17 - i64.const 32 - i64.shr_u - local.set $20 - local.get $11 - i64.const 32 - i64.shr_u - local.set $21 - local.get $18 - local.get $19 - i64.mul - local.set $22 - local.get $20 - local.get $19 - i64.mul - local.get $22 - i64.const 32 - i64.shr_u - i64.add - local.set $23 - local.get $18 - local.get $21 - i64.mul - local.get $23 - i64.const 4294967295 - i64.and - i64.add - local.set $27 - local.get $27 - i64.const 2147483647 - i64.add - local.set $27 - local.get $23 - i64.const 32 - i64.shr_u - local.set $23 - local.get $27 - i64.const 32 - i64.shr_u - local.set $27 - local.get $20 - local.get $21 - i64.mul - local.get $23 - i64.add - local.get $27 - i64.add - i64.const 1 - i64.add - local.set $27 - local.get $25 - local.get $27 - i64.sub - local.set $23 - local.get $4 - local.get $24 - local.get $10 - local.get $25 - local.get $26 - local.get $23 - local.get $3 - call $~lib/util/number/genDigits - local.set $28 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $28 + local.get $3 local.get $2 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.set $28 - local.get $28 + local.set $3 + local.get $3 local.get $2 i32.add ) @@ -37470,95 +36795,85 @@ i32.sub i32.load offset=12 ) - (func $~lib/typedarray/Uint8Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/WRAP<~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $0 local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.set $7 + local.set $4 + local.get $1 local.get $4 - local.get $7 i32.gt_u - local.get $4 + local.get $1 i32.const 0 i32.and i32.or if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1741 + i32.const 1705 i32.const 5 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $3 + local.get $2 i32.const -1 i32.eq if - local.get $7 + local.get $4 i32.const 0 i32.and if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1746 + i32.const 1710 i32.const 9 call $~lib/builtins/abort unreachable end - local.get $7 local.get $4 + local.get $1 i32.sub - local.set $6 + local.set $3 else - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1750 + i32.const 1714 i32.const 7 call $~lib/builtins/abort unreachable end else - local.get $3 + local.get $2 i32.const 0 i32.shl - local.set $6 - local.get $4 - local.get $6 + local.set $3 + local.get $1 + local.get $3 i32.add - local.get $7 + local.get $4 i32.gt_s if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1755 + i32.const 1719 i32.const 7 call $~lib/builtins/abort unreachable @@ -37567,29 +36882,39 @@ i32.const 12 i32.const 4 call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 + local.set $5 local.get $5 + local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $8 - local.get $6 + local.get $5 + local.get $3 i32.store offset=8 - local.get $8 local.get $5 - local.get $4 + local.get $0 + local.get $1 i32.add i32.store offset=4 - local.get $8 - call $~lib/rt/pure/__retain - local.set $9 local.get $5 + call $~lib/rt/pure/__retain + local.set $6 + local.get $0 call $~lib/rt/pure/__release - local.get $9 - local.set $8 + local.get $6 + ) + (func $~lib/typedarray/Uint8Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/WRAP<~lib/typedarray/Uint8Array,u8> + local.set $3 local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $3 ) (func $~lib/typedarray/Uint8Array.wrap@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $2of2 @@ -37697,95 +37022,85 @@ local.get $7 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int8Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/WRAP<~lib/typedarray/Int8Array,i8> (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $0 local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.set $7 + local.set $4 + local.get $1 local.get $4 - local.get $7 i32.gt_u - local.get $4 + local.get $1 i32.const 0 i32.and i32.or if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1741 + i32.const 1705 i32.const 5 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $3 + local.get $2 i32.const -1 i32.eq if - local.get $7 + local.get $4 i32.const 0 i32.and if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1746 + i32.const 1710 i32.const 9 call $~lib/builtins/abort unreachable end - local.get $7 local.get $4 + local.get $1 i32.sub - local.set $6 + local.set $3 else - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1750 + i32.const 1714 i32.const 7 call $~lib/builtins/abort unreachable end else - local.get $3 + local.get $2 i32.const 0 i32.shl - local.set $6 - local.get $4 - local.get $6 + local.set $3 + local.get $1 + local.get $3 i32.add - local.get $7 + local.get $4 i32.gt_s if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1755 + i32.const 1719 i32.const 7 call $~lib/builtins/abort unreachable @@ -37794,29 +37109,39 @@ i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 + local.set $5 local.get $5 + local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $8 - local.get $6 + local.get $5 + local.get $3 i32.store offset=8 - local.get $8 local.get $5 - local.get $4 + local.get $0 + local.get $1 i32.add i32.store offset=4 - local.get $8 - call $~lib/rt/pure/__retain - local.set $9 local.get $5 + call $~lib/rt/pure/__retain + local.set $6 + local.get $0 call $~lib/rt/pure/__release - local.get $9 - local.set $8 + local.get $6 + ) + (func $~lib/typedarray/Int8Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/WRAP<~lib/typedarray/Int8Array,i8> + local.set $3 local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $3 ) (func $~lib/typedarray/Int8Array.wrap@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $2of2 @@ -38073,95 +37398,85 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/WRAP<~lib/typedarray/Uint8ClampedArray,u8> (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $0 local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.set $7 + local.set $4 + local.get $1 local.get $4 - local.get $7 i32.gt_u - local.get $4 + local.get $1 i32.const 0 i32.and i32.or if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1741 + i32.const 1705 i32.const 5 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $3 + local.get $2 i32.const -1 i32.eq if - local.get $7 + local.get $4 i32.const 0 i32.and if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1746 + i32.const 1710 i32.const 9 call $~lib/builtins/abort unreachable end - local.get $7 local.get $4 + local.get $1 i32.sub - local.set $6 + local.set $3 else - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1750 + i32.const 1714 i32.const 7 call $~lib/builtins/abort unreachable end else - local.get $3 + local.get $2 i32.const 0 i32.shl - local.set $6 - local.get $4 - local.get $6 + local.set $3 + local.get $1 + local.get $3 i32.add - local.get $7 + local.get $4 i32.gt_s if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1755 + i32.const 1719 i32.const 7 call $~lib/builtins/abort unreachable @@ -38170,29 +37485,39 @@ i32.const 12 i32.const 5 call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 + local.set $5 local.get $5 + local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $8 - local.get $6 + local.get $5 + local.get $3 i32.store offset=8 - local.get $8 local.get $5 - local.get $4 + local.get $0 + local.get $1 i32.add i32.store offset=4 - local.get $8 - call $~lib/rt/pure/__retain - local.set $9 local.get $5 + call $~lib/rt/pure/__retain + local.set $6 + local.get $0 call $~lib/rt/pure/__release - local.get $9 - local.set $8 + local.get $6 + ) + (func $~lib/typedarray/Uint8ClampedArray.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/WRAP<~lib/typedarray/Uint8ClampedArray,u8> + local.set $3 local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $3 ) (func $~lib/typedarray/Uint8ClampedArray.wrap@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $2of2 @@ -38335,95 +37660,85 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/WRAP<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $0 local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.set $7 + local.set $4 + local.get $1 local.get $4 - local.get $7 i32.gt_u - local.get $4 + local.get $1 i32.const 1 i32.and i32.or if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1741 + i32.const 1705 i32.const 5 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $3 + local.get $2 i32.const -1 i32.eq if - local.get $7 + local.get $4 i32.const 1 i32.and if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1746 + i32.const 1710 i32.const 9 call $~lib/builtins/abort unreachable end - local.get $7 local.get $4 + local.get $1 i32.sub - local.set $6 + local.set $3 else - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1750 + i32.const 1714 i32.const 7 call $~lib/builtins/abort unreachable end else - local.get $3 + local.get $2 i32.const 1 i32.shl - local.set $6 - local.get $4 - local.get $6 + local.set $3 + local.get $1 + local.get $3 i32.add - local.get $7 + local.get $4 i32.gt_s if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1755 + i32.const 1719 i32.const 7 call $~lib/builtins/abort unreachable @@ -38432,29 +37747,39 @@ i32.const 12 i32.const 6 call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 + local.set $5 local.get $5 + local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $8 - local.get $6 + local.get $5 + local.get $3 i32.store offset=8 - local.get $8 local.get $5 - local.get $4 + local.get $0 + local.get $1 i32.add i32.store offset=4 - local.get $8 - call $~lib/rt/pure/__retain - local.set $9 local.get $5 + call $~lib/rt/pure/__retain + local.set $6 + local.get $0 call $~lib/rt/pure/__release - local.get $9 - local.set $8 + local.get $6 + ) + (func $~lib/typedarray/Int16Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/WRAP<~lib/typedarray/Int16Array,i16> + local.set $3 local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $3 ) (func $~lib/typedarray/Int16Array.wrap@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $2of2 @@ -38601,95 +37926,85 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/WRAP<~lib/typedarray/Uint16Array,u16> (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $0 local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.set $7 + local.set $4 + local.get $1 local.get $4 - local.get $7 i32.gt_u - local.get $4 + local.get $1 i32.const 1 i32.and i32.or if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1741 + i32.const 1705 i32.const 5 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $3 + local.get $2 i32.const -1 i32.eq if - local.get $7 + local.get $4 i32.const 1 i32.and if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1746 + i32.const 1710 i32.const 9 call $~lib/builtins/abort unreachable end - local.get $7 local.get $4 + local.get $1 i32.sub - local.set $6 + local.set $3 else - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1750 + i32.const 1714 i32.const 7 call $~lib/builtins/abort unreachable end else - local.get $3 + local.get $2 i32.const 1 i32.shl - local.set $6 - local.get $4 - local.get $6 + local.set $3 + local.get $1 + local.get $3 i32.add - local.get $7 + local.get $4 i32.gt_s if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1755 + i32.const 1719 i32.const 7 call $~lib/builtins/abort unreachable @@ -38698,29 +38013,39 @@ i32.const 12 i32.const 7 call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 + local.set $5 local.get $5 + local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $8 - local.get $6 + local.get $5 + local.get $3 i32.store offset=8 - local.get $8 local.get $5 - local.get $4 + local.get $0 + local.get $1 i32.add i32.store offset=4 - local.get $8 - call $~lib/rt/pure/__retain - local.set $9 local.get $5 + call $~lib/rt/pure/__retain + local.set $6 + local.get $0 call $~lib/rt/pure/__release - local.get $9 - local.set $8 + local.get $6 + ) + (func $~lib/typedarray/Uint16Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/WRAP<~lib/typedarray/Uint16Array,u16> + local.set $3 local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $3 ) (func $~lib/typedarray/Uint16Array.wrap@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $2of2 @@ -38867,95 +38192,85 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/WRAP<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $0 local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.set $7 + local.set $4 + local.get $1 local.get $4 - local.get $7 i32.gt_u - local.get $4 + local.get $1 i32.const 3 i32.and i32.or if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1741 + i32.const 1705 i32.const 5 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $3 + local.get $2 i32.const -1 i32.eq if - local.get $7 + local.get $4 i32.const 3 i32.and if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1746 + i32.const 1710 i32.const 9 call $~lib/builtins/abort unreachable end - local.get $7 local.get $4 + local.get $1 i32.sub - local.set $6 + local.set $3 else - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1750 + i32.const 1714 i32.const 7 call $~lib/builtins/abort unreachable end else - local.get $3 + local.get $2 i32.const 2 i32.shl - local.set $6 - local.get $4 - local.get $6 + local.set $3 + local.get $1 + local.get $3 i32.add - local.get $7 + local.get $4 i32.gt_s if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1755 + i32.const 1719 i32.const 7 call $~lib/builtins/abort unreachable @@ -38964,29 +38279,39 @@ i32.const 12 i32.const 8 call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 + local.set $5 local.get $5 + local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $8 - local.get $6 + local.get $5 + local.get $3 i32.store offset=8 - local.get $8 local.get $5 - local.get $4 + local.get $0 + local.get $1 i32.add i32.store offset=4 - local.get $8 - call $~lib/rt/pure/__retain - local.set $9 local.get $5 + call $~lib/rt/pure/__retain + local.set $6 + local.get $0 call $~lib/rt/pure/__release - local.get $9 - local.set $8 + local.get $6 + ) + (func $~lib/typedarray/Int32Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/WRAP<~lib/typedarray/Int32Array,i32> + local.set $3 local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $3 ) (func $~lib/typedarray/Int32Array.wrap@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $2of2 @@ -39133,95 +38458,85 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/WRAP<~lib/typedarray/Uint32Array,u32> (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $0 local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.set $7 + local.set $4 + local.get $1 local.get $4 - local.get $7 i32.gt_u - local.get $4 + local.get $1 i32.const 3 i32.and i32.or if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1741 + i32.const 1705 i32.const 5 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $3 + local.get $2 i32.const -1 i32.eq if - local.get $7 + local.get $4 i32.const 3 i32.and if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1746 + i32.const 1710 i32.const 9 call $~lib/builtins/abort unreachable end - local.get $7 local.get $4 + local.get $1 i32.sub - local.set $6 + local.set $3 else - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1750 + i32.const 1714 i32.const 7 call $~lib/builtins/abort unreachable end else - local.get $3 + local.get $2 i32.const 2 i32.shl - local.set $6 - local.get $4 - local.get $6 + local.set $3 + local.get $1 + local.get $3 i32.add - local.get $7 + local.get $4 i32.gt_s if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1755 + i32.const 1719 i32.const 7 call $~lib/builtins/abort unreachable @@ -39230,29 +38545,39 @@ i32.const 12 i32.const 9 call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 + local.set $5 local.get $5 + local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $8 - local.get $6 + local.get $5 + local.get $3 i32.store offset=8 - local.get $8 local.get $5 - local.get $4 + local.get $0 + local.get $1 i32.add i32.store offset=4 - local.get $8 - call $~lib/rt/pure/__retain - local.set $9 local.get $5 + call $~lib/rt/pure/__retain + local.set $6 + local.get $0 call $~lib/rt/pure/__release - local.get $9 - local.set $8 + local.get $6 + ) + (func $~lib/typedarray/Uint32Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/WRAP<~lib/typedarray/Uint32Array,u32> + local.set $3 local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $3 ) (func $~lib/typedarray/Uint32Array.wrap@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $2of2 @@ -39401,95 +38726,85 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/WRAP<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $0 local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.set $7 + local.set $4 + local.get $1 local.get $4 - local.get $7 i32.gt_u - local.get $4 + local.get $1 i32.const 7 i32.and i32.or if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1741 + i32.const 1705 i32.const 5 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $3 + local.get $2 i32.const -1 i32.eq if - local.get $7 + local.get $4 i32.const 7 i32.and if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1746 + i32.const 1710 i32.const 9 call $~lib/builtins/abort unreachable end - local.get $7 local.get $4 + local.get $1 i32.sub - local.set $6 + local.set $3 else - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1750 + i32.const 1714 i32.const 7 call $~lib/builtins/abort unreachable end else - local.get $3 + local.get $2 i32.const 3 i32.shl - local.set $6 - local.get $4 - local.get $6 + local.set $3 + local.get $1 + local.get $3 i32.add - local.get $7 + local.get $4 i32.gt_s if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1755 + i32.const 1719 i32.const 7 call $~lib/builtins/abort unreachable @@ -39498,29 +38813,39 @@ i32.const 12 i32.const 10 call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 + local.set $5 local.get $5 + local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $8 - local.get $6 + local.get $5 + local.get $3 i32.store offset=8 - local.get $8 local.get $5 - local.get $4 + local.get $0 + local.get $1 i32.add i32.store offset=4 - local.get $8 - call $~lib/rt/pure/__retain - local.set $9 local.get $5 + call $~lib/rt/pure/__retain + local.set $6 + local.get $0 call $~lib/rt/pure/__release - local.get $9 - local.set $8 + local.get $6 + ) + (func $~lib/typedarray/Int64Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/WRAP<~lib/typedarray/Int64Array,i64> + local.set $3 local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $3 ) (func $~lib/typedarray/Int64Array.wrap@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $2of2 @@ -39672,95 +38997,85 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/WRAP<~lib/typedarray/Uint64Array,u64> (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $0 local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.set $7 + local.set $4 + local.get $1 local.get $4 - local.get $7 i32.gt_u - local.get $4 + local.get $1 i32.const 7 i32.and i32.or if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1741 + i32.const 1705 i32.const 5 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $3 + local.get $2 i32.const -1 i32.eq if - local.get $7 + local.get $4 i32.const 7 i32.and if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1746 + i32.const 1710 i32.const 9 call $~lib/builtins/abort unreachable end - local.get $7 local.get $4 + local.get $1 i32.sub - local.set $6 + local.set $3 else - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1750 + i32.const 1714 i32.const 7 call $~lib/builtins/abort unreachable end else - local.get $3 + local.get $2 i32.const 3 i32.shl - local.set $6 - local.get $4 - local.get $6 + local.set $3 + local.get $1 + local.get $3 i32.add - local.get $7 + local.get $4 i32.gt_s if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1755 + i32.const 1719 i32.const 7 call $~lib/builtins/abort unreachable @@ -39769,29 +39084,39 @@ i32.const 12 i32.const 11 call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 + local.set $5 local.get $5 + local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $8 - local.get $6 + local.get $5 + local.get $3 i32.store offset=8 - local.get $8 local.get $5 - local.get $4 + local.get $0 + local.get $1 i32.add i32.store offset=4 - local.get $8 - call $~lib/rt/pure/__retain - local.set $9 local.get $5 + call $~lib/rt/pure/__retain + local.set $6 + local.get $0 call $~lib/rt/pure/__release - local.get $9 - local.set $8 + local.get $6 + ) + (func $~lib/typedarray/Uint64Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/WRAP<~lib/typedarray/Uint64Array,u64> + local.set $3 local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $3 ) (func $~lib/typedarray/Uint64Array.wrap@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $2of2 @@ -39945,95 +39270,85 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/WRAP<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $0 local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.set $7 + local.set $4 + local.get $1 local.get $4 - local.get $7 i32.gt_u - local.get $4 + local.get $1 i32.const 3 i32.and i32.or if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1741 + i32.const 1705 i32.const 5 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $3 + local.get $2 i32.const -1 i32.eq if - local.get $7 + local.get $4 i32.const 3 i32.and if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1746 + i32.const 1710 i32.const 9 call $~lib/builtins/abort unreachable end - local.get $7 local.get $4 + local.get $1 i32.sub - local.set $6 + local.set $3 else - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1750 + i32.const 1714 i32.const 7 call $~lib/builtins/abort unreachable end else - local.get $3 + local.get $2 i32.const 2 i32.shl - local.set $6 - local.get $4 - local.get $6 + local.set $3 + local.get $1 + local.get $3 i32.add - local.get $7 + local.get $4 i32.gt_s if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1755 + i32.const 1719 i32.const 7 call $~lib/builtins/abort unreachable @@ -40042,29 +39357,39 @@ i32.const 12 i32.const 12 call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 + local.set $5 local.get $5 + local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $8 - local.get $6 + local.get $5 + local.get $3 i32.store offset=8 - local.get $8 local.get $5 - local.get $4 + local.get $0 + local.get $1 i32.add i32.store offset=4 - local.get $8 - call $~lib/rt/pure/__retain - local.set $9 local.get $5 + call $~lib/rt/pure/__retain + local.set $6 + local.get $0 call $~lib/rt/pure/__release - local.get $9 - local.set $8 + local.get $6 + ) + (func $~lib/typedarray/Float32Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/WRAP<~lib/typedarray/Float32Array,f32> + local.set $3 local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $3 ) (func $~lib/typedarray/Float32Array.wrap@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $2of2 @@ -40220,95 +39545,85 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/WRAP<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $0 local.get $0 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.set $7 + local.set $4 + local.get $1 local.get $4 - local.get $7 i32.gt_u - local.get $4 + local.get $1 i32.const 7 i32.and i32.or if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1741 + i32.const 1705 i32.const 5 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $3 + local.get $2 i32.const -1 i32.eq if - local.get $7 + local.get $4 i32.const 7 i32.and if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1746 + i32.const 1710 i32.const 9 call $~lib/builtins/abort unreachable end - local.get $7 local.get $4 + local.get $1 i32.sub - local.set $6 + local.set $3 else - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1750 + i32.const 1714 i32.const 7 call $~lib/builtins/abort unreachable end else - local.get $3 + local.get $2 i32.const 3 i32.shl - local.set $6 - local.get $4 - local.get $6 + local.set $3 + local.get $1 + local.get $3 i32.add - local.get $7 + local.get $4 i32.gt_s if - local.get $5 + local.get $0 call $~lib/rt/pure/__release i32.const 32 i32.const 432 - i32.const 1755 + i32.const 1719 i32.const 7 call $~lib/builtins/abort unreachable @@ -40317,29 +39632,39 @@ i32.const 12 i32.const 13 call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 + local.set $5 local.get $5 + local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $8 - local.get $6 + local.get $5 + local.get $3 i32.store offset=8 - local.get $8 local.get $5 - local.get $4 + local.get $0 + local.get $1 i32.add i32.store offset=4 - local.get $8 - call $~lib/rt/pure/__retain - local.set $9 local.get $5 + call $~lib/rt/pure/__retain + local.set $6 + local.get $0 call $~lib/rt/pure/__release - local.get $9 - local.set $8 + local.get $6 + ) + (func $~lib/typedarray/Float64Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/WRAP<~lib/typedarray/Float64Array,f64> + local.set $3 local.get $0 call $~lib/rt/pure/__release - local.get $8 + local.get $3 ) (func $~lib/typedarray/Float64Array.wrap@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $2of2 @@ -40497,58 +39822,50 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,i32> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int8Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -40575,27 +39892,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -40615,29 +39932,38 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 0 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 2 i32.shl i32.add i32.load i32.store8 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,i32> local.get $1 call $~lib/rt/pure/__release ) @@ -40728,59 +40054,51 @@ local.get $0 i32.load offset=12 ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,f32> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (local $8 f32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int8Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -40807,27 +40125,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -40839,96 +40157,97 @@ i32.const 0 end drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 2 i32.shl i32.add f32.load - local.set $11 + local.set $8 + local.get $3 local.get $6 - local.get $9 i32.const 0 i32.shl i32.add - local.get $11 - local.get $11 + local.get $8 + local.get $8 f32.sub f32.const 0 f32.eq if (result i32) - local.get $11 + local.get $8 i32.trunc_f32_s else i32.const 0 end i32.store8 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,f32> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Int64Array,i64> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int64Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int8Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -40955,27 +40274,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Int64Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -40995,29 +40314,38 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 0 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 3 i32.shl i32.add i64.load i64.store8 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Int64Array,i64> local.get $1 call $~lib/rt/pure/__release ) @@ -41025,59 +40353,51 @@ local.get $0 i32.load offset=12 ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,f64> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f64) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (local $8 f64) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int8Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -41104,27 +40424,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -41136,91 +40456,92 @@ i32.const 0 end drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 3 i32.shl i32.add f64.load - local.set $11 + local.set $8 + local.get $3 local.get $6 - local.get $9 i32.const 0 i32.shl i32.add - local.get $11 - local.get $11 + local.get $8 + local.get $8 f64.sub f64.const 0 f64.eq if (result i32) - local.get $11 + local.get $8 i32.trunc_f64_s else i32.const 0 end i32.store8 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 + local.get $0 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 call $~lib/rt/pure/__retain local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,f64> + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Uint8Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int8Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -41247,76 +40568,77 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.get $4 + local.get $1 i32.load offset=4 - local.get $4 + local.get $1 i32.load offset=8 call $~lib/memory/memory.copy - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Uint8Array,u8> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Int16Array,i16> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int16Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int8Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -41343,27 +40665,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Int16Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -41383,79 +40705,80 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 0 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 1 i32.shl i32.add i32.load16_s i32.store8 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 + local.get $0 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 call $~lib/rt/pure/__retain local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Int16Array,i16> + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,i8> (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int8Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -41482,21 +40805,30 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.get $4 + local.get $1 i32.load offset=4 - local.get $4 + local.get $1 i32.load offset=8 call $~lib/memory/memory.copy - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,i8> local.get $1 call $~lib/rt/pure/__release ) @@ -41667,58 +40999,50 @@ local.get $8 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint8Array,u8,~lib/array/Array,i32> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint8Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -41745,27 +41069,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -41785,29 +41109,38 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 0 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 2 i32.shl i32.add i32.load i32.store8 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint8Array,u8,~lib/array/Array,i32> local.get $1 call $~lib/rt/pure/__release ) @@ -41907,59 +41240,51 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint8Array,u8,~lib/array/Array,f32> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (local $8 f32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint8Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -41986,27 +41311,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -42018,96 +41343,97 @@ i32.const 0 end drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 2 i32.shl i32.add f32.load - local.set $11 + local.set $8 + local.get $3 local.get $6 - local.get $9 i32.const 0 i32.shl i32.add - local.get $11 - local.get $11 + local.get $8 + local.get $8 f32.sub f32.const 0 f32.eq if (result i32) - local.get $11 + local.get $8 i32.trunc_f32_u else i32.const 0 end i32.store8 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint8Array,u8,~lib/array/Array,f32> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint8Array,u8,~lib/typedarray/Int64Array,i64> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int64Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint8Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -42134,27 +41460,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Int64Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -42174,85 +41500,86 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 0 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 3 i32.shl i32.add i64.load i64.store8 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint8Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint8Array,u8,~lib/typedarray/Int64Array,i64> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint8Array,u8,~lib/array/Array,f64> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f64) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (local $8 f64) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint8Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -42279,27 +41606,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -42311,91 +41638,92 @@ i32.const 0 end drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 3 i32.shl i32.add f64.load - local.set $11 + local.set $8 + local.get $3 local.get $6 - local.get $9 i32.const 0 i32.shl i32.add - local.get $11 - local.get $11 + local.get $8 + local.get $8 f64.sub f64.const 0 f64.eq if (result i32) - local.get $11 + local.get $8 i32.trunc_f64_u else i32.const 0 end i32.store8 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 + local.get $0 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 call $~lib/rt/pure/__retain local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint8Array,u8,~lib/array/Array,f64> + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/SET<~lib/typedarray/Uint8Array,u8,~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Uint8Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint8Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -42422,76 +41750,77 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.get $4 + local.get $1 i32.load offset=4 - local.get $4 + local.get $1 i32.load offset=8 call $~lib/memory/memory.copy - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint8Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint8Array,u8,~lib/typedarray/Uint8Array,u8> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint8Array,u8,~lib/typedarray/Int16Array,i16> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int16Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint8Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -42518,27 +41847,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Int16Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -42558,79 +41887,80 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 0 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 1 i32.shl i32.add i32.load16_s i32.store8 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 + local.get $0 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/typedarray/Uint8Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 call $~lib/rt/pure/__retain local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint8Array,u8,~lib/typedarray/Int16Array,i16> + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/SET<~lib/typedarray/Uint8Array,u8,~lib/array/Array,i8> (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint8Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -42657,21 +41987,30 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.get $4 + local.get $1 i32.load offset=4 - local.get $4 + local.get $1 i32.load offset=8 call $~lib/memory/memory.copy - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint8Array,u8,~lib/array/Array,i8> local.get $1 call $~lib/rt/pure/__release ) @@ -42842,59 +42181,51 @@ local.get $8 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/array/Array,i32> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint8ClampedArray#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -42921,39 +42252,39 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 1 drop i32.const 0 drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 2 i32.shl i32.add i32.load - local.set $11 + local.set $8 i32.const 1 i32.eqz drop @@ -42961,36 +42292,45 @@ i32.const 4 i32.le_u drop + local.get $3 local.get $6 - local.get $9 i32.const 0 i32.shl i32.add - local.get $11 + local.get $8 i32.const 31 i32.shr_s i32.const -1 i32.xor i32.const 255 - local.get $11 + local.get $8 i32.sub i32.const 31 i32.shr_s - local.get $11 + local.get $8 i32.or i32.and i32.store8 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/array/Array,i32> local.get $1 call $~lib/rt/pure/__release ) @@ -43077,59 +42417,51 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/array/Array,f32> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (local $8 f32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint8ClampedArray#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -43156,53 +42488,53 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 1 drop i32.const 1 drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 2 i32.shl i32.add f32.load - local.set $11 + local.set $8 + local.get $3 local.get $6 - local.get $9 i32.const 0 i32.shl i32.add - local.get $11 - local.get $11 + local.get $8 + local.get $8 f32.sub f32.const 0 f32.eq if (result i32) f32.const 0 f32.const 255 - local.get $11 + local.get $8 f32.min f32.max i32.trunc_f32_u @@ -43210,73 +42542,74 @@ i32.const 0 end i32.store8 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/array/Array,f32> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int64Array,i64> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i64) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (local $8 i64) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int64Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint8ClampedArray#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -43303,39 +42636,39 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Int64Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 1 drop i32.const 0 drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 3 i32.shl i32.add i64.load - local.set $11 + local.set $8 i32.const 1 i32.eqz drop @@ -43343,12 +42676,12 @@ i32.const 4 i32.le_u drop + local.get $3 local.get $6 - local.get $9 i32.const 0 i32.shl i32.add - local.get $11 + local.get $8 i32.wrap_i64 i32.const 31 i32.shr_s @@ -43356,83 +42689,84 @@ i32.xor i64.extend_i32_s i32.const 255 - local.get $11 + local.get $8 i32.wrap_i64 i32.sub i32.const 31 i32.shr_s i64.extend_i32_s - local.get $11 + local.get $8 i64.or i64.and i64.store8 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int64Array,i64> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/array/Array,f64> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f64) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (local $8 f64) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint8ClampedArray#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -43459,53 +42793,53 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 1 drop i32.const 1 drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 3 i32.shl i32.add f64.load - local.set $11 + local.set $8 + local.get $3 local.get $6 - local.get $9 i32.const 0 i32.shl i32.add - local.get $11 - local.get $11 + local.get $8 + local.get $8 f64.sub f64.const 0 f64.eq if (result i32) f64.const 0 f64.const 255 - local.get $11 + local.get $8 f64.min f64.max i32.trunc_f64_u @@ -43513,67 +42847,68 @@ i32.const 0 end i32.store8 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 + local.get $0 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 call $~lib/rt/pure/__retain local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/array/Array,f64> + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Uint8Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint8ClampedArray#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -43600,77 +42935,78 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.get $4 + local.get $1 i32.load offset=4 - local.get $4 + local.get $1 i32.load offset=8 call $~lib/memory/memory.copy - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Uint8Array,u8> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int16Array,i16> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int16Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint8ClampedArray#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -43697,39 +43033,39 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Int16Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 1 drop i32.const 0 drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 1 i32.shl i32.add i32.load16_s - local.set $11 + local.set $8 i32.const 1 i32.eqz drop @@ -43737,92 +43073,93 @@ i32.const 4 i32.le_u drop + local.get $3 local.get $6 - local.get $9 i32.const 0 i32.shl i32.add - local.get $11 + local.get $8 i32.const 31 i32.shr_s i32.const -1 i32.xor i32.const 255 - local.get $11 + local.get $8 i32.sub i32.const 31 i32.shr_s - local.get $11 + local.get $8 i32.or i32.and i32.store8 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int16Array,i16> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/array/Array,i8> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint8ClampedArray#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -43849,39 +43186,39 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 1 drop i32.const 0 drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 0 i32.shl i32.add i32.load8_s - local.set $11 + local.set $8 i32.const 1 i32.eqz drop @@ -43889,36 +43226,45 @@ i32.const 4 i32.le_u drop + local.get $3 local.get $6 - local.get $9 i32.const 0 i32.shl i32.add - local.get $11 + local.get $8 i32.const 31 i32.shr_s i32.const -1 i32.xor i32.const 255 - local.get $11 + local.get $8 i32.sub i32.const 31 i32.shr_s - local.get $11 + local.get $8 i32.or i32.and i32.store8 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/array/Array,i8> local.get $1 call $~lib/rt/pure/__release ) @@ -44089,58 +43435,50 @@ local.get $8 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,i32> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int16Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -44167,27 +43505,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 1 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -44207,29 +43545,38 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 1 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 2 i32.shl i32.add i32.load i32.store16 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,i32> local.get $1 call $~lib/rt/pure/__release ) @@ -44329,59 +43676,51 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,f32> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (local $8 f32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int16Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -44408,27 +43747,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 1 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -44440,96 +43779,97 @@ i32.const 0 end drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 2 i32.shl i32.add f32.load - local.set $11 + local.set $8 + local.get $3 local.get $6 - local.get $9 i32.const 1 i32.shl i32.add - local.get $11 - local.get $11 + local.get $8 + local.get $8 f32.sub f32.const 0 f32.eq if (result i32) - local.get $11 + local.get $8 i32.trunc_f32_s else i32.const 0 end i32.store16 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,f32> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int64Array,i64> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int64Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int16Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -44556,27 +43896,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 1 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Int64Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -44596,85 +43936,86 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 1 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 3 i32.shl i32.add i64.load i64.store16 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int64Array,i64> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,f64> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f64) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (local $8 f64) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int16Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -44701,27 +44042,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 1 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -44733,96 +44074,97 @@ i32.const 0 end drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 3 i32.shl i32.add f64.load - local.set $11 + local.set $8 + local.get $3 local.get $6 - local.get $9 i32.const 1 i32.shl i32.add - local.get $11 - local.get $11 + local.get $8 + local.get $8 f64.sub f64.const 0 f64.eq if (result i32) - local.get $11 + local.get $8 i32.trunc_f64_s else i32.const 0 end i32.store16 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,f64> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Uint8Array,u8> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Uint8Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int16Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -44849,27 +44191,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 1 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Uint8Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -44889,79 +44231,80 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 1 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 0 i32.shl i32.add i32.load8_u i32.store16 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 + local.get $0 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 call $~lib/rt/pure/__retain local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Uint8Array,u8> + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int16Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int16Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -44988,76 +44331,77 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 1 i32.shl i32.add - local.get $4 + local.get $1 i32.load offset=4 - local.get $4 + local.get $1 i32.load offset=8 call $~lib/memory/memory.copy - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int16Array,i16> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,i8> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int16Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -45084,27 +44428,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 1 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -45124,29 +44468,38 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 1 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 0 i32.shl i32.add i32.load8_s i32.store16 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,i8> local.get $1 call $~lib/rt/pure/__release ) @@ -45317,58 +44670,50 @@ local.get $8 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint16Array,u16,~lib/array/Array,i32> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint16Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -45395,27 +44740,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 1 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -45435,29 +44780,38 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 1 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 2 i32.shl i32.add i32.load i32.store16 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint16Array,u16,~lib/array/Array,i32> local.get $1 call $~lib/rt/pure/__release ) @@ -45557,59 +44911,51 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint16Array,u16,~lib/array/Array,f32> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (local $8 f32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint16Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -45636,27 +44982,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 1 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -45668,96 +45014,97 @@ i32.const 0 end drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 2 i32.shl i32.add f32.load - local.set $11 + local.set $8 + local.get $3 local.get $6 - local.get $9 i32.const 1 i32.shl i32.add - local.get $11 - local.get $11 + local.get $8 + local.get $8 f32.sub f32.const 0 f32.eq if (result i32) - local.get $11 + local.get $8 i32.trunc_f32_u else i32.const 0 end i32.store16 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint16Array,u16,~lib/array/Array,f32> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint16Array,u16,~lib/typedarray/Int64Array,i64> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int64Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint16Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -45784,27 +45131,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 1 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Int64Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -45824,85 +45171,86 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 1 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 3 i32.shl i32.add i64.load i64.store16 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint16Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint16Array,u16,~lib/typedarray/Int64Array,i64> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint16Array,u16,~lib/array/Array,f64> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f64) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (local $8 f64) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint16Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -45929,27 +45277,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 1 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -45961,96 +45309,97 @@ i32.const 0 end drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 3 i32.shl i32.add f64.load - local.set $11 + local.set $8 + local.get $3 local.get $6 - local.get $9 i32.const 1 i32.shl i32.add - local.get $11 - local.get $11 + local.get $8 + local.get $8 f64.sub f64.const 0 f64.eq if (result i32) - local.get $11 + local.get $8 i32.trunc_f64_u else i32.const 0 end i32.store16 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint16Array,u16,~lib/array/Array,f64> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint16Array,u16,~lib/typedarray/Uint8Array,u8> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Uint8Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint16Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -46077,27 +45426,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 1 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Uint8Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -46117,79 +45466,80 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 1 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 0 i32.shl i32.add i32.load8_u i32.store16 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 + local.get $0 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/typedarray/Uint16Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 call $~lib/rt/pure/__retain local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint16Array,u16,~lib/typedarray/Uint8Array,u8> + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/SET<~lib/typedarray/Uint16Array,u16,~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int16Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint16Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -46216,76 +45566,77 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 1 i32.shl i32.add - local.get $4 + local.get $1 i32.load offset=4 - local.get $4 + local.get $1 i32.load offset=8 call $~lib/memory/memory.copy - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint16Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint16Array,u16,~lib/typedarray/Int16Array,i16> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint16Array,u16,~lib/array/Array,i8> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint16Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -46312,27 +45663,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 1 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -46352,29 +45703,38 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 1 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 0 i32.shl i32.add i32.load8_s i32.store16 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint16Array,u16,~lib/array/Array,i8> local.get $1 call $~lib/rt/pure/__release ) @@ -46545,53 +45905,45 @@ local.get $8 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (func $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,i32> (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int32Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -46618,21 +45970,30 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add - local.get $4 + local.get $1 i32.load offset=4 - local.get $4 + local.get $1 i32.load offset=8 call $~lib/memory/memory.copy - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,i32> local.get $1 call $~lib/rt/pure/__release ) @@ -46719,59 +46080,51 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,f32> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (local $8 f32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int32Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -46798,27 +46151,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -46830,96 +46183,97 @@ i32.const 0 end drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 2 i32.shl i32.add f32.load - local.set $11 + local.set $8 + local.get $3 local.get $6 - local.get $9 i32.const 2 i32.shl i32.add - local.get $11 - local.get $11 + local.get $8 + local.get $8 f32.sub f32.const 0 f32.eq if (result i32) - local.get $11 + local.get $8 i32.trunc_f32_s else i32.const 0 end i32.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,f32> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int64Array,i64> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int64Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int32Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -46946,27 +46300,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Int64Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -46986,85 +46340,86 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 2 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 3 i32.shl i32.add i64.load i64.store32 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int64Array,i64> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,f64> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f64) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (local $8 f64) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int32Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -47091,27 +46446,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -47123,96 +46478,97 @@ i32.const 0 end drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 3 i32.shl i32.add f64.load - local.set $11 + local.set $8 + local.get $3 local.get $6 - local.get $9 i32.const 2 i32.shl i32.add - local.get $11 - local.get $11 + local.get $8 + local.get $8 f64.sub f64.const 0 f64.eq if (result i32) - local.get $11 + local.get $8 i32.trunc_f64_s else i32.const 0 end i32.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,f64> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Uint8Array,u8> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Uint8Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int32Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -47239,27 +46595,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Uint8Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -47279,84 +46635,85 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 2 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 0 i32.shl i32.add i32.load8_u i32.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Uint8Array,u8> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int16Array,i16> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int16Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int32Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -47383,27 +46740,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Int16Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -47423,84 +46780,85 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 2 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 1 i32.shl i32.add i32.load16_s i32.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int16Array,i16> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,i8> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int32Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -47527,27 +46885,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -47567,29 +46925,38 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 2 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 0 i32.shl i32.add i32.load8_s i32.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,i8> local.get $1 call $~lib/rt/pure/__release ) @@ -47760,53 +47127,45 @@ local.get $8 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (func $~lib/typedarray/SET<~lib/typedarray/Uint32Array,u32,~lib/array/Array,i32> (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint32Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -47833,21 +47192,30 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add - local.get $4 + local.get $1 i32.load offset=4 - local.get $4 + local.get $1 i32.load offset=8 call $~lib/memory/memory.copy - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint32Array,u32,~lib/array/Array,i32> local.get $1 call $~lib/rt/pure/__release ) @@ -47947,59 +47315,51 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint32Array,u32,~lib/array/Array,f32> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (local $8 f32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint32Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -48026,27 +47386,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -48058,96 +47418,97 @@ i32.const 0 end drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 2 i32.shl i32.add f32.load - local.set $11 + local.set $8 + local.get $3 local.get $6 - local.get $9 i32.const 2 i32.shl i32.add - local.get $11 - local.get $11 + local.get $8 + local.get $8 f32.sub f32.const 0 f32.eq if (result i32) - local.get $11 + local.get $8 i32.trunc_f32_u else i32.const 0 end i32.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint32Array,u32,~lib/array/Array,f32> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint32Array,u32,~lib/typedarray/Int64Array,i64> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int64Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint32Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -48174,27 +47535,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Int64Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -48214,85 +47575,86 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 2 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 3 i32.shl i32.add i64.load i64.store32 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint32Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint32Array,u32,~lib/typedarray/Int64Array,i64> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint32Array,u32,~lib/array/Array,f64> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f64) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (local $8 f64) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint32Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -48319,27 +47681,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -48351,96 +47713,97 @@ i32.const 0 end drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 3 i32.shl i32.add f64.load - local.set $11 + local.set $8 + local.get $3 local.get $6 - local.get $9 i32.const 2 i32.shl i32.add - local.get $11 - local.get $11 + local.get $8 + local.get $8 f64.sub f64.const 0 f64.eq if (result i32) - local.get $11 + local.get $8 i32.trunc_f64_u else i32.const 0 end i32.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint32Array,u32,~lib/array/Array,f64> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint32Array,u32,~lib/typedarray/Uint8Array,u8> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Uint8Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint32Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -48467,27 +47830,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Uint8Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -48507,84 +47870,85 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 2 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 0 i32.shl i32.add i32.load8_u i32.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint32Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint32Array,u32,~lib/typedarray/Uint8Array,u8> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint32Array,u32,~lib/typedarray/Int16Array,i16> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int16Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint32Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -48611,27 +47975,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Int16Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -48651,84 +48015,85 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 2 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 1 i32.shl i32.add i32.load16_s i32.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint32Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint32Array,u32,~lib/typedarray/Int16Array,i16> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint32Array,u32,~lib/array/Array,i8> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint32Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -48755,27 +48120,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -48795,29 +48160,38 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 2 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 0 i32.shl i32.add i32.load8_s i32.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint32Array,u32,~lib/array/Array,i8> local.get $1 call $~lib/rt/pure/__release ) @@ -48988,58 +48362,50 @@ local.get $8 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,i32> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int64Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -49066,27 +48432,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 3 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -49106,29 +48472,38 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 3 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 2 i32.shl i32.add i64.load32_s i64.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,i32> local.get $1 call $~lib/rt/pure/__release ) @@ -49228,59 +48603,51 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,f32> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (local $8 f32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int64Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -49307,27 +48674,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 3 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -49339,91 +48706,92 @@ i32.const 0 end drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 2 i32.shl i32.add f32.load - local.set $11 + local.set $8 + local.get $3 local.get $6 - local.get $9 i32.const 3 i32.shl i32.add - local.get $11 - local.get $11 + local.get $8 + local.get $8 f32.sub f32.const 0 f32.eq if (result i64) - local.get $11 + local.get $8 i64.trunc_f32_s else i64.const 0 end i64.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 + local.get $0 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 call $~lib/rt/pure/__retain local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,f32> + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int64Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int64Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -49450,77 +48818,78 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 3 i32.shl i32.add - local.get $4 + local.get $1 i32.load offset=4 - local.get $4 + local.get $1 i32.load offset=8 call $~lib/memory/memory.copy - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int64Array,i64> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,f64> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f64) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (local $8 f64) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int64Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -49547,27 +48916,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 3 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -49579,96 +48948,97 @@ i32.const 0 end drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 3 i32.shl i32.add f64.load - local.set $11 + local.set $8 + local.get $3 local.get $6 - local.get $9 i32.const 3 i32.shl i32.add - local.get $11 - local.get $11 + local.get $8 + local.get $8 f64.sub f64.const 0 f64.eq if (result i64) - local.get $11 + local.get $8 i64.trunc_f64_s else i64.const 0 end i64.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,f64> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Uint8Array,u8> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Uint8Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int64Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -49695,27 +49065,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 3 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Uint8Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -49735,84 +49105,85 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 3 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 0 i32.shl i32.add i64.load8_u i64.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Uint8Array,u8> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int16Array,i16> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int16Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int64Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -49839,27 +49210,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 3 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Int16Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -49879,84 +49250,85 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 3 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 1 i32.shl i32.add i64.load16_s i64.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int16Array,i16> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,i8> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Int64Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -49983,27 +49355,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 3 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -50023,29 +49395,38 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 3 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 0 i32.shl i32.add i64.load8_s i64.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,i8> local.get $1 call $~lib/rt/pure/__release ) @@ -50216,58 +49597,50 @@ local.get $8 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint64Array,u64,~lib/array/Array,i32> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint64Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -50294,27 +49667,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 3 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -50334,29 +49707,38 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 3 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 2 i32.shl i32.add i64.load32_s i64.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint64Array,u64,~lib/array/Array,i32> local.get $1 call $~lib/rt/pure/__release ) @@ -50456,59 +49838,51 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint64Array,u64,~lib/array/Array,f32> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (local $8 f32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint64Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -50535,27 +49909,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 3 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -50567,91 +49941,92 @@ i32.const 0 end drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 2 i32.shl i32.add f32.load - local.set $11 + local.set $8 + local.get $3 local.get $6 - local.get $9 i32.const 3 i32.shl i32.add - local.get $11 - local.get $11 + local.get $8 + local.get $8 f32.sub f32.const 0 f32.eq if (result i64) - local.get $11 + local.get $8 i64.trunc_f32_u else i64.const 0 end i64.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 + local.get $0 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 call $~lib/rt/pure/__retain local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint64Array,u64,~lib/array/Array,f32> + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/SET<~lib/typedarray/Uint64Array,u64,~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int64Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint64Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -50678,77 +50053,78 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 3 i32.shl i32.add - local.get $4 + local.get $1 i32.load offset=4 - local.get $4 + local.get $1 i32.load offset=8 call $~lib/memory/memory.copy - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint64Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint64Array,u64,~lib/typedarray/Int64Array,i64> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint64Array,u64,~lib/array/Array,f64> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f64) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (local $8 f64) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint64Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -50775,27 +50151,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 3 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -50807,96 +50183,97 @@ i32.const 0 end drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 3 i32.shl i32.add f64.load - local.set $11 + local.set $8 + local.get $3 local.get $6 - local.get $9 i32.const 3 i32.shl i32.add - local.get $11 - local.get $11 + local.get $8 + local.get $8 f64.sub f64.const 0 f64.eq if (result i64) - local.get $11 + local.get $8 i64.trunc_f64_u else i64.const 0 end i64.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint64Array,u64,~lib/array/Array,f64> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint64Array,u64,~lib/typedarray/Uint8Array,u8> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Uint8Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint64Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -50923,27 +50300,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 3 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Uint8Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -50963,84 +50340,85 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 3 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 0 i32.shl i32.add i64.load8_u i64.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint64Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint64Array,u64,~lib/typedarray/Uint8Array,u8> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint64Array,u64,~lib/typedarray/Int16Array,i16> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int16Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint64Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -51067,27 +50445,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 3 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Int16Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -51107,84 +50485,85 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 3 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 1 i32.shl i32.add i64.load16_s i64.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint64Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint64Array,u64,~lib/typedarray/Int16Array,i16> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint64Array,u64,~lib/array/Array,i8> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint64Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -51211,27 +50590,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 3 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -51251,29 +50630,38 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 3 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 0 i32.shl i32.add i64.load8_s i64.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint64Array,u64,~lib/array/Array,i8> local.get $1 call $~lib/rt/pure/__release ) @@ -51444,58 +50832,50 @@ local.get $8 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Float32Array,f32,~lib/array/Array,i32> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Float32Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -51522,27 +50902,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -51562,30 +50942,39 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 2 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 2 i32.shl i32.add i32.load f32.convert_i32_s f32.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Float32Array,f32,~lib/array/Array,i32> local.get $1 call $~lib/rt/pure/__release ) @@ -51681,53 +51070,45 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (func $~lib/typedarray/SET<~lib/typedarray/Float32Array,f32,~lib/array/Array,f32> (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Float32Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -51754,76 +51135,77 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add - local.get $4 + local.get $1 i32.load offset=4 - local.get $4 + local.get $1 i32.load offset=8 call $~lib/memory/memory.copy - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Float32Array,f32,~lib/array/Array,f32> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Float32Array,f32,~lib/typedarray/Int64Array,i64> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int64Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Float32Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -51850,27 +51232,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Int64Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -51890,85 +51272,86 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 2 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 3 i32.shl i32.add i64.load f32.convert_i64_s f32.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Float32Array,f32,~lib/typedarray/Int64Array,i64> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Float32Array,f32,~lib/typedarray/Uint8Array,u8> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Uint8Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Float32Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -51995,27 +51378,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Uint8Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -52035,85 +51418,86 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 2 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 0 i32.shl i32.add i32.load8_u f32.convert_i32_u f32.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Float32Array,f32,~lib/typedarray/Uint8Array,u8> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Float32Array,f32,~lib/typedarray/Int16Array,i16> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int16Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Float32Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -52140,27 +51524,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Int16Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -52180,85 +51564,86 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 2 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 1 i32.shl i32.add i32.load16_s f32.convert_i32_s f32.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Float32Array,f32,~lib/typedarray/Int16Array,i16> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Float32Array,f32,~lib/array/Array,i8> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Float32Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -52285,27 +51670,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -52325,30 +51710,39 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 2 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 0 i32.shl i32.add i32.load8_s f32.convert_i32_s f32.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Float32Array,f32,~lib/array/Array,i8> local.get $1 call $~lib/rt/pure/__release ) @@ -52504,58 +51898,50 @@ local.get $8 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Float64Array,f64,~lib/array/Array,i32> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Float64Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -52582,27 +51968,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 3 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -52622,30 +52008,39 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 3 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 2 i32.shl i32.add i32.load f64.convert_i32_s f64.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Float64Array,f64,~lib/array/Array,i32> local.get $1 call $~lib/rt/pure/__release ) @@ -52739,58 +52134,50 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Float64Array,f64,~lib/array/Array,f32> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Float64Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -52817,27 +52204,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 3 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -52857,85 +52244,86 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 3 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 2 i32.shl i32.add f32.load f64.promote_f32 f64.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Float64Array,f64,~lib/array/Array,f32> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Float64Array,f64,~lib/typedarray/Int64Array,i64> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int64Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Float64Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -52962,27 +52350,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 3 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Int64Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -53002,85 +52390,86 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 3 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 3 i32.shl i32.add i64.load f64.convert_i64_s f64.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Float64Array,f64,~lib/typedarray/Int64Array,i64> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Float64Array,f64,~lib/typedarray/Uint8Array,u8> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Uint8Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Float64Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -53107,27 +52496,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 3 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Uint8Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -53147,85 +52536,86 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 3 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 0 i32.shl i32.add i32.load8_u f64.convert_i32_u f64.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Float64Array,f64,~lib/typedarray/Uint8Array,u8> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Float64Array,f64,~lib/typedarray/Int16Array,i16> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int16Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Float64Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -53252,27 +52642,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 3 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Int16Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -53292,85 +52682,86 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 3 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 1 i32.shl i32.add i32.load16_s f64.convert_i32_s f64.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Float64Array,f64,~lib/typedarray/Int16Array,i16> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Float64Array,f64,~lib/array/Array,i8> (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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/array/Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Float64Array#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -53397,27 +52788,27 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 3 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/array/Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 0 drop @@ -53437,30 +52828,39 @@ i32.const 0 end drop + local.get $3 local.get $6 - local.get $9 i32.const 3 i32.shl i32.add - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 0 i32.shl i32.add i32.load8_s f64.convert_i32_s f64.store - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Float64Array,f64,~lib/array/Array,i8> local.get $1 call $~lib/rt/pure/__release ) @@ -53616,59 +53016,51 @@ local.get $8 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Float32Array,f32> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 + (local $8 f32) local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Float32Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint8ClampedArray#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -53695,53 +53087,53 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Float32Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 1 drop i32.const 1 drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 2 i32.shl i32.add f32.load - local.set $11 + local.set $8 + local.get $3 local.get $6 - local.get $9 i32.const 0 i32.shl i32.add - local.get $11 - local.get $11 + local.get $8 + local.get $8 f32.sub f32.const 0 f32.eq if (result i32) f32.const 0 f32.const 255 - local.get $11 + local.get $8 f32.min f32.max i32.trunc_f32_u @@ -53749,73 +53141,74 @@ i32.const 0 end i32.store8 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Float32Array,f32> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int32Array,i32> (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Int32Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint8ClampedArray#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -53842,39 +53235,39 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Int32Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 1 drop i32.const 0 drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 2 i32.shl i32.add i32.load - local.set $11 + local.set $8 i32.const 1 i32.eqz drop @@ -53882,40 +53275,49 @@ i32.const 4 i32.le_u drop + local.get $3 local.get $6 - local.get $9 i32.const 0 i32.shl i32.add - local.get $11 + local.get $8 i32.const 31 i32.shr_s i32.const -1 i32.xor i32.const 255 - local.get $11 + local.get $8 i32.sub i32.const 31 i32.shr_s - local.get $11 + local.get $8 i32.or i32.and i32.store8 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int32Array,i32> local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint32Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Uint32Array,u32> (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -53924,52 +53326,44 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__retain - local.set $5 + local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - local.set $3 + local.set $1 i32.const 0 drop - local.get $3 + local.get $2 i32.const 0 i32.lt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1774 + i32.const 1736 i32.const 19 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/typedarray/Uint32Array#get:length - local.get $3 + local.get $2 i32.add - local.get $5 + local.get $0 call $~lib/typedarray/Uint8ClampedArray#get:length i32.gt_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release i32.const 368 i32.const 432 - i32.const 1775 + i32.const 1737 i32.const 47 call $~lib/builtins/abort unreachable @@ -53996,67 +53390,76 @@ i32.const 0 end drop - local.get $5 + local.get $0 i32.load offset=4 - local.get $3 + local.get $2 i32.const 0 i32.shl i32.add - local.set $6 - local.get $4 + local.set $3 + local.get $1 i32.load offset=4 - local.set $7 - local.get $4 + local.set $4 + local.get $1 call $~lib/typedarray/Uint32Array#get:length - local.set $8 + local.set $5 i32.const 0 - local.set $9 + local.set $6 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $6 + local.get $5 i32.lt_s - local.set $10 - local.get $10 + local.set $7 + local.get $7 if i32.const 1 drop i32.const 0 drop - local.get $7 - local.get $9 + local.get $4 + local.get $6 i32.const 2 i32.shl i32.add i32.load - local.set $11 + local.set $8 i32.const 0 i32.eqz drop + local.get $3 local.get $6 - local.get $9 i32.const 0 i32.shl i32.add i32.const 255 - local.tee $12 - local.get $11 - local.tee $13 - local.get $12 - local.get $13 + local.tee $9 + local.get $8 + local.tee $10 + local.get $9 + local.get $10 i32.lt_u select i32.store8 - local.get $9 + local.get $6 i32.const 1 i32.add - local.set $9 + local.set $6 br $for-loop|0 end end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint32Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Uint32Array,u32> local.get $1 call $~lib/rt/pure/__release ) @@ -56070,8 +55473,6 @@ f64.const nan:0x8000000000000 i32.const 0 call $~lib/typedarray/Float64Array#includes - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz @@ -56110,8 +55511,6 @@ f32.const nan:0x400000 i32.const 0 call $~lib/typedarray/Float32Array#includes - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz diff --git a/tests/compiler/wasi/seed.optimized.wat b/tests/compiler/wasi/seed.optimized.wat index 7551fbf30a..37edc48591 100644 --- a/tests/compiler/wasi/seed.optimized.wat +++ b/tests/compiler/wasi/seed.optimized.wat @@ -297,7 +297,7 @@ (local $4 i32) i32.const 5 local.set $1 - i32.const 1404 + i32.const 1381 local.set $0 i32.const 0 i32.const 12 @@ -318,7 +318,7 @@ local.tee $2 i32.const 40 i32.store8 - i32.const 1404 + i32.const 1381 call $~lib/util/number/decimalCount32 local.tee $4 local.get $2 diff --git a/tests/compiler/wasi/seed.untouched.wat b/tests/compiler/wasi/seed.untouched.wat index 7b482d50a1..a36b059110 100644 --- a/tests/compiler/wasi/seed.untouched.wat +++ b/tests/compiler/wasi/seed.untouched.wat @@ -612,7 +612,7 @@ if i32.const 0 i32.const 32 - i32.const 1404 + i32.const 1381 i32.const 5 call $~lib/wasi/index/abort unreachable diff --git a/tests/compiler/wasi/trace.optimized.wat b/tests/compiler/wasi/trace.optimized.wat index 13a8be18f1..0a06b92e84 100644 --- a/tests/compiler/wasi/trace.optimized.wat +++ b/tests/compiler/wasi/trace.optimized.wat @@ -1,15 +1,19 @@ (module (type $i32_=>_i32 (func (param i32) (result 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_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $i32_f64_=>_i32 (func (param i32 f64) (result 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_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) (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_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))) + (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) + (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (import "wasi_snapshot_preview1" "fd_write" (func $~lib/bindings/wasi_snapshot_preview1/fd_write (param i32 i32 i32 i32) (result i32))) (import "wasi_snapshot_preview1" "proc_exit" (func $~lib/bindings/wasi_snapshot_preview1/proc_exit (param i32))) (memory $0 1) @@ -373,6 +377,58 @@ local.get $2 i32.sub ) + (func $~lib/util/number/umul64f (param $0 i64) (param $1 i64) (result i64) + (local $2 i64) + (local $3 i64) + local.get $1 + i64.const 4294967295 + i64.and + local.tee $2 + local.get $0 + i64.const 32 + i64.shr_u + local.tee $3 + i64.mul + local.get $2 + local.get $0 + i64.const 4294967295 + i64.and + local.tee $2 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.set $0 + local.get $3 + local.get $1 + i64.const 32 + i64.shr_u + local.tee $1 + i64.mul + local.get $0 + i64.const 32 + i64.shr_u + i64.add + local.get $1 + local.get $2 + i64.mul + local.get $0 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + i64.add + ) + (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.add + i32.const -64 + i32.sub + ) (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) local.get $0 i32.const 10 @@ -415,14 +471,69 @@ i32.lt_u select ) + (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) + local.get $0 + local.get $1 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.tee $0 + i32.load16_u + local.set $1 + loop $while-continue|1 + i32.const 1 + local.get $5 + local.get $3 + i64.sub + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.sub + i64.gt_u + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.lt_u + select + i32.const 0 + local.get $2 + local.get $3 + i64.sub + local.get $4 + i64.ge_u + i32.const 0 + local.get $3 + local.get $5 + i64.lt_u + select + select + if + local.get $1 + i32.const 1 + i32.sub + local.set $1 + local.get $3 + local.get $4 + i64.add + local.set $3 + br $while-continue|1 + end + end + local.get $0 + local.get $1 + i32.store16 + ) (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) - (local $8 i64) + (local $8 i32) (local $9 i64) - (local $10 i32) + (local $10 i64) (local $11 i64) (local $12 i64) - (local $13 i64) local.get $3 local.get $1 i64.sub @@ -432,25 +543,25 @@ i32.const 0 local.get $4 i32.sub - local.tee $10 + local.tee $8 i64.extend_i32_s i64.shl - local.tee $11 + local.tee $10 i64.const 1 i64.sub - local.tee $12 + local.tee $11 i64.and - local.set $8 + local.set $1 local.get $3 - local.get $10 + local.get $8 i64.extend_i32_s i64.shr_u i32.wrap_i64 - local.tee $7 + local.tee $2 call $~lib/util/number/decimalCount32 - local.set $4 + local.set $7 loop $while-continue|0 - local.get $4 + local.get $7 i32.const 0 i32.gt_s if @@ -465,116 +576,116 @@ block $case3|1 block $case2|1 block $case1|1 - local.get $4 - local.tee $2 + local.get $7 + local.tee $4 i32.const 10 i32.ne if - local.get $2 + local.get $4 i32.const 1 i32.sub br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 end - local.get $7 + local.get $2 i32.const 1000000000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 1000000000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 100000000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 100000000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 10000000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 10000000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 1000000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 1000000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 100000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 100000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 10000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 10000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 1000 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 1000 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 100 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 100 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 + local.get $2 i32.const 10 i32.div_u - local.set $2 - local.get $7 + local.set $4 + local.get $2 i32.const 10 i32.rem_u - local.set $7 + local.set $2 br $break|1 end - local.get $7 - local.set $2 + local.get $2 + local.set $4 i32.const 0 - local.set $7 + local.set $2 br $break|1 end i32.const 0 - local.set $2 + local.set $4 end - local.get $2 + local.get $4 local.get $6 i32.or if @@ -583,7 +694,7 @@ i32.const 1 i32.shl i32.add - local.get $2 + local.get $4 i32.const 65535 i32.and i32.const 48 @@ -594,110 +705,61 @@ i32.add local.set $6 end - local.get $4 + local.get $7 i32.const 1 i32.sub - local.set $4 - local.get $8 - local.get $7 + local.set $7 + local.get $1 + local.get $2 i64.extend_i32_u - local.get $10 + local.get $8 i64.extend_i32_s i64.shl i64.add - local.tee $1 + local.tee $3 local.get $5 i64.le_u if - local.get $4 + local.get $7 global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $4 + local.get $0 + local.get $6 + local.get $5 + local.get $3 + local.get $7 i32.const 2 i32.shl i32.const 1936 i32.add i64.load32_u - local.get $10 + local.get $8 i64.extend_i32_s i64.shl - local.set $3 - local.get $0 - local.get $6 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_u - local.set $4 - loop $while-continue|3 - i32.const 1 - local.get $9 - local.get $1 - i64.sub - local.get $1 - local.get $3 - i64.add - local.get $9 - i64.sub - i64.gt_u - local.get $1 - local.get $3 - i64.add - local.get $9 - i64.lt_u - select - i32.const 0 - local.get $5 - local.get $1 - i64.sub - local.get $3 - i64.ge_u - i32.const 0 - local.get $1 - local.get $9 - i64.lt_u - select - select - if - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.get $3 - i64.add - local.set $1 - br $while-continue|3 - end - end - local.get $2 - local.get $4 - i32.store16 + local.get $9 + call $~lib/util/number/grisuRound local.get $6 return end br $while-continue|0 end end - local.get $10 + local.get $8 i64.extend_i32_s - local.set $13 - loop $while-continue|4 (result i32) + local.set $3 + loop $while-continue|2 (result i32) local.get $5 i64.const 10 i64.mul local.set $5 - local.get $8 + local.get $1 i64.const 10 i64.mul - local.tee $3 - local.get $13 - i64.shr_u local.tee $1 + local.get $3 + i64.shr_u + local.tee $12 local.get $6 i64.extend_i32_s i64.or @@ -706,41 +768,45 @@ if local.get $0 local.get $6 + local.tee $2 i32.const 1 i32.shl i32.add - local.get $1 + local.get $12 i32.wrap_i64 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 - local.get $6 + local.get $2 i32.const 1 i32.add local.set $6 end - local.get $4 + local.get $7 i32.const 1 i32.sub - local.set $4 - local.get $3 - local.get $12 + local.set $7 + local.get $1 + local.get $11 i64.and - local.tee $8 + local.tee $1 local.get $5 i64.ge_u - br_if $while-continue|4 - local.get $4 + br_if $while-continue|2 + local.get $7 global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $8 - local.set $1 + local.get $0 + local.get $6 + local.get $5 + local.get $1 + local.get $10 local.get $9 i32.const 0 - local.get $4 + local.get $7 i32.sub i32.const 2 i32.shl @@ -748,799 +814,581 @@ i32.add i64.load32_u i64.mul - local.set $3 - local.get $0 - local.get $6 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_u - local.set $4 - loop $while-continue|6 - i32.const 1 - local.get $3 - local.get $1 - i64.sub - local.get $1 - local.get $11 - i64.add - local.get $3 - i64.sub - i64.gt_u - local.get $1 - local.get $11 - i64.add - local.get $3 - i64.lt_u - select - i32.const 0 - local.get $5 - local.get $1 - i64.sub - local.get $11 - i64.ge_u - i32.const 0 - local.get $1 - local.get $3 - i64.lt_u - select - select - if - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.get $11 - i64.add - local.set $1 - br $while-continue|6 - end - end - local.get $2 - local.get $4 - i32.store16 + call $~lib/util/number/grisuRound local.get $6 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/grisu2 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i64) + (local $5 i32) + (local $6 i64) + (local $7 i32) + local.get $0 + i64.reinterpret_f64 + local.tee $4 + i64.const 9218868437227405312 + i64.and + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.tee $5 + i32.const 0 + i32.ne + i64.extend_i32_u + i64.const 52 + i64.shl + local.get $4 + i64.const 4503599627370495 + i64.and + i64.add + local.tee $4 + i64.const 1 + i64.shl + i64.const 1 + i64.add + local.tee $6 + i64.clz + i32.wrap_i64 + local.set $3 + local.get $6 + local.get $3 + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_plus + local.get $5 + i32.const 1 + local.get $5 + select + i32.const 1075 + i32.sub + local.tee $5 + i32.const 1 + i32.sub + local.get $3 + i32.sub + local.set $3 + local.get $4 + local.get $4 + i64.const 4503599627370496 + i64.eq + i32.const 1 + i32.add + local.tee $7 + i64.extend_i32_s + i64.shl + i64.const 1 + i64.sub + local.get $5 + local.get $7 + i32.sub + local.get $3 + i32.sub + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_minus + local.get $3 + global.set $~lib/util/number/_exp + i32.const 348 + i32.const -61 + global.get $~lib/util/number/_exp + i32.sub + f64.convert_i32_s + f64.const 0.30102999566398114 + f64.mul + f64.const 347 + f64.add + local.tee $0 + i32.trunc_f64_s + local.tee $3 + local.get $3 + f64.convert_i32_s + local.get $0 + f64.ne + i32.add + i32.const 3 + i32.shr_s + i32.const 1 + i32.add + local.tee $3 + i32.const 3 + i32.shl + local.tee $7 + i32.sub + global.set $~lib/util/number/_K + local.get $7 + i32.const 1064 + i32.add + i64.load + global.set $~lib/util/number/_frc_pow + local.get $3 + i32.const 1 + i32.shl + i32.const 1760 + i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow + global.get $~lib/util/number/_exp_pow + local.set $3 + local.get $1 + local.get $4 + local.get $4 + i64.clz + i32.wrap_i64 + local.tee $1 + i64.extend_i32_s + i64.shl + global.get $~lib/util/number/_frc_pow + local.tee $4 + call $~lib/util/number/umul64f + local.get $5 + local.get $1 + i32.sub + local.get $3 + call $~lib/util/number/umul64e + global.get $~lib/util/number/_frc_plus + local.get $4 + call $~lib/util/number/umul64f + i64.const 1 + i64.sub + local.tee $6 + global.get $~lib/util/number/_exp + local.get $3 + call $~lib/util/number/umul64e + local.get $6 + global.get $~lib/util/number/_frc_minus + local.get $4 + call $~lib/util/number/umul64f + i64.const 1 + i64.add + i64.sub + local.get $2 + call $~lib/util/number/genDigits + ) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $4 - local.get $0 + local.get $0 + local.get $1 + i32.eq + if + return + end + local.get $0 + local.get $1 + i32.lt_u + if local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 + i32.const 7 + i32.and local.get $0 - local.get $1 - i32.lt_u + i32.const 7 + i32.and + i32.eq if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $3 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $4 - i32.const 8 - i32.ge_u + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $4 - i32.const 8 - i32.sub - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $while-continue|1 + return end - end - end - loop $while-continue|2 - local.get $4 - if + local.get $2 + i32.const 1 + i32.sub + local.set $2 local.get $0 - local.tee $2 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $1 - local.get $2 local.get $3 + local.get $4 i32.load8_u i32.store8 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - br $while-continue|2 + br $while-continue|0 end end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 - local.get $4 - i32.add - i32.const 7 - i32.and - if - local.get $4 - i32.eqz - br_if $~lib/util/memory/memmove|inlined.0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $4 + local.get $1 + i64.load + i64.store + local.get $2 i32.const 8 - i32.ge_u - if - local.get $4 - i32.const 8 - i32.sub - local.tee $4 - local.get $0 - i32.add - local.get $1 - local.get $4 - i32.add - i64.load - i64.store - br $while-continue|4 - end - end - end - loop $while-continue|5 - local.get $4 - if - local.get $4 - i32.const 1 i32.sub - local.tee $4 + local.set $2 local.get $0 + i32.const 8 i32.add + local.set $0 local.get $1 - local.get $4 + i32.const 8 i32.add - i32.load8_u - i32.store8 - br $while-continue|5 + local.set $1 + br $while-continue|1 end end end - end - ) - (func $~lib/util/number/utoa_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 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - i32.add - local.get $3 - i32.const 48 - i32.add - i32.store16 - local.get $1 - br_if $do-continue|0 - end - ) - (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $2 - i32.eqz - if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 3145774 - i32.store - local.get $1 - i32.const 2 - i32.add - return - end - local.get $1 - local.get $1 - local.get $2 - i32.add - local.tee $3 - i32.le_s - if (result i32) - local.get $3 - i32.const 21 - i32.le_s - else - i32.const 0 - end - if (result i32) - loop $for-loop|0 - local.get $1 - local.get $3 - i32.lt_s + loop $while-continue|2 + local.get $2 if local.get $0 - local.get $1 + local.tee $3 i32.const 1 - i32.shl i32.add - i32.const 48 - i32.store16 + local.set $0 local.get $1 + local.tee $4 i32.const 1 i32.add local.set $1 - br $for-loop|0 + local.get $3 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 end end - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.const 3145774 - i32.store - local.get $3 - i32.const 2 - i32.add else - local.get $3 - i32.const 21 - i32.le_s - i32.const 0 - local.get $3 - i32.const 0 - i32.gt_s - select - if (result i32) - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.tee $0 - i32.const 2 - i32.add - local.get $0 - i32.const 0 - local.get $2 - i32.sub - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - i32.const 46 - i32.store16 - local.get $1 - i32.const 1 - i32.add - else - local.get $3 - i32.const 0 - i32.le_s - i32.const 0 - i32.const -6 - local.get $3 - i32.lt_s - select - if (result i32) + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 local.get $0 - i32.const 2 - local.get $3 - i32.sub - local.tee $3 - i32.const 1 - i32.shl + local.get $2 i32.add - local.get $0 - local.get $1 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - i32.const 3014704 - i32.store - i32.const 2 - local.set $2 - loop $for-loop|1 + i32.const 7 + i32.and + if local.get $2 - local.get $3 - i32.lt_s + i32.eqz if - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 48 - i32.store16 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 + return end - end - local.get $1 - local.get $3 - i32.add - else - local.get $1 - i32.const 1 - i32.eq - if (result i32) - local.get $0 - i32.const 101 - i32.store16 offset=2 local.get $0 - local.tee $1 - i32.const 4 - i32.add - local.get $3 + local.get $2 i32.const 1 i32.sub - local.tee $0 - i32.const 0 - i32.lt_s local.tee $2 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 i32.add - local.tee $0 - call $~lib/util/number/utoa_simple local.get $1 - i32.const 45 - i32.const 43 local.get $2 - select - i32.store16 offset=4 - local.get $0 - i32.const 2 - i32.add - else - local.get $0 - i32.const 4 - i32.add - local.get $0 - i32.const 2 i32.add - local.get $1 - i32.const 1 - i32.shl - local.tee $2 - i32.const 2 - i32.sub - call $~lib/memory/memory.copy - local.get $0 - i32.const 46 - i32.store16 offset=2 + i32.load8_u + i32.store8 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if local.get $0 local.get $2 - i32.add - local.tee $0 - i32.const 101 - i32.store16 offset=2 - local.get $0 - local.tee $2 - i32.const 4 - i32.add - local.get $3 - i32.const 1 + i32.const 8 i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $3 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 + local.tee $2 i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $2 - i32.const 45 - i32.const 43 - local.get $3 - select - i32.store16 offset=4 - local.get $0 local.get $1 + local.get $2 i32.add - i32.const 2 - i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) - (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) - (local $2 i64) - (local $3 i64) - (local $4 i32) - (local $5 i64) - (local $6 i32) - (local $7 i64) - (local $8 i32) - (local $9 i32) - (local $10 i64) + (func $~lib/util/number/genExponent (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $1 - f64.const 0 - f64.lt - local.tee $8 - if (result f64) - local.get $0 - i32.const 45 - i32.store16 - local.get $1 - f64.neg - else - local.get $1 - end - i64.reinterpret_f64 - local.tee $3 - i64.const 9218868437227405312 - i64.and - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.tee $6 i32.const 0 - i32.ne - i64.extend_i32_u - i64.const 52 - i64.shl - local.get $3 - i64.const 4503599627370495 - i64.and - i64.add - local.tee $2 - i64.const 1 - i64.shl - i64.const 1 - i64.add + i32.lt_s local.tee $3 - local.get $3 - i64.clz - i32.wrap_i64 - local.tee $4 - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_plus - local.get $6 - i32.const 1 - local.get $6 - select - i32.const 1075 - i32.sub - local.tee $6 - i32.const 1 - i32.sub - local.get $4 - i32.sub - local.set $4 - local.get $2 - local.get $2 - i64.const 4503599627370496 - i64.eq - i32.const 1 - i32.add - local.tee $9 - i64.extend_i32_s - i64.shl - i64.const 1 - i64.sub - local.get $6 - local.get $9 - i32.sub - local.get $4 - i32.sub - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_minus - local.get $4 - global.set $~lib/util/number/_exp - i32.const 348 - i32.const -61 - global.get $~lib/util/number/_exp - i32.sub - f64.convert_i32_s - f64.const 0.30102999566398114 - f64.mul - f64.const 347 - f64.add - local.tee $1 - i32.trunc_f64_s - local.tee $4 - local.get $4 - f64.convert_i32_s + if + i32.const 0 + local.get $1 + i32.sub + local.set $1 + end local.get $1 - f64.ne - i32.add - i32.const 3 - i32.shr_s - i32.const 1 - i32.add - local.tee $4 - i32.const 3 - i32.shl - local.tee $9 - i32.sub - global.set $~lib/util/number/_K - local.get $9 - i32.const 1064 - i32.add - i64.load - global.set $~lib/util/number/_frc_pow - local.get $4 - i32.const 1 - i32.shl - i32.const 1760 - i32.add - i32.load16_s - global.set $~lib/util/number/_exp_pow - global.get $~lib/util/number/_frc_pow - local.tee $3 - i64.const 4294967295 - i64.and - local.set $5 - local.get $0 - local.get $8 + call $~lib/util/number/decimalCount32 i32.const 1 - i32.shl i32.add - local.get $0 - local.get $2 - local.get $2 - i64.clz - i32.wrap_i64 - local.tee $0 - i64.extend_i32_s - i64.shl - local.tee $2 - i64.const 32 - i64.shr_u - local.tee $7 - local.get $3 - i64.const 32 - i64.shr_u - local.tee $10 - i64.mul - local.get $5 - local.get $7 - i64.mul - local.get $2 - i64.const 4294967295 - i64.and - local.tee $2 - local.get $5 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $5 - i64.const 32 - i64.shr_u - i64.add - local.get $2 - local.get $10 - i64.mul - local.get $5 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - global.get $~lib/util/number/_exp_pow local.tee $4 - local.get $6 - local.get $0 - i32.sub - i32.add - i32.const -64 - i32.sub - global.get $~lib/util/number/_frc_plus - local.tee $2 - i64.const 32 - i64.shr_u - local.tee $5 - local.get $3 - i64.const 32 - i64.shr_u - local.tee $7 - i64.mul - local.get $3 - i64.const 4294967295 - i64.and - local.tee $10 - local.get $5 - i64.mul - local.get $2 - i64.const 4294967295 - i64.and - local.tee $2 - local.get $10 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $5 - i64.const 32 - i64.shr_u - i64.add - local.get $2 - local.get $7 - i64.mul - local.get $5 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - i64.const 1 - i64.sub - local.tee $2 - local.get $4 - global.get $~lib/util/number/_exp - i32.add - i32.const -64 - i32.sub - local.get $2 - global.get $~lib/util/number/_frc_minus - local.tee $2 - i64.const 32 - i64.shr_u - local.tee $5 - local.get $3 - i64.const 32 - i64.shr_u - local.tee $7 - i64.mul + local.set $2 + loop $do-continue|0 + local.get $1 + i32.const 10 + i32.rem_u + local.set $5 + local.get $1 + i32.const 10 + i32.div_u + local.set $1 + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.const 1 + i32.shl + i32.add + local.get $5 + i32.const 48 + i32.add + i32.store16 + local.get $1 + br_if $do-continue|0 + end + local.get $0 + i32.const 45 + i32.const 43 local.get $3 - i64.const 4294967295 - i64.and - local.tee $3 - local.get $5 - i64.mul + select + i32.store16 + local.get $4 + ) + (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) local.get $2 - i64.const 4294967295 - i64.and - local.tee $2 - local.get $3 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $3 - i64.const 32 - i64.shr_u - i64.add + i32.eqz + if + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 3145774 + i32.store + local.get $1 + i32.const 2 + i32.add + return + end + local.get $1 + local.get $1 local.get $2 - local.get $7 - i64.mul - local.get $3 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - i64.const 1 - i64.add - i64.sub - local.get $8 - call $~lib/util/number/genDigits - local.get $8 - i32.sub - global.get $~lib/util/number/_K - call $~lib/util/number/prettify - local.get $8 i32.add + local.tee $3 + i32.le_s + if (result i32) + local.get $3 + i32.const 21 + i32.le_s + else + i32.const 0 + end + if (result i32) + loop $for-loop|0 + local.get $1 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.const 3145774 + i32.store + local.get $3 + i32.const 2 + i32.add + else + local.get $3 + i32.const 21 + i32.le_s + i32.const 0 + local.get $3 + i32.const 0 + i32.gt_s + select + if (result i32) + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.tee $0 + i32.const 2 + i32.add + local.get $0 + i32.const 0 + local.get $2 + i32.sub + i32.const 1 + i32.shl + call $~lib/util/memory/memmove + local.get $0 + i32.const 46 + i32.store16 + local.get $1 + i32.const 1 + i32.add + else + local.get $3 + i32.const 0 + i32.le_s + i32.const 0 + i32.const -6 + local.get $3 + i32.lt_s + select + if (result i32) + local.get $0 + i32.const 2 + local.get $3 + i32.sub + local.tee $3 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $1 + i32.const 1 + i32.shl + call $~lib/util/memory/memmove + local.get $0 + i32.const 3014704 + i32.store + i32.const 2 + local.set $2 + loop $for-loop|1 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|1 + end + end + local.get $1 + local.get $3 + i32.add + else + local.get $1 + i32.const 1 + i32.eq + if (result i32) + local.get $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + i32.const 4 + i32.add + local.get $3 + i32.const 1 + i32.sub + call $~lib/util/number/genExponent + i32.const 2 + i32.add + else + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.const 1 + i32.shl + local.tee $2 + i32.const 2 + i32.sub + call $~lib/util/memory/memmove + local.get $0 + i32.const 46 + i32.store16 offset=2 + local.get $0 + local.get $2 + i32.add + local.tee $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + i32.const 4 + i32.add + local.get $3 + i32.const 1 + i32.sub + call $~lib/util/number/genExponent + local.get $1 + i32.add + i32.const 2 + i32.add + end + end + end + end ) (func $~lib/util/number/dtoa_stream (param $0 i32) (param $1 f64) (result i32) (local $2 i32) @@ -1608,9 +1456,33 @@ end unreachable end + local.get $1 + f64.const 0 + f64.lt + local.tee $2 + if + local.get $0 + i32.const 45 + i32.store16 + local.get $1 + f64.neg + local.set $1 + end local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add local.get $1 - call $~lib/util/number/dtoa_core + local.get $0 + local.get $2 + call $~lib/util/number/grisu2 + local.get $2 + i32.sub + global.get $~lib/util/number/_K + call $~lib/util/number/prettify + local.get $2 + i32.add ) (func $~lib/wasi/index/abort (param $0 i32) (param $1 i32) (local $2 i32) diff --git a/tests/compiler/wasi/trace.untouched.wat b/tests/compiler/wasi/trace.untouched.wat index c1b5d27963..c53659aaba 100644 --- a/tests/compiler/wasi/trace.untouched.wat +++ b/tests/compiler/wasi/trace.untouched.wat @@ -1,16 +1,20 @@ (module (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 (func (param i32) (result i32))) (type $none_=>_none (func)) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) (type $i32_i32_f64_f64_f64_f64_f64_=>_none (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $i64_i32_=>_none (func (param i64 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_f64_=>_i32 (func (param i32 i32 f64) (result i32))) (type $i32_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) + (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) + (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (import "wasi_snapshot_preview1" "fd_write" (func $~lib/bindings/wasi_snapshot_preview1/fd_write (param i32 i32 i32 i32) (result i32))) (import "wasi_snapshot_preview1" "proc_exit" (func $~lib/bindings/wasi_snapshot_preview1/proc_exit (param i32))) (memory $0 1) @@ -484,6 +488,180 @@ local.get $2 i32.sub ) + (func $~lib/util/number/normalizedBoundaries (param $0 i64) (param $1 i32) + (local $2 i64) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i64.const 1 + i64.shl + i64.const 1 + i64.add + local.set $2 + local.get $1 + i32.const 1 + i32.sub + local.set $3 + local.get $2 + i64.clz + i32.wrap_i64 + local.set $4 + local.get $2 + local.get $4 + i64.extend_i32_s + i64.shl + local.set $2 + local.get $3 + local.get $4 + i32.sub + local.set $3 + i32.const 1 + local.get $0 + i64.const 4503599627370496 + i64.eq + i32.add + local.set $5 + local.get $2 + global.set $~lib/util/number/_frc_plus + local.get $0 + local.get $5 + i64.extend_i32_s + i64.shl + i64.const 1 + i64.sub + local.get $1 + local.get $5 + i32.sub + local.get $3 + i32.sub + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_minus + local.get $3 + global.set $~lib/util/number/_exp + ) + (func $~lib/util/number/getCachedPower (param $0 i32) + (local $1 f64) + (local $2 i32) + (local $3 i32) + i32.const -61 + local.get $0 + i32.sub + f64.convert_i32_s + f64.const 0.30102999566398114 + f64.mul + f64.const 347 + f64.add + local.set $1 + local.get $1 + i32.trunc_f64_s + local.set $2 + local.get $2 + local.get $2 + f64.convert_i32_s + local.get $1 + f64.ne + i32.add + local.set $2 + local.get $2 + i32.const 3 + i32.shr_s + i32.const 1 + i32.add + local.set $3 + i32.const 348 + local.get $3 + i32.const 3 + i32.shl + i32.sub + global.set $~lib/util/number/_K + i32.const 56 + local.get $3 + i32.const 3 + i32.shl + i32.add + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 752 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow + ) + (func $~lib/util/number/umul64f (param $0 i64) (param $1 i64) (result i64) + (local $2 i64) + (local $3 i64) + (local $4 i64) + (local $5 i64) + (local $6 i64) + (local $7 i64) + (local $8 i64) + local.get $0 + i64.const 4294967295 + i64.and + local.set $2 + local.get $1 + i64.const 4294967295 + i64.and + local.set $3 + local.get $0 + i64.const 32 + i64.shr_u + local.set $4 + local.get $1 + i64.const 32 + i64.shr_u + local.set $5 + local.get $2 + local.get $3 + i64.mul + local.set $6 + local.get $4 + local.get $3 + i64.mul + local.get $6 + i64.const 32 + i64.shr_u + i64.add + local.set $7 + local.get $2 + local.get $5 + i64.mul + local.get $7 + i64.const 4294967295 + i64.and + i64.add + local.set $8 + local.get $8 + i64.const 2147483647 + i64.add + local.set $8 + local.get $7 + i64.const 32 + i64.shr_u + local.set $7 + local.get $8 + i64.const 32 + i64.shr_u + local.set $8 + local.get $4 + local.get $5 + i64.mul + local.get $7 + i64.add + local.get $8 + i64.add + ) + (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.add + i32.const 64 + i32.add + ) (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) local.get $0 i32.const 100000 @@ -539,6 +717,74 @@ end unreachable ) + (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.set $6 + local.get $6 + i32.load16_u + local.set $7 + loop $while-continue|1 + local.get $3 + local.get $5 + i64.lt_u + if (result i32) + local.get $2 + local.get $3 + i64.sub + local.get $4 + i64.ge_u + else + i32.const 0 + end + if (result i32) + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.lt_u + if (result i32) + i32.const 1 + else + local.get $5 + local.get $3 + i64.sub + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.sub + i64.gt_u + end + else + i32.const 0 + end + local.set $8 + local.get $8 + if + local.get $7 + i32.const 1 + i32.sub + local.set $7 + local.get $3 + local.get $4 + i64.add + local.set $3 + br $while-continue|1 + end + end + local.get $6 + local.get $7 + i32.store16 + ) (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) @@ -554,14 +800,6 @@ (local $18 i32) (local $19 i64) (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i32) - (local $25 i32) - (local $26 i32) - (local $27 i32) - (local $28 i64) i32.const 0 local.get $4 i32.sub @@ -801,13 +1039,9 @@ i32.add global.set $~lib/util/number/_K local.get $0 - local.set $24 local.get $15 - local.set $18 local.get $5 - local.set $23 local.get $19 - local.set $22 i32.const 928 local.get $14 i32.const 2 @@ -817,79 +1051,15 @@ local.get $7 i64.extend_i32_s i64.shl - local.set $21 local.get $10 - local.set $20 - local.get $24 - local.get $18 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.set $25 - local.get $25 - i32.load16_u - local.set $26 - loop $while-continue|3 - local.get $22 - local.get $20 - i64.lt_u - if (result i32) - local.get $23 - local.get $22 - i64.sub - local.get $21 - i64.ge_u - else - i32.const 0 - end - if (result i32) - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.lt_u - if (result i32) - i32.const 1 - else - local.get $20 - local.get $22 - i64.sub - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.sub - i64.gt_u - end - else - i32.const 0 - end - local.set $27 - local.get $27 - if - local.get $26 - i32.const 1 - i32.sub - local.set $26 - local.get $22 - local.get $21 - i64.add - local.set $22 - br $while-continue|3 - end - end - local.get $25 - local.get $26 - i32.store16 + call $~lib/util/number/grisuRound local.get $15 return end br $while-continue|0 end end - loop $while-continue|4 + loop $while-continue|2 i32.const 1 local.set $16 local.get $16 @@ -906,8 +1076,8 @@ local.get $7 i64.extend_i32_s i64.shr_u - local.set $23 - local.get $23 + local.set $20 + local.get $20 local.get $15 i64.extend_i32_s i64.or @@ -916,16 +1086,16 @@ if local.get $0 local.get $15 - local.tee $26 + local.tee $18 i32.const 1 i32.add local.set $15 - local.get $26 + local.get $18 i32.const 1 i32.shl i32.add i32.const 48 - local.get $23 + local.get $20 i32.wrap_i64 i32.const 65535 i32.and @@ -960,88 +1130,125 @@ i64.mul local.set $10 local.get $0 - local.set $18 local.get $15 - local.set $27 local.get $5 - local.set $28 local.get $13 - local.set $22 local.get $8 - local.set $21 local.get $10 - local.set $20 - local.get $18 - local.get $27 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.set $26 - local.get $26 - i32.load16_u - local.set $25 - loop $while-continue|6 - local.get $22 - local.get $20 - i64.lt_u - if (result i32) - local.get $28 - local.get $22 - i64.sub - local.get $21 - i64.ge_u - else - i32.const 0 - end - if (result i32) - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.lt_u - if (result i32) - i32.const 1 - else - local.get $20 - local.get $22 - i64.sub - local.get $22 - local.get $21 - i64.add - local.get $20 - i64.sub - i64.gt_u - end - else - i32.const 0 - end - local.set $24 - local.get $24 - if - local.get $25 - i32.const 1 - i32.sub - local.set $25 - local.get $22 - local.get $21 - i64.add - local.set $22 - br $while-continue|6 - end - end - local.get $26 - local.get $25 - i32.store16 + call $~lib/util/number/grisuRound local.get $15 return end - br $while-continue|4 + br $while-continue|2 end end unreachable ) + (func $~lib/util/number/grisu2 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (local $3 i64) + (local $4 i32) + (local $5 i64) + (local $6 i64) + (local $7 i32) + (local $8 i64) + (local $9 i32) + (local $10 i64) + (local $11 i32) + (local $12 i64) + (local $13 i32) + (local $14 i64) + (local $15 i64) + local.get $0 + i64.reinterpret_f64 + local.set $3 + local.get $3 + i64.const 9218868437227405312 + i64.and + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.set $4 + local.get $3 + i64.const 4503599627370495 + i64.and + local.set $5 + local.get $4 + i32.const 0 + i32.ne + i64.extend_i32_u + i64.const 52 + i64.shl + local.get $5 + i64.add + local.set $6 + local.get $4 + i32.const 1 + local.get $4 + select + i32.const 1023 + i32.const 52 + i32.add + i32.sub + local.set $4 + local.get $6 + local.get $4 + call $~lib/util/number/normalizedBoundaries + global.get $~lib/util/number/_exp + call $~lib/util/number/getCachedPower + local.get $6 + i64.clz + i32.wrap_i64 + local.set $7 + local.get $6 + local.get $7 + i64.extend_i32_s + i64.shl + local.set $6 + local.get $4 + local.get $7 + i32.sub + local.set $4 + global.get $~lib/util/number/_frc_pow + local.set $8 + global.get $~lib/util/number/_exp_pow + local.set $9 + local.get $6 + local.get $8 + call $~lib/util/number/umul64f + local.set $10 + local.get $4 + local.get $9 + call $~lib/util/number/umul64e + local.set $11 + global.get $~lib/util/number/_frc_plus + local.get $8 + call $~lib/util/number/umul64f + i64.const 1 + i64.sub + local.set $12 + global.get $~lib/util/number/_exp + local.get $9 + call $~lib/util/number/umul64e + local.set $13 + global.get $~lib/util/number/_frc_minus + local.get $8 + call $~lib/util/number/umul64f + i64.const 1 + i64.add + local.set $14 + local.get $12 + local.get $14 + i64.sub + local.set $15 + local.get $1 + local.get $10 + local.get $11 + local.get $12 + local.get $13 + local.get $15 + local.get $2 + call $~lib/util/number/genDigits + ) (func $~lib/util/memory/memcpy (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -2066,238 +2273,233 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + return + end + i32.const 0 + i32.const 1 + i32.lt_s + drop + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + if (result i32) + i32.const 1 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if local.get $0 - local.set $5 local.get $1 - local.set $4 local.get $2 - local.set $3 - local.get $5 - local.get $4 - i32.eq - if - br $~lib/util/memory/memmove|inlined.0 - end + call $~lib/util/memory/memcpy + return + end + local.get $0 + local.get $1 + i32.lt_u + if i32.const 0 - i32.const 1 + i32.const 2 i32.lt_s drop - local.get $4 - local.get $3 - i32.add - local.get $5 - i32.le_u - if (result i32) - i32.const 1 - else - local.get $5 - local.get $3 - i32.add - local.get $4 - i32.le_u - end - if - local.get $5 - local.get $4 - local.get $3 - call $~lib/util/memory/memcpy - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $4 - i32.lt_u + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|0 - local.get $5 - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - local.get $5 - local.tee $7 - i32.const 1 - i32.add - local.set $5 - local.get $7 - local.get $4 - local.tee $7 - i32.const 1 - i32.add - local.set $4 - local.get $7 - i32.load8_u - i32.store8 - br $while-continue|0 - end - end - loop $while-continue|1 - local.get $3 - i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $5 - local.get $4 - i64.load - i64.store - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - i32.const 8 - i32.add - local.set $5 - local.get $4 - i32.const 8 - i32.add - local.set $4 - br $while-continue|1 - end - end - end - loop $while-continue|2 + loop $while-continue|0 + local.get $0 + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.tee $7 + local.get $2 + i32.eqz + if + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 i32.const 1 i32.add - local.set $5 - local.get $7 + local.set $0 local.get $4 - local.tee $7 + local.get $1 + local.tee $4 i32.const 1 i32.add - local.set $4 - local.get $7 + local.set $1 + local.get $4 i32.load8_u i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $while-continue|2 + br $while-continue|0 end end - else - i32.const 0 - i32.const 2 - i32.lt_s - drop - local.get $4 - i32.const 7 - i32.and - local.get $5 - i32.const 7 - i32.and - i32.eq - if - loop $while-continue|3 - local.get $5 - local.get $3 + loop $while-continue|1 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 i32.add - i32.const 7 - i32.and - local.set $6 - local.get $6 - if - local.get $3 - i32.eqz - if - br $~lib/util/memory/memmove|inlined.0 - end - local.get $5 - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.add - local.get $4 - local.get $3 - i32.add - i32.load8_u - i32.store8 - br $while-continue|3 - end - end - loop $while-continue|4 - local.get $3 + local.set $0 + local.get $1 i32.const 8 - i32.ge_u - local.set $6 - local.get $6 - if - local.get $3 - i32.const 8 - i32.sub - local.set $3 - local.get $5 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.add - i64.load - i64.store - br $while-continue|4 - end + i32.add + local.set $1 + br $while-continue|1 end end - loop $while-continue|5 + end + loop $while-continue|2 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $1 + local.tee $4 + i32.const 1 + i32.add + local.set $1 + local.get $4 + i32.load8_u + i32.store8 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|2 + end + end + else + i32.const 0 + i32.const 2 + i32.lt_s + drop + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $while-continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + local.set $3 local.get $3 - local.set $6 - local.get $6 if - local.get $5 - local.get $3 + local.get $2 + i32.eqz + if + return + end + local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $2 i32.add i32.load8_u i32.store8 - br $while-continue|5 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $2 + i32.const 8 + i32.ge_u + local.set $3 + local.get $3 + if + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $while-continue|4 end end end + loop $while-continue|5 + local.get $2 + local.set $3 + local.get $3 + if + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $while-continue|5 + end + end end ) + (func $~lib/memory/memory.copy (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memmove + ) (func $~lib/util/number/utoa32_lut (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -2438,16 +2640,52 @@ i32.store16 end ) + (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 0 + i32.const 1 + i32.ge_s + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa32_lut + ) + (func $~lib/util/number/genExponent (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.set $2 + local.get $2 + if + i32.const 0 + local.get $1 + i32.sub + local.set $1 + end + local.get $1 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.set $3 + local.get $0 + local.get $1 + local.get $3 + call $~lib/util/number/utoa32_core + local.get $0 + i32.const 45 + i32.const 43 + local.get $2 + select + i32.store16 + local.get $3 + ) (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result 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 $11 i32) local.get $2 i32.eqz if @@ -2630,48 +2868,10 @@ local.get $0 i32.const 4 i32.add - local.set $5 local.get $3 i32.const 1 i32.sub - local.set $6 - local.get $6 - i32.const 0 - i32.lt_s - local.set $4 - local.get $4 - if - i32.const 0 - local.get $6 - i32.sub - local.set $6 - end - local.get $6 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.set $7 - local.get $5 - local.set $10 - local.get $6 - local.set $9 - local.get $7 - local.set $8 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $10 - local.get $9 - local.get $8 - call $~lib/util/number/utoa32_lut - local.get $5 - i32.const 45 - i32.const 43 - local.get $4 - select - i32.store16 - local.get $7 + call $~lib/util/number/genExponent local.set $1 local.get $1 i32.const 2 @@ -2681,14 +2881,14 @@ local.get $1 i32.const 1 i32.shl - local.set $7 + local.set $4 local.get $0 i32.const 4 i32.add local.get $0 i32.const 2 i32.add - local.get $7 + local.get $4 i32.const 2 i32.sub call $~lib/memory/memory.copy @@ -2696,58 +2896,20 @@ i32.const 46 i32.store16 offset=2 local.get $0 - local.get $7 + local.get $4 i32.add i32.const 101 i32.store16 offset=2 local.get $1 local.get $0 - local.get $7 + local.get $4 i32.add i32.const 4 i32.add - local.set $9 local.get $3 i32.const 1 i32.sub - local.set $8 - local.get $8 - i32.const 0 - i32.lt_s - local.set $4 - local.get $4 - if - i32.const 0 - local.get $8 - i32.sub - local.set $8 - end - local.get $8 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.set $5 - local.get $9 - local.set $11 - local.get $8 - local.set $6 - local.get $5 - local.set $10 - i32.const 0 - i32.const 1 - i32.ge_s - drop - local.get $11 - local.get $6 - local.get $10 - call $~lib/util/number/utoa32_lut - local.get $9 - i32.const 45 - i32.const 43 - local.get $4 - select - i32.store16 - local.get $5 + call $~lib/util/number/genExponent i32.add local.set $1 local.get $1 @@ -2766,31 +2928,6 @@ (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i64) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i64) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i64) - (local $25 i64) - (local $26 i32) - (local $27 i64) - (local $28 i32) local.get $1 f64.const 0 f64.lt @@ -2805,387 +2942,22 @@ i32.store16 end local.get $1 - local.set $5 local.get $0 - local.set $4 local.get $2 + call $~lib/util/number/grisu2 local.set $3 - local.get $5 - i64.reinterpret_f64 - local.set $6 - local.get $6 - i64.const 9218868437227405312 - i64.and - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.set $7 - local.get $6 - i64.const 4503599627370495 - i64.and - local.set $8 - local.get $7 - i32.const 0 - i32.ne - i64.extend_i32_u - i64.const 52 - i64.shl - local.get $8 - i64.add - local.set $9 - local.get $7 - i32.const 1 - local.get $7 - select - i32.const 1023 - i32.const 52 - i32.add - i32.sub - local.set $7 - local.get $9 - local.set $11 - local.get $7 - local.set $10 - local.get $11 - i64.const 1 - i64.shl - i64.const 1 - i64.add - local.set $12 - local.get $10 - i32.const 1 - i32.sub - local.set $13 - local.get $12 - i64.clz - i32.wrap_i64 - local.set $14 - local.get $12 - local.get $14 - i64.extend_i32_s - i64.shl - local.set $12 - local.get $13 - local.get $14 - i32.sub - local.set $13 - i32.const 1 - local.get $11 - i64.const 4503599627370496 - i64.eq - i32.add - local.set $15 - local.get $12 - global.set $~lib/util/number/_frc_plus - local.get $11 - local.get $15 - i64.extend_i32_s - i64.shl - i64.const 1 - i64.sub - local.get $10 - local.get $15 - i32.sub - local.get $13 - i32.sub - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_minus - local.get $13 - global.set $~lib/util/number/_exp - global.get $~lib/util/number/_exp - local.set $10 - i32.const -61 - local.get $10 - i32.sub - f64.convert_i32_s - f64.const 0.30102999566398114 - f64.mul - f64.const 347 - f64.add - local.set $16 - local.get $16 - i32.trunc_f64_s - local.set $15 - local.get $15 - local.get $15 - f64.convert_i32_s - local.get $16 - f64.ne - i32.add - local.set $15 - local.get $15 - i32.const 3 - i32.shr_s - i32.const 1 - i32.add - local.set $14 - i32.const 348 - local.get $14 - i32.const 3 - i32.shl - i32.sub - global.set $~lib/util/number/_K - i32.const 56 - local.get $14 - i32.const 3 - i32.shl - i32.add - i64.load - global.set $~lib/util/number/_frc_pow - i32.const 752 - local.get $14 - i32.const 1 - i32.shl - i32.add - i32.load16_s - global.set $~lib/util/number/_exp_pow - local.get $9 - i64.clz - i32.wrap_i64 - local.set $14 - local.get $9 - local.get $14 - i64.extend_i32_s - i64.shl - local.set $9 - local.get $7 - local.get $14 - i32.sub - local.set $7 - global.get $~lib/util/number/_frc_pow - local.set $12 - global.get $~lib/util/number/_exp_pow - local.set $15 - local.get $9 - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $18 - local.get $11 - i64.const 4294967295 - i64.and - local.set $19 - local.get $17 - i64.const 32 - i64.shr_u - local.set $20 - local.get $11 - i64.const 32 - i64.shr_u - local.set $21 - local.get $18 - local.get $19 - i64.mul - local.set $22 - local.get $20 - local.get $19 - i64.mul - local.get $22 - i64.const 32 - i64.shr_u - i64.add - local.set $23 - local.get $18 - local.get $21 - i64.mul - local.get $23 - i64.const 4294967295 - i64.and - i64.add - local.set $24 - local.get $24 - i64.const 2147483647 - i64.add - local.set $24 - local.get $23 - i64.const 32 - i64.shr_u - local.set $23 - local.get $24 - i64.const 32 - i64.shr_u - local.set $24 - local.get $20 - local.get $21 - i64.mul - local.get $23 - i64.add - local.get $24 - i64.add - local.set $24 - local.get $7 - local.set $10 - local.get $15 - local.set $13 - local.get $10 - local.get $13 - i32.add - i32.const 64 - i32.add - local.set $10 - global.get $~lib/util/number/_frc_plus - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $23 - local.get $11 - i64.const 4294967295 - i64.and - local.set $22 - local.get $17 - i64.const 32 - i64.shr_u - local.set $21 - local.get $11 - i64.const 32 - i64.shr_u - local.set $20 - local.get $23 - local.get $22 - i64.mul - local.set $19 - local.get $21 - local.get $22 - i64.mul - local.get $19 - i64.const 32 - i64.shr_u - i64.add - local.set $18 - local.get $23 - local.get $20 - i64.mul - local.get $18 - i64.const 4294967295 - i64.and - i64.add - local.set $25 - local.get $25 - i64.const 2147483647 - i64.add - local.set $25 - local.get $18 - i64.const 32 - i64.shr_u - local.set $18 - local.get $25 - i64.const 32 - i64.shr_u - local.set $25 - local.get $21 - local.get $20 - i64.mul - local.get $18 - i64.add - local.get $25 - i64.add - i64.const 1 - i64.sub - local.set $25 - global.get $~lib/util/number/_exp - local.set $26 - local.get $15 - local.set $13 - local.get $26 - local.get $13 - i32.add - i32.const 64 - i32.add - local.set $26 - global.get $~lib/util/number/_frc_minus - local.set $17 - local.get $12 - local.set $11 - local.get $17 - i64.const 4294967295 - i64.and - local.set $18 - local.get $11 - i64.const 4294967295 - i64.and - local.set $19 - local.get $17 - i64.const 32 - i64.shr_u - local.set $20 - local.get $11 - i64.const 32 - i64.shr_u - local.set $21 - local.get $18 - local.get $19 - i64.mul - local.set $22 - local.get $20 - local.get $19 - i64.mul - local.get $22 - i64.const 32 - i64.shr_u - i64.add - local.set $23 - local.get $18 - local.get $21 - i64.mul - local.get $23 - i64.const 4294967295 - i64.and - i64.add - local.set $27 - local.get $27 - i64.const 2147483647 - i64.add - local.set $27 - local.get $23 - i64.const 32 - i64.shr_u - local.set $23 - local.get $27 - i64.const 32 - i64.shr_u - local.set $27 - local.get $20 - local.get $21 - i64.mul - local.get $23 - i64.add - local.get $27 - i64.add - i64.const 1 - i64.add - local.set $27 - local.get $25 - local.get $27 - i64.sub - local.set $23 - local.get $4 - local.get $24 - local.get $10 - local.get $25 - local.get $26 - local.get $23 - local.get $3 - call $~lib/util/number/genDigits - local.set $28 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $28 + local.get $3 local.get $2 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.set $28 - local.get $28 + local.set $3 + local.get $3 local.get $2 i32.add ) diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 9a365e4cff..2ebe94e386 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -1,11 +1,13 @@ (module (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) - (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result 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))) + (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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -110,6 +112,58 @@ i32.const 1 global.set $while/ran ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -124,7 +178,7 @@ if i32.const 0 i32.const 1072 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -146,7 +200,7 @@ if i32.const 0 i32.const 1072 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -165,23 +219,23 @@ local.get $2 i32.clz i32.sub - local.tee $4 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $4 + local.get $3 i32.const 7 i32.sub - local.set $4 + local.set $3 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $4 + local.get $3 i32.const 23 i32.lt_u select @@ -189,72 +243,56 @@ if i32.const 0 i32.const 1072 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 i32.load offset=20 - local.set $3 + local.set $4 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $3 + local.get $4 i32.store offset=20 end - local.get $3 + local.get $4 if - local.get $3 + local.get $4 local.get $5 i32.store offset=16 end - local.get $1 local.get $0 + local.get $3 local.get $2 - local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD + local.get $1 i32.eq if local.get $0 + local.get $3 local.get $2 local.get $4 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - local.get $3 - i32.store offset=96 - local.get $3 + call $~lib/rt/tlsf/SETHEAD + local.get $4 i32.eqz if local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.tee $3 - i32.load offset=4 + local.get $3 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.const -1 i32.xor i32.and - local.set $1 - local.get $3 - local.get $1 - i32.store offset=4 + local.tee $1 + call $~lib/rt/tlsf/SETSL local.get $1 i32.eqz if @@ -262,7 +300,7 @@ local.get $0 i32.load i32.const 1 - local.get $4 + local.get $3 i32.shl i32.const -1 i32.xor @@ -285,7 +323,7 @@ if i32.const 0 i32.const 1072 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -299,22 +337,16 @@ if i32.const 0 i32.const 1072 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load + call $~lib/rt/tlsf/GETRIGHT local.tee $5 + i32.load + local.tee $6 i32.const 1 i32.and if @@ -323,7 +355,7 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $6 i32.const -4 i32.and i32.add @@ -332,7 +364,7 @@ i32.lt_u if local.get $0 - local.get $4 + local.get $5 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 @@ -343,16 +375,10 @@ local.tee $3 i32.store local.get $1 - i32.const 16 - i32.add - local.get $1 + call $~lib/rt/tlsf/GETRIGHT + local.tee $5 i32.load - i32.const -4 - i32.and - i32.add - local.tee $4 - i32.load - local.set $5 + local.set $6 end end local.get $3 @@ -372,7 +398,7 @@ if i32.const 0 i32.const 1072 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable @@ -405,8 +431,8 @@ local.set $1 end end - local.get $4 local.get $5 + local.get $6 i32.const 2 i32.or i32.store @@ -427,7 +453,7 @@ if i32.const 0 i32.const 1072 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -437,17 +463,17 @@ i32.const 16 i32.add i32.add - local.get $4 + local.get $5 i32.ne if i32.const 0 i32.const 1072 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 4 i32.sub local.get $1 @@ -476,13 +502,13 @@ local.get $3 i32.const 7 i32.sub - local.set $6 + local.set $4 end local.get $2 i32.const 16 i32.lt_u i32.const 0 - local.get $6 + local.get $4 i32.const 23 i32.lt_u select @@ -490,21 +516,15 @@ if i32.const 0 i32.const 1072 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $3 local.get $1 i32.const 0 @@ -519,37 +539,28 @@ i32.store offset=16 end local.get $0 + local.get $4 local.get $2 - local.get $6 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add local.get $1 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load i32.const 1 - local.get $6 + local.get $4 i32.shl i32.or i32.store local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 + local.get $4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $2 i32.shl i32.or - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -573,7 +584,7 @@ if i32.const 0 i32.const 1072 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable @@ -590,7 +601,7 @@ if i32.const 0 i32.const 1072 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -618,7 +629,7 @@ if i32.const 0 i32.const 1072 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -670,7 +681,7 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $2 i32.eqz if i32.const 1 @@ -691,7 +702,8 @@ unreachable end i32.const 1216 - local.tee $0 + local.set $2 + i32.const 1216 i32.const 0 i32.store i32.const 2784 @@ -702,35 +714,26 @@ i32.const 23 i32.lt_u if - local.get $1 - i32.const 2 - i32.shl i32.const 1216 - i32.add + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $2 + local.set $0 loop $for-loop|1 - local.get $2 + local.get $0 i32.const 16 i32.lt_u if - local.get $1 - i32.const 4 - i32.shl - local.get $2 - i32.add - i32.const 2 - i32.shl i32.const 1216 - i32.add + local.get $1 + local.get $0 i32.const 0 - i32.store offset=96 - local.get $2 + call $~lib/rt/tlsf/SETHEAD + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end @@ -750,24 +753,23 @@ i32.const 1216 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $2 ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 - i32.load offset=4 + i32.const 0 + call $~lib/rt/tlsf/GETSL i32.const -2 i32.and local.tee $2 if (result i32) local.get $0 + i32.const 0 local.get $2 i32.ctz - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load @@ -779,31 +781,22 @@ local.get $1 i32.ctz local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL local.tee $2 i32.eqz if i32.const 0 i32.const 1072 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 + local.get $1 local.get $2 i32.ctz - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD else i32.const 0 end @@ -817,7 +810,7 @@ if i32.const 0 i32.const 1072 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -836,15 +829,16 @@ local.tee $1 i32.eqz if - i32.const 16 memory.size - local.tee $2 + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 i32.const 16 i32.shl i32.const 16 i32.sub - local.get $0 - i32.load offset=1568 i32.ne i32.shl i32.const 65551 @@ -853,18 +847,16 @@ i32.and i32.const 16 i32.shr_u - local.set $1 - local.get $2 + local.tee $2 local.get $1 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -873,7 +865,7 @@ end end local.get $0 - local.get $2 + local.get $1 i32.const 16 i32.shl memory.size @@ -887,7 +879,7 @@ if i32.const 0 i32.const 1072 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -903,7 +895,7 @@ if i32.const 0 i32.const 1072 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable @@ -958,20 +950,9 @@ i32.and i32.store local.get $1 - i32.const 16 - i32.add - local.tee $0 + call $~lib/rt/tlsf/GETRIGHT 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 + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const -3 i32.and diff --git a/tests/compiler/while.untouched.wat b/tests/compiler/while.untouched.wat index 7caedb7a8b..14e901143f 100644 --- a/tests/compiler/while.untouched.wat +++ b/tests/compiler/while.untouched.wat @@ -2,8 +2,8 @@ (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (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_i32_=>_none (func (param i32 i32 i32))) @@ -482,6 +482,69 @@ i32.const 1 global.set $while/ran ) + (func $~lib/rt/tlsf/SETTAIL (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=1568 + ) + (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/rt/tlsf/GETTAIL (param $0 i32) (result i32) + local.get $0 + i32.load offset=1568 + ) + (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + ) + (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + ) + (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -490,9 +553,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $1 i32.load local.set $2 @@ -505,7 +565,7 @@ if i32.const 0 i32.const 64 - i32.const 277 + i32.const 269 i32.const 14 call $~lib/builtins/abort unreachable @@ -532,7 +592,7 @@ if i32.const 0 i32.const 64 - i32.const 279 + i32.const 271 i32.const 14 call $~lib/builtins/abort unreachable @@ -586,7 +646,7 @@ if i32.const 0 i32.const 64 - i32.const 292 + i32.const 284 i32.const 14 call $~lib/builtins/abort unreachable @@ -611,77 +671,35 @@ end local.get $1 local.get $0 - local.set $10 local.get $4 - local.set $9 local.get $5 - local.set $8 - local.get $10 - local.get $9 - i32.const 4 - i32.shl - local.get $8 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD i32.eq if local.get $0 - local.set $11 local.get $4 - local.set $10 local.get $5 - local.set $9 local.get $7 - local.set $8 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $7 i32.eqz if local.get $0 - local.set $9 local.get $4 + call $~lib/rt/tlsf/GETSL local.set $8 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $9 local.get $0 - local.set $8 local.get $4 - local.set $11 - local.get $9 + local.get $8 i32.const 1 local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $9 - local.set $10 + local.tee $8 + call $~lib/rt/tlsf/SETSL local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.store offset=4 - local.get $9 i32.eqz if local.get $0 @@ -698,6 +716,12 @@ end end ) + (func $~lib/rt/tlsf/GETFREELEFT (param $0 i32) (result i32) + local.get $0 + i32.const 4 + i32.sub + i32.load + ) (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -709,8 +733,6 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) i32.const 1 drop local.get $1 @@ -718,7 +740,7 @@ if i32.const 0 i32.const 64 - i32.const 205 + i32.const 197 i32.const 14 call $~lib/builtins/abort unreachable @@ -735,28 +757,18 @@ if i32.const 0 i32.const 64 - i32.const 207 + i32.const 199 i32.const 14 call $~lib/builtins/abort unreachable end local.get $1 + call $~lib/rt/tlsf/GETRIGHT local.set $3 local.get $3 - i32.const 16 - i32.add - local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 local.get $4 - i32.load - local.set $5 - local.get $5 i32.const 1 i32.and if @@ -767,44 +779,34 @@ i32.and i32.const 16 i32.add - local.get $5 + local.get $4 i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 1073741808 i32.lt_u if local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $1 local.get $2 i32.const 3 i32.and - local.get $3 + local.get $5 i32.or local.tee $2 i32.store local.get $1 - local.set $6 - local.get $6 - i32.const 16 - i32.add - local.get $6 + call $~lib/rt/tlsf/GETRIGHT + local.set $3 + local.get $3 i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add local.set $4 - local.get $4 - i32.load - local.set $5 end end local.get $2 @@ -812,30 +814,26 @@ i32.and if local.get $1 - local.set $6 - local.get $6 - i32.const 4 - i32.sub + call $~lib/rt/tlsf/GETFREELEFT + local.set $5 + local.get $5 i32.load local.set $6 - local.get $6 - i32.load - local.set $3 i32.const 1 drop - local.get $3 + local.get $6 i32.const 1 i32.and i32.eqz if i32.const 0 i32.const 64 - i32.const 228 + i32.const 220 i32.const 16 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $6 i32.const 3 i32.const -1 i32.xor @@ -854,22 +852,22 @@ i32.lt_u if local.get $0 - local.get $6 + local.get $5 call $~lib/rt/tlsf/removeBlock + local.get $5 local.get $6 - local.get $3 i32.const 3 i32.and local.get $7 i32.or local.tee $2 i32.store - local.get $6 + local.get $5 local.set $1 end end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store @@ -895,7 +893,7 @@ if i32.const 0 i32.const 64 - i32.const 243 + i32.const 235 i32.const 14 call $~lib/builtins/abort unreachable @@ -907,18 +905,18 @@ i32.add local.get $8 i32.add - local.get $4 + local.get $3 i32.eq i32.eqz if i32.const 0 i32.const 64 - i32.const 244 + i32.const 236 i32.const 14 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -972,27 +970,15 @@ if i32.const 0 i32.const 64 - i32.const 260 + i32.const 252 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $7 local.get $9 - local.set $3 local.get $10 - local.set $6 - local.get $7 - local.get $3 - i32.const 4 - i32.shl - local.get $6 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 + call $~lib/rt/tlsf/GETHEAD local.set $11 local.get $1 i32.const 0 @@ -1007,24 +993,10 @@ i32.store offset=16 end local.get $0 - local.set $12 local.get $9 - local.set $7 local.get $10 - local.set $3 local.get $1 - local.set $6 - local.get $12 - local.get $7 - i32.const 4 - i32.shl - local.get $3 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=96 + call $~lib/rt/tlsf/SETHEAD local.get $0 local.get $0 i32.load @@ -1034,31 +1006,15 @@ i32.or i32.store local.get $0 - local.set $13 local.get $9 - local.set $12 local.get $0 - local.set $3 local.get $9 - local.set $6 - local.get $3 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 1 local.get $10 i32.shl i32.or - local.set $7 - local.get $13 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -1066,8 +1022,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) i32.const 1 drop local.get $1 @@ -1093,24 +1047,22 @@ if i32.const 0 i32.const 64 - i32.const 386 + i32.const 378 i32.const 5 call $~lib/builtins/abort unreachable end local.get $0 + call $~lib/rt/tlsf/GETTAIL local.set $3 - local.get $3 - i32.load offset=1568 - local.set $4 i32.const 0 - local.set $5 - local.get $4 + local.set $4 + local.get $3 if i32.const 1 drop local.get $1 - local.get $4 + local.get $3 i32.const 16 i32.add i32.ge_u @@ -1118,7 +1070,7 @@ if i32.const 0 i32.const 64 - i32.const 396 + i32.const 388 i32.const 16 call $~lib/builtins/abort unreachable @@ -1126,16 +1078,16 @@ local.get $1 i32.const 16 i32.sub - local.get $4 + local.get $3 i32.eq if local.get $1 i32.const 16 i32.sub local.set $1 - local.get $4 + local.get $3 i32.load - local.set $5 + local.set $4 else nop end @@ -1151,7 +1103,7 @@ if i32.const 0 i32.const 64 - i32.const 408 + i32.const 400 i32.const 5 call $~lib/builtins/abort unreachable @@ -1160,8 +1112,8 @@ local.get $2 local.get $1 i32.sub - local.set $6 - local.get $6 + local.set $5 + local.get $5 i32.const 16 i32.const 16 i32.add @@ -1172,49 +1124,45 @@ i32.const 0 return end - local.get $6 + local.get $5 i32.const 16 i32.const 1 i32.shl i32.sub - local.set $7 + local.set $6 local.get $1 - local.set $8 - local.get $8 + local.set $7 local.get $7 + local.get $6 i32.const 1 i32.or - local.get $5 + local.get $4 i32.const 2 i32.and i32.or i32.store - local.get $8 + local.get $7 i32.const 0 i32.store offset=16 - local.get $8 + local.get $7 i32.const 0 i32.store offset=20 local.get $1 - local.get $6 + local.get $5 i32.add i32.const 16 i32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.const 2 i32.or i32.store local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 local.get $3 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL local.get $0 - local.get $8 + local.get $7 call $~lib/rt/tlsf/insertBlock i32.const 1 ) @@ -1227,10 +1175,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) global.get $~lib/rt/tlsf/ROOT local.set $0 local.get $0 @@ -1280,73 +1224,46 @@ i32.const 0 i32.store local.get $0 - local.set $5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 - i32.store offset=1568 + call $~lib/rt/tlsf/SETTAIL i32.const 0 - local.set $5 + local.set $4 loop $for-loop|0 - local.get $5 + local.get $4 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $5 + local.get $5 if local.get $0 - local.set $8 - local.get $5 - local.set $7 + local.get $4 i32.const 0 - local.set $6 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store offset=4 + call $~lib/rt/tlsf/SETSL i32.const 0 - local.set $8 + local.set $6 loop $for-loop|1 - local.get $8 + local.get $6 i32.const 16 i32.lt_u local.set $7 local.get $7 if local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $4 + local.get $6 i32.const 0 - local.set $6 - local.get $11 - local.get $10 - i32.const 4 - i32.shl - local.get $9 - i32.add - i32.const 2 - i32.shl - i32.add + call $~lib/rt/tlsf/SETHEAD local.get $6 - i32.store offset=96 - local.get $8 i32.const 1 i32.add - local.set $8 + local.set $6 br $for-loop|1 end end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -1359,11 +1276,11 @@ i32.const -1 i32.xor i32.and - local.set $5 + local.set $4 i32.const 0 drop local.get $0 - local.get $5 + local.get $4 memory.size i32.const 16 i32.shl @@ -1383,7 +1300,7 @@ if i32.const 112 i32.const 64 - i32.const 461 + i32.const 453 i32.const 30 call $~lib/builtins/abort unreachable @@ -1409,9 +1326,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $1 i32.const 256 i32.lt_u @@ -1479,31 +1393,24 @@ if i32.const 0 i32.const 64 - i32.const 338 + i32.const 330 i32.const 14 call $~lib/builtins/abort unreachable end local.get $0 - local.set $5 local.get $2 - local.set $4 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 + call $~lib/rt/tlsf/GETSL i32.const 0 i32.const -1 i32.xor local.get $3 i32.shl i32.and - local.set $6 + local.set $5 i32.const 0 - local.set $7 - local.get $6 + local.set $6 + local.get $5 i32.eqz if local.get $0 @@ -1516,79 +1423,48 @@ i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if i32.const 0 - local.set $7 + local.set $6 else - local.get $5 + local.get $4 i32.ctz local.set $2 local.get $0 - local.set $8 local.get $2 - local.set $4 - local.get $8 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/GETSL + local.set $5 i32.const 1 drop - local.get $6 + local.get $5 i32.eqz if i32.const 0 i32.const 64 - i32.const 351 + i32.const 343 i32.const 18 call $~lib/builtins/abort unreachable end local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end else local.get $0 - local.set $9 local.get $2 - local.set $8 - local.get $6 + local.get $5 i32.ctz - local.set $4 - local.get $9 - local.get $8 - i32.const 4 - i32.shl - local.get $4 - i32.add - i32.const 2 - i32.shl - i32.add - i32.load offset=96 - local.set $7 + call $~lib/rt/tlsf/GETHEAD + local.set $6 end - local.get $7 + local.get $6 ) (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) (local $2 i32) @@ -1625,9 +1501,7 @@ i32.const 16 i32.sub local.get $0 - local.set $3 - local.get $3 - i32.load offset=1568 + call $~lib/rt/tlsf/GETTAIL i32.ne i32.shl i32.add @@ -1641,12 +1515,12 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $3 local.get $2 - local.tee $3 - local.get $4 - local.tee $5 + local.tee $4 local.get $3 + local.tee $5 + local.get $4 local.get $5 i32.gt_s select @@ -1656,7 +1530,7 @@ i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -1693,7 +1567,7 @@ if i32.const 0 i32.const 64 - i32.const 365 + i32.const 357 i32.const 14 call $~lib/builtins/abort unreachable @@ -1744,29 +1618,9 @@ i32.and i32.store local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT local.get $1 - local.set $5 - local.get $5 - i32.const 16 - i32.add - local.get $5 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.add + call $~lib/rt/tlsf/GETRIGHT i32.load i32.const 2 i32.const -1 @@ -1786,7 +1640,7 @@ if i32.const 0 i32.const 64 - i32.const 501 + i32.const 493 i32.const 14 call $~lib/builtins/abort unreachable @@ -1833,7 +1687,7 @@ if i32.const 0 i32.const 64 - i32.const 513 + i32.const 505 i32.const 20 call $~lib/builtins/abort unreachable @@ -1854,7 +1708,7 @@ if i32.const 0 i32.const 64 - i32.const 518 + i32.const 510 i32.const 18 call $~lib/builtins/abort unreachable @@ -1875,7 +1729,7 @@ if i32.const 0 i32.const 64 - i32.const 521 + i32.const 513 i32.const 14 call $~lib/builtins/abort unreachable From 2145cf60dd8a8e0151a3c93210eb865420a78317 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Thu, 7 May 2020 18:51:50 +0300 Subject: [PATCH 2/3] increase AlwaysInlineMaxSize to 7 --- src/module.ts | 2 +- tests/compiler/assert-nonnull.optimized.wat | 6 +- tests/compiler/builtins.optimized.wat | 22 +- tests/compiler/call-optional.optimized.wat | 28 +- .../compiler/class-overloading.optimized.wat | 56 +- tests/compiler/do.optimized.wat | 129 +- .../extends-baseaggregate.optimized.wat | 131 +- tests/compiler/for.optimized.wat | 262 +- tests/compiler/if.optimized.wat | 26 - .../implicit-getter-setter.optimized.wat | 115 +- tests/compiler/infer-array.optimized.wat | 18 +- tests/compiler/infer-generic.optimized.wat | 28 +- tests/compiler/instanceof-class.optimized.wat | 7 +- tests/compiler/issues/1095.optimized.wat | 82 +- tests/compiler/managed-cast.optimized.wat | 102 +- tests/compiler/many-locals.optimized.wat | 18 - tests/compiler/number.optimized.wat | 213 +- tests/compiler/object-literal.optimized.wat | 308 +- tests/compiler/possibly-null.optimized.wat | 8 +- tests/compiler/rc/local-init.optimized.wat | 82 +- .../rc/logical-and-mismatch.optimized.wat | 121 +- .../rc/logical-or-mismatch.optimized.wat | 121 +- tests/compiler/rc/optimize.optimized.wat | 252 +- tests/compiler/rc/rereturn.optimized.wat | 117 +- .../rc/ternary-mismatch.optimized.wat | 109 +- tests/compiler/resolve-access.optimized.wat | 210 +- tests/compiler/resolve-binary.optimized.wat | 372 +- .../resolve-elementaccess.optimized.wat | 540 +- .../resolve-function-expression.optimized.wat | 221 +- .../resolve-propertyaccess.optimized.wat | 214 +- tests/compiler/resolve-ternary.optimized.wat | 474 +- tests/compiler/resolve-unary.optimized.wat | 208 +- .../retain-release-sanity.optimized.wat | 264 +- tests/compiler/retain-return.optimized.wat | 167 +- tests/compiler/rt/instanceof.optimized.wat | 32 +- tests/compiler/runtime-full.optimized.wat | 105 +- tests/compiler/std/array-access.optimized.wat | 44 +- .../compiler/std/array-literal.optimized.wat | 156 +- tests/compiler/std/array.optimized.wat | 4854 +- tests/compiler/std/arraybuffer.optimized.wat | 158 +- tests/compiler/std/dataview.optimized.wat | 148 +- tests/compiler/std/map.optimized.wat | 2881 +- tests/compiler/std/math.optimized.wat | 4136 +- tests/compiler/std/object.optimized.wat | 130 +- .../std/operator-overloading.optimized.wat | 8 +- tests/compiler/std/set.optimized.wat | 2717 +- tests/compiler/std/staticarray.optimized.wat | 181 +- .../std/string-casemapping.optimized.wat | 289 +- .../std/string-encoding.optimized.wat | 273 +- tests/compiler/std/string.optimized.wat | 1383 +- tests/compiler/std/symbol.optimized.wat | 223 +- tests/compiler/std/typedarray.optimized.wat | 40465 ++++++++-------- tests/compiler/typeof.optimized.wat | 21 +- tests/compiler/wasi/abort.optimized.wat | 50 +- tests/compiler/wasi/trace.optimized.wat | 330 +- tests/compiler/while.optimized.wat | 141 +- 56 files changed, 33726 insertions(+), 30032 deletions(-) diff --git a/src/module.ts b/src/module.ts index 69d81f6025..d545a119ad 100644 --- a/src/module.ts +++ b/src/module.ts @@ -1457,7 +1457,7 @@ export class Module { binaryen._BinaryenSetAlwaysInlineMaxSize( optimizeLevel == 0 && shrinkLevel >= 0 ? 2 - : 4 + : 7 ); binaryen._BinaryenSetFlexibleInlineMaxSize(65); binaryen._BinaryenSetOneCallerInlineMaxSize(80); diff --git a/tests/compiler/assert-nonnull.optimized.wat b/tests/compiler/assert-nonnull.optimized.wat index c72cde40e7..7422e8e1e5 100644 --- a/tests/compiler/assert-nonnull.optimized.wat +++ b/tests/compiler/assert-nonnull.optimized.wat @@ -140,9 +140,10 @@ (local $1 i32) block $folding-inner0 local.get $0 + local.tee $1 i32.eqz br_if $folding-inner0 - local.get $0 + local.get $1 call $~lib/array/Array#__get local.tee $0 local.get $0 @@ -166,9 +167,10 @@ (local $1 i32) block $folding-inner0 local.get $0 + local.tee $1 i32.eqz br_if $folding-inner0 - local.get $0 + local.get $1 call $~lib/array/Array#__get local.tee $0 local.get $0 diff --git a/tests/compiler/builtins.optimized.wat b/tests/compiler/builtins.optimized.wat index 5d9fd01018..a16e9a8130 100644 --- a/tests/compiler/builtins.optimized.wat +++ b/tests/compiler/builtins.optimized.wat @@ -1,8 +1,8 @@ (module (type $none_=>_none (func)) - (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))) + (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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -53,14 +53,6 @@ select select ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - 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) @@ -154,10 +146,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 diff --git a/tests/compiler/call-optional.optimized.wat b/tests/compiler/call-optional.optimized.wat index a552c118cc..249c3a7d28 100644 --- a/tests/compiler/call-optional.optimized.wat +++ b/tests/compiler/call-optional.optimized.wat @@ -1,8 +1,8 @@ (module (type $none_=>_none (func)) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_=>_none (func (param 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 1024) " \00\00\00\01\00\00\00\01\00\00\00 \00\00\00c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s") @@ -10,13 +10,6 @@ (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "memory" (memory $0)) (start $~start) - (func $call-optional/opt (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 - local.get $0 - local.get $1 - i32.add - i32.add - ) (func $call-optional/opt@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $2of2 block $1of2 @@ -35,10 +28,11 @@ i32.const -2 local.set $2 end + local.get $2 local.get $0 local.get $1 - local.get $2 - call $call-optional/opt + i32.add + i32.add ) (func $~setArgumentsLength (param $0 i32) local.get $0 @@ -75,20 +69,6 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - i32.const 4 - i32.const 5 - call $call-optional/opt - i32.const 12 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 6 - i32.const 1 - call $~lib/builtins/abort - unreachable - end i32.const 1 global.set $~argumentsLength i32.const 3 diff --git a/tests/compiler/class-overloading.optimized.wat b/tests/compiler/class-overloading.optimized.wat index 68a6b7efce..88440f85e3 100644 --- a/tests/compiler/class-overloading.optimized.wat +++ b/tests/compiler/class-overloading.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 $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))) @@ -98,22 +98,13 @@ local.set $0 end local.get $0 - i32.eqz if (result i32) + local.get $0 + else i32.const 3 call $~lib/rt/stub/__alloc - else - local.get $0 end ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - 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) @@ -207,10 +198,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 @@ -240,25 +239,23 @@ i32.const 1184 global.set $class-overloading/which ) - (func $class-overloading/D#constructor (param $0 i32) (result i32) + (func $class-overloading/E#constructor (param $0 i32) (result i32) local.get $0 - if (result i32) - local.get $0 - else - i32.const 6 + i32.eqz + if + i32.const 7 call $~lib/rt/stub/__alloc + local.set $0 end - call $class-overloading/B#constructor - ) - (func $class-overloading/E#constructor (param $0 i32) (result i32) local.get $0 - if (result i32) - local.get $0 - else - i32.const 7 + i32.eqz + if + i32.const 6 call $~lib/rt/stub/__alloc + local.set $0 end - call $class-overloading/D#constructor + local.get $0 + call $class-overloading/B#constructor ) (func $start:class-overloading i32.const 1296 @@ -393,8 +390,9 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - call $class-overloading/D#constructor + i32.const 6 + call $~lib/rt/stub/__alloc + call $class-overloading/B#constructor global.set $class-overloading/a i32.const 1040 global.set $class-overloading/which diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index 31485a2a39..6efe15eb06 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -1,12 +1,11 @@ (module (type $i32_=>_none (func (param i32))) - (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result 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))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result 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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) @@ -107,15 +106,6 @@ i32.const 1 global.set $do/ran ) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -151,14 +141,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -277,9 +259,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -287,7 +275,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -453,12 +441,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -548,14 +536,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -709,10 +703,13 @@ i32.const 23 i32.lt_u if - i32.const 1216 local.get $1 + i32.const 2 + i32.shl + i32.const 1216 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -753,16 +750,16 @@ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 - i32.const 0 - call $~lib/rt/tlsf/GETSL + i32.load offset=4 i32.const -2 i32.and - local.tee $2 + local.tee $1 if (result i32) local.get $0 i32.const 0 - local.get $2 + local.get $1 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -776,8 +773,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -789,7 +791,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -825,14 +827,16 @@ i32.eqz if memory.size - local.tee $1 + local.tee $3 + i32.const 16 + i32.shl + local.set $1 + local.get $3 i32.const 16 local.get $0 i32.load offset=1568 local.get $1 i32.const 16 - i32.shl - i32.const 16 i32.sub i32.ne i32.shl @@ -843,9 +847,11 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $1 - local.get $2 i32.gt_s + local.set $1 + local.get $3 + local.get $2 + local.get $1 select memory.grow i32.const 0 @@ -860,7 +866,7 @@ end end local.get $0 - local.get $1 + local.get $3 i32.const 16 i32.shl memory.size @@ -957,22 +963,17 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $do/Ref#constructor (result i32) - (local $0 i32) + (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $1 + local.get $0 i32.const 1216 i32.gt_u if - local.get $1 + local.get $0 i32.const 16 i32.sub - local.tee $0 + local.tee $1 i32.load offset=4 local.tee $2 i32.const -268435456 @@ -991,14 +992,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 local.get $2 i32.const 1 i32.add i32.store offset=4 - local.get $0 + local.get $1 call $~lib/rt/rtrace/onincrement - local.get $0 + local.get $1 i32.load i32.const 1 i32.and @@ -1011,7 +1012,7 @@ unreachable end end - local.get $1 + local.get $0 ) (func $~lib/rt/pure/__release (param $0 i32) local.get $0 @@ -1242,7 +1243,11 @@ global.set $do/ran i32.const 0 global.set $do/ran - call $do/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $0 loop $do-continue|04 local.get $2 @@ -1260,7 +1265,11 @@ call $~lib/rt/pure/__release end else - call $do/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $1 local.get $0 call $~lib/rt/pure/__release @@ -1307,7 +1316,11 @@ global.set $do/ran i32.const 0 local.set $2 - call $do/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $0 loop $do-continue|05 block $do-break|0 @@ -1327,7 +1340,11 @@ local.set $0 br $do-break|0 end - call $do/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.tee $1 call $~lib/rt/pure/__release local.get $1 diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index 8412a4920f..5d73436993 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -1,13 +1,13 @@ (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 (func (param i32) (result 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 (func (param i32 i32 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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1028) "\01") @@ -30,15 +30,6 @@ (global $~lib/rt/pure/END (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -74,14 +65,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -200,9 +183,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -210,7 +199,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -376,12 +365,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -471,14 +460,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -632,10 +627,13 @@ i32.const 23 i32.lt_u if - i32.const 1568 local.get $1 + i32.const 2 + i32.shl + i32.const 1568 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -699,6 +697,7 @@ ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $1 i32.const 256 i32.lt_u @@ -708,23 +707,22 @@ i32.shr_u local.set $1 else + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 local.get $1 i32.const 536870904 i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.set $1 - end - local.get $1 + select + local.tee $1 i32.const 31 local.get $1 i32.clz @@ -760,7 +758,10 @@ end local.get $0 local.get $2 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const -1 local.get $1 i32.shl @@ -787,8 +788,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -800,7 +806,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -876,6 +882,7 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -907,11 +914,13 @@ memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 + i32.shl + local.set $5 local.get $3 i32.const 16 - i32.shl + local.get $0 + i32.load offset=1568 + local.get $5 i32.const 16 i32.sub i32.ne @@ -939,9 +948,11 @@ i32.const 16 i32.shr_u local.tee $5 + i32.gt_s + local.set $6 local.get $3 local.get $5 - i32.gt_s + local.get $6 select memory.grow i32.const 0 @@ -1010,14 +1021,6 @@ call $~lib/rt/tlsf/prepareBlock local.get $3 ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -1640,16 +1643,22 @@ ) (func $~start (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 20 i32.const 6 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.eqz if + call $~lib/rt/tlsf/maybeInitialize i32.const 20 i32.const 4 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $0 end @@ -2018,9 +2027,13 @@ i32.const 256 i32.gt_u select - local.tee $4 + local.set $4 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $1 local.get $3 diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 66375886ee..9e10e3d2d3 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -3,10 +3,9 @@ (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result 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 $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result 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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) @@ -104,15 +103,6 @@ i32.const 1 global.set $for/ran ) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -148,14 +138,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -274,9 +256,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -284,7 +272,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -450,12 +438,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -545,14 +533,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -706,10 +700,13 @@ i32.const 23 i32.lt_u if - i32.const 1216 local.get $1 + i32.const 2 + i32.shl + i32.const 1216 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -750,16 +747,16 @@ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 - i32.const 0 - call $~lib/rt/tlsf/GETSL + i32.load offset=4 i32.const -2 i32.and - local.tee $2 + local.tee $1 if (result i32) local.get $0 i32.const 0 - local.get $2 + local.get $1 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -773,8 +770,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -786,7 +788,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -822,14 +824,16 @@ i32.eqz if memory.size - local.tee $1 + local.tee $3 + i32.const 16 + i32.shl + local.set $1 + local.get $3 i32.const 16 local.get $0 i32.load offset=1568 local.get $1 i32.const 16 - i32.shl - i32.const 16 i32.sub i32.ne i32.shl @@ -840,9 +844,11 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $1 - local.get $2 i32.gt_s + local.set $1 + local.get $3 + local.get $2 + local.get $1 select memory.grow i32.const 0 @@ -857,7 +863,7 @@ end end local.get $0 - local.get $1 + local.get $3 i32.const 16 i32.shl memory.size @@ -954,22 +960,17 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $for/Ref#constructor (result i32) - (local $0 i32) + (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $1 + local.get $0 i32.const 1216 i32.gt_u if - local.get $1 + local.get $0 i32.const 16 i32.sub - local.tee $0 + local.tee $1 i32.load offset=4 local.tee $2 i32.const -268435456 @@ -988,14 +989,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 local.get $2 i32.const 1 i32.add i32.store offset=4 - local.get $0 + local.get $1 call $~lib/rt/rtrace/onincrement - local.get $0 + local.get $1 i32.load i32.const 1 i32.and @@ -1008,7 +1009,7 @@ unreachable end end - local.get $1 + local.get $0 ) (func $~lib/rt/pure/__release (param $0 i32) local.get $0 @@ -1021,11 +1022,90 @@ call $~lib/rt/pure/decrement end ) + (func $for/testRefAutorelease + (local $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.set $1 + call $~lib/rt/pure/__release + loop $for-loop|0 + block $for-break0 + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + call $~lib/rt/pure/__release + local.get $0 + if + local.get $2 + i32.const 1 + i32.add + local.tee $2 + i32.const 10 + i32.eq + if + local.get $1 + if + local.get $1 + call $~lib/rt/pure/__release + end + i32.const 0 + local.set $1 + br $for-break0 + end + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $1 + call $~lib/rt/pure/__release + local.set $1 + br $for-loop|0 + end + end + end + local.get $2 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 1040 + i32.const 157 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + if + i32.const 0 + i32.const 1040 + i32.const 158 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $for/ran + local.get $1 + call $~lib/rt/pure/__release + ) (func $start:for (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) i32.const 0 global.set $for/ran loop $for-loop|0 @@ -1242,15 +1322,19 @@ end i32.const 0 global.set $for/ran - call $for/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $1 loop $for-loop|03 local.get $1 if - local.get $3 + local.get $2 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 10 i32.eq if @@ -1262,7 +1346,11 @@ call $~lib/rt/pure/__release end else - call $for/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $0 local.get $1 call $~lib/rt/pure/__release @@ -1272,7 +1360,7 @@ br $for-loop|03 end end - local.get $3 + local.get $2 i32.const 10 i32.ne if @@ -1308,65 +1396,7 @@ end i32.const 0 global.set $for/ran - call $for/Ref#constructor - call $for/Ref#constructor - local.set $0 - call $~lib/rt/pure/__release - loop $for-loop|05 - block $for-break0 - call $for/Ref#constructor - local.tee $1 - call $~lib/rt/pure/__release - local.get $1 - if - local.get $2 - i32.const 1 - i32.add - local.tee $2 - i32.const 10 - i32.eq - if - local.get $0 - if - local.get $0 - call $~lib/rt/pure/__release - end - i32.const 0 - local.set $0 - br $for-break0 - end - call $for/Ref#constructor - local.get $0 - call $~lib/rt/pure/__release - local.set $0 - br $for-loop|05 - end - end - end - local.get $2 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 157 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - if - i32.const 0 - i32.const 1040 - i32.const 158 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $for/ran - local.get $0 - call $~lib/rt/pure/__release + call $for/testRefAutorelease global.get $for/ran i32.eqz if diff --git a/tests/compiler/if.optimized.wat b/tests/compiler/if.optimized.wat index 30dca3ad0d..eb9826dac2 100644 --- a/tests/compiler/if.optimized.wat +++ b/tests/compiler/if.optimized.wat @@ -1,6 +1,5 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -11,7 +10,6 @@ (export "ifThen" (func $if/ifThen)) (export "ifThenElseBlock" (func $if/ifThenElse)) (export "ifAlwaysReturns" (func $if/ifAlwaysReturns)) - (start $~start) (func $if/ifThenElse (param $0 i32) (result i32) i32.const 1 i32.const 0 @@ -39,28 +37,4 @@ unreachable end ) - (func $~start - i32.const 0 - call $if/ifThen - if - i32.const 0 - i32.const 1040 - i32.const 17 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - call $if/ifThen - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 18 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - ) ) diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index 0fa0db838c..9498a62677 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -1,12 +1,12 @@ (module (type $i32_=>_none (func (param i32))) - (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_i32_=>_none (func (param i32 i32 i32))) + (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 $none_=>_none (func)) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) @@ -37,15 +37,6 @@ (export "Managed#get:foo" (func $implicit-getter-setter/Managed#get:foo)) (export "Managed#set:foo" (func $implicit-getter-setter/Managed#set:foo)) (export "Managed#constructor" (func $implicit-getter-setter/Managed#constructor)) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -81,14 +72,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -207,9 +190,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -217,7 +206,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -383,12 +372,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -478,14 +467,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -639,10 +634,13 @@ i32.const 23 i32.lt_u if - i32.const 1232 local.get $1 + i32.const 2 + i32.shl + i32.const 1232 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -682,6 +680,7 @@ ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $1 i32.const 256 i32.lt_u @@ -691,23 +690,22 @@ i32.shr_u local.set $1 else + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 local.get $1 i32.const 536870904 i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.set $1 - end - local.get $1 + select + local.tee $1 i32.const 31 local.get $1 i32.clz @@ -743,7 +741,10 @@ end local.get $0 local.get $2 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const -1 local.get $1 i32.shl @@ -770,8 +771,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -783,7 +789,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -795,6 +801,7 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -846,11 +853,13 @@ memory.size local.tee $1 i32.const 16 - local.get $0 - i32.load offset=1568 + i32.shl + local.set $5 local.get $1 i32.const 16 - i32.shl + local.get $0 + i32.load offset=1568 + local.get $5 i32.const 16 i32.sub i32.ne @@ -878,9 +887,11 @@ i32.const 16 i32.shr_u local.tee $5 + i32.gt_s + local.set $6 local.get $1 local.get $5 - i32.gt_s + local.get $6 select memory.grow i32.const 0 @@ -1081,9 +1092,12 @@ local.get $0 i32.eqz if + call $~lib/rt/tlsf/maybeInitialize i32.const 4 i32.const 3 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $0 end @@ -1105,9 +1119,12 @@ local.get $0 i32.eqz if + call $~lib/rt/tlsf/maybeInitialize i32.const 4 i32.const 4 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $0 end diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index 95481f9449..4ecbebaffe 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -293,31 +293,31 @@ i32.const 16 local.get $2 call $~lib/rt/stub/__alloc - local.set $2 + local.tee $2 local.get $0 local.get $1 i32.shl - local.tee $4 + local.tee $1 local.set $5 - local.get $4 + local.get $1 i32.const 0 call $~lib/rt/stub/__alloc - local.set $1 + local.set $4 local.get $3 if - local.get $1 + local.get $4 local.get $3 local.get $5 call $~lib/util/memory/memmove end - local.get $2 - local.get $1 + local.get $4 + local.tee $3 i32.store local.get $2 - local.get $1 + local.get $3 i32.store offset=4 local.get $2 - local.get $4 + local.get $1 i32.store offset=8 local.get $2 local.get $0 diff --git a/tests/compiler/infer-generic.optimized.wat b/tests/compiler/infer-generic.optimized.wat index 8f605b0703..cc4cd0b2ac 100644 --- a/tests/compiler/infer-generic.optimized.wat +++ b/tests/compiler/infer-generic.optimized.wat @@ -2,7 +2,6 @@ (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_f32_i32_i32_=>_i32 (func (param i32 f32 i32 i32) (result i32))) (type $f32_=>_f32 (func (param f32) (result f32))) (memory $0 1) (data (i32.const 1024) " \00\00\00\01\00\00\00\01\00\00\00 \00\00\00i\00n\00f\00e\00r\00-\00g\00e\00n\00e\00r\00i\00c\00.\00t\00s") @@ -15,14 +14,6 @@ (export "test3" (func $infer-generic/test2)) (export "test4" (func $infer-generic/test2)) (start $~start) - (func $start:infer-generic~anonymous|0 (param $0 i32) (param $1 f32) (param $2 i32) (param $3 i32) (result i32) - local.get $1 - f32.const 0 - f32.ne - i32.const 0 - local.get $0 - select - ) (func $~setArgumentsLength (param $0 i32) nop ) @@ -39,20 +30,19 @@ (local $3 i32) i32.const 1132 i32.load - local.set $2 + local.set $1 loop $for-loop|0 local.get $0 - local.get $2 + local.get $1 i32.const 1132 i32.load - local.tee $3 + local.tee $2 + local.get $1 local.get $2 - local.get $3 i32.lt_s select i32.lt_s if - local.get $1 i32.const 1124 i32.load local.get $0 @@ -60,10 +50,12 @@ i32.shl i32.add f32.load - local.get $0 - i32.const 1120 - call $start:infer-generic~anonymous|0 - local.set $1 + f32.const 0 + f32.ne + i32.const 0 + local.get $3 + select + local.set $3 local.get $0 i32.const 1 i32.add diff --git a/tests/compiler/instanceof-class.optimized.wat b/tests/compiler/instanceof-class.optimized.wat index e1d5c7c1c4..0a53353118 100644 --- a/tests/compiler/instanceof-class.optimized.wat +++ b/tests/compiler/instanceof-class.optimized.wat @@ -92,12 +92,13 @@ i32.const 6 call $~lib/rt/stub/__alloc local.tee $0 - if (result i32) - local.get $0 - else + i32.eqz + if i32.const 5 call $~lib/rt/stub/__alloc + local.set $0 end + local.get $0 global.set $instanceof-class/b block $__inlined_func$instanceof-class/Child~instanceof (result i32) i32.const 0 diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index 58c8d49e05..90813b6b59 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -2,11 +2,10 @@ (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result 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_=>_none (func)) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result 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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) @@ -23,15 +22,6 @@ (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -67,14 +57,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -193,9 +175,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -203,7 +191,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -369,12 +357,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -464,14 +452,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -625,10 +619,13 @@ i32.const 23 i32.lt_u if - i32.const 1264 local.get $1 + i32.const 2 + i32.shl + i32.const 1264 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -669,16 +666,16 @@ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 - i32.const 0 - call $~lib/rt/tlsf/GETSL + i32.load offset=4 i32.const -2 i32.and - local.tee $2 + local.tee $1 if (result i32) local.get $0 i32.const 0 - local.get $2 + local.get $1 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -692,8 +689,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -705,7 +707,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -741,14 +743,16 @@ i32.eqz if memory.size - local.tee $1 + local.tee $3 + i32.const 16 + i32.shl + local.set $1 + local.get $3 i32.const 16 local.get $0 i32.load offset=1568 local.get $1 i32.const 16 - i32.shl - i32.const 16 i32.sub i32.ne i32.shl @@ -759,9 +763,11 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $1 - local.get $2 i32.gt_s + local.set $1 + local.get $3 + local.get $2 + local.get $1 select memory.grow i32.const 0 @@ -776,7 +782,7 @@ end end local.get $0 - local.get $1 + local.get $3 i32.const 16 i32.shl memory.size diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index 75840109dd..90bac99444 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -3,9 +3,9 @@ (type $i32_=>_i32 (func (param i32) (result 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))) (type $none_=>_i32 (func (result 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_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -24,15 +24,6 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -68,14 +59,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -194,9 +177,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -204,7 +193,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -370,12 +359,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -465,14 +454,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -626,10 +621,13 @@ i32.const 23 i32.lt_u if - i32.const 1280 local.get $1 + i32.const 2 + i32.shl + i32.const 1280 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -670,16 +668,16 @@ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 - i32.const 0 - call $~lib/rt/tlsf/GETSL + i32.load offset=4 i32.const -2 i32.and - local.tee $2 + local.tee $1 if (result i32) local.get $0 i32.const 0 - local.get $2 + local.get $1 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -693,8 +691,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -706,7 +709,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -717,6 +720,7 @@ (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -743,11 +747,13 @@ memory.size local.tee $2 i32.const 16 - local.get $0 - i32.load offset=1568 + i32.shl + local.set $3 local.get $2 i32.const 16 - i32.shl + local.get $0 + i32.load offset=1568 + local.get $3 i32.const 16 i32.sub i32.ne @@ -759,9 +765,11 @@ i32.const 16 i32.shr_u local.tee $3 + i32.gt_s + local.set $4 local.get $2 local.get $3 - i32.gt_s + local.get $4 select memory.grow i32.const 0 @@ -873,13 +881,6 @@ call $~lib/rt/rtrace/onalloc local.get $2 ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -933,18 +934,23 @@ ) (func $managed-cast/Cat#constructor (result i32) (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 3 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 - i32.eqz - if + if (result i32) + local.get $0 + else + call $~lib/rt/tlsf/maybeInitialize i32.const 4 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.set $0 end - local.get $0 ) (func $~lib/rt/pure/__release (param $0 i32) local.get $0 diff --git a/tests/compiler/many-locals.optimized.wat b/tests/compiler/many-locals.optimized.wat index 4c9f7826dd..7d224119fe 100644 --- a/tests/compiler/many-locals.optimized.wat +++ b/tests/compiler/many-locals.optimized.wat @@ -1,14 +1,10 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1024) "\1c\00\00\00\01\00\00\00\01\00\00\00\1c\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s") (export "memory" (memory $0)) (export "testI32" (func $many-locals/testI32)) (export "testI8" (func $many-locals/testI8)) - (start $~start) (func $many-locals/testI32 (param $0 i32) (result i32) local.get $0 ) @@ -19,18 +15,4 @@ i32.const 24 i32.shr_s ) - (func $~start - i32.const 42 - call $many-locals/testI8 - i32.const 42 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 267 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - ) ) diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 091471b7c6..c247f0ea0d 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -8,7 +8,7 @@ (type $f64_=>_i32 (func (param f64) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) - (type $i32_i64_i32_i64_i32_i64_=>_i32 (func (param i32 i64 i32 i64 i32 i64) (result i32))) + (type $i32_i64_i64_i32_i64_=>_i32 (func (param i32 i64 i64 i32 i64) (result i32))) (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -233,14 +233,6 @@ i32.const 1040 end ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - 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) @@ -334,10 +326,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 @@ -394,13 +394,6 @@ i64.shr_u i64.add ) - (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.add - i32.const -64 - i32.sub - ) (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) local.get $0 local.get $1 @@ -457,7 +450,8 @@ local.get $1 i32.store16 ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) + (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i32) (param $4 i64) (result i32) + (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) @@ -465,14 +459,14 @@ (local $10 i64) (local $11 i64) (local $12 i64) - local.get $3 + local.get $2 local.get $1 i64.sub local.set $9 - local.get $3 + local.get $2 i64.const 1 i32.const 0 - local.get $4 + local.get $3 i32.sub local.tee $8 i64.extend_i32_s @@ -483,12 +477,12 @@ local.tee $11 i64.and local.set $1 - local.get $3 + local.get $2 local.get $8 i64.extend_i32_s i64.shr_u i32.wrap_i64 - local.tee $2 + local.tee $5 call $~lib/util/number/decimalCount32 local.set $7 loop $while-continue|0 @@ -516,106 +510,106 @@ i32.sub br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 end - local.get $2 + local.get $5 i32.const 1000000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 1000000000 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 100000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 100000000 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 10000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 10000000 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 1000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 1000000 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 100000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 100000 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 10000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 10000 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 1000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 1000 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 100 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 100 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 10 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 10 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 - local.set $4 + local.get $5 + local.set $3 i32.const 0 - local.set $2 + local.set $5 br $break|1 end i32.const 0 - local.set $4 + local.set $3 end - local.get $4 + local.get $3 local.get $6 i32.or if @@ -624,7 +618,7 @@ i32.const 1 i32.shl i32.add - local.get $4 + local.get $3 i32.const 65535 i32.and i32.const 48 @@ -640,14 +634,14 @@ i32.sub local.set $7 local.get $1 - local.get $2 + local.get $5 i64.extend_i32_u local.get $8 i64.extend_i32_s i64.shl i64.add - local.tee $3 - local.get $5 + local.tee $2 + local.get $4 i64.le_u if local.get $7 @@ -656,8 +650,8 @@ global.set $~lib/util/number/_K local.get $0 local.get $6 - local.get $5 - local.get $3 + local.get $4 + local.get $2 local.get $7 i32.const 2 i32.shl @@ -677,19 +671,19 @@ end local.get $8 i64.extend_i32_s - local.set $12 + local.set $2 loop $while-continue|2 - local.get $5 + local.get $4 i64.const 10 i64.mul - local.set $5 + local.set $4 local.get $1 i64.const 10 i64.mul - local.tee $3 - local.get $12 - i64.shr_u local.tee $1 + local.get $2 + i64.shr_u + local.tee $12 local.get $6 i64.extend_i32_s i64.or @@ -701,7 +695,7 @@ i32.const 1 i32.shl i32.add - local.get $1 + local.get $12 i32.wrap_i64 i32.const 65535 i32.and @@ -717,11 +711,11 @@ i32.const 1 i32.sub local.set $7 - local.get $3 + local.get $1 local.get $11 i64.and local.tee $1 - local.get $5 + local.get $4 i64.ge_u br_if $while-continue|2 end @@ -731,7 +725,7 @@ global.set $~lib/util/number/_K local.get $0 local.get $6 - local.get $5 + local.get $4 local.get $1 local.get $10 local.get $9 @@ -1153,46 +1147,46 @@ (local $4 i32) i32.const 0 local.get $0 - call $~lib/string/String#get:length - local.tee $4 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $2 + i32.const 0 + local.get $2 i32.lt_s - local.set $2 + select + local.tee $3 local.get $1 i32.const 0 local.get $1 i32.const 0 i32.gt_s select - local.tee $3 - local.get $4 - i32.lt_s - local.set $1 - i32.const 0 - local.get $4 + local.tee $1 local.get $2 - select - local.tee $2 - local.get $3 - local.get $4 local.get $1 - select - local.tee $3 local.get $2 + i32.lt_s + select + local.tee $1 local.get $3 + local.get $1 i32.gt_s select i32.const 1 i32.shl - local.tee $1 - local.get $2 + local.tee $4 local.get $3 - local.get $2 + local.get $1 local.get $3 + local.get $1 i32.lt_s select i32.const 1 i32.shl - local.tee $2 + local.tee $1 i32.sub local.tee $3 i32.eqz @@ -1201,12 +1195,12 @@ return end i32.const 0 - local.get $1 local.get $4 + local.get $2 i32.const 1 i32.shl i32.eq - local.get $2 + local.get $1 select if local.get $0 @@ -1214,13 +1208,13 @@ end local.get $3 call $~lib/rt/stub/__alloc - local.tee $1 + local.tee $2 local.get $0 - local.get $2 + local.get $1 i32.add local.get $3 call $~lib/util/memory/memmove - local.get $1 + local.get $2 ) (func $~lib/number/F32.isSafeInteger (param $0 f32) (result i32) local.get $0 @@ -1320,18 +1314,17 @@ global.get $~lib/util/number/_frc_pow local.tee $3 call $~lib/util/number/umul64f - i32.const -62 - local.get $0 - call $~lib/util/number/umul64e global.get $~lib/util/number/_frc_plus local.get $3 call $~lib/util/number/umul64f i64.const 1 i64.sub local.tee $4 - global.get $~lib/util/number/_exp local.get $0 - call $~lib/util/number/umul64e + global.get $~lib/util/number/_exp + i32.add + i32.const -64 + i32.sub local.get $4 global.get $~lib/util/number/_frc_minus local.get $3 diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index 5f34354273..b8f62c00d1 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -1,13 +1,13 @@ (module (type $i32_=>_none (func (param i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result 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))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -29,15 +29,6 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -73,14 +64,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -199,9 +182,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -209,7 +198,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -375,12 +364,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -470,14 +459,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -631,10 +626,13 @@ i32.const 23 i32.lt_u if - i32.const 1440 local.get $1 + i32.const 2 + i32.shl + i32.const 1440 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -674,6 +672,7 @@ ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $1 i32.const 256 i32.lt_u @@ -683,23 +682,22 @@ i32.shr_u local.set $1 else + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 local.get $1 i32.const 536870904 i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.set $1 - end - local.get $1 + select + local.tee $1 i32.const 31 local.get $1 i32.clz @@ -735,7 +733,10 @@ end local.get $0 local.get $2 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const -1 local.get $1 i32.shl @@ -762,8 +763,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -775,7 +781,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -787,6 +793,7 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -838,11 +845,13 @@ memory.size local.tee $1 i32.const 16 - local.get $0 - i32.load offset=1568 + i32.shl + local.set $5 local.get $1 i32.const 16 - i32.shl + local.get $0 + i32.load offset=1568 + local.get $5 i32.const 16 i32.sub i32.ne @@ -870,9 +879,11 @@ i32.const 16 i32.shr_u local.tee $5 + i32.gt_s + local.set $6 local.get $1 local.get $5 - i32.gt_s + local.get $6 select memory.grow i32.const 0 @@ -999,14 +1010,6 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -1069,14 +1072,6 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - 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) @@ -1170,10 +1165,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 @@ -1360,6 +1363,79 @@ end end ) + (func $~lib/string/String#substring (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 0 + i32.const 1036 + i32.load + i32.const 1 + i32.shr_u + local.tee $0 + i32.const 0 + local.get $0 + i32.lt_s + select + local.tee $1 + i32.const 5 + local.get $0 + i32.const 5 + local.get $0 + i32.lt_s + select + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + i32.const 1 + i32.shl + local.tee $3 + local.get $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select + i32.const 1 + i32.shl + local.tee $1 + i32.sub + local.tee $2 + i32.eqz + if + i32.const 1312 + return + end + i32.const 0 + local.get $3 + local.get $0 + i32.const 1 + i32.shl + i32.eq + local.get $1 + select + if + i32.const 1040 + return + end + call $~lib/rt/tlsf/maybeInitialize + local.get $2 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $0 + local.get $1 + i32.const 1040 + i32.add + local.get $2 + call $~lib/util/memory/memmove + local.get $0 + call $~lib/rt/pure/__retain + ) (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) local.get $1 local.get $1 @@ -1731,11 +1807,12 @@ (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 8 i32.const 3 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $3 i32.const 0 @@ -1774,87 +1851,32 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize i32.const 8 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $0 i32.const 0 i32.store - local.get $2 + local.get $0 i32.const 0 i32.store offset=4 - local.get $2 + local.get $0 i32.const 123 i32.store - local.get $2 - block $__inlined_func$~lib/string/String#substring (result i32) - i32.const 1312 - i32.const 0 - i32.const 1040 - call $~lib/string/String#get:length - local.tee $5 - i32.const 0 - local.get $5 - i32.lt_s - select - local.tee $4 - i32.const 5 - local.get $5 - i32.const 5 - local.get $5 - i32.lt_s - select - local.tee $1 - local.get $4 - local.get $1 - i32.gt_s - select - i32.const 1 - i32.shl - local.tee $0 - local.get $4 - local.get $1 - local.get $4 - local.get $1 - i32.lt_s - select - i32.const 1 - i32.shl - local.tee $4 - i32.sub - local.tee $1 - i32.eqz - br_if $__inlined_func$~lib/string/String#substring - drop - i32.const 1040 - i32.const 0 - local.get $0 - local.get $5 - i32.const 1 - i32.shl - i32.eq - local.get $4 - select - br_if $__inlined_func$~lib/string/String#substring - drop - local.get $1 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $4 - i32.const 1040 - i32.add - local.get $1 - call $~lib/util/memory/memmove - local.get $0 - call $~lib/rt/pure/__retain - end + local.get $0 + call $~lib/string/String#substring i32.store offset=4 - local.get $2 + local.get $0 call $object-literal/testUnmanaged + call $~lib/rt/tlsf/maybeInitialize i32.const 65 i32.const 4 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -1942,9 +1964,12 @@ i32.store8 offset=64 local.get $0 call $object-literal/testOmittedTypes + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 5 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $2 i32.const 0 @@ -1999,9 +2024,12 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize i32.const 40 i32.const 6 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $1 i32.const 1392 diff --git a/tests/compiler/possibly-null.optimized.wat b/tests/compiler/possibly-null.optimized.wat index cb9bd243f8..8a344aa5aa 100644 --- a/tests/compiler/possibly-null.optimized.wat +++ b/tests/compiler/possibly-null.optimized.wat @@ -49,10 +49,10 @@ local.get $0 if local.get $1 - local.get $0 - local.get $1 - select - local.set $0 + if + local.get $1 + local.set $0 + end br $while-continue|0 end end diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index daffd6c278..65aa21ec96 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -2,11 +2,10 @@ (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result 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_=>_none (func)) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result 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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) @@ -22,15 +21,6 @@ (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -66,14 +56,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -192,9 +174,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -202,7 +190,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -368,12 +356,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -463,14 +451,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -624,10 +618,13 @@ i32.const 23 i32.lt_u if - i32.const 1200 local.get $1 + i32.const 2 + i32.shl + i32.const 1200 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -668,16 +665,16 @@ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 - i32.const 0 - call $~lib/rt/tlsf/GETSL + i32.load offset=4 i32.const -2 i32.and - local.tee $2 + local.tee $1 if (result i32) local.get $0 i32.const 0 - local.get $2 + local.get $1 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -691,8 +688,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -704,7 +706,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -740,14 +742,16 @@ i32.eqz if memory.size - local.tee $1 + local.tee $3 + i32.const 16 + i32.shl + local.set $1 + local.get $3 i32.const 16 local.get $0 i32.load offset=1568 local.get $1 i32.const 16 - i32.shl - i32.const 16 i32.sub i32.ne i32.shl @@ -758,9 +762,11 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $1 - local.get $2 i32.gt_s + local.set $1 + local.get $3 + local.get $2 + local.get $1 select memory.grow i32.const 0 @@ -775,7 +781,7 @@ end end local.get $0 - local.get $1 + local.get $3 i32.const 16 i32.shl memory.size diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index 8763b19e3f..922338bd13 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -2,11 +2,10 @@ (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result 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))) (type $none_=>_none (func)) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param 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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) @@ -22,15 +21,6 @@ (global $rc/logical-and-mismatch/gloRef (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -66,14 +56,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -192,9 +174,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -202,7 +190,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -368,12 +356,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -463,14 +451,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -624,10 +618,13 @@ i32.const 23 i32.lt_u if - i32.const 1184 local.get $1 + i32.const 2 + i32.shl + i32.const 1184 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -668,16 +665,16 @@ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 - i32.const 0 - call $~lib/rt/tlsf/GETSL + i32.load offset=4 i32.const -2 i32.and - local.tee $2 + local.tee $1 if (result i32) local.get $0 i32.const 0 - local.get $2 + local.get $1 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -691,8 +688,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -704,7 +706,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -740,14 +742,16 @@ i32.eqz if memory.size - local.tee $1 + local.tee $3 + i32.const 16 + i32.shl + local.set $1 + local.get $3 i32.const 16 local.get $0 i32.load offset=1568 local.get $1 i32.const 16 - i32.shl - i32.const 16 i32.sub i32.ne i32.shl @@ -758,9 +762,11 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $1 - local.get $2 i32.gt_s + local.set $1 + local.get $3 + local.get $2 + local.get $1 select memory.grow i32.const 0 @@ -775,7 +781,7 @@ end end local.get $0 - local.get $1 + local.get $3 i32.const 16 i32.shl memory.size @@ -923,13 +929,6 @@ end local.get $0 ) - (func $rc/logical-and-mismatch/Ref#constructor (result i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - ) (func $~lib/rt/pure/__release (param $0 i32) local.get $0 i32.const 1184 @@ -943,9 +942,17 @@ ) (func $~start (local $0 i32) - call $rc/logical-and-mismatch/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain global.set $rc/logical-and-mismatch/gloRef - call $rc/logical-and-mismatch/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.tee $0 if local.get $0 @@ -959,18 +966,30 @@ global.get $rc/logical-and-mismatch/gloRef local.tee $0 if (result i32) - call $rc/logical-and-mismatch/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + 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/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.tee $0 if local.get $0 call $~lib/rt/pure/__release - call $rc/logical-and-mismatch/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $0 end local.get $0 diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index 4b29c21ab8..18639e5dbe 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -2,11 +2,10 @@ (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result 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))) (type $none_=>_none (func)) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param 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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) @@ -22,15 +21,6 @@ (global $rc/logical-or-mismatch/gloRef (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -66,14 +56,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -192,9 +174,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -202,7 +190,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -368,12 +356,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -463,14 +451,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -624,10 +618,13 @@ i32.const 23 i32.lt_u if - i32.const 1184 local.get $1 + i32.const 2 + i32.shl + i32.const 1184 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -668,16 +665,16 @@ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 - i32.const 0 - call $~lib/rt/tlsf/GETSL + i32.load offset=4 i32.const -2 i32.and - local.tee $2 + local.tee $1 if (result i32) local.get $0 i32.const 0 - local.get $2 + local.get $1 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -691,8 +688,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -704,7 +706,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -740,14 +742,16 @@ i32.eqz if memory.size - local.tee $1 + local.tee $3 + i32.const 16 + i32.shl + local.set $1 + local.get $3 i32.const 16 local.get $0 i32.load offset=1568 local.get $1 i32.const 16 - i32.shl - i32.const 16 i32.sub i32.ne i32.shl @@ -758,9 +762,11 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $1 - local.get $2 i32.gt_s + local.set $1 + local.get $3 + local.get $2 + local.get $1 select memory.grow i32.const 0 @@ -775,7 +781,7 @@ end end local.get $0 - local.get $1 + local.get $3 i32.const 16 i32.shl memory.size @@ -923,13 +929,6 @@ end local.get $0 ) - (func $rc/logical-or-mismatch/Ref#constructor (result i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - ) (func $~lib/rt/pure/__release (param $0 i32) local.get $0 i32.const 1184 @@ -943,9 +942,17 @@ ) (func $~start (local $0 i32) - call $rc/logical-or-mismatch/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain global.set $rc/logical-or-mismatch/gloRef - call $rc/logical-or-mismatch/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.tee $0 i32.eqz if @@ -963,16 +970,28 @@ local.get $0 call $~lib/rt/pure/__retain else - call $rc/logical-or-mismatch/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain end call $~lib/rt/pure/__release - call $rc/logical-or-mismatch/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.tee $0 i32.eqz if local.get $0 call $~lib/rt/pure/__release - call $rc/logical-or-mismatch/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $0 end local.get $0 diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 09b023696f..62229dd6ca 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -1,12 +1,12 @@ (module (type $i32_=>_none (func (param i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (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))) - (type $none_=>_none (func)) (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 "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -41,7 +41,7 @@ (export "OptimizeARC.eliminates.replaceAlreadyRetained" (func $rc/optimize/eliminated_rr)) (export "OptimizeARC.keeps.partialRetains" (func $rc/optimize/OptimizeARC.keeps.partialRetains)) (export "OptimizeARC.keeps.reachesReturn" (func $rc/optimize/OptimizeARC.keeps.reachesReturn)) - (export "FinalizeARC.eliminates.unnecessaryAllocation" (func $rc/optimize/eliminated_v)) + (export "FinalizeARC.eliminates.unnecessaryAllocation" (func $rc/optimize/FinalizeARC.eliminates.unnecessaryAllocation)) (export "FinalizeARC.eliminates.unnecessaryPair" (func $rc/optimize/eliminated_vi)) (export "FinalizeARC.eliminates.unnecessaryStaticPair" (func $rc/optimize/eliminated_v)) (export "FinalizeARC.eliminates.unnecessaryStaticRetain" (func $rc/optimize/eliminated_v)) @@ -111,15 +111,6 @@ end local.get $0 ) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -155,14 +146,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -281,9 +264,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -291,7 +280,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -457,12 +446,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -552,14 +541,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -713,10 +708,13 @@ i32.const 23 i32.lt_u if - i32.const 1216 local.get $1 + i32.const 2 + i32.shl + i32.const 1216 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -754,25 +752,92 @@ end local.get $2 ) - (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - local.get $0 + (local $3 i32) + local.get $1 + i32.const 256 + i32.lt_u + if + local.get $1 + i32.const 4 + i32.shr_u + local.set $1 + else + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 + local.get $1 + i32.const 536870904 + i32.lt_u + select + local.tee $1 + i32.const 31 + local.get $1 + i32.clz + i32.sub + local.tee $2 + i32.const 4 + i32.sub + i32.shr_u + i32.const 16 + i32.xor + local.set $1 + local.get $2 + i32.const 7 + i32.sub + local.set $2 + end + local.get $1 + i32.const 16 + i32.lt_u i32.const 0 - call $~lib/rt/tlsf/GETSL - i32.const -2 + local.get $2 + i32.const 23 + i32.lt_u + select + i32.eqz + if + i32.const 0 + i32.const 1088 + i32.const 330 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + i32.const -1 + local.get $1 + i32.shl i32.and - local.tee $2 + local.tee $1 if (result i32) local.get $0 - i32.const 0 local.get $2 + local.get $1 i32.ctz call $~lib/rt/tlsf/GETHEAD else local.get $0 i32.load - i32.const -2 + i32.const -1 + local.get $2 + i32.const 1 + i32.add + i32.shl i32.and local.tee $1 if (result i32) @@ -780,8 +845,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -793,7 +863,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -801,10 +871,11 @@ end end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -814,7 +885,31 @@ call $~lib/builtins/abort unreachable end + local.get $1 + local.tee $3 + i32.const 1073741808 + i32.ge_u + if + i32.const 1136 + i32.const 1088 + i32.const 453 + i32.const 30 + call $~lib/builtins/abort + unreachable + end local.get $0 + local.get $3 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $1 + i32.const 16 + local.get $1 + i32.const 16 + i32.gt_u + select + local.tee $4 call $~lib/rt/tlsf/searchBlock local.tee $1 i32.eqz @@ -824,6 +919,7 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 + local.get $4 call $~lib/rt/tlsf/searchBlock local.tee $1 i32.eqz @@ -831,31 +927,51 @@ memory.size local.tee $1 i32.const 16 - local.get $0 - i32.load offset=1568 + i32.shl + local.set $5 local.get $1 i32.const 16 - i32.shl + local.get $0 + i32.load offset=1568 + local.get $5 i32.const 16 i32.sub i32.ne i32.shl - i32.const 65551 + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 + local.get $4 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 i32.add i32.const -65536 i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $1 - local.get $2 + local.tee $5 i32.gt_s + local.set $6 + local.get $1 + local.get $5 + local.get $6 select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $5 memory.grow i32.const 0 i32.lt_s @@ -872,6 +988,7 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 + local.get $4 call $~lib/rt/tlsf/searchBlock local.tee $1 i32.eqz @@ -889,7 +1006,7 @@ i32.load i32.const -4 i32.and - i32.const 16 + local.get $4 i32.lt_u if i32.const 0 @@ -903,34 +1020,48 @@ i32.const 0 i32.store offset=4 local.get $1 - i32.const 3 + local.get $2 i32.store offset=8 local.get $1 - i32.const 0 + local.get $3 i32.store offset=12 local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock local.get $1 i32.load - local.tee $2 + local.set $2 + local.get $4 + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1088 + i32.const 357 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $2 i32.const -4 i32.and - i32.const 16 + local.get $4 i32.sub local.tee $3 i32.const 32 i32.ge_u if local.get $1 + local.get $4 local.get $2 i32.const 2 i32.and - i32.const 16 i32.or i32.store + local.get $4 local.get $1 - i32.const 32 + i32.const 16 + i32.add i32.add local.tee $2 local.get $3 @@ -963,6 +1094,8 @@ ) (func $rc/optimize/getRef (result i32) call $~lib/rt/tlsf/maybeInitialize + i32.const 0 + i32.const 3 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add @@ -981,6 +1114,8 @@ ) (func $rc/optimize/eliminated_rr (param $0 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize + i32.const 0 + i32.const 3 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add @@ -1021,6 +1156,13 @@ call $~lib/rt/pure/__release i32.const 0 ) + (func $rc/optimize/FinalizeARC.eliminates.unnecessaryAllocation + call $~lib/rt/tlsf/maybeInitialize + i32.const 1 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + drop + ) (func $rc/optimize/FinalizeARC.keeps.dynamicRetain (param $0 i32) local.get $0 call $~lib/rt/pure/__retain diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index dafdc9f9b4..9fff994434 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -1,12 +1,12 @@ (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 $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))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $none_=>_none (func)) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -21,17 +21,9 @@ (export "__alloc" (func $~lib/rt/tlsf/__alloc)) (export "__retain" (func $~lib/rt/pure/__retain)) (export "__release" (func $~lib/rt/pure/__release)) - (export "__collect" (func $~start)) + (export "__collect" (func $~lib/rt/pure/__collect)) (export "__rtti_base" (global $~lib/rt/__rtti_base)) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) + (start $~start) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -67,14 +59,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -193,9 +177,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -203,7 +193,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -369,12 +359,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -464,14 +454,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -625,10 +621,13 @@ i32.const 23 i32.lt_u if - i32.const 1232 local.get $1 + i32.const 2 + i32.shl + i32.const 1232 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -668,6 +667,7 @@ ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $1 i32.const 256 i32.lt_u @@ -677,23 +677,22 @@ i32.shr_u local.set $1 else + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 local.get $1 i32.const 536870904 i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.set $1 - end - local.get $1 + select + local.tee $1 i32.const 31 local.get $1 i32.clz @@ -729,7 +728,10 @@ end local.get $0 local.get $2 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const -1 local.get $1 i32.shl @@ -756,8 +758,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -769,7 +776,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -781,6 +788,7 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -832,11 +840,13 @@ memory.size local.tee $1 i32.const 16 - local.get $0 - i32.load offset=1568 + i32.shl + local.set $5 local.get $1 i32.const 16 - i32.shl + local.get $0 + i32.load offset=1568 + local.get $5 i32.const 16 i32.sub i32.ne @@ -864,9 +874,11 @@ i32.const 16 i32.shr_u local.tee $5 + i32.gt_s + local.set $6 local.get $1 local.get $5 - i32.gt_s + local.get $6 select memory.grow i32.const 0 @@ -1060,6 +1072,13 @@ end ) (func $~start + call $~lib/rt/tlsf/maybeInitialize + i32.const 0 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + drop + ) + (func $~lib/rt/pure/__collect nop ) (func $~lib/rt/pure/decrement (param $0 i32) diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index eafc465097..3aa3efbd71 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -2,11 +2,10 @@ (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result 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))) (type $none_=>_none (func)) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param 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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) @@ -24,15 +23,6 @@ (export "test1" (func $rc/ternary-mismatch/test1)) (export "test2" (func $rc/ternary-mismatch/test2)) (start $~start) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -68,14 +58,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -194,9 +176,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -204,7 +192,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -370,12 +358,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -465,14 +453,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -626,10 +620,13 @@ i32.const 23 i32.lt_u if - i32.const 1184 local.get $1 + i32.const 2 + i32.shl + i32.const 1184 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -670,16 +667,16 @@ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 - i32.const 0 - call $~lib/rt/tlsf/GETSL + i32.load offset=4 i32.const -2 i32.and - local.tee $2 + local.tee $1 if (result i32) local.get $0 i32.const 0 - local.get $2 + local.get $1 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -693,8 +690,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -706,7 +708,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -742,14 +744,16 @@ i32.eqz if memory.size - local.tee $1 + local.tee $3 + i32.const 16 + i32.shl + local.set $1 + local.get $3 i32.const 16 local.get $0 i32.load offset=1568 local.get $1 i32.const 16 - i32.shl - i32.const 16 i32.sub i32.ne i32.shl @@ -760,9 +764,11 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $1 - local.get $2 i32.gt_s + local.set $1 + local.get $3 + local.get $2 + local.get $1 select memory.grow i32.const 0 @@ -777,7 +783,7 @@ end end local.get $0 - local.get $1 + local.get $3 i32.const 16 i32.shl memory.size @@ -925,17 +931,14 @@ end local.get $0 ) - (func $rc/ternary-mismatch/Ref#constructor (result i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - 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/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain else global.get $rc/ternary-mismatch/gloRef call $~lib/rt/pure/__retain @@ -958,11 +961,19 @@ global.get $rc/ternary-mismatch/gloRef call $~lib/rt/pure/__retain else - call $rc/ternary-mismatch/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain end ) (func $~start - call $rc/ternary-mismatch/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain global.set $rc/ternary-mismatch/gloRef i32.const 1 call $rc/ternary-mismatch/test1 diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index d1df70ff35..9e43d0320c 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -347,118 +347,115 @@ br_if $do-continue|0 end ) - (func $~lib/number/U64#toString (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $__inlined_func$~lib/util/number/utoa64 + local.get $0 + i64.eqz + if + i32.const 1184 + return + end + local.get $0 + i64.const 4294967295 + i64.le_u + if local.get $0 - i64.eqz - if - i32.const 1184 - local.set $2 - br $__inlined_func$~lib/util/number/utoa64 - end + i32.wrap_i64 + local.tee $1 + call $~lib/util/number/decimalCount32 + local.tee $2 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $3 + local.get $1 + local.get $2 + call $~lib/util/number/utoa32_core + else local.get $0 - i64.const 4294967295 - i64.le_u - if + i64.const 100000000000 + i64.ge_u + i32.const 10 + i32.add + local.get $0 + i64.const 10000000000 + i64.ge_u + i32.add + local.get $0 + i64.const 100000000000000 + i64.ge_u + i32.const 13 + i32.add + local.get $0 + i64.const 10000000000000 + i64.ge_u + i32.add + local.get $0 + i64.const 1000000000000 + i64.lt_u + select + local.get $0 + i64.const 10000000000000000 + i64.ge_u + i32.const 16 + i32.add + local.get $0 + i64.const -8446744073709551616 + i64.ge_u + i32.const 18 + i32.add + local.get $0 + i64.const 1000000000000000000 + i64.ge_u + i32.add + local.get $0 + i64.const 100000000000000000 + i64.lt_u + select + local.get $0 + i64.const 1000000000000000 + i64.lt_u + select + local.tee $1 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/stub/__alloc + 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 + i32.sub local.tee $1 - call $~lib/util/number/decimalCount32 - local.tee $3 i32.const 1 i32.shl - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $2 - local.get $1 - local.get $3 - call $~lib/util/number/utoa32_core - else - local.get $0 - i64.const 100000000000 - i64.ge_u - i32.const 10 - i32.add - local.get $0 - i64.const 10000000000 - i64.ge_u i32.add - local.get $0 - i64.const 100000000000000 - i64.ge_u - i32.const 13 - i32.add - local.get $0 - i64.const 10000000000000 - i64.ge_u - i32.add - local.get $0 - i64.const 1000000000000 - i64.lt_u - select - local.get $0 - i64.const 10000000000000000 - i64.ge_u - i32.const 16 - i32.add - local.get $0 - i64.const -8446744073709551616 - i64.ge_u - i32.const 18 - i32.add - local.get $0 - i64.const 1000000000000000000 - i64.ge_u + local.get $4 + i32.const 48 i32.add + i32.store16 local.get $0 - i64.const 100000000000000000 - i64.lt_u - select - local.get $0 - i64.const 1000000000000000 - i64.lt_u - select - local.tee $1 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $2 - local.set $3 - 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 $3 - local.get $1 - i32.const 1 - i32.sub - local.tee $1 - i32.const 1 - i32.shl - i32.add - local.get $4 - i32.const 48 - i32.add - i32.store16 - local.get $0 - i64.const 0 - i64.ne - br_if $do-continue|0 - end + i64.const 0 + i64.ne + br_if $do-continue|0 end end - local.get $2 + local.get $3 ) (func $resolve-access/arrayAccess (result i32) (local $0 i32) @@ -499,7 +496,7 @@ local.get $0 i32.load offset=4 i64.load - call $~lib/number/U64#toString + call $~lib/util/number/utoa64 ) (func $resolve-access/Container#constructor (result i32) (local $0 i32) @@ -519,7 +516,7 @@ i64.store local.get $0 i64.load - call $~lib/number/U64#toString + call $~lib/util/number/utoa64 ) (func $resolve-access/propertyAccess (result i32) (local $0 i32) @@ -533,24 +530,23 @@ i64.load i32.wrap_i64 local.tee $1 - local.set $0 - i32.const 1184 - local.set $2 - local.get $1 if - local.get $0 + local.get $1 call $~lib/util/number/decimalCount32 - local.tee $1 + local.tee $2 i32.const 1 i32.shl i32.const 1 call $~lib/rt/stub/__alloc - local.tee $2 - local.get $0 + local.tee $0 local.get $1 + local.get $2 call $~lib/util/number/utoa32_core + else + i32.const 1184 + local.set $0 end - local.get $2 + local.get $0 ) (func $~start i32.const 1200 diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index fd5ec4ab22..83dbd365f0 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -1,13 +1,13 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) (type $none_=>_i32 (func (result i32))) - (type $i32_i64_i32_i64_i32_i64_=>_i32 (func (param i32 i64 i32 i64 i32 i64) (result i32))) + (type $i32_i64_i64_i32_i64_=>_i32 (func (param i32 i64 i64 i32 i64) (result i32))) (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -55,14 +55,6 @@ (global $resolve-binary/bar2 (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - 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) @@ -156,10 +148,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 @@ -409,13 +409,6 @@ i64.shr_u i64.add ) - (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.add - i32.const -64 - i32.sub - ) (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) local.get $0 local.get $1 @@ -472,7 +465,8 @@ local.get $1 i32.store16 ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) + (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i32) (param $4 i64) (result i32) + (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) @@ -480,14 +474,14 @@ (local $10 i64) (local $11 i64) (local $12 i64) - local.get $3 + local.get $2 local.get $1 i64.sub local.set $9 - local.get $3 + local.get $2 i64.const 1 i32.const 0 - local.get $4 + local.get $3 i32.sub local.tee $8 i64.extend_i32_s @@ -498,16 +492,16 @@ local.tee $11 i64.and local.set $1 - local.get $3 + local.get $2 local.get $8 i64.extend_i32_s i64.shr_u i32.wrap_i64 - local.tee $2 + local.tee $5 call $~lib/util/number/decimalCount32 - local.set $7 + local.set $3 loop $while-continue|0 - local.get $7 + local.get $3 i32.const 0 i32.gt_s if @@ -522,158 +516,159 @@ block $case3|1 block $case2|1 block $case1|1 - local.get $7 + local.get $3 + local.tee $6 i32.const 10 i32.ne if - local.get $7 + local.get $6 i32.const 1 i32.sub br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 end - local.get $2 + local.get $5 i32.const 1000000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 1000000000 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 100000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 100000000 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 10000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 10000000 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 1000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 1000000 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 100000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 100000 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 10000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 10000 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 1000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 1000 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 100 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 100 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 10 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 10 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 - local.set $4 + local.get $5 + local.set $3 i32.const 0 - local.set $2 + local.set $5 br $break|1 end i32.const 0 - local.set $4 + local.set $3 end - local.get $4 - local.get $6 + local.get $3 + local.get $7 i32.or if local.get $0 - local.get $6 + local.get $7 i32.const 1 i32.shl i32.add - local.get $4 + local.get $3 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 - local.get $6 + local.get $7 i32.const 1 i32.add - local.set $6 + local.set $7 end - local.get $7 + local.get $6 i32.const 1 i32.sub - local.set $7 + local.set $3 local.get $1 - local.get $2 + local.get $5 i64.extend_i32_u local.get $8 i64.extend_i32_s i64.shl i64.add - local.tee $3 - local.get $5 + local.tee $2 + local.get $4 i64.le_u if - local.get $7 + local.get $3 global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K local.get $0 - local.get $6 - local.get $5 - local.get $3 local.get $7 + local.get $4 + local.get $2 + local.get $3 i32.const 2 i32.shl i32.const 2296 @@ -684,7 +679,7 @@ i64.shl local.get $9 call $~lib/util/number/grisuRound - local.get $6 + local.get $7 return end br $while-continue|0 @@ -692,66 +687,66 @@ end local.get $8 i64.extend_i32_s - local.set $12 + local.set $2 loop $while-continue|2 - local.get $5 + local.get $4 i64.const 10 i64.mul - local.set $5 + local.set $4 local.get $1 i64.const 10 i64.mul - local.tee $3 - local.get $12 - i64.shr_u local.tee $1 - local.get $6 + local.get $2 + i64.shr_u + local.tee $12 + local.get $7 i64.extend_i32_s i64.or i64.const 0 i64.ne if local.get $0 - local.get $6 + local.get $7 i32.const 1 i32.shl i32.add - local.get $1 + local.get $12 i32.wrap_i64 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 - local.get $6 + local.get $7 i32.const 1 i32.add - local.set $6 + local.set $7 end - local.get $7 + local.get $3 i32.const 1 i32.sub - local.set $7 - local.get $3 + local.set $3 + local.get $1 local.get $11 i64.and local.tee $1 - local.get $5 + local.get $4 i64.ge_u br_if $while-continue|2 end - local.get $7 + local.get $3 global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K local.get $0 - local.get $6 - local.get $5 + local.get $7 + local.get $4 local.get $1 local.get $10 local.get $9 i32.const 0 - local.get $7 + local.get $3 i32.sub i32.const 2 i32.shl @@ -760,7 +755,7 @@ i64.load32_u i64.mul call $~lib/util/number/grisuRound - local.get $6 + local.get $7 ) (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -1168,46 +1163,46 @@ (local $4 i32) i32.const 0 local.get $0 - call $~lib/string/String#get:length - local.tee $4 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $2 + i32.const 0 + local.get $2 i32.lt_s - local.set $2 + select + local.tee $3 local.get $1 i32.const 0 local.get $1 i32.const 0 i32.gt_s select - local.tee $3 - local.get $4 - i32.lt_s - local.set $1 - i32.const 0 - local.get $4 + local.tee $1 local.get $2 - select - local.tee $2 - local.get $3 - local.get $4 local.get $1 - select - local.tee $3 local.get $2 + i32.lt_s + select + local.tee $1 local.get $3 + local.get $1 i32.gt_s select i32.const 1 i32.shl - local.tee $1 - local.get $2 + local.tee $4 local.get $3 - local.get $2 + local.get $1 local.get $3 + local.get $1 i32.lt_s select i32.const 1 i32.shl - local.tee $2 + local.tee $1 i32.sub local.tee $3 i32.eqz @@ -1216,12 +1211,12 @@ return end i32.const 0 - local.get $1 local.get $4 + local.get $2 i32.const 1 i32.shl i32.eq - local.get $2 + local.get $1 select if local.get $0 @@ -1230,19 +1225,19 @@ local.get $3 i32.const 1 call $~lib/rt/stub/__alloc - local.tee $1 + local.tee $2 local.get $0 - local.get $2 + local.get $1 i32.add local.get $3 call $~lib/util/memory/memmove - local.get $1 + local.get $2 ) - (func $~lib/number/F64#toString (result i32) + (func $~lib/util/number/dtoa (result i32) (local $0 i32) (local $1 i32) - (local $2 i64) - (local $3 i32) + (local $2 i32) + (local $3 i64) (local $4 i64) i32.const 56 i32.const 1 @@ -1268,23 +1263,22 @@ local.get $0 i64.const -9223372036854775808 global.get $~lib/util/number/_frc_pow - local.tee $2 + local.tee $3 call $~lib/util/number/umul64f - i32.const -61 - local.get $1 - call $~lib/util/number/umul64e global.get $~lib/util/number/_frc_plus - local.get $2 + local.get $3 call $~lib/util/number/umul64f i64.const 1 i64.sub local.tee $4 - global.get $~lib/util/number/_exp local.get $1 - call $~lib/util/number/umul64e + global.get $~lib/util/number/_exp + i32.add + i32.const -64 + i32.sub local.get $4 global.get $~lib/util/number/_frc_minus - local.get $2 + local.get $3 call $~lib/util/number/umul64f i64.const 1 i64.add @@ -1293,55 +1287,57 @@ global.get $~lib/util/number/_K call $~lib/util/number/prettify local.tee $1 + local.set $2 + local.get $1 i32.const 28 - i32.ne - if (result i32) - local.get $0 - local.get $1 - call $~lib/string/String#substring + i32.eq + if local.get $0 - i32.const 15 - i32.and - i32.eqz + return + end + local.get $0 + local.get $2 + call $~lib/string/String#substring + local.get $0 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $0 + select + i32.eqz + if i32.const 0 - local.get $0 - select - i32.eqz - if - i32.const 0 - i32.const 2368 - i32.const 70 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.tee $3 - i32.load offset=4 - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 2368 - i32.const 72 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/rt/stub/offset - local.get $0 - local.get $3 - i32.load - i32.add - i32.eq - if - local.get $3 - global.set $~lib/rt/stub/offset - end - else - local.get $0 + i32.const 2368 + i32.const 70 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load offset=4 + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 2368 + i32.const 72 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/stub/offset + local.get $0 + local.get $1 + i32.load + i32.add + i32.eq + if + local.get $1 + global.set $~lib/rt/stub/offset end ) (func $start:resolve-binary @@ -1509,7 +1505,7 @@ call $~lib/builtins/abort unreachable end - call $~lib/number/F64#toString + call $~lib/util/number/dtoa i32.const 2416 call $~lib/string/String.__eq i32.eqz @@ -1722,7 +1718,7 @@ call $~lib/builtins/abort unreachable end - call $~lib/number/F64#toString + call $~lib/util/number/dtoa i32.const 2416 call $~lib/string/String.__eq i32.eqz diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index 21ca221915..46da6f5034 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -1,15 +1,15 @@ (module (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 $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_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) - (type $i32_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) - (type $f32_=>_i32 (func (param f32) (result i32))) + (type $i32_i64_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i64 i32 i64 i32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) @@ -446,13 +446,6 @@ i64.shr_u i64.add ) - (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.add - i32.const -64 - i32.sub - ) (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) local.get $0 i32.const 10 @@ -551,21 +544,22 @@ local.get $1 i32.store16 ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i32) (param $4 i64) (param $5 i32) (result i32) + (local $6 i32) (local $7 i32) (local $8 i32) (local $9 i64) (local $10 i64) (local $11 i64) (local $12 i64) - local.get $3 + local.get $2 local.get $1 i64.sub local.set $9 - local.get $3 + local.get $2 i64.const 1 i32.const 0 - local.get $4 + local.get $3 i32.sub local.tee $8 i64.extend_i32_s @@ -576,16 +570,16 @@ local.tee $11 i64.and local.set $1 - local.get $3 + local.get $2 local.get $8 i64.extend_i32_s i64.shr_u i32.wrap_i64 - local.tee $2 + local.tee $6 call $~lib/util/number/decimalCount32 - local.set $7 + local.set $3 loop $while-continue|0 - local.get $7 + local.get $3 i32.const 0 i32.gt_s if @@ -600,159 +594,159 @@ block $case3|1 block $case2|1 block $case1|1 - local.get $7 - local.tee $4 + local.get $3 + local.tee $7 i32.const 10 i32.ne if - local.get $4 + local.get $7 i32.const 1 i32.sub br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 end - local.get $2 + local.get $6 i32.const 1000000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 1000000000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 100000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 100000000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 10000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 10000000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 1000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 1000000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 100000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 100000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 10000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 10000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 1000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 1000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 100 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 100 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 10 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 10 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 - local.set $4 + local.get $6 + local.set $3 i32.const 0 - local.set $2 + local.set $6 br $break|1 end i32.const 0 - local.set $4 + local.set $3 end - local.get $4 - local.get $6 + local.get $3 + local.get $5 i32.or if local.get $0 - local.get $6 + local.get $5 i32.const 1 i32.shl i32.add - local.get $4 + local.get $3 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 end local.get $7 i32.const 1 i32.sub - local.set $7 + local.set $3 local.get $1 - local.get $2 + local.get $6 i64.extend_i32_u local.get $8 i64.extend_i32_s i64.shl i64.add - local.tee $3 - local.get $5 + local.tee $2 + local.get $4 i64.le_u if - local.get $7 + local.get $3 global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K local.get $0 - local.get $6 local.get $5 + local.get $4 + local.get $2 local.get $3 - local.get $7 i32.const 2 i32.shl i32.const 2280 @@ -763,7 +757,7 @@ i64.shl local.get $9 call $~lib/util/number/grisuRound - local.get $6 + local.get $5 return end br $while-continue|0 @@ -771,28 +765,27 @@ end local.get $8 i64.extend_i32_s - local.set $3 - loop $while-continue|2 (result i32) - local.get $5 + local.set $2 + loop $while-continue|2 + local.get $4 i64.const 10 i64.mul - local.set $5 + local.set $4 local.get $1 i64.const 10 i64.mul local.tee $1 - local.get $3 + local.get $2 i64.shr_u local.tee $12 - local.get $6 + local.get $5 i64.extend_i32_s i64.or i64.const 0 i64.ne if local.get $0 - local.get $6 - local.tee $2 + local.get $5 i32.const 1 i32.shl i32.add @@ -803,44 +796,44 @@ i32.const 48 i32.add i32.store16 - local.get $2 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 end - local.get $7 + local.get $3 i32.const 1 i32.sub - local.set $7 + local.set $3 local.get $1 local.get $11 i64.and local.tee $1 - local.get $5 + local.get $4 i64.ge_u br_if $while-continue|2 - local.get $7 - global.get $~lib/util/number/_K - i32.add - global.set $~lib/util/number/_K - local.get $0 - local.get $6 - local.get $5 - local.get $1 - local.get $10 - local.get $9 - i32.const 0 - local.get $7 - i32.sub - i32.const 2 - i32.shl - i32.const 2280 - i32.add - i64.load32_u - i64.mul - call $~lib/util/number/grisuRound - local.get $6 end + local.get $3 + global.get $~lib/util/number/_K + i32.add + global.set $~lib/util/number/_K + local.get $0 + local.get $5 + local.get $4 + local.get $1 + local.get $10 + local.get $9 + i32.const 0 + local.get $3 + i32.sub + i32.const 2 + i32.shl + i32.const 2280 + i32.add + i64.load32_u + i64.mul + call $~lib/util/number/grisuRound + local.get $5 ) (func $~lib/util/number/grisu2 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -959,17 +952,11 @@ local.get $4 i64.clz i32.wrap_i64 - local.tee $1 i64.extend_i32_s i64.shl global.get $~lib/util/number/_frc_pow local.tee $4 call $~lib/util/number/umul64f - local.get $5 - local.get $1 - i32.sub - local.get $3 - call $~lib/util/number/umul64e global.get $~lib/util/number/_frc_plus local.get $4 call $~lib/util/number/umul64f @@ -978,7 +965,9 @@ local.tee $6 global.get $~lib/util/number/_exp local.get $3 - call $~lib/util/number/umul64e + i32.add + i32.const -64 + i32.sub local.get $6 global.get $~lib/util/number/_frc_minus local.get $4 @@ -1416,60 +1405,52 @@ end end ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) + (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 0 local.get $0 i32.const 16 i32.sub i32.load offset=12 i32.const 1 i32.shr_u - ) - (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + local.tee $2 i32.const 0 - local.get $0 - call $~lib/string/String#get:length - local.tee $4 + local.get $2 i32.lt_s - local.set $2 + select + local.tee $3 local.get $1 i32.const 0 local.get $1 i32.const 0 i32.gt_s select - local.tee $3 - local.get $4 - i32.lt_s - local.set $1 - i32.const 0 - local.get $4 + local.tee $1 local.get $2 - select - local.tee $2 - local.get $3 - local.get $4 local.get $1 - select - local.tee $3 local.get $2 + i32.lt_s + select + local.tee $1 local.get $3 + local.get $1 i32.gt_s select i32.const 1 i32.shl - local.tee $1 - local.get $2 + local.tee $4 local.get $3 - local.get $2 + local.get $1 local.get $3 + local.get $1 i32.lt_s select i32.const 1 i32.shl - local.tee $2 + local.tee $1 i32.sub local.tee $3 i32.eqz @@ -1478,12 +1459,12 @@ return end i32.const 0 - local.get $1 local.get $4 + local.get $2 i32.const 1 i32.shl i32.eq - local.get $2 + local.get $1 select if local.get $0 @@ -1492,136 +1473,131 @@ local.get $3 i32.const 1 call $~lib/rt/stub/__alloc - local.tee $1 + local.tee $2 local.get $0 - local.get $2 + local.get $1 i32.add local.get $3 call $~lib/util/memory/memmove - local.get $1 + local.get $2 ) - (func $~lib/number/F32#toString (param $0 f32) (result i32) + (func $~lib/util/number/dtoa (param $0 f64) (result i32) (local $1 i32) (local $2 i32) - (local $3 f64) - (local $4 i32) - block $__inlined_func$~lib/util/number/dtoa + (local $3 i32) + local.get $0 + f64.const 0 + f64.eq + if + i32.const 1280 + return + end + local.get $0 + local.get $0 + f64.sub + f64.const 0 + f64.ne + if + local.get $0 local.get $0 - f64.promote_f32 - local.tee $3 - f64.const 0 - f64.eq - if - i32.const 1280 - local.set $1 - br $__inlined_func$~lib/util/number/dtoa - end - local.get $3 - local.get $3 - f64.sub - f64.const 0 f64.ne if - local.get $3 - local.get $3 - f64.ne - if - i32.const 1312 - local.set $1 - br $__inlined_func$~lib/util/number/dtoa - end - i32.const 1344 - i32.const 1392 - local.get $3 - f64.const 0 - f64.lt - select - local.set $1 - br $__inlined_func$~lib/util/number/dtoa + i32.const 1312 + return end - i32.const 56 - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $1 - local.set $4 - local.get $3 + i32.const 1344 + i32.const 1392 + local.get $0 f64.const 0 f64.lt - local.tee $2 - if - local.get $4 - i32.const 45 - i32.store16 - local.get $3 - f64.neg - local.set $3 - end - local.get $4 + select + return + end + i32.const 56 + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $3 + local.set $2 + local.get $0 + f64.const 0 + f64.lt + local.tee $1 + if local.get $2 - i32.const 1 - i32.shl - i32.add + i32.const 45 + i32.store16 + local.get $0 + f64.neg + local.set $0 + end + local.get $2 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $2 + local.get $1 + call $~lib/util/number/grisu2 + local.get $1 + i32.sub + global.get $~lib/util/number/_K + call $~lib/util/number/prettify + local.get $1 + i32.add + local.tee $1 + local.set $2 + local.get $1 + i32.const 28 + i32.eq + if local.get $3 - local.get $4 - local.get $2 - call $~lib/util/number/grisu2 - local.get $2 - i32.sub - global.get $~lib/util/number/_K - call $~lib/util/number/prettify - local.get $2 - i32.add - local.tee $2 - i32.const 28 - i32.eq - br_if $__inlined_func$~lib/util/number/dtoa - local.get $1 - local.get $2 - call $~lib/string/String#substring - local.get $1 - i32.const 15 - i32.and - i32.eqz + return + end + local.get $3 + local.get $2 + call $~lib/string/String#substring + local.get $3 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $3 + select + i32.eqz + if i32.const 0 - local.get $1 - select - i32.eqz - if - i32.const 0 - i32.const 2352 - i32.const 70 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 16 - i32.sub - local.tee $4 - i32.load offset=4 - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 2352 - i32.const 72 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/rt/stub/offset - local.get $1 - local.get $4 - i32.load - i32.add - i32.eq - if - local.get $4 - global.set $~lib/rt/stub/offset - end - local.set $1 + i32.const 2352 + i32.const 70 + i32.const 3 + call $~lib/builtins/abort + unreachable end + local.get $3 + i32.const 16 + i32.sub + local.tee $1 + i32.load offset=4 + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 2352 + i32.const 72 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/stub/offset + local.get $3 local.get $1 + i32.load + i32.add + i32.eq + if + local.get $1 + global.set $~lib/rt/stub/offset + end ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -1716,10 +1692,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 @@ -1773,26 +1757,28 @@ (func $~lib/number/U8#toString (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - i32.const 2560 - local.set $1 - local.get $0 - i32.const 255 - i32.and - local.tee $0 - if + block $__inlined_func$~lib/util/number/utoa32 (result i32) + i32.const 2560 local.get $0 + i32.const 255 + i32.and + local.tee $1 + i32.eqz + br_if $__inlined_func$~lib/util/number/utoa32 + drop + local.get $1 call $~lib/util/number/decimalCount32 - local.tee $2 + local.tee $0 i32.const 1 i32.shl i32.const 1 call $~lib/rt/stub/__alloc - local.tee $1 + local.tee $2 + local.get $1 local.get $0 - local.get $2 call $~lib/util/number/utoa32_core + local.get $2 end - local.get $1 ) (func $start:resolve-elementaccess (local $0 i32) @@ -1815,7 +1801,8 @@ global.get $resolve-elementaccess/arr i32.const 0 call $~lib/typedarray/Float32Array#__get - call $~lib/number/F32#toString + f64.promote_f32 + call $~lib/util/number/dtoa i32.const 2400 call $~lib/string/String.__eq i32.eqz @@ -1830,7 +1817,8 @@ global.get $resolve-elementaccess/arr i32.const 1 call $~lib/typedarray/Float32Array#__get - call $~lib/number/F32#toString + f64.promote_f32 + call $~lib/util/number/dtoa i32.const 2496 call $~lib/string/String.__eq i32.eqz @@ -1854,7 +1842,8 @@ local.get $0 i32.const 0 call $~lib/typedarray/Float32Array#__get - call $~lib/number/F32#toString + f64.promote_f32 + call $~lib/util/number/dtoa i32.const 2528 call $~lib/string/String.__eq i32.eqz @@ -1891,13 +1880,14 @@ i32.const 4 call $~lib/rt/stub/__alloc local.tee $0 - if (result i32) - local.get $0 - else + i32.eqz + if i32.const 12 i32.const 5 call $~lib/rt/stub/__alloc + local.set $0 end + local.get $0 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor global.set $resolve-elementaccess/buf diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index 8eeca3502c..fc8252e733 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -2,7 +2,7 @@ (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result 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) @@ -16,13 +16,103 @@ (func $~setArgumentsLength (param $0 i32) nop ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 42 + local.set $1 + i32.const 2 + local.set $5 + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + i32.const 16 + i32.add + local.tee $0 + memory.size + local.tee $2 + i32.const 16 + i32.shl + local.tee $3 + i32.gt_u + if + local.get $2 + local.get $0 + local.get $3 + i32.sub + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $3 + local.get $2 + local.get $3 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $3 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + end local.get $0 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub - i32.load offset=12 + local.tee $0 + i32.const 16 + i32.store + local.get $0 + i32.const 1 + i32.store offset=4 + local.get $0 i32.const 1 - i32.shr_u + i32.store offset=8 + local.get $0 + i32.const 4 + i32.store offset=12 + local.get $4 + local.set $0 + loop $do-continue|0 + local.get $1 + i32.const 10 + i32.rem_u + local.set $2 + local.get $1 + i32.const 10 + i32.div_u + local.set $1 + local.get $0 + local.get $5 + i32.const 1 + i32.sub + local.tee $5 + i32.const 1 + i32.shl + i32.add + local.get $2 + i32.const 48 + i32.add + i32.store16 + local.get $1 + br_if $do-continue|0 + end + local.get $4 ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -73,16 +163,16 @@ local.set $1 local.get $2 if - local.get $0 + local.get $3 i32.load16_u local.tee $2 - local.get $3 + local.get $0 i32.load16_u local.tee $4 i32.ne if - local.get $2 local.get $4 + local.get $2 i32.sub return end @@ -99,105 +189,15 @@ end i32.const 0 ) - (func $start:resolve-function-expression + (func $~start (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) i32.const 1168 global.set $~lib/rt/stub/offset - i32.const 42 - local.set $1 - i32.const 2 - local.set $5 - i32.const 1184 - local.tee $2 - i32.const 16 - i32.add - local.tee $0 - memory.size - local.tee $3 - i32.const 16 - i32.shl - local.tee $4 - i32.gt_u - if - local.get $3 - local.get $0 - local.get $4 - i32.sub - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $4 - local.get $3 - local.get $4 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $4 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - end - local.get $0 - global.set $~lib/rt/stub/offset - local.get $2 - i32.const 16 - i32.sub - local.tee $0 - i32.const 16 - i32.store - local.get $0 - i32.const 1 - i32.store offset=4 - local.get $0 - i32.const 1 - i32.store offset=8 - local.get $0 - i32.const 4 - i32.store offset=12 - local.get $2 - local.set $0 - 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 $5 - i32.const 1 - i32.sub - local.tee $5 - i32.const 1 - i32.shl - i32.add - local.get $3 - i32.const 48 - i32.add - i32.store16 - local.get $1 - br_if $do-continue|0 - end block $__inlined_func$~lib/string/String.__eq (result i32) i32.const 1 - local.get $2 + call $~lib/util/number/itoa32 + local.tee $0 i32.const 1152 i32.eq br_if $__inlined_func$~lib/string/String.__eq @@ -205,17 +205,23 @@ block $folding-inner0 i32.const 0 i32.const 1 - local.get $2 + local.get $0 select br_if $folding-inner0 - local.get $2 - call $~lib/string/String#get:length + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $1 - i32.const 1152 - call $~lib/string/String#get:length + i32.const 1148 + i32.load + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 - local.get $2 + local.get $0 local.get $1 call $~lib/util/string/compareImpl i32.eqz @@ -233,7 +239,4 @@ unreachable end ) - (func $~start - call $start:resolve-function-expression - ) ) diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index 44ee1415b3..242fe80912 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.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_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) @@ -105,116 +105,108 @@ i32.store offset=12 local.get $4 ) - (func $~lib/number/I32#toString (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 + i32.eqz if + i32.const 1040 + return + end + local.get $0 + i32.const 31 + i32.shr_u + local.tee $1 + if + i32.const 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 - local.get $2 + i32.sub + local.set $0 + end + local.get $1 + local.get $0 + i32.const 10 + i32.ge_u + i32.const 1 + i32.add + local.get $0 + i32.const 10000 + i32.ge_u + i32.const 3 + i32.add + local.get $0 + i32.const 1000 + i32.ge_u + i32.add + local.get $0 + i32.const 100 + i32.lt_u + select + local.get $0 + i32.const 1000000 + i32.ge_u + i32.const 6 + i32.add + local.get $0 + i32.const 1000000000 + i32.ge_u + i32.const 8 + i32.add + local.get $0 + i32.const 100000000 + i32.ge_u + i32.add + local.get $0 + i32.const 10000000 + i32.lt_u + select + local.get $0 + i32.const 100000 + i32.lt_u + select + i32.add + local.tee $2 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $3 + local.set $4 + loop $do-continue|0 local.get $0 i32.const 10 - i32.ge_u - i32.const 1 - i32.add + i32.rem_u + local.set $5 local.get $0 - i32.const 10000 - i32.ge_u - i32.const 3 - i32.add - local.get $0 - i32.const 1000 - i32.ge_u - i32.add - local.get $0 - i32.const 100 - i32.lt_u - select - local.get $0 - i32.const 1000000 - i32.ge_u - i32.const 6 - i32.add - local.get $0 - i32.const 1000000000 - i32.ge_u - i32.const 8 + i32.const 10 + i32.div_u + local.set $0 + local.get $4 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.const 1 + i32.shl i32.add - local.get $0 - i32.const 100000000 - i32.ge_u + local.get $5 + i32.const 48 i32.add + i32.store16 local.get $0 - i32.const 10000000 - i32.lt_u - select - local.get $0 - i32.const 100000 - i32.lt_u - select - i32.add - local.tee $3 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $1 - 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 $3 - i32.const 1 - i32.sub - local.tee $3 - i32.const 1 - i32.shl - i32.add - local.get $5 - i32.const 48 - i32.add - i32.store16 - local.get $0 - br_if $do-continue|0 - end - local.get $2 - if - local.get $1 - i32.const 45 - i32.store16 - end - else - i32.const 1040 - local.set $1 + br_if $do-continue|0 end local.get $1 - ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + if + local.get $3 + i32.const 45 + i32.store16 + end + local.get $3 ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -309,10 +301,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 @@ -329,7 +329,7 @@ i32.const 1456 global.set $~lib/rt/stub/offset i32.const 1 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1072 call $~lib/string/String.__eq i32.eqz @@ -342,7 +342,7 @@ unreachable end i32.const 11 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1184 call $~lib/string/String.__eq i32.eqz @@ -355,7 +355,7 @@ unreachable end i32.const 2 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1216 call $~lib/string/String.__eq i32.eqz @@ -368,7 +368,7 @@ unreachable end i32.const 22 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1248 call $~lib/string/String.__eq i32.eqz @@ -381,7 +381,7 @@ unreachable end i32.const 3 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -394,7 +394,7 @@ unreachable end i32.const 33 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1312 call $~lib/string/String.__eq i32.eqz @@ -407,7 +407,7 @@ unreachable end i32.const 4 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1344 call $~lib/string/String.__eq i32.eqz @@ -420,7 +420,7 @@ unreachable end i32.const 5 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1376 call $~lib/string/String.__eq i32.eqz @@ -433,7 +433,7 @@ unreachable end i32.const 55 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1408 call $~lib/string/String.__eq i32.eqz @@ -453,7 +453,7 @@ i32.store local.get $0 i32.load - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1440 call $~lib/string/String.__eq i32.eqz diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 1d4aec020b..510c6a9ae0 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -1,15 +1,15 @@ (module (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 (func (param i32 i32 i32) (result 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 (func (param i32) (result i32))) + (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) (type $none_=>_i32 (func (result i32))) - (type $i32_i64_i32_i64_i32_i64_=>_i32 (func (param i32 i64 i32 i64 i32 i64) (result i32))) + (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) + (type $i32_i64_i64_i32_i64_=>_i32 (func (param i32 i64 i64 i32 i64) (result i32))) (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -46,15 +46,6 @@ (export "__collect" (func $~lib/rt/pure/__collect)) (export "__rtti_base" (global $~lib/rt/__rtti_base)) (start $~start) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -90,14 +81,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -216,9 +199,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -226,7 +215,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -392,12 +381,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -487,14 +476,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -648,10 +643,13 @@ i32.const 23 i32.lt_u if - i32.const 2448 local.get $1 + i32.const 2 + i32.shl + i32.const 2448 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -691,6 +689,7 @@ ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $1 i32.const 256 i32.lt_u @@ -700,23 +699,22 @@ i32.shr_u local.set $1 else + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 local.get $1 i32.const 536870904 i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.set $1 - end - local.get $1 + select + local.tee $1 i32.const 31 local.get $1 i32.clz @@ -752,7 +750,10 @@ end local.get $0 local.get $2 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const -1 local.get $1 i32.shl @@ -779,8 +780,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -792,7 +798,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -804,6 +810,7 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -855,11 +862,13 @@ memory.size local.tee $1 i32.const 16 - local.get $0 - i32.load offset=1568 + i32.shl + local.set $5 local.get $1 i32.const 16 - i32.shl + local.get $0 + i32.load offset=1568 + local.get $5 i32.const 16 i32.sub i32.ne @@ -887,9 +896,11 @@ i32.const 16 i32.shr_u local.tee $5 + i32.gt_s + local.set $6 local.get $1 local.get $5 - i32.gt_s + local.get $6 select memory.grow i32.const 0 @@ -1151,14 +1162,6 @@ br_if $do-continue|0 end ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - 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) @@ -1252,10 +1255,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 @@ -1312,13 +1323,6 @@ i64.shr_u i64.add ) - (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.add - i32.const -64 - i32.sub - ) (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) local.get $0 local.get $1 @@ -1375,7 +1379,8 @@ local.get $1 i32.store16 ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) + (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i32) (param $4 i64) (result i32) + (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) @@ -1383,14 +1388,14 @@ (local $10 i64) (local $11 i64) (local $12 i64) - local.get $3 + local.get $2 local.get $1 i64.sub local.set $9 - local.get $3 + local.get $2 i64.const 1 i32.const 0 - local.get $4 + local.get $3 i32.sub local.tee $8 i64.extend_i32_s @@ -1401,12 +1406,12 @@ local.tee $11 i64.and local.set $1 - local.get $3 + local.get $2 local.get $8 i64.extend_i32_s i64.shr_u i32.wrap_i64 - local.tee $2 + local.tee $5 call $~lib/util/number/decimalCount32 local.set $7 loop $while-continue|0 @@ -1434,106 +1439,106 @@ i32.sub br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 end - local.get $2 + local.get $5 i32.const 1000000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 1000000000 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 100000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 100000000 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 10000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 10000000 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 1000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 1000000 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 100000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 100000 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 10000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 10000 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 1000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 1000 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 100 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 100 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 + local.get $5 i32.const 10 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $5 i32.const 10 i32.rem_u - local.set $2 + local.set $5 br $break|1 end - local.get $2 - local.set $4 + local.get $5 + local.set $3 i32.const 0 - local.set $2 + local.set $5 br $break|1 end i32.const 0 - local.set $4 + local.set $3 end - local.get $4 + local.get $3 local.get $6 i32.or if @@ -1542,7 +1547,7 @@ i32.const 1 i32.shl i32.add - local.get $4 + local.get $3 i32.const 65535 i32.and i32.const 48 @@ -1558,14 +1563,14 @@ i32.sub local.set $7 local.get $1 - local.get $2 + local.get $5 i64.extend_i32_u local.get $8 i64.extend_i32_s i64.shl i64.add - local.tee $3 - local.get $5 + local.tee $2 + local.get $4 i64.le_u if local.get $7 @@ -1574,8 +1579,8 @@ global.set $~lib/util/number/_K local.get $0 local.get $6 - local.get $5 - local.get $3 + local.get $4 + local.get $2 local.get $7 i32.const 2 i32.shl @@ -1595,19 +1600,19 @@ end local.get $8 i64.extend_i32_s - local.set $12 + local.set $2 loop $while-continue|2 - local.get $5 + local.get $4 i64.const 10 i64.mul - local.set $5 + local.set $4 local.get $1 i64.const 10 i64.mul - local.tee $3 - local.get $12 - i64.shr_u local.tee $1 + local.get $2 + i64.shr_u + local.tee $12 local.get $6 i64.extend_i32_s i64.or @@ -1619,7 +1624,7 @@ i32.const 1 i32.shl i32.add - local.get $1 + local.get $12 i32.wrap_i64 i32.const 65535 i32.and @@ -1635,11 +1640,11 @@ i32.const 1 i32.sub local.set $7 - local.get $3 + local.get $1 local.get $11 i64.and local.tee $1 - local.get $5 + local.get $4 i64.ge_u br_if $while-continue|2 end @@ -1649,7 +1654,7 @@ global.set $~lib/util/number/_K local.get $0 local.get $6 - local.get $5 + local.get $4 local.get $1 local.get $10 local.get $9 @@ -2071,7 +2076,11 @@ (local $4 i32) i32.const 0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 i32.const 0 local.get $2 @@ -2127,9 +2136,12 @@ call $~lib/rt/pure/__retain return end + call $~lib/rt/tlsf/maybeInitialize local.get $3 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $0 local.get $1 @@ -2150,46 +2162,20 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~setArgumentsLength (param $0 i32) - nop - ) - (func $start:resolve-ternary + (func $~lib/util/number/dtoa (result i32) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i64) - (local $4 i32) - (local $5 i64) - (local $6 i32) - i32.const 1 - call $~lib/util/number/decimalCount32 - local.tee $1 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $0 - i32.const 1 - local.get $1 - call $~lib/util/number/utoa32_core - local.get $0 - call $~lib/rt/pure/__retain - local.tee $4 - i32.const 1232 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1264 - i32.const 5 - i32.const 1 - call $~lib/builtins/abort - unreachable - end + (local $4 i64) + (local $5 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 56 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.set $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $0 i64.const -9223372036854774784 global.set $~lib/util/number/_frc_plus i64.const 9223372036854775296 @@ -2205,26 +2191,25 @@ i32.load16_s global.set $~lib/util/number/_exp_pow global.get $~lib/util/number/_exp_pow - local.set $0 - local.get $1 - local.get $1 + local.set $1 + local.get $0 + local.get $0 i64.const -9223372036854775808 global.get $~lib/util/number/_frc_pow local.tee $3 call $~lib/util/number/umul64f - i32.const -63 - local.get $0 - call $~lib/util/number/umul64e global.get $~lib/util/number/_frc_plus local.get $3 call $~lib/util/number/umul64f i64.const 1 i64.sub - local.tee $5 + local.tee $4 + local.get $1 global.get $~lib/util/number/_exp - local.get $0 - call $~lib/util/number/umul64e - local.get $5 + i32.add + i32.const -64 + i32.sub + local.get $4 global.get $~lib/util/number/_frc_minus local.get $3 call $~lib/util/number/umul64f @@ -2234,65 +2219,100 @@ call $~lib/util/number/genDigits global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.tee $0 + local.tee $1 local.set $2 - block $__inlined_func$~lib/util/number/dtoa + local.get $1 + i32.const 28 + i32.eq + if local.get $0 - i32.const 28 - i32.eq - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $0 - br $__inlined_func$~lib/util/number/dtoa - end - local.get $1 - local.get $2 - call $~lib/string/String#substring - local.set $0 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 - i32.const 16 - i32.sub - local.set $2 + call $~lib/rt/pure/__retain + return + end + local.get $0 + local.get $2 + call $~lib/string/String#substring + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + i32.const 16 + 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.const 15 + i32.load + i32.const 1 i32.and i32.eqz + else i32.const 0 + end + if (result i32) local.get $1 - select - if (result i32) - local.get $2 - i32.load - i32.const 1 - i32.and - i32.eqz - else - i32.const 0 - end - if (result i32) - local.get $2 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end + i32.load offset=4 + i32.const -268435456 + i32.and i32.eqz - if - i32.const 0 - i32.const 1040 - i32.const 573 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/tlsf/freeBlock + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 1040 + i32.const 573 + i32.const 3 + call $~lib/builtins/abort + unreachable end + local.get $1 + call $~lib/rt/tlsf/freeBlock + ) + (func $~setArgumentsLength (param $0 i32) + nop + ) + (func $~start + (local $0 i32) + (local $1 i32) + i32.const 1 + call $~lib/util/number/decimalCount32 + local.tee $0 + i32.const 1 + i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + i32.const 1 + local.get $0 + call $~lib/util/number/utoa32_core + local.get $1 + call $~lib/rt/pure/__retain + local.tee $0 local.get $0 + i32.const 1232 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1264 + i32.const 5 + i32.const 1 + call $~lib/builtins/abort + unreachable + end + call $~lib/util/number/dtoa + local.tee $0 i32.const 2400 call $~lib/string/String.__eq i32.eqz @@ -2304,14 +2324,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $~start - call $start:resolve-ternary - ) (func $~lib/rt/pure/__collect nop ) diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index f7e83839d2..7ab4064246 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.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_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) @@ -112,116 +112,108 @@ i32.store offset=12 local.get $4 ) - (func $~lib/number/I32#toString (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 + i32.eqz if + i32.const 1040 + return + end + local.get $0 + i32.const 31 + i32.shr_u + local.tee $1 + if + i32.const 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 - local.get $2 + i32.sub + local.set $0 + end + local.get $1 + local.get $0 + i32.const 10 + i32.ge_u + i32.const 1 + i32.add + local.get $0 + i32.const 10000 + i32.ge_u + i32.const 3 + i32.add + local.get $0 + i32.const 1000 + i32.ge_u + i32.add + local.get $0 + i32.const 100 + i32.lt_u + select + local.get $0 + i32.const 1000000 + i32.ge_u + i32.const 6 + i32.add + local.get $0 + i32.const 1000000000 + i32.ge_u + i32.const 8 + i32.add + local.get $0 + i32.const 100000000 + i32.ge_u + i32.add + local.get $0 + i32.const 10000000 + i32.lt_u + select + local.get $0 + i32.const 100000 + i32.lt_u + select + i32.add + local.tee $2 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $3 + local.set $4 + loop $do-continue|0 local.get $0 i32.const 10 - i32.ge_u - i32.const 1 - i32.add + i32.rem_u + local.set $5 local.get $0 - i32.const 10000 - i32.ge_u - i32.const 3 - i32.add - local.get $0 - i32.const 1000 - i32.ge_u - i32.add - local.get $0 - i32.const 100 - i32.lt_u - select - local.get $0 - i32.const 1000000 - i32.ge_u - i32.const 6 - i32.add - local.get $0 - i32.const 1000000000 - i32.ge_u - i32.const 8 + i32.const 10 + i32.div_u + local.set $0 + local.get $4 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.const 1 + i32.shl i32.add - local.get $0 - i32.const 100000000 - i32.ge_u + local.get $5 + i32.const 48 i32.add + i32.store16 local.get $0 - i32.const 10000000 - i32.lt_u - select - local.get $0 - i32.const 100000 - i32.lt_u - select - i32.add - local.tee $3 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $1 - 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 $3 - i32.const 1 - i32.sub - local.tee $3 - i32.const 1 - i32.shl - i32.add - local.get $5 - i32.const 48 - i32.add - i32.store16 - local.get $0 - br_if $do-continue|0 - end - local.get $2 - if - local.get $1 - i32.const 45 - i32.store16 - end - else - i32.const 1040 - local.set $1 + br_if $do-continue|0 end local.get $1 - ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + if + local.get $3 + i32.const 45 + i32.store16 + end + local.get $3 ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -316,10 +308,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 @@ -336,7 +336,7 @@ i32.const 1552 global.set $~lib/rt/stub/offset i32.const -1 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1072 call $~lib/string/String.__eq i32.eqz @@ -349,7 +349,7 @@ unreachable end i32.const 1 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1152 call $~lib/string/String.__eq i32.eqz @@ -366,7 +366,7 @@ i32.add global.set $resolve-unary/a global.get $resolve-unary/a - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1184 call $~lib/string/String.__eq i32.eqz @@ -383,7 +383,7 @@ i32.sub global.set $resolve-unary/a global.get $resolve-unary/a - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1152 call $~lib/string/String.__eq i32.eqz @@ -428,7 +428,7 @@ global.get $resolve-unary/a i32.const -1 i32.xor - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -446,7 +446,7 @@ i32.add global.set $resolve-unary/b local.get $0 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1152 call $~lib/string/String.__eq i32.eqz @@ -464,7 +464,7 @@ i32.sub global.set $resolve-unary/b local.get $0 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1184 call $~lib/string/String.__eq i32.eqz diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index 6e20b71c31..f67d649bb4 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -2,11 +2,11 @@ (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 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 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 $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) @@ -36,15 +36,6 @@ (global $~lib/rt/pure/END (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -80,14 +71,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -206,9 +189,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -216,7 +205,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -382,12 +371,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -477,14 +466,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -638,10 +633,13 @@ i32.const 23 i32.lt_u if - i32.const 1664 local.get $1 + i32.const 2 + i32.shl + i32.const 1664 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -705,6 +703,7 @@ ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $1 i32.const 256 i32.lt_u @@ -714,23 +713,22 @@ i32.shr_u local.set $1 else + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 local.get $1 i32.const 536870904 i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.set $1 - end - local.get $1 + select + local.tee $1 i32.const 31 local.get $1 i32.clz @@ -766,7 +764,10 @@ end local.get $0 local.get $2 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const -1 local.get $1 i32.shl @@ -793,8 +794,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -806,7 +812,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -882,6 +888,7 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -913,11 +920,13 @@ memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 + i32.shl + local.set $5 local.get $3 i32.const 16 - i32.shl + local.get $0 + i32.load offset=1568 + local.get $5 i32.const 16 i32.sub i32.ne @@ -945,9 +954,11 @@ i32.const 16 i32.shr_u local.tee $5 + i32.gt_s + local.set $6 local.get $3 local.get $5 - i32.gt_s + local.get $6 select memory.grow i32.const 0 @@ -1018,14 +1029,6 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 @@ -1665,23 +1668,10 @@ local.get $2 i32.store offset=12 ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) - (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - i32.const 1424 - local.get $0 - select - local.set $2 local.get $1 call $~lib/rt/pure/__retain local.tee $1 @@ -1697,45 +1687,53 @@ i32.const 1424 local.set $1 end - block $__inlined_func$~lib/string/String#concat - local.get $2 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $3 - local.get $1 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $4 - i32.add - local.tee $0 - i32.eqz - if - i32.const 1344 - local.set $0 - local.get $1 - call $~lib/rt/pure/__release - br $__inlined_func$~lib/string/String#concat - end - local.get $0 - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $0 - local.get $2 - local.get $3 - call $~lib/util/memory/memmove - local.get $0 - local.get $3 - i32.add - local.get $1 - local.get $4 - call $~lib/util/memory/memmove + local.get $1 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $4 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $2 + i32.add + local.tee $3 + i32.eqz + if local.get $1 call $~lib/rt/pure/__release + i32.const 1344 + return end + call $~lib/rt/tlsf/maybeInitialize + local.get $3 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $3 local.get $0 + local.get $2 + call $~lib/util/memory/memmove + local.get $2 + local.get $3 + i32.add + local.get $1 + local.get $4 + call $~lib/util/memory/memmove + local.get $1 + call $~lib/rt/pure/__release + local.get $3 ) (func $start:retain-release-sanity (local $0 i32) @@ -1744,15 +1742,21 @@ (local $3 i32) (local $4 i32) (local $5 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 i32.const 12 call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 3 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $3 i32.const 0 @@ -1824,15 +1828,21 @@ i32.store offset=12 local.get $3 call $~lib/rt/pure/__release + call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 i32.const 0 call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 5 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $3 i32.const 0 @@ -1877,15 +1887,21 @@ i32.const 10 i32.lt_s if + call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 i32.const 0 call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 4 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $3 i32.const 0 @@ -1969,32 +1985,40 @@ call $~lib/rt/pure/__release i32.const 1360 i32.const 1392 - call $~lib/string/String.__concat + call $~lib/string/String#concat local.tee $1 + i32.const 1424 + local.get $1 + select i32.const 1456 - call $~lib/string/String.__concat + call $~lib/string/String#concat local.get $1 call $~lib/rt/pure/__release call $~lib/rt/pure/__release + call $~lib/rt/tlsf/maybeInitialize i32.const 4 i32.const 6 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $2 i32.const 0 i32.store + call $~lib/rt/tlsf/maybeInitialize i32.const 4 i32.const 7 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $3 i32.const 0 i32.store - local.get $2 - local.set $1 local.get $3 local.tee $0 local.get $2 + local.tee $1 i32.load local.tee $4 i32.ne @@ -2445,9 +2469,13 @@ i32.const 256 i32.gt_u select - local.tee $4 + local.set $4 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 i32.const 16 i32.sub diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index d0b82842d8..a5272ed2ce 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -2,11 +2,10 @@ (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_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))) (type $none_=>_none (func)) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param 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) @@ -20,15 +19,6 @@ (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -64,14 +54,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -190,9 +172,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -200,7 +188,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -366,12 +354,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -461,14 +449,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -622,10 +616,13 @@ i32.const 23 i32.lt_u if - i32.const 1184 local.get $1 + i32.const 2 + i32.shl + i32.const 1184 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -666,16 +663,16 @@ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 - i32.const 0 - call $~lib/rt/tlsf/GETSL + i32.load offset=4 i32.const -2 i32.and - local.tee $2 + local.tee $1 if (result i32) local.get $0 i32.const 0 - local.get $2 + local.get $1 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -689,8 +686,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -702,7 +704,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -738,14 +740,16 @@ i32.eqz if memory.size - local.tee $1 + local.tee $3 + i32.const 16 + i32.shl + local.set $1 + local.get $3 i32.const 16 local.get $0 i32.load offset=1568 local.get $1 i32.const 16 - i32.shl - i32.const 16 i32.sub i32.ne i32.shl @@ -756,9 +760,11 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $1 - local.get $2 i32.gt_s + local.set $1 + local.get $3 + local.get $2 + local.get $1 select memory.grow i32.const 0 @@ -773,7 +779,7 @@ end end local.get $0 - local.get $1 + local.get $3 i32.const 16 i32.shl memory.size @@ -917,24 +923,6 @@ end local.get $0 ) - (func $retain-return/Ref#constructor (result i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 1184 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) (func $~setArgumentsLength (param $0 i32) nop ) @@ -947,33 +935,54 @@ i32.const 1 global.set $~started end - 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 + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + drop + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + drop + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + drop + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + drop + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain global.set $retain-return/ref - 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 - call $~lib/rt/pure/__release - call $retain-return/Ref#constructor - call $~lib/rt/pure/__release + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + drop + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + drop + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + drop + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + drop + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + drop + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + drop global.get $retain-return/ref local.tee $0 if local.get $0 - call $~lib/rt/pure/__release + i32.const 1184 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end i32.const 0 global.set $retain-return/ref diff --git a/tests/compiler/rt/instanceof.optimized.wat b/tests/compiler/rt/instanceof.optimized.wat index d433725220..26c8bd8101 100644 --- a/tests/compiler/rt/instanceof.optimized.wat +++ b/tests/compiler/rt/instanceof.optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_=>_i32 (func (param i32) (result 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))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -83,24 +83,22 @@ i32.store offset=12 local.get $3 ) - (func $rt/instanceof/Animal#constructor (param $0 i32) (result i32) + (func $rt/instanceof/Cat#constructor (param $0 i32) (result i32) local.get $0 - if (result i32) - local.get $0 - else - i32.const 3 + i32.eqz + if + i32.const 4 call $~lib/rt/stub/__alloc + local.set $0 end - ) - (func $rt/instanceof/Cat#constructor (param $0 i32) (result i32) local.get $0 - if (result i32) - local.get $0 - else - i32.const 4 + i32.eqz + if + i32.const 3 call $~lib/rt/stub/__alloc + local.set $0 end - call $rt/instanceof/Animal#constructor + local.get $0 ) (func $~lib/rt/__instanceof (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -136,8 +134,8 @@ (local $0 i32) i32.const 1136 global.set $~lib/rt/stub/offset - i32.const 0 - call $rt/instanceof/Animal#constructor + i32.const 3 + call $~lib/rt/stub/__alloc global.set $rt/instanceof/animal i32.const 0 call $rt/instanceof/Cat#constructor @@ -251,8 +249,8 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - call $rt/instanceof/Animal#constructor + i32.const 3 + call $~lib/rt/stub/__alloc global.set $rt/instanceof/nullableAnimal i32.const 0 call $rt/instanceof/Cat#constructor diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index 861f9fccc9..fed0922ce2 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -1,12 +1,12 @@ (module - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (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 $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 $none_=>_none (func)) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -23,15 +23,6 @@ (export "__release" (func $~lib/rt/pure/__release)) (export "__collect" (func $~lib/rt/pure/__collect)) (export "__rtti_base" (global $~lib/rt/__rtti_base)) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -67,14 +58,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -193,9 +176,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -203,7 +192,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -369,12 +358,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -464,14 +453,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -625,10 +620,13 @@ i32.const 23 i32.lt_u if - i32.const 1216 local.get $1 + i32.const 2 + i32.shl + i32.const 1216 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -668,6 +666,7 @@ ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $1 i32.const 256 i32.lt_u @@ -677,23 +676,22 @@ i32.shr_u local.set $1 else + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 local.get $1 i32.const 536870904 i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.set $1 - end - local.get $1 + select + local.tee $1 i32.const 31 local.get $1 i32.clz @@ -729,7 +727,10 @@ end local.get $0 local.get $2 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const -1 local.get $1 i32.shl @@ -756,8 +757,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -769,7 +775,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -781,6 +787,7 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -832,11 +839,13 @@ memory.size local.tee $1 i32.const 16 - local.get $0 - i32.load offset=1568 + i32.shl + local.set $5 local.get $1 i32.const 16 - i32.shl + local.get $0 + i32.load offset=1568 + local.get $5 i32.const 16 i32.sub i32.ne @@ -864,9 +873,11 @@ i32.const 16 i32.shr_u local.tee $5 + i32.gt_s + local.set $6 local.get $1 local.get $5 - i32.gt_s + local.get $6 select memory.grow i32.const 0 diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 8c4643e1d0..c4253d49a8 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -37,7 +37,6 @@ i32.add i32.load local.tee $0 - local.get $0 i32.eqz if i32.const 1152 @@ -47,6 +46,7 @@ call $~lib/builtins/abort unreachable end + local.get $0 ) (func $std/array-access/i32ArrayArrayElementAccess (param $0 i32) (result i32) i32.const 1 @@ -68,20 +68,16 @@ i32.load offset=4 i32.load offset=4 ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) + (func $std/array-access/stringArrayPropertyAccess (param $0 i32) (result i32) local.get $0 + i32.const 0 + call $~lib/array/Array<~lib/array/Array>#__get i32.const 16 i32.sub i32.load offset=12 i32.const 1 i32.shr_u ) - (func $std/array-access/stringArrayPropertyAccess (param $0 i32) (result i32) - local.get $0 - i32.const 0 - call $~lib/array/Array<~lib/array/Array>#__get - call $~lib/string/String#get:length - ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -165,30 +161,36 @@ (local $1 i32) (local $2 i32) (local $3 i32) + i32.const 1260 + i32.load + i32.const 1 + i32.shr_u + local.tee $1 + local.set $2 + local.get $1 i32.const 0 local.get $0 - call $~lib/string/String#get:length - local.tee $2 - i32.lt_s - local.set $1 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $1 i32.const 0 - local.get $2 local.get $1 + i32.lt_s select - local.tee $1 - i32.const 1264 - call $~lib/string/String#get:length local.tee $3 i32.add - local.get $2 + local.get $1 i32.gt_s if i32.const 0 return end local.get $0 - local.get $1 local.get $3 + local.get $2 call $~lib/util/string/compareImpl i32.eqz ) @@ -204,7 +206,11 @@ call $~lib/array/Array<~lib/array/Array>#__get i32.const 1 call $~lib/array/Array<~lib/array/Array>#__get - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u ) (func $std/array-access/stringArrayArrayMethodCall (param $0 i32) (result i32) local.get $0 diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 7c124d991d..7cf4fef24d 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -4,9 +4,9 @@ (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result 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))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) @@ -75,15 +75,6 @@ i32.add i32.load ) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -119,14 +110,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -245,9 +228,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -255,7 +244,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -421,12 +410,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -516,14 +505,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -677,10 +672,13 @@ i32.const 23 i32.lt_u if - i32.const 1536 local.get $1 + i32.const 2 + i32.shl + i32.const 1536 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -720,6 +718,7 @@ ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $1 i32.const 256 i32.lt_u @@ -729,23 +728,22 @@ i32.shr_u local.set $1 else + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 local.get $1 i32.const 536870904 i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.set $1 - end - local.get $1 + select + local.tee $1 i32.const 31 local.get $1 i32.clz @@ -781,7 +779,10 @@ end local.get $0 local.get $2 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const -1 local.get $1 i32.shl @@ -808,8 +809,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -821,7 +827,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -833,6 +839,7 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -884,11 +891,13 @@ memory.size local.tee $1 i32.const 16 - local.get $0 - i32.load offset=1568 + i32.shl + local.set $5 local.get $1 i32.const 16 - i32.shl + local.get $0 + i32.load offset=1568 + local.get $5 i32.const 16 i32.sub i32.ne @@ -916,9 +925,11 @@ i32.const 16 i32.shr_u local.tee $5 + i32.gt_s + local.set $6 local.get $1 local.get $5 - i32.gt_s + local.get $6 select memory.grow i32.const 0 @@ -1045,14 +1056,6 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -1106,16 +1109,22 @@ ) (func $~lib/rt/__allocArray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 16 local.get $2 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 + call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 i32.shl local.tee $1 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 call $~lib/rt/pure/__retain i32.store @@ -1412,21 +1421,30 @@ local.tee $1 i32.load offset=4 local.tee $0 + call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 5 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain i32.store local.get $0 + call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 5 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain i32.store offset=4 local.get $0 + call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 5 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain i32.store offset=8 local.get $1 @@ -1451,21 +1469,30 @@ local.tee $1 i32.load offset=4 local.tee $0 + call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 7 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain i32.store local.get $0 + call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 7 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain i32.store offset=4 local.get $0 + call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 7 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain i32.store offset=8 local.get $1 @@ -1497,9 +1524,12 @@ call $~lib/rt/pure/__retain local.tee $0 i32.load offset=4 + call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 5 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain i32.store local.get $0 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index c2db4f8379..ac99d0ea92 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -2,22 +2,22 @@ (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_=>_none (func (param i32 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 $none_=>_f64 (func (result f64))) (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_i64_=>_i32 (func (param i32 i32 i64) (result i32))) + (type $i64_=>_i32 (func (param i64) (result i32))) (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) (type $i64_=>_none (func (param i64))) - (type $none_=>_i32 (func (result i32))) (type $i32_i32_f64_=>_i32 (func (param i32 i32 f64) (result i32))) - (type $i32_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) + (type $i32_i64_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i64 i32 i64 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) - (type $i64_=>_i32 (func (param i64) (result i32))) (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) @@ -241,6 +241,7 @@ (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) (global $std/array/i (mut i32) (i32.const 0)) + (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/math/random_seeded (mut i32) (i32.const 0)) (global $~lib/math/random_state0_64 (mut i64) (i64.const 0)) (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) @@ -256,15 +257,6 @@ (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -300,14 +292,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -426,9 +410,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -436,7 +426,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -602,12 +592,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -697,14 +687,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -858,10 +854,13 @@ i32.const 23 i32.lt_u if - i32.const 9744 local.get $1 + i32.const 2 + i32.shl + i32.const 9744 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -925,6 +924,7 @@ ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $1 i32.const 256 i32.lt_u @@ -934,23 +934,22 @@ i32.shr_u local.set $1 else + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 local.get $1 i32.const 536870904 i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.set $1 - end - local.get $1 + select + local.tee $1 i32.const 31 local.get $1 i32.clz @@ -986,7 +985,10 @@ end local.get $0 local.get $2 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const -1 local.get $1 i32.shl @@ -1013,8 +1015,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -1026,7 +1033,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -1102,6 +1109,7 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1132,11 +1140,13 @@ memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 + i32.shl + local.set $5 local.get $3 i32.const 16 - i32.shl + local.get $0 + i32.load offset=1568 + local.get $5 i32.const 16 i32.sub i32.ne @@ -1164,9 +1174,11 @@ i32.const 16 i32.shr_u local.tee $5 + i32.gt_s + local.set $6 local.get $3 local.get $5 - i32.gt_s + local.get $6 select memory.grow i32.const 0 @@ -1237,14 +1249,6 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) @@ -1506,19 +1510,25 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize local.get $0 i32.const 2 i32.shl local.tee $4 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $1 i32.const 0 local.get $4 call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 3 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $3 i32.const 0 @@ -1562,9 +1572,12 @@ ) (func $std/array/Ref#constructor (param $0 i32) (result i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 4 i32.const 4 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $1 local.get $0 @@ -1750,17 +1763,23 @@ (local $4 i32) (local $5 i32) (local $6 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 16 local.get $2 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 + call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 i32.shl local.tee $5 local.tee $6 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 local.get $3 if @@ -2054,15 +2073,6 @@ end i32.const 0 ) - (func $std/array/internalCapacity (param $0 i32) (result i32) - local.get $0 - i32.load - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 2 - i32.shr_s - ) (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) (local $1 i32) local.get $0 @@ -2575,14 +2585,6 @@ end i32.const -1 ) - (func $~lib/array/Array#includes (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - ) (func $~lib/array/Array#splice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -2941,7 +2943,8 @@ i32.eqz ) (func $~setArgumentsLength (param $0 i32) - nop + local.get $0 + global.set $~argumentsLength ) (func $~lib/array/Array#findIndex (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -2969,7 +2972,8 @@ i32.shl i32.add i32.load - local.tee $3 + i32.const 3 + global.set $~argumentsLength local.get $2 local.get $0 local.get $1 @@ -3044,7 +3048,8 @@ i32.shl i32.add i32.load - local.tee $3 + i32.const 3 + global.set $~argumentsLength local.get $2 local.get $0 local.get $1 @@ -3120,7 +3125,8 @@ i32.shl i32.add i32.load - local.tee $3 + i32.const 3 + global.set $~argumentsLength local.get $2 local.get $0 local.get $1 @@ -3196,7 +3202,8 @@ i32.shl i32.add i32.load - local.tee $3 + i32.const 3 + global.set $~argumentsLength local.get $2 local.get $0 local.get $1 @@ -3394,6 +3401,8 @@ i32.add i32.load local.set $7 + i32.const 3 + global.set $~argumentsLength local.get $3 local.get $6 i32.add @@ -3468,7 +3477,10 @@ i32.shl i32.add i32.load - local.tee $3 + local.set $3 + i32.const 3 + global.set $~argumentsLength + local.get $3 local.get $2 local.get $0 local.get $1 @@ -3544,7 +3556,6 @@ select i32.lt_s if - local.get $2 local.get $0 i32.load offset=4 local.get $3 @@ -3552,7 +3563,11 @@ i32.shl i32.add i32.load - local.tee $4 + local.set $4 + i32.const 4 + global.set $~argumentsLength + local.get $2 + local.get $4 local.get $3 local.get $0 local.get $1 @@ -3612,7 +3627,6 @@ i32.const 0 i32.ge_s if - local.get $2 local.get $0 i32.load offset=4 local.get $3 @@ -3620,6 +3634,11 @@ i32.shl i32.add i32.load + local.set $4 + i32.const 4 + global.set $~argumentsLength + local.get $2 + local.get $4 local.get $3 local.get $0 local.get $1 @@ -3732,6 +3751,84 @@ unreachable end ) + (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 f32) + (local $5 f32) + (local $6 i32) + loop $for-loop|0 + local.get $6 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $6 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $5 + local.get $6 + i32.const 1 + i32.sub + local.set $3 + loop $while-continue|1 + local.get $3 + i32.const 0 + i32.ge_s + if + block $while-break|1 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $4 + i32.const 2 + global.set $~argumentsLength + local.get $5 + local.get $4 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.ge_s + br_if $while-break|1 + local.get $3 + local.tee $2 + i32.const 1 + i32.sub + local.set $3 + local.get $0 + local.get $2 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + f32.store + br $while-continue|1 + end + end + end + local.get $0 + local.get $3 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $5 + f32.store + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|0 + end + end + ) (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -3739,6 +3836,7 @@ (local $5 i32) (local $6 f32) (local $7 i32) + call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 31 i32.add @@ -3748,7 +3846,9 @@ i32.shl local.tee $2 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $5 i32.const 0 local.get $2 @@ -3802,14 +3902,18 @@ i32.shl i32.add f32.load - local.tee $4 + local.set $4 local.get $0 local.get $3 i32.const 2 i32.shl i32.add f32.load - local.tee $6 + local.set $6 + i32.const 2 + global.set $~argumentsLength + local.get $4 + local.get $6 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s @@ -3914,14 +4018,18 @@ if local.get $0 f32.load - local.tee $4 + local.set $4 local.get $0 local.get $1 i32.const 2 i32.shl i32.add f32.load - local.tee $6 + local.set $6 + i32.const 2 + global.set $~argumentsLength + local.get $4 + local.get $6 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s @@ -4012,23 +4120,104 @@ i32.lt_s i32.sub ) - (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) + (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) - (local $5 i32) - (local $6 f64) - (local $7 i32) - local.get $1 - i32.const 31 - i32.add + (local $5 f64) + (local $6 i32) + loop $for-loop|0 + local.get $6 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $6 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $5 + local.get $6 + i32.const 1 + i32.sub + local.set $3 + loop $while-continue|1 + local.get $3 + i32.const 0 + i32.ge_s + if + block $while-break|1 + local.get $0 + local.get $3 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $4 + i32.const 2 + global.set $~argumentsLength + local.get $5 + local.get $4 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.ge_s + br_if $while-break|1 + local.get $3 + local.tee $2 + i32.const 1 + i32.sub + local.set $3 + local.get $0 + local.get $2 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $4 + f64.store + br $while-continue|1 + end + end + end + local.get $0 + local.get $3 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $5 + f64.store + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|0 + end + end + ) + (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 f64) + (local $5 i32) + (local $6 f64) + (local $7 i32) + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + i32.const 31 + i32.add i32.const 5 i32.shr_u i32.const 2 i32.shl local.tee $2 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $5 i32.const 0 local.get $2 @@ -4082,14 +4271,18 @@ i32.shl i32.add f64.load - local.tee $4 + local.set $4 local.get $0 local.get $3 i32.const 3 i32.shl i32.add f64.load - local.tee $6 + local.set $6 + i32.const 2 + global.set $~argumentsLength + local.get $4 + local.get $6 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s @@ -4194,14 +4387,18 @@ if local.get $0 f64.load - local.tee $4 + local.set $4 local.get $0 local.get $1 i32.const 3 i32.shl i32.add f64.load - local.tee $6 + local.set $6 + i32.const 2 + global.set $~argumentsLength + local.get $4 + local.get $6 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s @@ -4313,6 +4510,85 @@ i32.add f64.load ) + (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) + loop $for-loop|0 + local.get $7 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $7 + i32.const 1 + i32.sub + local.set $4 + loop $while-continue|1 + local.get $4 + i32.const 0 + i32.ge_s + if + block $while-break|1 + local.get $0 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 + i32.const 2 + global.set $~argumentsLength + local.get $6 + local.get $5 + local.get $2 + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.ge_s + br_if $while-break|1 + local.get $4 + local.tee $3 + i32.const 1 + i32.sub + local.set $4 + local.get $0 + local.get $3 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $5 + i32.store + br $while-continue|1 + end + end + end + local.get $0 + local.get $4 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $6 + i32.store + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $for-loop|0 + end + end + ) (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -4320,6 +4596,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) + call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 31 i32.add @@ -4329,7 +4606,9 @@ i32.shl local.tee $3 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $5 i32.const 0 local.get $3 @@ -4383,14 +4662,18 @@ i32.shl i32.add i32.load - local.tee $3 + local.set $3 local.get $0 local.get $4 i32.const 2 i32.shl i32.add i32.load - local.tee $6 + local.set $6 + i32.const 2 + global.set $~argumentsLength + local.get $3 + local.get $6 local.get $2 call_indirect (type $i32_i32_=>_i32) i32.const 0 @@ -4496,14 +4779,18 @@ if local.get $0 i32.load - local.tee $3 + local.set $3 local.get $0 local.get $1 i32.const 2 i32.shl i32.add i32.load - local.tee $6 + local.set $6 + i32.const 2 + global.set $~argumentsLength + local.get $3 + local.get $6 local.get $2 call_indirect (type $i32_i32_=>_i32) i32.const 0 @@ -4570,10 +4857,6 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 i32.load offset=12 local.tee $3 @@ -4586,26 +4869,30 @@ end local.get $0 i32.load offset=4 - local.set $2 + local.set $4 local.get $3 i32.const 2 i32.eq if - local.get $2 + local.get $4 i32.load offset=4 - local.tee $3 - local.get $2 + local.set $3 + local.get $4 i32.load - local.tee $5 + local.set $2 + i32.const 2 + global.set $~argumentsLength + local.get $3 + local.get $2 local.get $1 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if + local.get $4 local.get $2 - local.get $5 i32.store offset=4 - local.get $2 + local.get $4 local.get $3 i32.store end @@ -4614,84 +4901,17 @@ return end local.get $3 + local.tee $2 i32.const 256 i32.lt_s if - local.get $3 - local.set $5 + local.get $4 + local.get $2 local.get $1 - local.set $7 - loop $for-loop|0 - local.get $4 - local.get $5 - i32.lt_s - if - local.get $2 - 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 $1 - loop $while-continue|1 - local.get $1 - i32.const 0 - i32.ge_s - if - local.get $6 - local.get $2 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $8 - local.get $7 - call_indirect (type $i32_i32_=>_i32) - i32.const 0 - i32.lt_s - if - local.get $1 - local.tee $3 - i32.const 1 - i32.sub - local.set $1 - local.get $2 - local.get $3 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store - br $while-continue|1 - end - end - end - local.get $2 - local.get $1 - 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 + call $~lib/util/sort/insertionSort else + local.get $4 local.get $2 - local.get $3 local.get $1 call $~lib/util/sort/weakHeapSort end @@ -4816,39 +5036,46 @@ (local $5 i32) (local $6 i32) block $__inlined_func$std/array/isSorted (result i32) - i32.const 1 - local.set $2 local.get $0 local.get $1 call $~lib/array/Array#sort - local.tee $3 - local.tee $0 + local.tee $2 + local.set $3 + i32.const 1 + local.set $0 + local.get $2 i32.load offset=12 local.set $4 loop $for-loop|0 - local.get $2 + local.get $0 local.get $4 i32.lt_s if - i32.const 0 + local.get $3 local.get $0 - local.get $2 i32.const 1 i32.sub call $~lib/array/Array#__get + local.set $5 + local.get $3 local.get $0 - local.get $2 call $~lib/array/Array#__get + local.set $6 + i32.const 2 + global.set $~argumentsLength + i32.const 0 + local.get $5 + local.get $6 local.get $1 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.gt_s br_if $__inlined_func$std/array/isSorted drop - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|0 end end @@ -4863,7 +5090,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 call $~lib/rt/pure/__release ) (func $start:std/array~anonymous|44 (param $0 i32) (param $1 i32) (result i32) @@ -4933,13 +5160,9 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 i32.load offset=12 - local.tee $5 + local.tee $2 i32.const 1 i32.le_s if @@ -4949,105 +5172,41 @@ end local.get $0 i32.load offset=4 - local.set $2 - local.get $5 + local.set $3 + local.get $2 i32.const 2 i32.eq if - local.get $2 + local.get $3 i32.load offset=4 - local.tee $3 - local.get $2 + local.set $2 + local.get $3 i32.load - local.tee $5 + local.set $4 + i32.const 2 + global.set $~argumentsLength + local.get $2 + local.get $4 local.get $1 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $2 - local.get $5 + local.get $3 + local.get $4 i32.store offset=4 - local.get $2 local.get $3 + local.get $2 i32.store end local.get $0 call $~lib/rt/pure/__retain return end + local.get $3 local.get $2 - local.set $3 local.get $1 - local.set $7 - loop $for-loop|0 - local.get $4 - local.get $5 - i32.lt_s - if - local.get $3 - 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 $1 - loop $while-continue|1 - local.get $1 - i32.const 0 - i32.ge_s - if - local.get $6 - local.get $3 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $8 - local.get $7 - call_indirect (type $i32_i32_=>_i32) - i32.const 0 - i32.lt_s - if - local.get $1 - local.tee $2 - i32.const 1 - i32.sub - local.set $1 - local.get $3 - local.get $2 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.store - br $while-continue|1 - end - end - end - local.get $3 - local.get $1 - 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 + call $~lib/util/sort/insertionSort local.get $0 call $~lib/rt/pure/__retain ) @@ -5058,50 +5217,55 @@ (local $5 i32) (local $6 i32) block $__inlined_func$std/array/isSorted<~lib/array/Array> (result i32) - i32.const 1 - local.set $2 local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#sort - local.tee $5 local.tee $4 + local.set $5 + i32.const 1 + local.set $0 + local.get $4 i32.load offset=12 local.set $6 loop $for-loop|0 - local.get $2 + local.get $0 local.get $6 i32.lt_s if - local.get $4 - local.get $2 + local.get $5 + local.get $0 i32.const 1 i32.sub call $~lib/array/Array#__get - local.tee $0 - local.get $4 - local.get $2 + local.set $2 + local.get $5 + local.get $0 call $~lib/array/Array#__get - local.tee $3 + local.set $3 + i32.const 2 + global.set $~argumentsLength + local.get $2 + local.get $3 local.get $1 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 + local.get $2 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isSorted<~lib/array/Array> end - local.get $0 + local.get $2 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|0 end end @@ -5116,9 +5280,102 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 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) + call $~lib/rt/tlsf/maybeInitialize + i32.const 2048 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $0 + i32.const 0 + i32.const 2048 + call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 14 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $2 + i32.const 0 + i32.store + local.get $2 + i32.const 0 + i32.store offset=4 + local.get $2 + i32.const 0 + i32.store offset=8 + local.get $2 + i32.const 0 + i32.store offset=12 + local.get $0 + local.set $1 + local.get $0 + local.get $2 + i32.load + local.tee $4 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $4 + call $~lib/rt/pure/__release + end + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + i32.const 2048 + i32.store offset=8 + local.get $2 + i32.const 512 + i32.store offset=12 + loop $for-loop|0 + local.get $3 + i32.const 512 + i32.lt_s + if + call $~lib/rt/tlsf/maybeInitialize + i32.const 4 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 511 + local.get $3 + i32.sub + i32.store + local.get $2 + local.get $3 + local.get $0 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $0 + call $~lib/rt/pure/__release + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $2 + ) (func $start:std/array~anonymous|48 (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load @@ -5126,14 +5383,6 @@ i32.load i32.sub ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - 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) @@ -5226,24 +5475,31 @@ select select br_if $folding-inner0 - local.get $0 - call $~lib/string/String#get:length - local.set $2 i32.const 0 local.get $1 - call $~lib/string/String#get:length - local.tee $3 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $2 i32.eqz - local.get $2 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $3 select br_if $folding-inner0 - local.get $2 + local.get $3 i32.eqz if i32.const -1 return end - local.get $3 + local.get $2 i32.eqz if i32.const 1 @@ -5251,10 +5507,10 @@ end local.get $0 local.get $1 - local.get $2 local.get $3 local.get $2 local.get $3 + local.get $2 i32.lt_s select call $~lib/util/string/compareImpl @@ -5262,6 +5518,93 @@ end i32.const 0 ) + (func $std/array/assertSorted<~lib/string/String | null>@varargs (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 54 + local.set $2 + end + block $__inlined_func$std/array/isSorted<~lib/string/String | null> (result i32) + i32.const 1 + local.set $1 + local.get $0 + local.get $2 + call $~lib/array/Array<~lib/array/Array>#sort + local.tee $0 + local.set $5 + local.get $0 + i32.load offset=12 + local.set $6 + loop $for-loop|0 + local.get $1 + local.get $6 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.sub + call $~lib/array/Array#__get + local.set $3 + local.get $0 + local.get $1 + call $~lib/array/Array#__get + local.set $4 + i32.const 2 + global.set $~argumentsLength + local.get $3 + local.get $4 + local.get $2 + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.gt_s + if + local.get $3 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + i32.const 0 + br $__inlined_func$std/array/isSorted<~lib/string/String | null> + end + local.get $3 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + i32.const 1 + end + i32.eqz + if + i32.const 0 + i32.const 1296 + i32.const 887 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $5 + call $~lib/rt/pure/__release + ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 @@ -5279,10 +5622,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 @@ -5294,15 +5645,10 @@ end i32.const 0 ) - (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - i32.const 6176 - local.get $0 - select - local.set $2 local.get $1 call $~lib/rt/pure/__retain local.tee $1 @@ -5318,139 +5664,235 @@ i32.const 6176 local.set $1 end - block $__inlined_func$~lib/string/String#concat - local.get $2 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $3 - local.get $1 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $4 - i32.add - local.tee $0 - i32.eqz - if - i32.const 6064 - local.set $0 - local.get $1 - call $~lib/rt/pure/__release - br $__inlined_func$~lib/string/String#concat - end - local.get $0 - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $0 - local.get $2 - local.get $3 - call $~lib/util/memory/memmove - local.get $0 - local.get $3 - i32.add - local.get $1 - local.get $4 - call $~lib/util/memory/memmove - local.get $1 - call $~lib/rt/pure/__release - end - local.get $0 - ) - (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 0 - local.get $0 - call $~lib/string/String#get:length - local.tee $2 - i32.const 0 - local.get $2 - i32.lt_s - select - local.tee $3 - local.get $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - local.tee $1 - local.get $2 - local.get $1 - local.get $2 - i32.lt_s - select - local.tee $1 - local.get $3 local.get $1 - i32.gt_s - select + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.const 1 i32.shl local.tee $4 - local.get $3 - local.get $1 - local.get $3 - local.get $1 - i32.lt_s - select + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.const 1 i32.shl - local.tee $1 - i32.sub + local.tee $2 + i32.add local.tee $3 i32.eqz if + local.get $1 + call $~lib/rt/pure/__release i32.const 6064 return end - i32.const 0 - local.get $4 - local.get $2 - i32.const 1 - i32.shl - i32.eq - local.get $1 - select - if - local.get $0 - call $~lib/rt/pure/__retain - return - end + call $~lib/rt/tlsf/maybeInitialize local.get $3 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - local.get $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 i32.add - local.get $3 + call $~lib/rt/pure/__retain + local.tee $3 + local.get $0 + local.get $2 call $~lib/util/memory/memmove local.get $2 - call $~lib/rt/pure/__retain + local.get $3 + i32.add + local.get $1 + local.get $4 + call $~lib/util/memory/memmove + local.get $1 + call $~lib/rt/pure/__release + local.get $3 ) - (func $~lib/util/string/joinBooleanArray (param $0 i32) (param $1 i32) (result i32) + (func $std/array/createRandomString (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.get $1 - i32.const 1 - i32.sub - local.tee $3 - i32.const 0 - i32.lt_s - if - i32.const 6064 - return - end - local.get $3 + i32.const 6064 + local.set $1 + loop $for-loop|0 + local.get $4 + local.get $0 + i32.lt_s + if + local.get $1 + i32.const 6176 + local.get $1 + select + block $__inlined_func$~lib/string/String#charAt (result i32) + i32.const 6064 + call $~lib/math/NativeMath.random + i32.const 5084 + i32.load + i32.const 1 + i32.shr_u + f64.convert_i32_s + f64.mul + f64.floor + i32.trunc_f64_s + local.tee $2 + i32.const 5084 + i32.load + i32.const 1 + i32.shr_u + i32.ge_u + br_if $__inlined_func$~lib/string/String#charAt + drop + call $~lib/rt/tlsf/maybeInitialize + i32.const 2 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $3 + local.get $2 + i32.const 1 + i32.shl + i32.const 5088 + i32.add + i32.load16_u + i32.store16 + local.get $3 + call $~lib/rt/pure/__retain + end + local.tee $5 + call $~lib/string/String#concat + local.tee $2 + local.get $1 + local.tee $3 + local.get $2 + local.tee $1 + 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 $5 + call $~lib/rt/pure/__release + 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) + (local $4 i32) + i32.const 0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $2 + i32.const 0 + local.get $2 + i32.lt_s + select + local.tee $3 + local.get $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + local.tee $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select + local.tee $1 + local.get $3 + local.get $1 + i32.gt_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 + select + i32.const 1 + i32.shl + local.tee $1 + i32.sub + local.tee $3 + i32.eqz + if + i32.const 6064 + return + end + i32.const 0 + local.get $4 + local.get $2 + i32.const 1 + i32.shl + i32.eq + local.get $1 + select + if + local.get $0 + call $~lib/rt/pure/__retain + return + end + call $~lib/rt/tlsf/maybeInitialize + local.get $3 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 + local.get $0 + local.get $1 + i32.add + local.get $3 + call $~lib/util/memory/memmove + local.get $2 + call $~lib/rt/pure/__retain + ) + (func $~lib/util/string/joinBooleanArray (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + i32.const 1 + i32.sub + local.tee $3 + i32.const 0 + i32.lt_s + if + i32.const 6064 + return + end + local.get $3 i32.eqz if i32.const 6240 @@ -5462,8 +5904,10 @@ return end local.get $3 - i32.const 6304 - call $~lib/string/String#get:length + i32.const 6300 + i32.load + i32.const 1 + i32.shr_u local.tee $4 i32.const 5 i32.add @@ -5473,8 +5917,13 @@ local.tee $7 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $1 loop $for-loop|1 @@ -5652,7 +6101,7 @@ local.get $0 i32.const 31 i32.shr_u - local.tee $1 + local.tee $2 if i32.const 0 local.get $0 @@ -5661,24 +6110,29 @@ end local.get $0 call $~lib/util/number/decimalCount32 - local.get $1 + local.get $2 i32.add local.tee $3 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 local.get $0 local.get $3 call $~lib/util/number/utoa32_core - local.get $1 + local.get $2 if - local.get $2 + local.get $1 i32.const 45 i32.store16 end - local.get $2 + local.get $1 call $~lib/rt/pure/__retain ) (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -5755,7 +6209,11 @@ end local.get $4 local.get $2 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $5 i32.const 11 i32.add @@ -5765,8 +6223,13 @@ local.tee $7 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -5834,14 +6297,6 @@ end local.get $1 ) - (func $~lib/array/Array#join (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=12 - local.get $1 - call $~lib/util/string/joinIntegerArray - ) (func $~lib/util/number/utoa32 (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -5853,16 +6308,21 @@ end local.get $0 call $~lib/util/number/decimalCount32 - local.tee $1 + local.tee $2 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 local.get $0 - local.get $1 - call $~lib/util/number/utoa32_core local.get $2 + call $~lib/util/number/utoa32_core + local.get $1 call $~lib/rt/pure/__retain ) (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -5918,7 +6378,11 @@ end local.get $4 local.get $2 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $5 i32.const 10 i32.add @@ -5928,8 +6392,13 @@ local.tee $7 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -5997,14 +6466,6 @@ end local.get $1 ) - (func $~lib/array/Array#join (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=12 - local.get $1 - call $~lib/util/string/joinIntegerArray - ) (func $~lib/util/number/umul64f (param $0 i64) (param $1 i64) (result i64) (local $2 i64) (local $3 i64) @@ -6050,13 +6511,6 @@ i64.shr_u i64.add ) - (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.add - i32.const -64 - i32.sub - ) (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) local.get $0 local.get $1 @@ -6113,21 +6567,22 @@ local.get $1 i32.store16 ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i32) (param $4 i64) (param $5 i32) (result i32) + (local $6 i32) (local $7 i32) (local $8 i32) (local $9 i64) (local $10 i64) (local $11 i64) (local $12 i64) - local.get $3 + local.get $2 local.get $1 i64.sub local.set $9 - local.get $3 + local.get $2 i64.const 1 i32.const 0 - local.get $4 + local.get $3 i32.sub local.tee $8 i64.extend_i32_s @@ -6138,16 +6593,16 @@ local.tee $11 i64.and local.set $1 - local.get $3 + local.get $2 local.get $8 i64.extend_i32_s i64.shr_u i32.wrap_i64 - local.tee $2 + local.tee $6 call $~lib/util/number/decimalCount32 - local.set $7 + local.set $3 loop $while-continue|0 - local.get $7 + local.get $3 i32.const 0 i32.gt_s if @@ -6162,159 +6617,159 @@ block $case3|1 block $case2|1 block $case1|1 - local.get $7 - local.tee $4 + local.get $3 + local.tee $7 i32.const 10 i32.ne if - local.get $4 + local.get $7 i32.const 1 i32.sub br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 end - local.get $2 + local.get $6 i32.const 1000000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 1000000000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 100000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 100000000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 10000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 10000000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 1000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 1000000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 100000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 100000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 10000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 10000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 1000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 1000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 100 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 100 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 10 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 10 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 - local.set $4 + local.get $6 + local.set $3 i32.const 0 - local.set $2 + local.set $6 br $break|1 end i32.const 0 - local.set $4 + local.set $3 end - local.get $4 - local.get $6 + local.get $3 + local.get $5 i32.or if local.get $0 - local.get $6 + local.get $5 i32.const 1 i32.shl i32.add - local.get $4 + local.get $3 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 end local.get $7 i32.const 1 i32.sub - local.set $7 + local.set $3 local.get $1 - local.get $2 + local.get $6 i64.extend_i32_u local.get $8 i64.extend_i32_s i64.shl i64.add - local.tee $3 - local.get $5 + local.tee $2 + local.get $4 i64.le_u if - local.get $7 + local.get $3 global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K local.get $0 - local.get $6 local.get $5 + local.get $4 + local.get $2 local.get $3 - local.get $7 i32.const 2 i32.shl i32.const 7768 @@ -6325,7 +6780,7 @@ i64.shl local.get $9 call $~lib/util/number/grisuRound - local.get $6 + local.get $5 return end br $while-continue|0 @@ -6333,28 +6788,27 @@ end local.get $8 i64.extend_i32_s - local.set $3 - loop $while-continue|2 (result i32) - local.get $5 + local.set $2 + loop $while-continue|2 + local.get $4 i64.const 10 i64.mul - local.set $5 + local.set $4 local.get $1 i64.const 10 i64.mul local.tee $1 - local.get $3 + local.get $2 i64.shr_u local.tee $12 - local.get $6 + local.get $5 i64.extend_i32_s i64.or i64.const 0 i64.ne if local.get $0 - local.get $6 - local.tee $2 + local.get $5 i32.const 1 i32.shl i32.add @@ -6365,44 +6819,44 @@ i32.const 48 i32.add i32.store16 - local.get $2 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 end - local.get $7 + local.get $3 i32.const 1 i32.sub - local.set $7 + local.set $3 local.get $1 local.get $11 i64.and local.tee $1 - local.get $5 + local.get $4 i64.ge_u br_if $while-continue|2 - local.get $7 - global.get $~lib/util/number/_K - i32.add - global.set $~lib/util/number/_K - local.get $0 - local.get $6 - local.get $5 - local.get $1 - local.get $10 - local.get $9 - i32.const 0 - local.get $7 - i32.sub - i32.const 2 - i32.shl - i32.const 7768 - i32.add - i64.load32_u - i64.mul - call $~lib/util/number/grisuRound - local.get $6 end + local.get $3 + global.get $~lib/util/number/_K + i32.add + global.set $~lib/util/number/_K + local.get $0 + local.get $5 + local.get $4 + local.get $1 + local.get $10 + local.get $9 + i32.const 0 + local.get $3 + i32.sub + i32.const 2 + i32.shl + i32.const 7768 + i32.add + i64.load32_u + i64.mul + call $~lib/util/number/grisuRound + local.get $5 ) (func $~lib/util/number/grisu2 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -6521,17 +6975,11 @@ local.get $4 i64.clz i32.wrap_i64 - local.tee $1 i64.extend_i32_s i64.shl global.get $~lib/util/number/_frc_pow local.tee $4 call $~lib/util/number/umul64f - local.get $5 - local.get $1 - i32.sub - local.get $3 - call $~lib/util/number/umul64e global.get $~lib/util/number/_frc_plus local.get $4 call $~lib/util/number/umul64f @@ -6540,7 +6988,9 @@ local.tee $6 global.get $~lib/util/number/_exp local.get $3 - call $~lib/util/number/umul64e + i32.add + i32.const -64 + i32.sub local.get $6 global.get $~lib/util/number/_frc_minus local.get $4 @@ -6936,9 +7386,12 @@ local.set $0 br $__inlined_func$~lib/util/number/dtoa end + call $~lib/rt/tlsf/maybeInitialize i32.const 56 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $1 local.get $3 call $~lib/util/number/dtoa_core @@ -6964,8 +7417,10 @@ return end local.get $4 - i32.const 6736 - call $~lib/string/String#get:length + i32.const 6732 + i32.load + i32.const 1 + i32.shr_u local.tee $5 i32.const 28 i32.add @@ -6975,8 +7430,13 @@ local.tee $7 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -7052,6 +7512,8 @@ (local $7 i32) (local $8 i32) (local $9 i32) + local.get $2 + local.set $4 local.get $1 i32.const 1 i32.sub @@ -7086,9 +7548,12 @@ end i32.const 6064 local.set $1 - local.get $2 - local.tee $4 - call $~lib/string/String#get:length + local.get $4 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.set $8 loop $for-loop|0 local.get $5 @@ -7118,11 +7583,15 @@ call $~lib/rt/pure/__retain local.tee $2 local.get $1 + i32.const 6176 + local.get $1 + select local.get $2 - call $~lib/string/String.__concat - local.tee $9 + call $~lib/string/String#concat local.tee $2 + local.set $9 local.get $1 + local.get $2 i32.ne if local.get $2 @@ -7141,10 +7610,13 @@ if local.get $1 local.tee $2 + i32.const 6176 + local.get $1 + select local.get $4 - call $~lib/string/String.__concat - local.tee $7 + call $~lib/string/String#concat local.tee $1 + local.get $1 local.get $2 i32.ne if @@ -7154,7 +7626,6 @@ local.get $2 call $~lib/rt/pure/__release end - local.get $7 call $~lib/rt/pure/__release end local.get $5 @@ -7186,11 +7657,15 @@ call $~lib/rt/pure/__retain local.tee $0 local.get $1 + i32.const 6176 + local.get $1 + select local.get $0 - call $~lib/string/String.__concat - local.tee $0 + call $~lib/string/String#concat local.tee $3 + local.set $0 local.get $1 + local.get $3 i32.ne if local.get $3 @@ -7209,14 +7684,6 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/array/Array<~lib/string/String | null>#join (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=12 - local.get $1 - call $~lib/util/string/joinReferenceArray<~lib/string/String | null> - ) (func $~lib/util/string/joinReferenceArray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -7255,8 +7722,10 @@ end i32.const 6064 local.set $1 - i32.const 6304 - call $~lib/string/String#get:length + i32.const 6300 + i32.load + i32.const 1 + i32.shr_u local.set $7 loop $for-loop|0 local.get $4 @@ -7283,11 +7752,14 @@ local.get $3 if local.get $1 + i32.const 6176 local.get $1 + select i32.const 7984 - call $~lib/string/String.__concat - local.tee $6 + call $~lib/string/String#concat local.tee $2 + local.get $1 + local.get $2 i32.ne if local.get $2 @@ -7296,7 +7768,6 @@ local.get $1 call $~lib/rt/pure/__release end - local.get $6 call $~lib/rt/pure/__release local.get $2 local.set $1 @@ -7305,10 +7776,13 @@ if local.get $1 local.tee $2 + i32.const 6176 + local.get $1 + select i32.const 6304 - call $~lib/string/String.__concat - local.tee $6 + call $~lib/string/String#concat local.tee $1 + local.get $1 local.get $2 i32.ne if @@ -7318,7 +7792,6 @@ local.get $2 call $~lib/rt/pure/__release end - local.get $6 call $~lib/rt/pure/__release end local.get $4 @@ -7328,7 +7801,6 @@ br $for-loop|0 end end - local.get $3 local.get $0 local.get $5 i32.const 2 @@ -7336,6 +7808,7 @@ i32.add i32.load local.tee $2 + local.get $3 i32.ne if local.get $2 @@ -7347,11 +7820,14 @@ local.get $2 if local.get $1 + i32.const 6176 local.get $1 + select i32.const 7984 - call $~lib/string/String.__concat - local.tee $0 + call $~lib/string/String#concat local.tee $3 + local.get $1 + local.get $3 i32.ne if local.get $3 @@ -7360,7 +7836,6 @@ local.get $1 call $~lib/rt/pure/__release end - local.get $0 call $~lib/rt/pure/__release local.get $3 local.set $1 @@ -7369,13 +7844,6 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/array/Array#join (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=12 - call $~lib/util/string/joinReferenceArray - ) (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 @@ -7467,8 +7935,10 @@ return end local.get $3 - i32.const 6304 - call $~lib/string/String#get:length + i32.const 6300 + i32.load + i32.const 1 + i32.shr_u local.tee $4 i32.const 11 i32.add @@ -7478,8 +7948,13 @@ local.tee $6 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -7603,8 +8078,10 @@ return end local.get $3 - i32.const 6304 - call $~lib/string/String#get:length + i32.const 6300 + i32.load + i32.const 1 + i32.shr_u local.tee $4 i32.const 10 i32.add @@ -7614,8 +8091,13 @@ local.tee $6 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -7841,8 +8323,13 @@ local.tee $2 i32.const 1 i32.shl + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $0 local.get $1 local.get $2 @@ -7853,8 +8340,13 @@ local.tee $1 i32.const 1 i32.shl + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $0 local.get $4 local.get $1 @@ -7866,8 +8358,10 @@ return end local.get $3 - i32.const 6304 - call $~lib/string/String#get:length + i32.const 6300 + i32.load + i32.const 1 + i32.shr_u local.tee $5 i32.const 20 i32.add @@ -7877,8 +8371,13 @@ local.tee $7 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -7946,38 +8445,113 @@ end local.get $1 ) - (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa64 (param $0 i64) (result i32) + (local $1 i32) + (local $2 i32) (local $3 i32) - local.get $1 - i32.const 1 - i32.shl + (local $4 i32) local.get $0 - i32.add - local.set $1 - local.get $2 - i64.const 0 - i64.lt_s - local.tee $0 + i64.eqz + if + i32.const 6416 + return + end + local.get $0 + i64.const 63 + i64.shr_u + i32.wrap_i64 + local.tee $2 if - local.get $1 - i32.const 45 - i32.store16 i64.const 0 - local.get $2 + local.get $0 i64.sub - local.set $2 + local.set $0 end - local.get $2 - i64.const 10 - i64.lt_u + local.get $0 + i64.const 4294967295 + i64.le_u if local.get $0 + i32.wrap_i64 + local.tee $3 + call $~lib/util/number/decimalCount32 + local.get $2 + i32.add + local.tee $4 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize local.get $1 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 i32.add - local.get $2 - i64.const 48 + local.tee $1 + local.get $3 + local.get $4 + call $~lib/util/number/utoa32_core + else + local.get $0 + call $~lib/util/number/decimalCount64High + local.get $2 + i32.add + local.tee $3 + i32.const 1 + i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $0 + local.get $3 + call $~lib/util/number/utoa64_core + end + local.get $2 + if + local.get $1 + i32.const 45 + i32.store16 + end + local.get $1 + call $~lib/rt/pure/__retain + ) + (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) + local.get $1 + i32.const 1 + i32.shl + local.get $0 + i32.add + local.set $1 + local.get $2 + i64.const 0 + i64.lt_s + local.tee $0 + if + local.get $1 + i32.const 45 + i32.store16 + i64.const 0 + local.get $2 + i64.sub + local.set $2 + end + local.get $2 + i64.const 10 + i64.lt_u + if + local.get $0 + i32.const 1 + i32.shl + local.get $1 + i32.add + local.get $2 + i64.const 48 i64.or i64.store16 local.get $0 @@ -8014,113 +8588,60 @@ ) (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) local.get $1 i32.const 1 i32.sub - local.tee $4 + local.tee $3 i32.const 0 i32.lt_s if i32.const 6064 return end - local.get $4 + local.get $3 i32.eqz if - block $__inlined_func$~lib/util/number/itoa64 (result i32) - i32.const 6416 - local.get $0 - i64.load - local.tee $3 - i64.eqz - br_if $__inlined_func$~lib/util/number/itoa64 - drop - 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 - i64.const 4294967295 - i64.le_u - if - local.get $3 - i32.wrap_i64 - local.tee $2 - call $~lib/util/number/decimalCount32 - local.get $0 - i32.add - local.tee $4 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $2 - local.get $4 - call $~lib/util/number/utoa32_core - else - local.get $3 - call $~lib/util/number/decimalCount64High - local.get $0 - i32.add - local.tee $2 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $3 - local.get $2 - call $~lib/util/number/utoa64_core - end - local.get $0 - if - local.get $1 - i32.const 45 - i32.store16 - end - local.get $1 - call $~lib/rt/pure/__retain - end + local.get $0 + i64.load + call $~lib/util/number/itoa64 return end - local.get $4 - i32.const 6304 - call $~lib/string/String#get:length - local.tee $5 + local.get $3 + i32.const 6300 + i32.load + i32.const 1 + i32.shr_u + local.tee $4 i32.const 21 i32.add i32.mul i32.const 21 i32.add - local.tee $7 + local.tee $6 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 - local.get $4 + local.get $5 + local.get $3 i32.lt_s if local.get $1 local.get $2 local.get $0 - local.get $6 + local.get $5 i32.const 3 i32.shl i32.add @@ -8129,7 +8650,7 @@ local.get $2 i32.add local.set $2 - local.get $5 + local.get $4 if local.get $1 local.get $2 @@ -8137,27 +8658,27 @@ i32.shl i32.add i32.const 6304 - local.get $5 + local.get $4 i32.const 1 i32.shl call $~lib/util/memory/memmove local.get $2 - local.get $5 + local.get $4 i32.add local.set $2 end - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|0 end end - local.get $7 + local.get $6 local.get $1 local.get $2 local.get $0 - local.get $4 + local.get $3 i32.const 3 i32.shl i32.add @@ -8209,8 +8730,11 @@ local.get $4 if (result i32) local.get $4 + i32.load offset=4 + local.get $4 + i32.load offset=12 i32.const 6304 - call $~lib/array/Array#join + call $~lib/util/string/joinIntegerArray else i32.const 6064 end @@ -8220,8 +8744,10 @@ end i32.const 6064 local.set $1 - i32.const 6304 - call $~lib/string/String#get:length + i32.const 6300 + i32.load + i32.const 1 + i32.shr_u local.set $7 loop $for-loop|0 local.get $4 @@ -8248,15 +8774,22 @@ local.get $3 if local.get $3 + i32.load offset=4 + local.get $3 + i32.load offset=12 i32.const 6304 - call $~lib/array/Array#join + call $~lib/util/string/joinIntegerArray local.tee $2 local.get $1 + i32.const 6176 local.get $1 + select local.get $2 - call $~lib/string/String.__concat - local.tee $8 + call $~lib/string/String#concat local.tee $2 + local.set $8 + local.get $1 + local.get $2 i32.ne if local.get $2 @@ -8275,10 +8808,13 @@ if local.get $1 local.tee $2 + i32.const 6176 + local.get $1 + select i32.const 6304 - call $~lib/string/String.__concat - local.tee $6 + call $~lib/string/String#concat local.tee $1 + local.get $1 local.get $2 i32.ne if @@ -8288,7 +8824,6 @@ local.get $2 call $~lib/rt/pure/__release end - local.get $6 call $~lib/rt/pure/__release end local.get $4 @@ -8317,15 +8852,22 @@ local.get $2 if local.get $2 + i32.load offset=4 + local.get $2 + i32.load offset=12 i32.const 6304 - call $~lib/array/Array#join + call $~lib/util/string/joinIntegerArray local.tee $0 local.get $1 + i32.const 6176 local.get $1 + select local.get $0 - call $~lib/string/String.__concat - local.tee $0 + call $~lib/string/String#concat local.tee $3 + local.set $0 + local.get $1 + local.get $3 i32.ne if local.get $3 @@ -8404,8 +8946,10 @@ return end local.get $3 - i32.const 6304 - call $~lib/string/String#get:length + i32.const 6300 + i32.load + i32.const 1 + i32.shr_u local.tee $4 i32.const 10 i32.add @@ -8415,8 +8959,13 @@ local.tee $6 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -8480,13 +9029,6 @@ end local.get $1 ) - (func $~lib/array/Array#toString (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=12 - call $~lib/util/string/joinIntegerArray - ) (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -8519,7 +9061,10 @@ local.get $4 if (result i32) local.get $4 - call $~lib/array/Array#toString + i32.load offset=4 + local.get $4 + i32.load offset=12 + call $~lib/util/string/joinIntegerArray else i32.const 6064 end @@ -8529,8 +9074,10 @@ end i32.const 6064 local.set $1 - i32.const 6304 - call $~lib/string/String#get:length + i32.const 6300 + i32.load + i32.const 1 + i32.shr_u local.set $7 loop $for-loop|0 local.get $4 @@ -8556,14 +9103,22 @@ end local.get $3 if + local.get $3 + i32.load offset=4 + local.get $3 + i32.load offset=12 + call $~lib/util/string/joinIntegerArray + local.tee $2 local.get $1 + i32.const 6176 local.get $1 - local.get $3 - call $~lib/array/Array#toString - local.tee $6 - call $~lib/string/String.__concat - local.tee $8 + select + local.get $2 + call $~lib/string/String#concat local.tee $2 + local.set $8 + local.get $1 + local.get $2 i32.ne if local.get $2 @@ -8572,7 +9127,6 @@ 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 @@ -8583,10 +9137,13 @@ if local.get $1 local.tee $2 + i32.const 6176 + local.get $1 + select i32.const 6304 - call $~lib/string/String.__concat - local.tee $6 + call $~lib/string/String#concat local.tee $1 + local.get $1 local.get $2 i32.ne if @@ -8596,7 +9153,6 @@ local.get $2 call $~lib/rt/pure/__release end - local.get $6 call $~lib/rt/pure/__release end local.get $4 @@ -8606,7 +9162,6 @@ br $for-loop|0 end end - local.get $3 local.get $0 local.get $5 i32.const 2 @@ -8614,6 +9169,7 @@ i32.add i32.load local.tee $2 + local.get $3 i32.ne if local.get $2 @@ -8624,14 +9180,22 @@ end local.get $2 if - local.get $1 - local.get $1 local.get $2 - call $~lib/array/Array#toString + i32.load offset=4 + local.get $2 + i32.load offset=12 + call $~lib/util/string/joinIntegerArray local.tee $0 - call $~lib/string/String.__concat - local.tee $4 + local.get $1 + i32.const 6176 + local.get $1 + select + local.get $0 + call $~lib/string/String#concat local.tee $3 + local.set $0 + local.get $1 + local.get $3 i32.ne if local.get $3 @@ -8640,9 +9204,8 @@ local.get $1 call $~lib/rt/pure/__release end - local.get $0 call $~lib/rt/pure/__release - local.get $4 + local.get $0 call $~lib/rt/pure/__release local.get $3 local.set $1 @@ -8683,8 +9246,11 @@ local.get $4 if (result i32) local.get $4 + i32.load offset=4 + local.get $4 + i32.load offset=12 i32.const 6304 - call $~lib/array/Array#join + call $~lib/util/string/joinIntegerArray else i32.const 6064 end @@ -8694,8 +9260,10 @@ end i32.const 6064 local.set $1 - i32.const 6304 - call $~lib/string/String#get:length + i32.const 6300 + i32.load + i32.const 1 + i32.shr_u local.set $7 loop $for-loop|0 local.get $4 @@ -8722,15 +9290,22 @@ local.get $3 if local.get $3 + i32.load offset=4 + local.get $3 + i32.load offset=12 i32.const 6304 - call $~lib/array/Array#join + call $~lib/util/string/joinIntegerArray local.tee $2 local.get $1 + i32.const 6176 local.get $1 + select local.get $2 - call $~lib/string/String.__concat - local.tee $8 + call $~lib/string/String#concat local.tee $2 + local.set $8 + local.get $1 + local.get $2 i32.ne if local.get $2 @@ -8749,10 +9324,13 @@ if local.get $1 local.tee $2 + i32.const 6176 + local.get $1 + select i32.const 6304 - call $~lib/string/String.__concat - local.tee $6 + call $~lib/string/String#concat local.tee $1 + local.get $1 local.get $2 i32.ne if @@ -8762,7 +9340,6 @@ local.get $2 call $~lib/rt/pure/__release end - local.get $6 call $~lib/rt/pure/__release end local.get $4 @@ -8791,15 +9368,22 @@ local.get $2 if local.get $2 + i32.load offset=4 + local.get $2 + i32.load offset=12 i32.const 6304 - call $~lib/array/Array#join + call $~lib/util/string/joinIntegerArray local.tee $0 local.get $1 + i32.const 6176 local.get $1 + select local.get $0 - call $~lib/string/String.__concat - local.tee $0 + call $~lib/string/String#concat local.tee $3 + local.set $0 + local.get $1 + local.get $3 i32.ne if local.get $3 @@ -8818,13 +9402,6 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/array/Array<~lib/array/Array>#toString (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=12 - call $~lib/util/string/joinReferenceArray<~lib/array/Array> - ) (func $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -8857,7 +9434,10 @@ local.get $4 if (result i32) local.get $4 - call $~lib/array/Array<~lib/array/Array>#toString + i32.load offset=4 + local.get $4 + i32.load offset=12 + call $~lib/util/string/joinReferenceArray<~lib/array/Array> else i32.const 6064 end @@ -8867,8 +9447,10 @@ end i32.const 6064 local.set $1 - i32.const 6304 - call $~lib/string/String#get:length + i32.const 6300 + i32.load + i32.const 1 + i32.shr_u local.set $7 loop $for-loop|0 local.get $4 @@ -8894,14 +9476,22 @@ end local.get $3 if + local.get $3 + i32.load offset=4 + local.get $3 + i32.load offset=12 + call $~lib/util/string/joinReferenceArray<~lib/array/Array> + local.tee $2 local.get $1 + i32.const 6176 local.get $1 - local.get $3 - call $~lib/array/Array<~lib/array/Array>#toString - local.tee $6 - call $~lib/string/String.__concat - local.tee $8 + select + local.get $2 + call $~lib/string/String#concat local.tee $2 + local.set $8 + local.get $1 + local.get $2 i32.ne if local.get $2 @@ -8910,7 +9500,6 @@ 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 @@ -8921,10 +9510,13 @@ if local.get $1 local.tee $2 + i32.const 6176 + local.get $1 + select i32.const 6304 - call $~lib/string/String.__concat - local.tee $6 + call $~lib/string/String#concat local.tee $1 + local.get $1 local.get $2 i32.ne if @@ -8934,7 +9526,6 @@ local.get $2 call $~lib/rt/pure/__release end - local.get $6 call $~lib/rt/pure/__release end local.get $4 @@ -8944,7 +9535,6 @@ br $for-loop|0 end end - local.get $3 local.get $0 local.get $5 i32.const 2 @@ -8952,6 +9542,7 @@ i32.add i32.load local.tee $2 + local.get $3 i32.ne if local.get $2 @@ -8962,14 +9553,22 @@ end local.get $2 if - local.get $1 - local.get $1 local.get $2 - call $~lib/array/Array<~lib/array/Array>#toString + i32.load offset=4 + local.get $2 + i32.load offset=12 + call $~lib/util/string/joinReferenceArray<~lib/array/Array> local.tee $0 - call $~lib/string/String.__concat - local.tee $4 + local.get $1 + i32.const 6176 + local.get $1 + select + local.get $0 + call $~lib/string/String#concat local.tee $3 + local.set $0 + local.get $1 + local.get $3 i32.ne if local.get $3 @@ -8978,9 +9577,8 @@ local.get $1 call $~lib/rt/pure/__release end - local.get $0 call $~lib/rt/pure/__release - local.get $4 + local.get $0 call $~lib/rt/pure/__release local.get $3 local.set $1 @@ -9030,27 +9628,33 @@ br $for-loop|0 end end + call $~lib/rt/tlsf/maybeInitialize local.get $2 i32.const 2 i32.shl local.tee $1 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $0 + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 3 - call $~lib/rt/tlsf/__alloc - local.tee $0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $3 local.get $2 i32.store offset=12 - local.get $0 + local.get $3 local.get $1 i32.store offset=8 - local.get $0 local.get $3 - i32.store offset=4 local.get $0 + i32.store offset=4 local.get $3 + local.get $0 call $~lib/rt/pure/__retain i32.store i32.const 0 @@ -9068,7 +9672,7 @@ i32.load local.tee $2 if - local.get $3 + local.get $0 local.get $4 i32.add local.get $2 @@ -9089,7 +9693,7 @@ br $for-loop|1 end end - local.get $0 + local.get $3 call $~lib/rt/pure/__retain ) (func $~lib/array/Array<~lib/array/Array<~lib/string/String | null>>#flat (param $0 i32) (result i32) @@ -9134,16 +9738,22 @@ br $for-loop|0 end end + call $~lib/rt/tlsf/maybeInitialize local.get $2 i32.const 2 i32.shl local.tee $1 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $0 + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 15 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 local.get $2 i32.store offset=12 @@ -9235,8 +9845,8 @@ (local $13 i32) (local $14 i32) (local $15 i32) - (local $16 f32) - (local $17 f64) + (local $16 i32) + (local $17 i32) (local $18 i32) (local $19 i32) (local $20 i32) @@ -9247,22 +9857,22 @@ (local $25 i32) (local $26 i32) (local $27 i32) - (local $28 i32) - (local $29 i32) + (local $28 f64) + (local $29 f32) (local $30 i32) (local $31 i32) (local $32 i32) (local $33 i32) - (local $34 f32) - (local $35 f64) + (local $34 i32) + (local $35 i32) (local $36 i32) (local $37 i32) (local $38 i32) (local $39 i32) (local $40 i32) (local $41 i32) - (local $42 i32) - (local $43 i32) + (local $42 f64) + (local $43 f32) (local $44 i32) (local $45 i32) (local $46 i32) @@ -9286,56 +9896,65 @@ global.set $std/array/arr i32.const 0 call $std/array/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 5 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.set $2 + local.set $61 + call $~lib/rt/tlsf/maybeInitialize i32.const 1 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $0 i32.const 0 i32.const 1 call $~lib/util/memory/memset - local.get $2 + local.get $61 i32.eqz if + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 2 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.set $2 + local.set $61 end - local.get $2 + local.get $61 i32.const 0 i32.store - local.get $2 + local.get $61 i32.const 0 i32.store offset=4 - local.get $2 + local.get $61 i32.const 0 i32.store offset=8 - local.get $1 - local.tee $0 - local.get $2 + local.get $0 + local.tee $1 + local.get $61 i32.load - local.tee $5 + local.tee $57 i32.ne if - local.get $0 + local.get $1 call $~lib/rt/pure/__retain - local.set $0 - local.get $5 + local.set $1 + local.get $57 call $~lib/rt/pure/__release end - local.get $2 - local.get $0 - i32.store - local.get $2 + local.get $61 local.get $1 + i32.store + local.get $61 + local.get $0 i32.store offset=4 - local.get $2 + local.get $61 i32.const 1 i32.store offset=8 global.get $std/array/arr @@ -9349,7 +9968,7 @@ unreachable end call $~lib/rt/pure/__release - local.get $2 + local.get $61 call $~lib/rt/pure/__release i32.const 5 i32.const 0 @@ -9357,20 +9976,20 @@ i32.const 1440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 0 i32.const 6 i32.const 1472 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 call $std/array/isArraysEqual i32.eqz if @@ -9381,20 +10000,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 0 i32.const 6 i32.const 1568 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $61 call $std/array/isArraysEqual i32.eqz if @@ -9405,20 +10024,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 0 i32.const 6 i32.const 1600 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $60 call $std/array/isArraysEqual i32.eqz if @@ -9429,20 +10048,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 0 i32.const 6 i32.const 1632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $57 call $std/array/isArraysEqual i32.eqz if @@ -9453,20 +10072,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 0 i32.const 6 i32.const 1664 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $54 call $std/array/isArraysEqual i32.eqz if @@ -9477,17 +10096,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $61 call $~lib/rt/pure/__release - local.get $5 + local.get $60 call $~lib/rt/pure/__release - local.get $9 + local.get $57 + call $~lib/rt/pure/__release + local.get $54 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -9495,20 +10114,20 @@ i32.const 1696 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 7 i32.const 1744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9520,20 +10139,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 7 i32.const 1792 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $61 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9545,20 +10164,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 7 i32.const 1840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $60 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9570,20 +10189,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 7 i32.const 1888 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $57 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9595,20 +10214,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 7 i32.const 1936 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $54 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9620,17 +10239,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $61 call $~lib/rt/pure/__release - local.get $5 + local.get $60 call $~lib/rt/pure/__release - local.get $9 + local.get $57 + call $~lib/rt/pure/__release + local.get $54 call $~lib/rt/pure/__release global.get $std/array/arr i32.load offset=12 @@ -9643,7 +10262,12 @@ unreachable end global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s if i32.const 0 i32.const 1296 @@ -9681,7 +10305,12 @@ unreachable end global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s i32.const 1 i32.ne if @@ -9715,7 +10344,12 @@ unreachable end global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s i32.const 1 i32.ne if @@ -9742,7 +10376,12 @@ unreachable end global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s i32.const 1 i32.ne if @@ -9782,7 +10421,12 @@ unreachable end global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s i32.const 2 i32.ne if @@ -9835,7 +10479,12 @@ unreachable end global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s i32.const 3 i32.ne if @@ -9891,51 +10540,51 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 - i32.load offset=4 local.tee $1 + i32.load offset=4 + local.tee $0 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $1 + local.get $0 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $0 + local.get $1 i32.load offset=12 - local.tee $1 + local.tee $0 i32.const 0 i32.gt_s if - local.get $0 - i32.load offset=4 - local.tee $3 local.get $1 + i32.load offset=4 + local.tee $60 + local.get $0 i32.const 2 i32.shl i32.add - local.set $1 + local.set $0 loop $do-continue|0 - local.get $3 + local.get $60 i32.load call $~lib/rt/pure/__release - local.get $3 + local.get $60 i32.const 4 i32.add - local.tee $3 - local.get $1 + local.tee $60 + local.get $0 i32.lt_u br_if $do-continue|0 end else - local.get $0 + local.get $1 i32.const 0 call $~lib/array/ensureSize end - local.get $0 + local.get $1 i32.const 0 i32.store offset=12 - local.get $0 + local.get $1 i32.load offset=12 if i32.const 0 @@ -9945,17 +10594,22 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 0 call $~lib/array/Array#constructor - local.set $1 + local.set $0 global.get $std/array/arr - local.get $1 + local.get $0 call $~lib/array/Array#concat - local.set $2 + local.set $61 global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s i32.const 3 i32.ne if @@ -9978,7 +10632,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $61 i32.load offset=12 i32.const 3 i32.ne @@ -9990,18 +10644,23 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $61 i32.const 0 i32.const 2 i32.const 3 i32.const 2032 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $57 call $~lib/array/Array#concat call $~lib/rt/pure/__release global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s i32.const 3 i32.ne if @@ -10012,7 +10671,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $61 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -10025,7 +10684,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $61 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -10038,7 +10697,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $61 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -10051,20 +10710,25 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 46 call $~lib/array/Array#push - local.get $1 + local.get $0 i32.const 47 call $~lib/array/Array#push global.get $std/array/arr - local.get $1 + local.get $0 call $~lib/array/Array#concat - local.set $0 - local.get $2 + local.set $1 + local.get $61 call $~lib/rt/pure/__release global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s i32.const 3 i32.ne if @@ -10075,7 +10739,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=12 i32.const 2 i32.ne @@ -10087,7 +10751,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.load offset=12 i32.const 5 i32.ne @@ -10099,7 +10763,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -10112,7 +10776,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -10125,7 +10789,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -10138,7 +10802,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 3 call $~lib/array/Array#__get i32.const 46 @@ -10151,7 +10815,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 call $~lib/array/Array#__get i32.const 47 @@ -10164,10 +10828,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $~lib/array/Array#pop drop - local.get $0 + local.get $1 i32.load offset=12 i32.const 4 i32.ne @@ -10185,7 +10849,7 @@ i32.const 2048 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $61 i32.load offset=12 if i32.const 0 @@ -10195,13 +10859,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $61 global.get $std/array/arr call $~lib/array/Array#concat - local.set $3 - local.get $0 + local.set $60 + local.get $1 call $~lib/rt/pure/__release - local.get $3 + local.get $60 i32.load offset=12 i32.const 3 i32.ne @@ -10213,7 +10877,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $61 i32.load offset=12 if i32.const 0 @@ -10223,13 +10887,13 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $60 call $~lib/rt/pure/__release - local.get $5 + local.get $57 call $~lib/rt/pure/__release - local.get $2 + local.get $61 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -10237,19 +10901,19 @@ i32.const 2064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.const 0 i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $2 + local.tee $61 i32.const 5 i32.const 2 i32.const 3 i32.const 2112 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $60 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10267,22 +10931,22 @@ i32.const 2160 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 i32.const 1 i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $5 + local.tee $57 i32.const 5 i32.const 2 i32.const 3 i32.const 2208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $54 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10300,22 +10964,22 @@ i32.const 2256 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - call $~lib/rt/pure/__release + local.set $0 local.get $1 + call $~lib/rt/pure/__release + local.get $0 i32.const 1 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $14 + local.tee $41 i32.const 5 i32.const 2 i32.const 3 i32.const 2304 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $58 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10333,21 +10997,22 @@ i32.const 2352 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.set $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.get $1 i32.const 2 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $25 + local.tee $56 i32.const 5 i32.const 2 i32.const 3 i32.const 2400 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $53 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10365,21 +11030,22 @@ i32.const 2448 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain + local.set $0 local.get $1 call $~lib/rt/pure/__release - local.tee $1 + local.get $0 i32.const 0 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $8 + local.tee $55 i32.const 5 i32.const 2 i32.const 3 i32.const 2496 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $52 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10397,21 +11063,22 @@ i32.const 2544 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.set $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.get $1 i32.const 1 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $12 + local.tee $50 i32.const 5 i32.const 2 i32.const 3 i32.const 2592 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $49 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10429,21 +11096,22 @@ i32.const 2640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain + local.set $0 local.get $1 call $~lib/rt/pure/__release - local.tee $1 + local.get $0 i32.const 1 i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $30 + local.tee $33 i32.const 5 i32.const 2 i32.const 3 i32.const 2688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $48 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10461,21 +11129,22 @@ i32.const 2736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.set $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.get $1 i32.const 0 i32.const -2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $19 + local.tee $46 i32.const 5 i32.const 2 i32.const 3 i32.const 2784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $45 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10493,21 +11162,22 @@ i32.const 2832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain + local.set $0 local.get $1 call $~lib/rt/pure/__release - local.tee $1 + local.get $0 i32.const 0 i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $13 + local.tee $47 i32.const 5 i32.const 2 i32.const 3 i32.const 2880 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $21 + local.tee $44 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10525,22 +11195,22 @@ i32.const 2928 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 i32.const -4 i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - local.tee $22 + local.tee $40 i32.const 5 i32.const 2 i32.const 3 i32.const 2976 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $23 + local.tee $39 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10558,22 +11228,22 @@ i32.const 3024 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - call $~lib/rt/pure/__release + local.set $0 local.get $1 + call $~lib/rt/pure/__release + local.get $0 i32.const -4 i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $24 + local.tee $38 i32.const 5 i32.const 2 i32.const 3 i32.const 3072 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $37 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10591,22 +11261,22 @@ i32.const 3120 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 i32.const -4 i32.const -3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $1 + local.tee $0 i32.const 5 i32.const 2 i32.const 3 i32.const 3168 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $36 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10618,55 +11288,55 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $61 call $~lib/rt/pure/__release - local.get $3 + local.get $60 call $~lib/rt/pure/__release - local.get $5 + local.get $57 call $~lib/rt/pure/__release - local.get $9 + local.get $54 call $~lib/rt/pure/__release - local.get $14 + local.get $41 call $~lib/rt/pure/__release - local.get $7 + local.get $58 call $~lib/rt/pure/__release - local.get $25 + local.get $56 call $~lib/rt/pure/__release - local.get $6 + local.get $53 call $~lib/rt/pure/__release - local.get $8 + local.get $55 call $~lib/rt/pure/__release - local.get $10 + local.get $52 call $~lib/rt/pure/__release - local.get $12 + local.get $50 call $~lib/rt/pure/__release - local.get $15 + local.get $49 call $~lib/rt/pure/__release - local.get $30 + local.get $33 call $~lib/rt/pure/__release - local.get $18 + local.get $48 call $~lib/rt/pure/__release - local.get $19 + local.get $46 call $~lib/rt/pure/__release - local.get $20 + local.get $45 call $~lib/rt/pure/__release - local.get $13 + local.get $47 call $~lib/rt/pure/__release - local.get $21 + local.get $44 call $~lib/rt/pure/__release - local.get $22 + local.get $40 call $~lib/rt/pure/__release - local.get $23 + local.get $39 call $~lib/rt/pure/__release - local.get $24 + local.get $38 call $~lib/rt/pure/__release - local.get $26 + local.get $37 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $27 + local.get $36 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 42 @@ -10684,7 +11354,12 @@ unreachable end global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s i32.const 4 i32.ne if @@ -10763,10 +11438,15 @@ unreachable end global.get $std/array/arr - call $std/array/internalCapacity - i32.const 5 - i32.ne - if + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s + i32.const 5 + i32.ne + if i32.const 0 i32.const 1296 i32.const 232 @@ -10840,9 +11520,9 @@ unreachable end global.get $std/array/arr - local.tee $1 + local.tee $0 i32.load offset=12 - local.tee $2 + local.tee $61 i32.const 1 i32.lt_s if @@ -10853,29 +11533,29 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=4 - local.tee $0 + local.tee $1 i32.load - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.const 4 i32.add - local.get $2 + local.get $61 i32.const 1 i32.sub - local.tee $2 + local.tee $61 i32.const 2 i32.shl - local.tee $5 + local.tee $57 call $~lib/util/memory/memmove - local.get $0 - local.get $5 + local.get $1 + local.get $57 i32.add i32.const 0 i32.store - local.get $1 - local.get $2 + local.get $0 + local.get $61 i32.store offset=12 global.set $std/array/i global.get $std/array/i @@ -10902,7 +11582,12 @@ unreachable end global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s i32.const 5 i32.ne if @@ -10992,7 +11677,12 @@ unreachable end global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s i32.const 5 i32.ne if @@ -11043,45 +11733,45 @@ unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=12 local.tee $1 + i32.load offset=12 + local.tee $0 if - local.get $0 - i32.load offset=4 - local.set $2 - local.get $0 + local.get $1 i32.load offset=4 + local.set $61 local.get $1 + i32.load offset=4 + local.get $0 i32.const 1 i32.sub i32.const 2 i32.shl i32.add - local.set $3 + local.set $60 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $61 + local.get $60 i32.lt_u if - local.get $2 + local.get $61 i32.load local.set $0 - local.get $2 - local.get $3 + local.get $61 + local.get $60 i32.load i32.store - local.get $3 + local.get $60 local.get $0 i32.store - local.get $2 + local.get $61 i32.const 4 i32.add - local.set $2 - local.get $3 + local.set $61 + local.get $60 i32.const 4 i32.sub - local.set $3 + local.set $60 br $while-continue|0 end end @@ -11099,7 +11789,12 @@ unreachable end global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s i32.const 5 i32.ne if @@ -11319,36 +12014,36 @@ i32.const 3216 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 - local.set $5 + local.tee $1 + local.set $57 i32.const 0 - local.set $2 + local.set $61 block $__inlined_func$~lib/array/Array#indexOf - local.get $0 + local.get $1 i32.load offset=12 - local.tee $1 + local.tee $0 if (result i32) i32.const 0 - local.get $1 + local.get $0 i32.ge_s else i32.const 1 end if i32.const -1 - local.set $2 + local.set $61 br $__inlined_func$~lib/array/Array#indexOf end - local.get $5 + local.get $57 i32.load offset=4 - local.set $3 - loop $while-continue|022 - local.get $2 - local.get $1 + local.set $60 + loop $while-continue|016 + local.get $61 + local.get $0 i32.lt_s if - local.get $3 - local.get $2 + local.get $60 + local.get $61 i32.const 2 i32.shl i32.add @@ -11356,17 +12051,17 @@ f32.const nan:0x400000 f32.eq br_if $__inlined_func$~lib/array/Array#indexOf - local.get $2 + local.get $61 i32.const 1 i32.add - local.set $2 - br $while-continue|022 + local.set $61 + br $while-continue|016 end end i32.const -1 - local.set $2 + local.set $61 end - local.get $2 + local.get $61 i32.const -1 i32.ne if @@ -11383,36 +12078,36 @@ i32.const 3248 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 - local.set $9 + local.tee $0 + local.set $54 i32.const 0 - local.set $2 + local.set $61 block $__inlined_func$~lib/array/Array#indexOf - local.get $1 + local.get $0 i32.load offset=12 - local.tee $3 + local.tee $60 if (result i32) i32.const 0 - local.get $3 + local.get $60 i32.ge_s else i32.const 1 end if i32.const -1 - local.set $2 + local.set $61 br $__inlined_func$~lib/array/Array#indexOf end - local.get $9 + local.get $54 i32.load offset=4 - local.set $5 - loop $while-continue|023 - local.get $2 - local.get $3 + local.set $57 + loop $while-continue|017 + local.get $61 + local.get $60 i32.lt_s if - local.get $5 - local.get $2 + local.get $57 + local.get $61 i32.const 3 i32.shl i32.add @@ -11420,17 +12115,17 @@ f64.const nan:0x8000000000000 f64.eq br_if $__inlined_func$~lib/array/Array#indexOf - local.get $2 + local.get $61 i32.const 1 i32.add - local.set $2 - br $while-continue|023 + local.set $61 + br $while-continue|017 end end i32.const -1 - local.set $2 + local.set $61 end - local.get $2 + local.get $61 i32.const -1 i32.ne if @@ -11441,14 +12136,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release global.get $std/array/arr i32.const 44 i32.const 0 - call $~lib/array/Array#includes + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s i32.const 1 i32.ne if @@ -11462,7 +12159,9 @@ global.get $std/array/arr i32.const 42 i32.const 0 - call $~lib/array/Array#includes + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s i32.const 1 i32.ne if @@ -11476,7 +12175,9 @@ global.get $std/array/arr i32.const 45 i32.const 0 - call $~lib/array/Array#includes + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s if i32.const 0 i32.const 1296 @@ -11488,7 +12189,9 @@ global.get $std/array/arr i32.const 43 i32.const 100 - call $~lib/array/Array#includes + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s if i32.const 0 i32.const 1296 @@ -11500,7 +12203,9 @@ global.get $std/array/arr i32.const 43 i32.const -100 - call $~lib/array/Array#includes + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s i32.const 1 i32.ne if @@ -11514,7 +12219,9 @@ global.get $std/array/arr i32.const 43 i32.const -2 - call $~lib/array/Array#includes + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s i32.const 1 i32.ne if @@ -11528,7 +12235,9 @@ global.get $std/array/arr i32.const 43 i32.const -4 - call $~lib/array/Array#includes + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s i32.const 1 i32.ne if @@ -11542,7 +12251,9 @@ global.get $std/array/arr i32.const 43 i32.const 0 - call $~lib/array/Array#includes + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s i32.const 1 i32.ne if @@ -11556,7 +12267,9 @@ global.get $std/array/arr i32.const 43 i32.const 1 - call $~lib/array/Array#includes + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s i32.const 1 i32.ne if @@ -11570,7 +12283,9 @@ global.get $std/array/arr i32.const 43 i32.const 2 - call $~lib/array/Array#includes + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s i32.const 1 i32.ne if @@ -11583,7 +12298,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $2 + local.set $61 i32.const 0 i32.const 1 i32.const 2 @@ -11591,50 +12306,50 @@ i32.const 3280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.load offset=12 - local.tee $3 + local.tee $60 if (result i32) i32.const 0 - local.get $3 + local.get $60 i32.ge_s else i32.const 1 end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $1 + local.get $0 i32.load offset=4 - local.set $9 - loop $while-continue|024 - local.get $2 - local.get $3 + local.set $54 + loop $while-continue|027 + local.get $61 + local.get $60 i32.lt_s if i32.const 1 - local.get $9 - local.get $2 + local.get $54 + local.get $61 i32.const 2 i32.shl i32.add f32.load - local.tee $16 + local.tee $43 f32.const nan:0x400000 f32.eq if (result i32) i32.const 1 else - local.get $16 - local.get $16 + local.get $43 + local.get $43 f32.ne end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $2 + local.get $61 i32.const 1 i32.add - local.set $2 - br $while-continue|024 + local.set $61 + br $while-continue|027 end end i32.const 0 @@ -11650,7 +12365,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $2 + local.set $61 i32.const 0 i32.const 1 i32.const 3 @@ -11658,50 +12373,50 @@ i32.const 3312 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $60 i32.load offset=12 - local.tee $5 + local.tee $57 if (result i32) i32.const 0 - local.get $5 + local.get $57 i32.ge_s else i32.const 1 end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $3 + local.get $60 i32.load offset=4 - local.set $14 - loop $while-continue|025 - local.get $2 - local.get $5 + local.set $41 + loop $while-continue|028 + local.get $61 + local.get $57 i32.lt_s if i32.const 1 - local.get $14 - local.get $2 + local.get $41 + local.get $61 i32.const 3 i32.shl i32.add f64.load - local.tee $17 + local.tee $42 f64.const nan:0x8000000000000 f64.eq if (result i32) i32.const 1 else - local.get $17 - local.get $17 + local.get $42 + local.get $42 f64.ne end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $2 + local.get $61 i32.const 1 i32.add - local.set $2 - br $while-continue|025 + local.set $61 + br $while-continue|028 end end i32.const 0 @@ -11733,7 +12448,12 @@ unreachable end global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s i32.const 5 i32.ne if @@ -11770,9 +12490,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $60 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -11780,18 +12500,18 @@ i32.const 3344 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $3 + local.tee $60 i32.const 5 i32.const 2 i32.const 3 i32.const 3392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $58 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11803,14 +12523,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 i32.const 2 i32.const 3 i32.const 3440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $56 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11828,21 +12548,21 @@ i32.const 3456 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 i32.const 0 i32.const 0 call $~lib/array/Array#splice - local.tee $6 + local.tee $53 i32.const 0 i32.const 2 i32.const 3 i32.const 3504 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $55 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11854,14 +12574,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 3 i32.const 3520 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $52 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11879,21 +12599,21 @@ i32.const 3568 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - call $~lib/rt/pure/__release + local.set $0 local.get $1 + call $~lib/rt/pure/__release + local.get $0 i32.const 2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $12 + local.tee $50 i32.const 3 i32.const 2 i32.const 3 i32.const 3616 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $49 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11905,14 +12625,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 i32.const 2 i32.const 3 i32.const 3648 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $48 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11930,21 +12650,21 @@ i32.const 3680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 - local.get $1 + local.set $61 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $61 i32.const 2 i32.const 2 call $~lib/array/Array#splice - local.tee $19 + local.tee $46 i32.const 2 i32.const 2 i32.const 3 i32.const 3728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $45 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11956,14 +12676,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $61 i32.const 3 i32.const 2 i32.const 3 i32.const 3760 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $47 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11981,21 +12701,21 @@ i32.const 3792 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $2 + local.set $1 + local.get $61 call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 0 i32.const 1 call $~lib/array/Array#splice - local.tee $21 + local.tee $44 i32.const 1 i32.const 2 i32.const 3 i32.const 3840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $40 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12007,14 +12727,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 2 i32.const 3 i32.const 3872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $23 + local.tee $39 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12032,20 +12752,20 @@ i32.const 3904 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.tee $1 i32.const -1 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $24 + local.tee $38 i32.const 1 i32.const 2 i32.const 3 i32.const 3952 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $37 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12057,14 +12777,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 2 i32.const 3 i32.const 3984 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $36 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12082,20 +12802,20 @@ i32.const 4016 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.tee $1 i32.const -2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $31 + local.tee $32 i32.const 2 i32.const 2 i32.const 3 i32.const 4064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $32 + local.tee $31 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12107,14 +12827,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 3 i32.const 2 i32.const 3 i32.const 4096 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $33 + local.tee $30 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12132,20 +12852,20 @@ i32.const 4128 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.tee $1 i32.const -2 i32.const 1 call $~lib/array/Array#splice - local.tee $28 + local.tee $35 i32.const 1 i32.const 2 i32.const 3 i32.const 4176 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $29 + local.tee $34 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12157,14 +12877,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 2 i32.const 3 i32.const 4208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $36 + local.tee $27 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12182,20 +12902,20 @@ i32.const 4240 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.tee $1 i32.const -7 i32.const 1 call $~lib/array/Array#splice - local.tee $37 + local.tee $26 i32.const 1 i32.const 2 i32.const 3 i32.const 4288 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $38 + local.tee $25 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12207,14 +12927,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 2 i32.const 3 i32.const 4320 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $39 + local.tee $24 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12232,20 +12952,20 @@ i32.const 4352 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.tee $1 i32.const -2 i32.const -1 call $~lib/array/Array#splice - local.tee $40 + local.tee $23 i32.const 0 i32.const 2 i32.const 3 i32.const 4400 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $41 + local.tee $22 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12257,14 +12977,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 3 i32.const 4416 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $42 + local.tee $21 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12282,20 +13002,20 @@ i32.const 4464 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.tee $1 i32.const 1 i32.const -2 call $~lib/array/Array#splice - local.tee $43 + local.tee $20 i32.const 0 i32.const 2 i32.const 3 i32.const 4512 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $44 + local.tee $19 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12307,14 +13027,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 3 i32.const 4528 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $45 + local.tee $18 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12332,21 +13052,20 @@ i32.const 4576 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - call $~lib/rt/pure/__release local.get $1 + call $~lib/rt/pure/__release + local.tee $1 i32.const 4 i32.const 0 call $~lib/array/Array#splice - local.tee $46 + local.tee $17 i32.const 0 i32.const 2 i32.const 3 i32.const 4624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $47 + local.tee $16 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12365,7 +13084,7 @@ i32.const 4640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $48 + local.tee $15 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12383,21 +13102,20 @@ i32.const 4688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 local.get $1 call $~lib/rt/pure/__release - local.get $0 + local.tee $1 i32.const 7 i32.const 0 call $~lib/array/Array#splice - local.tee $49 + local.tee $14 i32.const 0 i32.const 2 i32.const 3 i32.const 4736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $13 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12409,14 +13127,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 3 i32.const 4752 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $51 + local.tee $12 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12434,21 +13152,21 @@ i32.const 4800 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - call $~lib/rt/pure/__release + local.set $0 local.get $1 + call $~lib/rt/pure/__release + local.get $0 i32.const 7 i32.const 5 call $~lib/array/Array#splice - local.tee $52 + local.tee $11 i32.const 0 i32.const 2 i32.const 3 i32.const 4848 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $53 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12460,14 +13178,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 5 i32.const 2 i32.const 3 i32.const 4864 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $54 + local.tee $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12485,10 +13203,10 @@ i32.const 4912 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $61 i32.const 1 call $~lib/array/Array#splice - local.tee $14 + local.tee $54 i32.load offset=12 if i32.const 0 @@ -12498,7 +13216,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $61 i32.load offset=12 if i32.const 0 @@ -12514,37 +13232,37 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $57 i32.load offset=4 - local.tee $0 + local.tee $1 i32.const 1 call $std/array/Ref#constructor i32.store - local.get $0 + local.get $1 i32.const 2 call $std/array/Ref#constructor i32.store offset=4 - local.get $0 + local.get $1 i32.const 3 call $std/array/Ref#constructor i32.store offset=8 - local.get $0 + local.get $1 i32.const 4 call $std/array/Ref#constructor i32.store offset=12 - local.get $0 + local.get $1 i32.const 5 call $std/array/Ref#constructor i32.store offset=16 - local.get $2 + local.get $61 call $~lib/rt/pure/__release - local.get $9 + local.get $57 i32.const 2 call $~lib/array/Array#splice - local.set $25 - local.get $14 + local.set $41 + local.get $54 call $~lib/rt/pure/__release - local.get $25 + local.get $41 i32.load offset=12 i32.const 2 i32.ne @@ -12556,10 +13274,10 @@ call $~lib/builtins/abort unreachable end - local.get $25 + local.get $41 i32.const 0 call $~lib/array/Array#__get - local.tee $55 + local.tee $8 i32.load i32.const 3 i32.ne @@ -12571,10 +13289,10 @@ call $~lib/builtins/abort unreachable end - local.get $25 + local.get $41 i32.const 1 call $~lib/array/Array#__get - local.tee $56 + local.tee $7 i32.load i32.const 4 i32.ne @@ -12586,7 +13304,7 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $57 i32.load offset=12 i32.const 3 i32.ne @@ -12598,10 +13316,10 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $57 i32.const 0 call $~lib/array/Array#__get - local.tee $57 + local.tee $6 i32.load i32.const 1 i32.ne @@ -12613,10 +13331,10 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $57 i32.const 1 call $~lib/array/Array#__get - local.tee $58 + local.tee $5 i32.load i32.const 2 i32.ne @@ -12628,10 +13346,10 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $57 i32.const 2 call $~lib/array/Array#__get - local.tee $59 + local.tee $4 i32.load i32.const 5 i32.ne @@ -12649,22 +13367,22 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $14 + local.tee $54 i32.load offset=4 - local.tee $0 + local.tee $1 i32.const 1 call $std/array/Ref#constructor i32.store - local.get $0 + local.get $1 i32.const 0 i32.store offset=4 - local.get $0 + local.get $1 i32.const 2 call $std/array/Ref#constructor i32.store offset=8 - local.get $14 + local.get $54 call $~lib/array/Array#splice - local.tee $30 + local.tee $33 i32.load offset=12 i32.const 1 i32.ne @@ -12676,11 +13394,11 @@ call $~lib/builtins/abort unreachable end - local.get $30 + local.get $33 i32.const 0 call $~lib/array/Array#__get - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i32.eqz if i32.const 0 @@ -12701,7 +13419,7 @@ call $~lib/builtins/abort unreachable end - local.get $14 + local.get $54 i32.load offset=12 i32.const 2 i32.ne @@ -12713,10 +13431,10 @@ call $~lib/builtins/abort unreachable end - local.get $14 + local.get $54 i32.const 0 call $~lib/array/Array#__get - local.tee $60 + local.tee $3 if i32.const 0 i32.const 1296 @@ -12725,11 +13443,11 @@ call $~lib/builtins/abort unreachable end - local.get $14 + local.get $54 i32.const 1 call $~lib/array/Array#__get - local.tee $2 - local.get $2 + local.tee $61 + local.get $61 i32.eqz if i32.const 0 @@ -12750,107 +13468,107 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $60 call $~lib/rt/pure/__release - local.get $7 + local.get $58 call $~lib/rt/pure/__release - local.get $6 + local.get $56 call $~lib/rt/pure/__release - local.get $8 + local.get $53 call $~lib/rt/pure/__release - local.get $10 + local.get $55 call $~lib/rt/pure/__release - local.get $12 + local.get $52 call $~lib/rt/pure/__release - local.get $15 + local.get $50 call $~lib/rt/pure/__release - local.get $18 + local.get $49 call $~lib/rt/pure/__release - local.get $19 + local.get $48 call $~lib/rt/pure/__release - local.get $20 + local.get $46 call $~lib/rt/pure/__release - local.get $13 + local.get $45 call $~lib/rt/pure/__release - local.get $21 + local.get $47 call $~lib/rt/pure/__release - local.get $22 + local.get $44 call $~lib/rt/pure/__release - local.get $23 + local.get $40 call $~lib/rt/pure/__release - local.get $24 + local.get $39 call $~lib/rt/pure/__release - local.get $26 + local.get $38 call $~lib/rt/pure/__release - local.get $27 + local.get $37 call $~lib/rt/pure/__release - local.get $31 + local.get $36 call $~lib/rt/pure/__release local.get $32 call $~lib/rt/pure/__release - local.get $33 + local.get $31 call $~lib/rt/pure/__release - local.get $28 + local.get $30 call $~lib/rt/pure/__release - local.get $29 + local.get $35 call $~lib/rt/pure/__release - local.get $36 + local.get $34 call $~lib/rt/pure/__release - local.get $37 + local.get $27 call $~lib/rt/pure/__release - local.get $38 + local.get $26 call $~lib/rt/pure/__release - local.get $39 + local.get $25 call $~lib/rt/pure/__release - local.get $40 + local.get $24 call $~lib/rt/pure/__release - local.get $41 + local.get $23 call $~lib/rt/pure/__release - local.get $42 + local.get $22 call $~lib/rt/pure/__release - local.get $43 + local.get $21 call $~lib/rt/pure/__release - local.get $44 + local.get $20 call $~lib/rt/pure/__release - local.get $45 + local.get $19 call $~lib/rt/pure/__release - local.get $46 + local.get $18 call $~lib/rt/pure/__release - local.get $47 + local.get $17 call $~lib/rt/pure/__release - local.get $48 + local.get $16 call $~lib/rt/pure/__release - local.get $49 + local.get $15 call $~lib/rt/pure/__release - local.get $50 + local.get $14 call $~lib/rt/pure/__release - local.get $51 + local.get $13 call $~lib/rt/pure/__release - local.get $52 + local.get $12 call $~lib/rt/pure/__release - local.get $53 + local.get $11 call $~lib/rt/pure/__release - local.get $54 + local.get $10 call $~lib/rt/pure/__release - local.get $55 + local.get $9 call $~lib/rt/pure/__release - local.get $56 + local.get $8 call $~lib/rt/pure/__release - local.get $57 + local.get $7 call $~lib/rt/pure/__release - local.get $58 + local.get $6 call $~lib/rt/pure/__release - local.get $59 + local.get $5 call $~lib/rt/pure/__release - local.get $0 + local.get $4 call $~lib/rt/pure/__release - local.get $60 + local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $3 + call $~lib/rt/pure/__release + local.get $61 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 0 @@ -13324,17 +14042,17 @@ unreachable end loop $for-loop|0 - local.get $4 + local.get $59 i32.const 100 i32.lt_s if global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $4 + local.get $59 i32.const 1 i32.add - local.set $4 + local.set $59 br $for-loop|0 end end @@ -13351,54 +14069,56 @@ i32.const 3 call $~lib/array/Array#push i32.const 0 - local.set $2 + local.set $60 global.get $std/array/arr - local.tee $1 + local.tee $0 i32.load offset=12 - local.tee $4 + local.tee $61 i32.const 2 i32.const 9 i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.load offset=4 - local.set $3 - loop $for-loop|043 - local.get $2 - local.get $4 - local.get $1 + local.set $59 + loop $for-loop|030 + local.get $60 + local.get $61 + local.get $0 i32.load offset=12 - local.tee $5 - local.get $4 - local.get $5 + local.tee $58 + local.get $61 + local.get $58 i32.lt_s select i32.lt_s if - local.get $2 + local.get $60 i32.const 2 i32.shl - local.tee $5 - local.get $1 + local.tee $58 + local.get $0 i32.load offset=4 i32.add i32.load - local.set $7 - local.get $3 - local.get $5 + local.set $56 + i32.const 3 + global.set $~argumentsLength + local.get $58 + local.get $59 i32.add - local.get $7 + local.get $56 f32.convert_i32_s f32.store - local.get $2 + local.get $60 i32.const 1 i32.add - local.set $2 - br $for-loop|043 + local.set $60 + br $for-loop|030 end end - local.get $0 + local.get $1 i32.load offset=12 i32.const 4 i32.ne @@ -13410,7 +14130,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/array/Array#__get global.get $std/array/arr @@ -13519,12 +14239,12 @@ global.get $std/array/arr i32.const 3 call $~lib/array/Array#push - local.get $0 + local.get $1 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 26 call $~lib/array/Array#filter - local.tee $0 + local.tee $1 i32.load offset=12 i32.const 2 i32.ne @@ -13629,7 +14349,7 @@ global.get $std/array/arr i32.const 3 call $~lib/array/Array#push - local.get $0 + local.get $1 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 30 @@ -13938,130 +14658,71 @@ call $~lib/bindings/Math/random i64.reinterpret_f64 call $~lib/math/NativeMath.seedRandom + i32.const 8 + i32.const 2 + i32.const 9 + i32.const 5280 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $0 + i32.const 0 + global.set $~argumentsLength block $__inlined_func$~lib/array/Array#sort (result i32) - i32.const 8 - i32.const 2 - i32.const 9 - i32.const 5280 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $2 + local.get $0 i32.load offset=12 - local.tee $5 + local.tee $61 i32.const 1 i32.le_s if - local.get $2 + local.get $0 call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end - local.get $2 + local.get $0 i32.load offset=4 - local.set $3 - local.get $5 + local.set $1 + local.get $61 i32.const 2 i32.eq if - local.get $3 + local.get $1 f32.load offset=4 - local.tee $16 - local.get $3 + local.set $43 + local.get $1 f32.load - local.tee $34 + local.set $29 + i32.const 2 + global.set $~argumentsLength + local.get $43 + local.get $29 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if - local.get $3 - local.get $34 + local.get $1 + local.get $29 f32.store offset=4 - local.get $3 - local.get $16 + local.get $1 + local.get $43 f32.store end - local.get $2 + local.get $0 call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end - local.get $5 + local.get $61 i32.const 256 i32.lt_s if - i32.const 0 - local.set $4 - loop $for-loop|00 - local.get $4 - local.get $5 - i32.lt_s - if - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $16 - local.get $4 - i32.const 1 - i32.sub - local.set $0 - loop $while-continue|1 - local.get $0 - i32.const 0 - i32.ge_s - if - local.get $16 - local.get $3 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $34 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 - i32.lt_s - if - local.get $0 - local.tee $1 - i32.const 1 - i32.sub - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $34 - f32.store - br $while-continue|1 - end - end - end - local.get $3 - local.get $0 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $16 - f32.store - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|00 - end - end + local.get $1 + local.get $61 + call $~lib/util/sort/insertionSort else - local.get $3 - local.get $5 + local.get $1 + local.get $61 call $~lib/util/sort/weakHeapSort end - local.get $2 + local.get $0 call $~lib/rt/pure/__retain end call $~lib/rt/pure/__release @@ -14072,60 +14733,61 @@ i32.const 5328 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $7 + local.tee $45 + local.set $61 i32.const 0 - local.set $3 + local.set $1 block $folding-inner0 - local.get $2 + local.get $0 i32.load offset=12 - local.tee $1 - local.get $7 + local.tee $59 + local.get $61 i32.load offset=12 i32.ne br_if $folding-inner0 i32.const 1 - local.get $2 - local.get $7 + local.get $0 + local.get $61 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop - loop $for-loop|001 - local.get $3 + loop $for-loop|00 local.get $1 + local.get $59 i32.lt_s if - local.get $2 - local.get $3 + local.get $0 + local.get $1 call $~lib/array/Array#__get - local.tee $16 - local.get $16 + local.tee $43 + local.get $43 f32.ne if (result i32) - local.get $7 - local.get $3 + local.get $61 + local.get $1 call $~lib/array/Array#__get - local.tee $16 - local.get $16 + local.tee $43 + local.get $43 f32.ne else i32.const 0 end i32.eqz if - local.get $2 - local.get $3 + local.get $0 + local.get $1 call $~lib/array/Array#__get - local.get $7 - local.get $3 + local.get $61 + local.get $1 call $~lib/array/Array#__get f32.ne br_if $folding-inner0 end - local.get $3 + local.get $1 i32.const 1 i32.add - local.set $3 - br $for-loop|001 + local.set $1 + br $for-loop|00 end end i32.const 1 @@ -14142,130 +14804,71 @@ call $~lib/builtins/abort unreachable end + i32.const 8 + i32.const 3 + i32.const 10 + i32.const 5376 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $61 + i32.const 0 + global.set $~argumentsLength block $__inlined_func$~lib/array/Array#sort (result i32) - i32.const 8 - i32.const 3 - i32.const 10 - i32.const 5376 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $3 + local.get $61 i32.load offset=12 - local.tee $6 + local.tee $60 i32.const 1 i32.le_s if - local.get $3 + local.get $61 call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end - local.get $3 + local.get $61 i32.load offset=4 - local.set $5 - local.get $6 + local.set $1 + local.get $60 i32.const 2 i32.eq if - local.get $5 + local.get $1 f64.load offset=8 - local.tee $17 - local.get $5 + local.set $42 + local.get $1 f64.load - local.tee $35 + local.set $28 + i32.const 2 + global.set $~argumentsLength + local.get $42 + local.get $28 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if - local.get $5 - local.get $35 + local.get $1 + local.get $28 f64.store offset=8 - local.get $5 - local.get $17 + local.get $1 + local.get $42 f64.store end - local.get $3 + local.get $61 call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end - local.get $6 + local.get $60 i32.const 256 i32.lt_s if - i32.const 0 - local.set $4 - loop $for-loop|02 - local.get $4 - local.get $6 - i32.lt_s - if - local.get $5 - local.get $4 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $17 - local.get $4 - i32.const 1 - i32.sub - local.set $0 - loop $while-continue|13 - local.get $0 - i32.const 0 - i32.ge_s - if - local.get $17 - local.get $5 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $35 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 - i32.lt_s - if - local.get $0 - local.tee $1 - i32.const 1 - i32.sub - local.set $0 - local.get $5 - local.get $1 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - local.get $35 - f64.store - br $while-continue|13 - end - end - end - local.get $5 - local.get $0 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - local.get $17 - f64.store - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|02 - end - end + local.get $1 + local.get $60 + call $~lib/util/sort/insertionSort else - local.get $5 - local.get $6 + local.get $1 + local.get $60 call $~lib/util/sort/weakHeapSort end - local.get $3 + local.get $61 call $~lib/rt/pure/__retain end call $~lib/rt/pure/__release @@ -14276,60 +14879,61 @@ i32.const 5456 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 + local.tee $47 + local.set $60 i32.const 0 - local.set $0 + local.set $1 block $folding-inner01 - local.get $3 + local.get $61 i32.load offset=12 - local.tee $5 - local.get $1 + local.tee $58 + local.get $60 i32.load offset=12 i32.ne br_if $folding-inner01 i32.const 1 - local.get $1 - local.get $3 + local.get $60 + local.get $61 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop - loop $for-loop|025 - local.get $0 - local.get $5 + loop $for-loop|02 + local.get $1 + local.get $58 i32.lt_s if - local.get $3 - local.get $0 + local.get $61 + local.get $1 call $~lib/array/Array#__get - local.tee $17 - local.get $17 + local.tee $42 + local.get $42 f64.ne if (result i32) + local.get $60 local.get $1 - local.get $0 call $~lib/array/Array#__get - local.tee $17 - local.get $17 + local.tee $42 + local.get $42 f64.ne else i32.const 0 end i32.eqz if - local.get $3 - local.get $0 + local.get $61 + local.get $1 call $~lib/array/Array#__get + local.get $60 local.get $1 - local.get $0 call $~lib/array/Array#__get f64.ne br_if $folding-inner01 end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 - br $for-loop|025 + local.set $1 + br $for-loop|02 end end i32.const 1 @@ -14352,18 +14956,21 @@ i32.const 5536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.set $60 + i32.const 0 + global.set $~argumentsLength + local.get $60 i32.const 46 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $18 + local.get $60 i32.const 5 i32.const 2 i32.const 3 i32.const 5584 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $21 + local.tee $44 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14381,18 +14988,21 @@ i32.const 5632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $19 + local.set $59 + i32.const 0 + global.set $~argumentsLength + local.get $59 i32.const 47 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $19 + local.get $59 i32.const 5 i32.const 2 i32.const 7 i32.const 5680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $40 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14410,64 +15020,64 @@ i32.const 5728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $20 + local.set $48 i32.const 1 i32.const 2 i32.const 3 i32.const 5744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $4 + local.set $58 i32.const 2 i32.const 2 i32.const 3 i32.const 5776 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $5 + local.set $56 i32.const 4 i32.const 2 i32.const 3 i32.const 5808 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $6 + local.set $53 i32.const 4 i32.const 2 i32.const 3 i32.const 5840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 + local.set $1 i32.const 64 call $std/array/createReverseOrderedArray - local.set $8 + local.set $55 i32.const 128 call $std/array/createReverseOrderedArray - local.set $10 + local.set $52 i32.const 1024 call $std/array/createReverseOrderedArray - local.set $12 + local.set $50 i32.const 10000 call $std/array/createReverseOrderedArray - local.set $15 + local.set $49 i32.const 512 call $std/array/createRandomOrderedArray - local.set $13 - local.get $20 + local.set $46 + local.get $48 i32.const 46 call $std/array/assertSorted - local.get $4 + local.get $58 i32.const 46 call $std/array/assertSorted - local.get $4 + local.get $58 i32.const 1 i32.const 2 i32.const 3 i32.const 5872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $23 + local.tee $39 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14479,17 +15089,17 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $56 i32.const 46 call $std/array/assertSorted - local.get $5 + local.get $56 i32.const 2 i32.const 2 i32.const 3 i32.const 5904 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $24 + local.tee $38 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14501,11 +15111,11 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $53 i32.const 46 call $std/array/assertSorted - local.get $6 - local.get $0 + local.get $53 + local.get $1 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14517,11 +15127,11 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $55 i32.const 46 call $std/array/assertSorted - local.get $8 - local.get $0 + local.get $55 + local.get $1 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14533,11 +15143,11 @@ call $~lib/builtins/abort unreachable end - local.get $10 + local.get $52 i32.const 46 call $std/array/assertSorted - local.get $10 - local.get $0 + local.get $52 + local.get $1 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14549,11 +15159,11 @@ call $~lib/builtins/abort unreachable end - local.get $12 + local.get $50 i32.const 46 call $std/array/assertSorted - local.get $12 - local.get $0 + local.get $50 + local.get $1 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14565,11 +15175,11 @@ call $~lib/builtins/abort unreachable end - local.get $15 + local.get $49 i32.const 46 call $std/array/assertSorted - local.get $15 - local.get $0 + local.get $49 + local.get $1 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14581,359 +15191,232 @@ call $~lib/builtins/abort unreachable end - local.get $13 + local.get $46 i32.const 46 call $std/array/assertSorted - local.get $2 + local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $45 call $~lib/rt/pure/__release - local.get $3 + local.get $61 call $~lib/rt/pure/__release - local.get $1 + local.get $47 call $~lib/rt/pure/__release - local.get $18 + local.get $60 call $~lib/rt/pure/__release - local.get $21 + local.get $44 call $~lib/rt/pure/__release - local.get $19 + local.get $59 call $~lib/rt/pure/__release - local.get $22 + local.get $40 call $~lib/rt/pure/__release - local.get $20 + local.get $48 call $~lib/rt/pure/__release - local.get $4 + local.get $58 call $~lib/rt/pure/__release - local.get $5 + local.get $56 call $~lib/rt/pure/__release - local.get $6 + local.get $53 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.get $8 + local.get $55 call $~lib/rt/pure/__release - local.get $10 + local.get $52 call $~lib/rt/pure/__release - local.get $12 + local.get $50 call $~lib/rt/pure/__release - local.get $15 + local.get $49 call $~lib/rt/pure/__release - local.get $13 + local.get $46 call $~lib/rt/pure/__release - local.get $23 + local.get $39 call $~lib/rt/pure/__release - local.get $24 + local.get $38 call $~lib/rt/pure/__release i32.const 64 call $std/array/createRandomOrderedArray - local.set $0 + local.set $1 i32.const 257 call $std/array/createRandomOrderedArray - local.set $1 - local.get $0 + local.set $0 + local.get $1 i32.const 48 call $std/array/assertSorted - local.get $0 + local.get $1 i32.const 49 call $std/array/assertSorted - local.get $1 + local.get $0 i32.const 50 call $std/array/assertSorted - local.get $1 + local.get $0 i32.const 51 call $std/array/assertSorted - local.get $0 - call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release i32.const 0 - local.set $3 + local.set $61 + call $~lib/rt/tlsf/maybeInitialize i32.const 8 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $0 i32.const 0 i32.const 8 call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 12 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $4 + local.tee $60 i32.const 0 i32.store - local.get $4 + local.get $60 i32.const 0 i32.store offset=4 - local.get $4 + local.get $60 i32.const 0 i32.store offset=8 - local.get $4 + local.get $60 i32.const 0 i32.store offset=12 - local.get $1 - local.tee $0 - local.get $4 + local.get $0 + local.tee $1 + local.get $60 i32.load - local.tee $2 + local.tee $59 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 $59 call $~lib/rt/pure/__release end - local.get $4 - local.get $0 - i32.store - local.get $4 + local.get $60 local.get $1 + i32.store + local.get $60 + local.get $0 i32.store offset=4 - local.get $4 + local.get $60 i32.const 8 i32.store offset=8 - local.get $4 + local.get $60 i32.const 2 i32.store offset=12 - loop $for-loop|053 - local.get $3 + loop $for-loop|039 + local.get $61 i32.const 2 i32.lt_s if i32.const 1 call $~lib/array/Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 - local.get $3 + local.get $61 i32.sub call $~lib/array/Array#__set - local.get $4 - local.get $3 - local.get $0 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|053 - end - end - local.get $4 - i32.const 52 - call $std/array/assertSorted<~lib/array/Array> - local.get $4 - call $~lib/rt/pure/__release - i32.const 0 - local.set $3 - i32.const 2048 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $1 - i32.const 0 - i32.const 2048 - call $~lib/util/memory/memset - i32.const 16 - i32.const 14 - call $~lib/rt/tlsf/__alloc - 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 - local.get $1 - local.tee $0 - 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|054 - local.get $3 - i32.const 512 - i32.lt_s - if - i32.const 4 - i32.const 13 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 511 - local.get $3 - i32.sub - i32.store - local.get $4 - local.get $3 - local.get $0 + local.get $60 + local.get $61 + local.get $1 call $~lib/array/Array<~lib/array/Array>#__set - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.get $3 + local.get $61 i32.const 1 i32.add - local.set $3 - br $for-loop|054 - end - end - local.get $4 - i32.const 53 - call $std/array/assertSorted<~lib/array/Array> - local.get $4 - call $~lib/rt/pure/__release - i32.const 7 - i32.const 2 - i32.const 15 - i32.const 6080 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $5 - i32.const 7 - i32.const 2 - i32.const 15 - i32.const 6128 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $7 - block $__inlined_func$std/array/isSorted<~lib/string/String | null> (result i32) - i32.const 1 - local.set $3 - local.get $5 - i32.const 54 - call $~lib/array/Array<~lib/array/Array>#sort - local.tee $0 - local.set $1 - local.get $0 - i32.load offset=12 - local.set $6 - loop $for-loop|011 - local.get $3 - local.get $6 - i32.lt_s - if - local.get $1 - local.get $3 - i32.const 1 - i32.sub - call $~lib/array/Array#__get - local.tee $4 - local.get $1 - local.get $3 - call $~lib/array/Array#__get - local.tee $2 - call $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 - i32.const 0 - i32.gt_s - if - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 0 - br $__inlined_func$std/array/isSorted<~lib/string/String | null> - end - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|011 - end + local.set $61 + br $for-loop|039 end - i32.const 1 - end - i32.eqz - if - i32.const 0 - i32.const 1296 - i32.const 887 - i32.const 3 - call $~lib/builtins/abort - unreachable end - local.get $0 + local.get $60 + i32.const 52 + call $std/array/assertSorted<~lib/array/Array> + local.get $60 + call $~lib/rt/pure/__release + call $std/array/createReverseOrderedElementsArray + local.tee $1 + i32.const 53 + call $std/array/assertSorted<~lib/array/Array> + local.get $1 call $~lib/rt/pure/__release + i32.const 7 + i32.const 2 + i32.const 15 + i32.const 6080 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $59 + i32.const 7 + i32.const 2 + i32.const 15 + i32.const 6128 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $58 + i32.const 1 + global.set $~argumentsLength + local.get $59 + call $std/array/assertSorted<~lib/string/String | null>@varargs block $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> (result i32) i32.const 0 - local.set $2 + local.set $60 i32.const 0 - local.get $5 + local.get $59 i32.load offset=12 - local.tee $4 - local.get $7 + local.tee $61 + local.get $58 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop i32.const 1 - local.get $5 - local.get $7 + local.get $58 + local.get $59 i32.eq br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop - loop $for-loop|012 - local.get $2 - local.get $4 + loop $for-loop|03 + local.get $60 + local.get $61 i32.lt_s if - local.get $5 - local.get $2 - call $~lib/array/Array#__get - local.tee $0 - local.get $7 - local.get $2 + local.get $59 + local.get $60 call $~lib/array/Array#__get local.tee $1 + local.get $58 + local.get $60 + call $~lib/array/Array#__get + local.tee $0 call $~lib/string/String.__eq i32.eqz if - local.get $0 - call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> end - local.get $0 - call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $60 i32.const 1 i32.add - local.set $2 - br $for-loop|012 + local.set $60 + br $for-loop|03 end end i32.const 1 @@ -14948,153 +15431,94 @@ unreachable end i32.const 0 - local.set $4 + local.set $60 + call $~lib/rt/tlsf/maybeInitialize i32.const 1600 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $0 i32.const 0 i32.const 1600 call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 16 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $1 + local.tee $61 i32.const 0 i32.store - local.get $1 + local.get $61 i32.const 0 i32.store offset=4 - local.get $1 + local.get $61 i32.const 0 i32.store offset=8 - local.get $1 + local.get $61 i32.const 0 i32.store offset=12 - local.get $2 - local.tee $0 - local.get $1 + local.get $0 + local.tee $1 + local.get $61 i32.load - local.tee $3 + local.tee $56 i32.ne if - local.get $0 + local.get $1 call $~lib/rt/pure/__retain - local.set $0 - local.get $3 + local.set $1 + local.get $56 call $~lib/rt/pure/__release end + local.get $61 local.get $1 - local.get $0 i32.store - local.get $1 - local.get $2 + local.get $61 + local.get $0 i32.store offset=4 - local.get $1 + local.get $61 i32.const 1600 i32.store offset=8 - local.get $1 + local.get $61 i32.const 400 i32.store offset=12 - loop $for-loop|0013 - local.get $4 + loop $for-loop|004 + local.get $60 i32.const 400 i32.lt_s if - local.get $4 - local.set $2 + local.get $61 + local.get $60 call $~lib/math/NativeMath.random f64.const 32 f64.mul i32.trunc_f64_s - local.set $8 - i32.const 0 - local.set $6 - i32.const 6064 - local.set $0 - loop $for-loop|01 - local.get $6 - local.get $8 - i32.lt_s - if - block $__inlined_func$~lib/string/String#charAt (result i32) - i32.const 6064 - call $~lib/math/NativeMath.random - i32.const 5088 - call $~lib/string/String#get:length - f64.convert_i32_s - f64.mul - f64.floor - i32.trunc_f64_s - local.tee $4 - i32.const 5088 - call $~lib/string/String#get:length - i32.ge_u - br_if $__inlined_func$~lib/string/String#charAt - drop - i32.const 2 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $3 - local.get $4 - i32.const 1 - i32.shl - i32.const 5088 - i32.add - i32.load16_u - i32.store16 - local.get $3 - call $~lib/rt/pure/__retain - end - local.set $4 - local.get $0 - local.tee $3 - local.get $0 - local.get $4 - call $~lib/string/String.__concat - local.tee $10 - local.tee $0 - i32.ne - if - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $4 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|01 - end - end - local.get $1 - local.get $2 - local.get $0 + call $std/array/createRandomString + local.tee $1 call $~lib/array/Array<~lib/array/Array>#__set - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $60 i32.const 1 i32.add - local.set $4 - br $for-loop|0013 + local.set $60 + br $for-loop|004 end end - local.get $1 + i32.const 1 + global.set $~argumentsLength + local.get $61 i32.const 55 call $std/array/assertSorted<~lib/array/Array> - local.get $5 + local.get $59 call $~lib/rt/pure/__release - local.get $7 + local.get $58 call $~lib/rt/pure/__release - local.get $1 + local.get $61 call $~lib/rt/pure/__release i32.const 2 i32.const 0 @@ -15102,12 +15526,13 @@ i32.const 6208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $61 i32.load offset=4 - local.get $0 + local.get $61 i32.load offset=12 call $~lib/util/string/joinBooleanArray - local.tee $3 + local.tee $1 + local.get $1 i32.const 6336 call $~lib/string/String.__eq i32.eqz @@ -15125,10 +15550,15 @@ i32.const 6384 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $60 + i32.load offset=4 + local.get $60 + i32.load offset=12 i32.const 6064 - call $~lib/array/Array#join - local.tee $7 + call $~lib/util/string/joinIntegerArray + local.tee $1 + local.set $52 + local.get $1 i32.const 6448 call $~lib/string/String.__eq i32.eqz @@ -15146,10 +15576,15 @@ i32.const 6480 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $59 + i32.load offset=4 + local.get $59 + i32.load offset=12 i32.const 6512 - call $~lib/array/Array#join - local.tee $8 + call $~lib/util/string/joinIntegerArray + local.tee $1 + local.set $50 + local.get $1 i32.const 6448 call $~lib/string/String.__eq i32.eqz @@ -15167,10 +15602,15 @@ i32.const 6544 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $58 + i32.load offset=4 + local.get $58 + i32.load offset=12 i32.const 6576 - call $~lib/array/Array#join - local.tee $12 + call $~lib/util/string/joinIntegerArray + local.tee $1 + local.set $49 + local.get $1 i32.const 6608 call $~lib/string/String.__eq i32.eqz @@ -15188,12 +15628,14 @@ i32.const 6672 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $56 i32.load offset=4 - local.get $1 + local.get $56 i32.load offset=12 call $~lib/util/string/joinFloatArray - local.tee $15 + local.tee $1 + local.set $48 + local.get $1 i32.const 7824 call $~lib/string/String.__eq i32.eqz @@ -15211,10 +15653,15 @@ i32.const 7952 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $53 + i32.load offset=4 + local.get $53 + i32.load offset=12 i32.const 6064 - call $~lib/array/Array<~lib/string/String | null>#join - local.tee $19 + call $~lib/util/string/joinReferenceArray<~lib/string/String | null> + local.tee $1 + local.set $46 + local.get $1 i32.const 7920 call $~lib/string/String.__eq i32.eqz @@ -15232,22 +15679,27 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $1 i32.load offset=4 - local.tee $2 + local.tee $0 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $2 + local.get $0 i32.const 0 i32.store offset=4 - local.get $2 + local.get $0 i32.const 0 call $std/array/Ref#constructor i32.store offset=8 - local.get $4 - call $~lib/array/Array#join - local.tee $20 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=12 + call $~lib/util/string/joinReferenceArray + local.tee $0 + local.set $45 + local.get $0 i32.const 8032 call $~lib/string/String.__eq i32.eqz @@ -15265,19 +15717,24 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $0 i32.load offset=4 - local.tee $13 + local.tee $47 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $13 + local.get $47 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $2 - call $~lib/array/Array#join - local.tee $13 + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=12 + call $~lib/util/string/joinReferenceArray + local.tee $47 + local.set $44 + local.get $47 i32.const 8112 call $~lib/string/String.__eq i32.eqz @@ -15289,37 +15746,36 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $61 call $~lib/rt/pure/__release - local.get $3 call $~lib/rt/pure/__release - local.get $5 + local.get $60 call $~lib/rt/pure/__release - local.get $7 + local.get $52 call $~lib/rt/pure/__release - local.get $6 + local.get $59 call $~lib/rt/pure/__release - local.get $8 + local.get $50 call $~lib/rt/pure/__release - local.get $10 + local.get $58 call $~lib/rt/pure/__release - local.get $12 + local.get $49 call $~lib/rt/pure/__release - local.get $1 + local.get $56 call $~lib/rt/pure/__release - local.get $15 + local.get $48 call $~lib/rt/pure/__release - local.get $18 + local.get $53 call $~lib/rt/pure/__release - local.get $19 + local.get $46 call $~lib/rt/pure/__release - local.get $4 + local.get $1 call $~lib/rt/pure/__release - local.get $20 + local.get $45 call $~lib/rt/pure/__release - local.get $2 + local.get $0 call $~lib/rt/pure/__release - local.get $13 + local.get $44 call $~lib/rt/pure/__release i32.const 0 i32.const 2 @@ -15327,33 +15783,36 @@ i32.const 8192 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 + local.set $1 i32.const 1 i32.const 2 i32.const 3 i32.const 8208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $3 + local.set $0 i32.const 2 i32.const 2 i32.const 3 i32.const 8240 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $5 + local.set $61 i32.const 4 i32.const 2 i32.const 3 i32.const 8272 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $7 - local.get $2 + local.set $60 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=12 i32.const 6304 - call $~lib/array/Array#join - local.tee $0 - local.get $0 + call $~lib/util/string/joinIntegerArray + local.tee $59 + local.get $59 i32.const 6064 call $~lib/string/String.__eq i32.eqz @@ -15365,12 +15824,15 @@ call $~lib/builtins/abort unreachable end - local.get $3 - i32.const 6304 - call $~lib/array/Array#join - local.tee $0 - local.set $18 local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=12 + i32.const 6304 + call $~lib/util/string/joinIntegerArray + local.tee $59 + local.set $45 + local.get $59 i32.const 7920 call $~lib/string/String.__eq i32.eqz @@ -15382,12 +15844,15 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $61 + i32.load offset=4 + local.get $61 + i32.load offset=12 i32.const 6304 - call $~lib/array/Array#join - local.tee $0 - local.set $19 - local.get $0 + call $~lib/util/string/joinIntegerArray + local.tee $59 + local.set $47 + local.get $59 i32.const 8304 call $~lib/string/String.__eq i32.eqz @@ -15399,12 +15864,15 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $60 + i32.load offset=4 + local.get $60 + i32.load offset=12 i32.const 6304 - call $~lib/array/Array#join - local.tee $0 - local.set $20 - local.get $0 + call $~lib/util/string/joinIntegerArray + local.tee $59 + local.set $44 + local.get $59 i32.const 8336 call $~lib/string/String.__eq i32.eqz @@ -15422,14 +15890,14 @@ i32.const 8368 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $53 i32.load offset=4 - local.get $6 + local.get $53 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $0 - local.set $13 - local.get $0 + local.tee $59 + local.set $40 + local.get $59 i32.const 8400 call $~lib/string/String.__eq i32.eqz @@ -15447,14 +15915,14 @@ i32.const 8432 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $55 i32.load offset=4 - local.get $8 + local.get $55 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $0 - local.set $21 - local.get $0 + local.tee $59 + local.set $39 + local.get $59 i32.const 8464 call $~lib/string/String.__eq i32.eqz @@ -15472,14 +15940,14 @@ i32.const 8512 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $52 i32.load offset=4 - local.get $10 + local.get $52 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $0 - local.set $22 - local.get $0 + local.tee $59 + local.set $38 + local.get $59 i32.const 8560 call $~lib/string/String.__eq i32.eqz @@ -15497,14 +15965,14 @@ i32.const 8624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $50 i32.load offset=4 - local.get $12 + local.get $50 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $0 - local.set $23 - local.get $0 + local.tee $59 + local.set $37 + local.get $59 i32.const 8672 call $~lib/string/String.__eq i32.eqz @@ -15522,12 +15990,15 @@ i32.const 8784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $24 + local.tee $49 + i32.load offset=4 + local.get $49 + i32.load offset=12 i32.const 6304 - call $~lib/array/Array<~lib/string/String | null>#join - local.tee $0 - local.set $26 - local.get $0 + call $~lib/util/string/joinReferenceArray<~lib/string/String | null> + local.tee $59 + local.set $36 + local.get $59 i32.const 8832 call $~lib/string/String.__eq i32.eqz @@ -15545,12 +16016,15 @@ i32.const 8944 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $48 + i32.load offset=4 + local.get $48 + i32.load offset=12 i32.const 6304 - call $~lib/array/Array<~lib/string/String | null>#join - local.tee $0 - local.set $31 - local.get $0 + call $~lib/util/string/joinReferenceArray<~lib/string/String | null> + local.tee $59 + local.set $32 + local.get $59 i32.const 8976 call $~lib/string/String.__eq i32.eqz @@ -15568,9 +16042,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $59 i32.load offset=4 - local.tee $1 + local.tee $58 i32.const 2 i32.const 2 i32.const 3 @@ -15578,7 +16052,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $58 i32.const 2 i32.const 2 i32.const 3 @@ -15586,14 +16060,14 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $0 + local.get $59 i32.load offset=4 - local.get $0 + local.get $59 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $1 - local.set $32 - local.get $1 + local.tee $58 + local.set $31 + local.get $58 i32.const 9072 call $~lib/string/String.__eq i32.eqz @@ -15611,9 +16085,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $58 i32.load offset=4 - local.tee $4 + local.tee $56 i32.const 2 i32.const 0 i32.const 6 @@ -15621,7 +16095,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $4 + local.get $56 i32.const 2 i32.const 0 i32.const 6 @@ -15629,14 +16103,14 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $1 + local.get $58 i32.load offset=4 - local.get $1 + local.get $58 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $4 - local.set $33 - local.get $4 + local.tee $56 + local.set $30 + local.get $56 i32.const 9072 call $~lib/string/String.__eq i32.eqz @@ -15654,7 +16128,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $56 i32.load offset=4 i32.const 1 i32.const 2 @@ -15662,7 +16136,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $29 + local.tee $34 i32.load offset=4 i32.const 1 i32.const 2 @@ -15671,16 +16145,16 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $29 + local.get $34 i32.store - local.get $4 + local.get $56 i32.load offset=4 - local.get $4 + local.get $56 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> - local.tee $28 - local.set $29 - local.get $28 + local.tee $35 + local.set $34 + local.get $35 i32.const 7920 call $~lib/string/String.__eq i32.eqz @@ -15692,50 +16166,50 @@ call $~lib/builtins/abort unreachable end - local.get $2 - call $~lib/rt/pure/__release - local.get $3 + local.get $1 call $~lib/rt/pure/__release - local.get $5 + local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $61 call $~lib/rt/pure/__release + local.get $60 call $~lib/rt/pure/__release - local.get $18 call $~lib/rt/pure/__release - local.get $19 + local.get $45 call $~lib/rt/pure/__release - local.get $20 + local.get $47 call $~lib/rt/pure/__release - local.get $6 + local.get $44 call $~lib/rt/pure/__release - local.get $13 + local.get $53 call $~lib/rt/pure/__release - local.get $8 + local.get $40 call $~lib/rt/pure/__release - local.get $21 + local.get $55 call $~lib/rt/pure/__release - local.get $10 + local.get $39 call $~lib/rt/pure/__release - local.get $22 + local.get $52 call $~lib/rt/pure/__release - local.get $12 + local.get $38 call $~lib/rt/pure/__release - local.get $23 + local.get $50 call $~lib/rt/pure/__release - local.get $24 + local.get $37 call $~lib/rt/pure/__release - local.get $26 + local.get $49 call $~lib/rt/pure/__release - local.get $27 + local.get $36 call $~lib/rt/pure/__release - local.get $31 + local.get $48 call $~lib/rt/pure/__release local.get $32 call $~lib/rt/pure/__release - local.get $33 + local.get $31 call $~lib/rt/pure/__release - local.get $29 + local.get $30 + call $~lib/rt/pure/__release + local.get $34 call $~lib/rt/pure/__release global.get $std/array/arr call $~lib/rt/pure/__release @@ -15745,9 +16219,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $61 i32.load offset=4 - local.tee $2 + local.tee $1 i32.const 1 i32.const 2 i32.const 3 @@ -15755,7 +16229,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $2 + local.get $1 i32.const 3 i32.const 2 i32.const 3 @@ -15763,7 +16237,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $2 + local.get $1 i32.const 3 i32.const 2 i32.const 3 @@ -15771,7 +16245,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=8 - local.get $2 + local.get $1 i32.const 3 i32.const 2 i32.const 3 @@ -15779,9 +16253,9 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=12 - local.get $5 + local.get $61 call $~lib/array/Array<~lib/array/Array>#flat - local.tee $7 + local.tee $60 i32.load offset=12 i32.const 10 i32.ne @@ -15794,14 +16268,14 @@ unreachable end loop $for-loop|1 - local.get $11 + local.get $51 i32.const 10 i32.lt_s if - local.get $7 - local.get $11 + local.get $60 + local.get $51 call $~lib/array/Array#__get - local.get $11 + local.get $51 i32.ne if i32.const 0 @@ -15811,10 +16285,10 @@ call $~lib/builtins/abort unreachable end - local.get $11 + local.get $51 i32.const 1 i32.add - local.set $11 + local.set $51 br $for-loop|1 end end @@ -15824,9 +16298,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $53 i32.load offset=4 - local.tee $2 + local.tee $1 i32.const 1 i32.const 2 i32.const 15 @@ -15834,7 +16308,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $2 + local.get $1 i32.const 3 i32.const 2 i32.const 15 @@ -15842,7 +16316,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $2 + local.get $1 i32.const 3 i32.const 2 i32.const 15 @@ -15850,7 +16324,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=8 - local.get $2 + local.get $1 i32.const 1 i32.const 2 i32.const 15 @@ -15858,17 +16332,17 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=12 - local.get $6 + local.get $53 call $~lib/array/Array<~lib/array/Array<~lib/string/String | null>>#flat - local.set $2 + local.set $1 i32.const 8 i32.const 2 i32.const 15 i32.const 9680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $3 - local.get $2 + local.set $0 + local.get $1 i32.load offset=12 i32.const 8 i32.ne @@ -15881,21 +16355,21 @@ unreachable end i32.const 0 - local.set $11 + local.set $51 loop $for-loop|2 - local.get $11 - local.get $3 + local.get $51 + local.get $0 i32.load offset=12 i32.lt_s if - local.get $2 - local.get $11 + local.get $1 + local.get $51 call $~lib/array/Array#__get - local.tee $8 - local.get $3 - local.get $11 + local.tee $55 + local.get $0 + local.get $51 call $~lib/array/Array#__get - local.tee $10 + local.tee $52 call $~lib/string/String.__eq i32.eqz if @@ -15906,14 +16380,14 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $55 call $~lib/rt/pure/__release - local.get $10 + local.get $52 call $~lib/rt/pure/__release - local.get $11 + local.get $51 i32.const 1 i32.add - local.set $11 + local.set $51 br $for-loop|2 end end @@ -15923,9 +16397,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $11 + local.tee $51 i32.load offset=4 - local.tee $8 + local.tee $55 i32.const 0 i32.const 2 i32.const 3 @@ -15933,7 +16407,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $8 + local.get $55 i32.const 0 i32.const 2 i32.const 3 @@ -15941,9 +16415,9 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $11 + local.get $51 call $~lib/array/Array<~lib/array/Array>#flat - local.tee $8 + local.tee $55 i32.load offset=12 if i32.const 0 @@ -15953,33 +16427,33 @@ call $~lib/builtins/abort unreachable end - local.get $11 + local.get $51 call $~lib/rt/pure/__release - local.get $8 + local.get $55 call $~lib/rt/pure/__release - local.get $9 + local.get $57 call $~lib/rt/pure/__release - local.get $25 + local.get $41 call $~lib/rt/pure/__release - local.get $14 + local.get $54 call $~lib/rt/pure/__release - local.get $30 + local.get $33 call $~lib/rt/pure/__release - local.get $0 + local.get $59 call $~lib/rt/pure/__release - local.get $1 + local.get $58 call $~lib/rt/pure/__release - local.get $4 + local.get $56 call $~lib/rt/pure/__release - local.get $5 + local.get $61 call $~lib/rt/pure/__release - local.get $7 + local.get $60 call $~lib/rt/pure/__release - local.get $6 + local.get $53 call $~lib/rt/pure/__release - local.get $2 + local.get $1 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release ) (func $~start diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index a5806b24c9..8d67f5aadf 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1,12 +1,12 @@ (module (type $i32_=>_none (func (param i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result 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))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) @@ -27,15 +27,6 @@ (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -71,14 +62,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -197,9 +180,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -207,7 +196,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -373,12 +362,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -468,14 +457,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -629,10 +624,13 @@ i32.const 23 i32.lt_u if - i32.const 1440 local.get $1 + i32.const 2 + i32.shl + i32.const 1440 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -672,6 +670,7 @@ ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $1 i32.const 256 i32.lt_u @@ -681,23 +680,22 @@ i32.shr_u local.set $1 else + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 local.get $1 i32.const 536870904 i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.set $1 - end - local.get $1 + select + local.tee $1 i32.const 31 local.get $1 i32.clz @@ -733,7 +731,10 @@ end local.get $0 local.get $2 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const -1 local.get $1 i32.shl @@ -760,8 +761,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -773,7 +779,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -785,6 +791,7 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -836,11 +843,13 @@ memory.size local.tee $1 i32.const 16 - local.get $0 - i32.load offset=1568 + i32.shl + local.set $5 local.get $1 i32.const 16 - i32.shl + local.get $0 + i32.load offset=1568 + local.get $5 i32.const 16 i32.sub i32.ne @@ -868,9 +877,11 @@ i32.const 16 i32.shr_u local.tee $5 + i32.gt_s + local.set $6 local.get $1 local.get $5 - i32.gt_s + local.get $6 select memory.grow i32.const 0 @@ -997,14 +1008,6 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 @@ -1428,6 +1431,7 @@ select end local.set $1 + call $~lib/rt/tlsf/maybeInitialize local.get $2 i32.const 0 i32.lt_s @@ -1459,7 +1463,9 @@ select local.tee $2 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 local.get $0 local.get $1 @@ -1497,21 +1503,27 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize i32.const 1 local.get $1 i32.shl local.tee $3 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $3 call $~lib/util/memory/memset local.get $0 i32.eqz if + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 2 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $0 end @@ -1562,9 +1574,12 @@ (local $7 i32) (local $8 i32) (local $9 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 8 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $1 i32.const 8 call $~lib/util/memory/memset @@ -1765,20 +1780,29 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 5 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor local.set $6 + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 3 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 + call $~lib/rt/tlsf/maybeInitialize i32.const 8 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $0 i32.const 1376 i32.const 8 @@ -1798,9 +1822,12 @@ i32.store offset=12 local.get $1 call $~lib/rt/pure/__retain + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 9 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor @@ -1828,9 +1855,12 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 15 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $8 i32.const 0 diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index bf9ffa45f9..4d33086be6 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_=>_none (func (param 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 (func (param i32) (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) @@ -35,15 +35,6 @@ (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -79,14 +70,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -205,9 +188,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -215,7 +204,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -381,12 +370,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -476,14 +465,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -637,10 +632,13 @@ i32.const 23 i32.lt_u if - i32.const 1520 local.get $1 + i32.const 2 + i32.shl + i32.const 1520 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -680,6 +678,7 @@ ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $1 i32.const 256 i32.lt_u @@ -689,23 +688,22 @@ i32.shr_u local.set $1 else + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 local.get $1 i32.const 536870904 i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.set $1 - end - local.get $1 + select + local.tee $1 i32.const 31 local.get $1 i32.clz @@ -741,7 +739,10 @@ end local.get $0 local.get $2 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const -1 local.get $1 i32.shl @@ -768,8 +769,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -781,7 +787,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -793,6 +799,7 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -844,11 +851,13 @@ memory.size local.tee $1 i32.const 16 - local.get $0 - i32.load offset=1568 + i32.shl + local.set $5 local.get $1 i32.const 16 - i32.shl + local.get $0 + i32.load offset=1568 + local.get $5 i32.const 16 i32.sub i32.ne @@ -876,9 +885,11 @@ i32.const 16 i32.shr_u local.tee $5 + i32.gt_s + local.set $6 local.get $1 local.get $5 - i32.gt_s + local.get $6 select memory.grow i32.const 0 @@ -1005,14 +1016,6 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -1079,9 +1082,12 @@ (local $1 i32) (local $2 i32) (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 8 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 i32.const 0 i32.store8 @@ -1112,9 +1118,12 @@ local.get $0 i32.eqz if + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 2 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $0 end @@ -1194,9 +1203,12 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 4 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $4 i32.const 0 @@ -1234,13 +1246,6 @@ i32.store offset=8 local.get $4 ) - (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - i32.sub - ) (func $~lib/polyfills/bswap (param $0 i32) (result i32) local.get $0 i32.const -16711936 @@ -1800,9 +1805,12 @@ (local $1 i32) (local $2 i32) (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 3 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 @@ -1840,7 +1848,10 @@ local.get $1 i32.load local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $1 + i32.load + i32.sub local.get $1 i32.load offset=8 call $~lib/dataview/DataView#constructor @@ -3361,7 +3372,10 @@ local.get $0 call $~lib/rt/pure/__release local.get $2 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $2 + i32.load + i32.sub if i32.const 0 i32.const 1488 diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 9ca06f54bf..2e2e6e92a4 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -2,13 +2,12 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (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))) (type $none_=>_i32 (func (result i32))) - (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) @@ -18,6 +17,7 @@ (type $i32_i64_=>_none (func (param i32 i64))) (type $i32_f32_=>_none (func (param i32 f32))) (type $i32_f64_=>_none (func (param i32 f64))) + (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) (type $i32_f32_f32_=>_i32 (func (param i32 f32 f32) (result i32))) (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) @@ -44,15 +44,6 @@ (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -88,14 +79,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -214,9 +197,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -224,7 +213,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -390,12 +379,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -485,14 +474,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -646,10 +641,13 @@ i32.const 23 i32.lt_u if - i32.const 1568 local.get $1 + i32.const 2 + i32.shl + i32.const 1568 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -713,6 +711,7 @@ ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $1 i32.const 256 i32.lt_u @@ -722,23 +721,22 @@ i32.shr_u local.set $1 else + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 local.get $1 i32.const 536870904 i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.set $1 - end - local.get $1 + select + local.tee $1 i32.const 31 local.get $1 i32.clz @@ -774,7 +772,10 @@ end local.get $0 local.get $2 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const -1 local.get $1 i32.shl @@ -801,8 +802,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -814,7 +820,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -890,6 +896,7 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -920,11 +927,13 @@ memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 + i32.shl + local.set $5 local.get $3 i32.const 16 - i32.shl + local.get $0 + i32.load offset=1568 + local.get $5 i32.const 16 i32.sub i32.ne @@ -952,9 +961,11 @@ i32.const 16 i32.shr_u local.tee $5 + i32.gt_s + local.set $6 local.get $3 local.get $5 - i32.gt_s + local.get $6 select memory.grow i32.const 0 @@ -1025,14 +1036,6 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -1265,9 +1268,12 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize local.get $0 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $1 local.get $0 call $~lib/util/memory/memset @@ -1318,20 +1324,16 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/util/hash/hash8 (param $0 i32) (result i32) - local.get $0 - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - ) (func $~lib/util/hash/HASH (param $0 i32) (result i32) local.get $0 i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/util/hash/hash8 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -1376,15 +1378,6 @@ end i32.const 0 ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - i32.const 0 - i32.ne - ) (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -1625,6 +1618,78 @@ local.get $0 i32.load offset=4 ) + (func $~lib/array/Array#constructor (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + i32.const 1200 + i32.const 1472 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $0 + call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + 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 + local.get $1 + local.set $2 + local.get $1 + local.get $3 + i32.load + local.tee $4 + i32.ne + if + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $4 + call $~lib/rt/pure/__release + end + local.get $3 + local.get $2 + i32.store + local.get $3 + local.get $1 + i32.store offset=4 + local.get $3 + local.get $0 + i32.store offset=8 + local.get $3 + local.get $0 + i32.store offset=12 + local.get $3 + ) (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -2057,23 +2122,14 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (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.get $0 - i32.load offset=8 - local.set $5 local.get $0 - i32.load offset=16 - local.tee $4 - local.tee $8 - i32.const 1073741808 + i32.const 268435452 i32.gt_u if i32.const 1200 @@ -2083,149 +2139,52 @@ call $~lib/builtins/abort unreachable end - local.get $8 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + i32.const 2 + i32.shl + local.tee $4 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $4 call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize i32.const 16 - i32.const 4 - call $~lib/rt/tlsf/__alloc + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 i32.const 0 i32.store - local.get $0 + local.get $3 i32.const 0 i32.store offset=4 - local.get $0 + local.get $3 i32.const 0 i32.store offset=8 - local.get $0 + local.get $3 i32.const 0 i32.store offset=12 - local.get $2 - local.set $1 - local.get $2 - local.get $0 + local.get $1 + local.set $2 + local.get $1 + local.get $3 i32.load - local.tee $3 + local.tee $5 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $3 + local.set $2 + local.get $5 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 - local.get $8 - i32.store offset=8 - local.get $0 - local.get $8 - i32.store offset=12 - loop $for-loop|0 - local.get $6 - local.get $4 - i32.lt_s - if - local.get $5 - local.get $6 - i32.const 12 - i32.mul - i32.add - local.tee $2 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $7 - local.get $2 - i32.load8_s - call $~lib/array/Array#__set - local.get $7 - i32.const 1 - i32.add - local.set $7 - end - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|0 - end - end - local.get $0 - local.get $7 - call $~lib/array/Array#set:length - local.get $0 - ) - (func $~lib/array/Array#constructor (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.const 268435452 - i32.gt_u - if - i32.const 1200 - i32.const 1472 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 2 - i32.shl - local.tee $4 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $4 - call $~lib/util/memory/memset - i32.const 16 - i32.const 5 - call $~lib/rt/tlsf/__alloc - 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 - local.get $1 - local.set $2 - local.get $1 - local.get $3 - i32.load - local.tee $5 - i32.ne - if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - local.get $5 - call $~lib/rt/pure/__release - end - local.get $3 + local.get $3 local.get $2 i32.store local.get $3 @@ -2376,9 +2335,12 @@ ) (func $~lib/map/Map#constructor (result i32) (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 7 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -2766,24 +2728,24 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $3 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $8 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 local.get $0 i32.load offset=16 i32.const 12 @@ -2793,27 +2755,27 @@ local.get $2 local.set $4 loop $while-continue|0 - local.get $3 + local.get $5 local.get $7 i32.ne if - local.get $3 + local.get $5 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $4 - local.get $3 + local.get $5 i32.load i32.store local.get $4 - local.get $3 + local.get $5 i32.load offset=4 i32.store offset=4 local.get $4 - local.get $5 local.get $3 + local.get $5 i32.load call $~lib/util/hash/hash32 local.get $1 @@ -2821,10 +2783,10 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $6 i32.load i32.store offset=8 - local.get $8 + local.get $6 local.get $4 i32.store local.get $4 @@ -2832,28 +2794,28 @@ i32.add local.set $4 end - local.get $3 + local.get $5 i32.const 12 i32.add - local.set $3 + local.set $5 br $while-continue|0 end end - local.get $5 - local.tee $3 + local.get $3 + local.tee $5 local.get $0 i32.load local.tee $4 i32.ne if - local.get $3 + local.get $5 call $~lib/rt/pure/__retain - local.set $3 + local.set $5 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $3 + local.get $5 i32.store local.get $0 local.get $1 @@ -2862,26 +2824,26 @@ local.tee $1 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 local.get $1 i32.store offset=8 local.get $0 - local.get $6 + local.get $8 i32.store offset=12 local.get $0 local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $3 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release @@ -2890,13 +2852,11 @@ (local $3 i32) (local $4 i32) (local $5 i32) - local.get $1 - call $~lib/util/hash/hash32 - local.tee $3 - local.set $4 local.get $0 local.get $1 - local.get $3 + local.get $1 + call $~lib/util/hash/hash32 + local.tee $4 call $~lib/map/Map#find local.tee $3 if @@ -3046,9 +3006,14 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) + (local $9 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 3 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -3081,7 +3046,9 @@ if local.get $0 local.get $1 - call $~lib/map/Map#has + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -3103,7 +3070,9 @@ call $~lib/rt/pure/__release local.get $0 local.get $1 - call $~lib/map/Map#has + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -3164,7 +3133,9 @@ if local.get $0 local.get $1 - call $~lib/map/Map#has + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -3206,7 +3177,9 @@ call $~lib/rt/pure/__release local.get $0 local.get $1 - call $~lib/map/Map#has + local.get $1 + call $~lib/util/hash/HASH + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -3255,45 +3228,89 @@ unreachable end local.get $0 - call $~lib/map/Map#keys - local.set $4 + i32.load offset=8 + local.set $5 + local.get $0 + i32.load offset=16 + local.tee $6 + call $~lib/array/Array#constructor + local.set $1 + loop $for-loop|0 + local.get $4 + local.get $6 + i32.lt_s + if + local.get $5 + local.get $4 + i32.const 12 + i32.mul + i32.add + local.tee $7 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + local.get $3 + local.get $7 + i32.load8_s + call $~lib/array/Array#__set + local.get $3 + i32.const 1 + i32.add + local.set $3 + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 + end + end + local.get $1 + local.get $3 + call $~lib/array/Array#set:length local.get $0 call $~lib/map/Map#values local.set $6 + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 6 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $1 + local.tee $3 i32.const 0 i32.store - local.get $1 + local.get $3 i32.const 0 i32.store offset=4 - local.get $1 + local.get $3 i32.const 0 i32.store offset=8 - local.get $1 + local.get $3 i32.const 0 i32.store offset=12 - local.get $1 + local.get $3 i32.const 0 i32.store offset=16 - local.get $1 + local.get $3 i32.const 0 i32.store offset=20 - local.get $1 + local.get $3 call $~lib/map/Map#clear call $~lib/map/Map#constructor local.set $5 loop $for-loop|4 local.get $2 - local.get $4 + local.get $1 i32.load offset=12 i32.lt_s if local.get $2 - local.get $4 + local.get $1 i32.load offset=12 i32.ge_u if @@ -3305,18 +3322,20 @@ unreachable end local.get $2 - local.get $4 + local.get $1 i32.load offset=4 i32.add i32.load8_s - local.set $3 + local.set $4 local.get $6 local.get $2 call $~lib/array/Array#__get local.set $7 local.get $0 - local.get $3 - call $~lib/map/Map#has + local.get $4 + local.get $4 + call $~lib/util/hash/HASH + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -3326,11 +3345,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $7 i32.const 20 i32.sub - call $~lib/map/Map#has + local.tee $8 + call $~lib/util/hash/HASH + local.set $9 + local.get $0 + local.get $8 + local.get $9 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -3340,17 +3364,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $3 local.get $3 + local.get $4 + local.get $4 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $2 @@ -3360,7 +3384,7 @@ br $for-loop|4 end end - local.get $1 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -3397,7 +3421,9 @@ if local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + call $~lib/util/hash/HASH + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -3431,7 +3457,9 @@ call $~lib/map/Map#delete local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + call $~lib/util/hash/HASH + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -3472,7 +3500,9 @@ if local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + call $~lib/util/hash/HASH + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -3494,7 +3524,9 @@ call $~lib/rt/pure/__release local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + call $~lib/util/hash/HASH + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -3509,7 +3541,9 @@ call $~lib/map/Map#delete local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + call $~lib/util/hash/HASH + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -3549,28 +3583,17 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $1 + local.get $3 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - call $~lib/map/Map#find - i32.const 0 - i32.ne - ) (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -3582,24 +3605,24 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $3 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $8 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 local.get $0 i32.load offset=16 i32.const 12 @@ -3609,38 +3632,41 @@ local.get $2 local.set $4 loop $while-continue|0 - local.get $3 + local.get $5 local.get $7 i32.ne if - local.get $3 + local.get $5 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $4 - local.get $3 + local.get $5 i32.load8_u i32.store8 local.get $4 - local.get $3 + local.get $5 i32.load offset=4 i32.store offset=4 local.get $4 - local.get $5 local.get $3 - i32.load8_u - call $~lib/util/hash/hash8 local.get $1 + local.get $5 + i32.load8_u + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul i32.and i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $6 i32.load i32.store offset=8 - local.get $8 + local.get $6 local.get $4 i32.store local.get $4 @@ -3648,28 +3674,28 @@ i32.add local.set $4 end - local.get $3 + local.get $5 i32.const 12 i32.add - local.set $3 + local.set $5 br $while-continue|0 end end - local.get $5 - local.tee $3 + local.get $3 + local.tee $5 local.get $0 i32.load local.tee $4 i32.ne if - local.get $3 + local.get $5 call $~lib/rt/pure/__retain - local.set $3 + local.set $5 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $3 + local.get $5 i32.store local.get $0 local.get $1 @@ -3678,26 +3704,26 @@ local.tee $1 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 local.get $1 i32.store offset=8 local.get $0 - local.get $6 + local.get $8 i32.store offset=12 local.get $0 local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $3 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release @@ -3709,7 +3735,10 @@ local.get $1 i32.const 255 i32.and - call $~lib/util/hash/hash8 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul local.tee $3 local.set $4 local.get $0 @@ -3802,7 +3831,10 @@ local.get $1 i32.const 255 i32.and - call $~lib/util/hash/hash8 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/map/Map#find local.tee $0 i32.eqz @@ -3817,22 +3849,12 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (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.get $0 - i32.load offset=8 - local.set $5 local.get $0 - i32.load offset=16 - local.tee $4 - local.tee $8 i32.const 1073741808 i32.gt_u if @@ -3843,91 +3865,61 @@ call $~lib/builtins/abort unreachable end - local.get $8 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $0 call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 9 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 i32.const 0 i32.store - local.get $0 + local.get $3 i32.const 0 i32.store offset=4 - local.get $0 + local.get $3 i32.const 0 i32.store offset=8 - local.get $0 + local.get $3 i32.const 0 i32.store offset=12 - local.get $2 - local.set $1 - local.get $2 - local.get $0 + local.get $1 + local.set $2 + local.get $1 + local.get $3 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $3 + local.set $2 + local.get $4 call $~lib/rt/pure/__release end - local.get $0 - local.get $1 - i32.store - local.get $0 + local.get $3 local.get $2 + i32.store + local.get $3 + local.get $1 i32.store offset=4 + local.get $3 local.get $0 - local.get $8 i32.store offset=8 + local.get $3 local.get $0 - local.get $8 i32.store offset=12 - loop $for-loop|0 - local.get $6 - local.get $4 - i32.lt_s - if - local.get $5 - local.get $6 - i32.const 12 - i32.mul - i32.add - local.tee $2 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $7 - local.get $2 - i32.load8_u - call $~lib/array/Array#__set - local.get $7 - i32.const 1 - i32.add - local.set $7 - end - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|0 - end - end - local.get $0 - local.get $7 - call $~lib/array/Array#set:length - local.get $0 + local.get $3 ) (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) (local $2 i32) @@ -3940,24 +3932,24 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $3 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $8 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 local.get $0 i32.load offset=16 i32.const 3 @@ -3967,38 +3959,41 @@ local.get $2 local.set $4 loop $while-continue|0 - local.get $3 + local.get $5 local.get $7 i32.ne if - local.get $3 + local.get $5 i32.load offset=4 i32.const 1 i32.and i32.eqz if local.get $4 - local.get $3 + local.get $5 i32.load8_u i32.store8 local.get $4 - local.get $3 + local.get $5 i32.load8_u offset=1 i32.store8 offset=1 local.get $4 - local.get $5 local.get $3 - i32.load8_u - call $~lib/util/hash/hash8 local.get $1 + local.get $5 + i32.load8_u + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul i32.and i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $6 i32.load i32.store offset=4 - local.get $8 + local.get $6 local.get $4 i32.store local.get $4 @@ -4006,28 +4001,28 @@ i32.add local.set $4 end - local.get $3 + local.get $5 i32.const 8 i32.add - local.set $3 + local.set $5 br $while-continue|0 end end - local.get $5 - local.tee $3 + local.get $3 + local.tee $5 local.get $0 i32.load local.tee $4 i32.ne if - local.get $3 + local.get $5 call $~lib/rt/pure/__retain - local.set $3 + local.set $5 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $3 + local.get $5 i32.store local.get $0 local.get $1 @@ -4036,26 +4031,26 @@ local.tee $1 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 local.get $1 i32.store offset=8 local.get $0 - local.get $6 + local.get $8 i32.store offset=12 local.get $0 local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $3 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release @@ -4068,11 +4063,15 @@ local.tee $3 i32.const 255 i32.and - call $~lib/util/hash/hash8 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + local.tee $1 local.set $4 local.get $0 i32.load - local.get $4 + local.get $1 local.get $0 i32.load offset=4 i32.and @@ -4198,7 +4197,10 @@ local.get $1 i32.const 255 i32.and - call $~lib/util/hash/hash8 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/map/Map#find local.tee $1 i32.eqz @@ -4261,9 +4263,14 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) + (local $9 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 8 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -4294,7 +4301,14 @@ if local.get $0 local.get $1 - call $~lib/map/Map#has + local.get $1 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -4308,13 +4322,19 @@ local.get $1 i32.const 255 i32.and + local.tee $3 i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $0 local.get $1 - call $~lib/map/Map#has + local.get $3 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -4371,7 +4391,14 @@ if local.get $0 local.get $1 - call $~lib/map/Map#has + local.get $1 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -4403,13 +4430,19 @@ local.get $1 i32.const 255 i32.and + local.tee $3 i32.const 20 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $0 local.get $1 - call $~lib/map/Map#has + local.get $3 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -4455,46 +4488,92 @@ call $~lib/builtins/abort unreachable end + i32.const 0 + local.set $3 local.get $0 - call $~lib/map/Map#keys - local.set $4 + i32.load offset=8 + local.set $5 local.get $0 - call $~lib/map/Map#values - local.set $6 - i32.const 24 - i32.const 10 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $1 + i32.load offset=16 + local.tee $6 + call $~lib/array/Array#constructor + local.set $1 + loop $for-loop|0 + local.get $4 + local.get $6 + i32.lt_s + if + local.get $5 + local.get $4 + i32.const 12 + i32.mul + i32.add + local.tee $7 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + local.get $3 + local.get $7 + i32.load8_u + call $~lib/array/Array#__set + local.get $3 + i32.const 1 + i32.add + local.set $3 + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 + end + end + local.get $1 + local.get $3 + call $~lib/array/Array#set:length + local.get $0 + call $~lib/map/Map#values + local.set $6 + call $~lib/rt/tlsf/maybeInitialize + i32.const 24 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $3 i32.const 0 i32.store - local.get $1 + local.get $3 i32.const 0 i32.store offset=4 - local.get $1 + local.get $3 i32.const 0 i32.store offset=8 - local.get $1 + local.get $3 i32.const 0 i32.store offset=12 - local.get $1 + local.get $3 i32.const 0 i32.store offset=16 - local.get $1 + local.get $3 i32.const 0 i32.store offset=20 - local.get $1 + local.get $3 call $~lib/map/Map#clear call $~lib/map/Map#constructor local.set $5 loop $for-loop|4 local.get $2 - local.get $4 + local.get $1 i32.load offset=12 i32.lt_s if local.get $2 - local.get $4 + local.get $1 i32.load offset=12 i32.ge_u if @@ -4506,18 +4585,25 @@ unreachable end local.get $2 - local.get $4 + local.get $1 i32.load offset=4 i32.add i32.load8_u - local.set $3 + local.set $4 local.get $6 local.get $2 call $~lib/array/Array#__get local.set $7 local.get $0 - local.get $3 - call $~lib/map/Map#has + local.get $4 + local.get $4 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -4527,11 +4613,21 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $7 i32.const 20 i32.sub - call $~lib/map/Map#has + local.tee $8 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + local.set $9 + local.get $0 + local.get $8 + local.get $9 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -4541,17 +4637,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $3 local.get $3 + local.get $4 + local.get $4 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $2 @@ -4561,7 +4657,7 @@ br $for-loop|4 end end - local.get $1 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -4596,7 +4692,14 @@ if local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -4628,7 +4731,14 @@ call $~lib/map/Map#delete local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -4667,7 +4777,14 @@ if local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -4681,13 +4798,19 @@ local.get $2 i32.const 255 i32.and + local.tee $4 i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $4 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -4702,7 +4825,14 @@ call $~lib/map/Map#delete local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -4742,11 +4872,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $1 + local.get $3 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release @@ -4768,14 +4898,6 @@ i32.const 16777619 i32.mul ) - (func $~lib/util/hash/HASH (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load @@ -4823,7 +4945,11 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 call $~lib/map/Map#find i32.const 0 i32.ne @@ -4888,7 +5014,7 @@ local.get $5 local.get $3 i32.load16_s - call $~lib/util/hash/HASH + call $~lib/util/hash/hash16 local.get $1 i32.and i32.const 2 @@ -4963,11 +5089,17 @@ (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + local.tee $3 + local.set $4 + local.get $0 local.get $1 - call $~lib/util/hash/HASH - local.tee $4 + local.get $3 call $~lib/map/Map#find local.tee $3 if @@ -5053,7 +5185,11 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 call $~lib/map/Map#find local.tee $0 i32.eqz @@ -5068,6 +5204,82 @@ local.get $0 i32.load offset=4 ) + (func $~lib/array/Array#constructor (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.const 536870904 + i32.gt_u + if + i32.const 1200 + i32.const 1472 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + i32.const 1 + i32.shl + local.tee $4 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $4 + call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + 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 + local.get $1 + local.set $2 + local.get $1 + local.get $3 + i32.load + local.tee $5 + i32.ne + if + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $5 + call $~lib/rt/pure/__release + end + local.get $3 + local.get $2 + i32.store + local.get $3 + local.get $1 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store offset=8 + local.get $3 + local.get $0 + i32.store offset=12 + local.get $3 + ) (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 @@ -5118,8 +5330,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5127,143 +5338,27 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 2 + i32.shl + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $5 + local.get $3 + i32.const 3 + i32.shl + i32.const 3 + i32.div_s + local.tee $6 + i32.const 3 + i32.shl + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $2 local.get $0 i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.tee $7 - local.set $6 - local.get $7 - i32.const 536870904 - i32.gt_u - if - i32.const 1200 - i32.const 1472 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 1 - i32.shl - local.tee $5 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $5 - call $~lib/util/memory/memset - i32.const 16 - i32.const 12 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $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 $2 - local.set $1 - 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 - local.get $5 - i32.store offset=8 - local.get $0 - local.get $6 - i32.store offset=12 - loop $for-loop|0 - local.get $8 - local.get $7 - i32.lt_s - if - local.get $4 - local.get $8 - i32.const 12 - i32.mul - i32.add - local.tee $2 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $9 - local.get $2 - i32.load16_s - call $~lib/array/Array#__set - local.get $9 - i32.const 1 - i32.add - local.set $9 - end - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|0 - end - end - local.get $0 - local.get $9 - call $~lib/array/Array#set:length - local.get $0 - ) - (func $~lib/map/Map#rehash (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 $8 i32) - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 2 - i32.shl - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 - i32.const 3 - i32.shl - i32.const 3 - i32.div_s - local.tee $6 - i32.const 3 - i32.shl - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 - local.get $0 - i32.load offset=8 - local.tee $3 + local.tee $3 local.get $0 i32.load offset=16 i32.const 3 @@ -5295,7 +5390,7 @@ local.get $5 local.get $3 i32.load16_s - call $~lib/util/hash/HASH + call $~lib/util/hash/hash16 local.get $1 i32.and i32.const 2 @@ -5372,7 +5467,11 @@ (local $5 i32) local.get $1 local.tee $3 - call $~lib/util/hash/HASH + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 local.set $4 local.get $0 i32.load @@ -5500,7 +5599,11 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 call $~lib/map/Map#find local.tee $1 i32.eqz @@ -5563,9 +5666,12 @@ (local $5 i32) (local $6 i32) (local $7 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 11 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -5772,14 +5878,58 @@ unreachable end local.get $0 - call $~lib/map/Map#keys - local.set $4 + i32.load offset=8 + local.set $5 + local.get $0 + i32.load offset=16 + local.tee $6 + call $~lib/array/Array#constructor + local.set $1 + loop $for-loop|0 + local.get $4 + local.get $6 + i32.lt_s + if + local.get $5 + local.get $4 + i32.const 12 + i32.mul + i32.add + local.tee $7 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + local.get $3 + local.get $7 + i32.load16_s + call $~lib/array/Array#__set + local.get $3 + i32.const 1 + i32.add + local.set $3 + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 + end + end + local.get $1 + local.get $3 + call $~lib/array/Array#set:length local.get $0 call $~lib/map/Map#values local.set $6 + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 13 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $3 i32.const 0 @@ -5802,15 +5952,15 @@ local.get $3 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $5 + local.set $4 loop $for-loop|4 local.get $2 - local.get $4 + local.get $1 i32.load offset=12 i32.lt_s if local.get $2 - local.get $4 + local.get $1 i32.load offset=12 i32.ge_u if @@ -5821,20 +5971,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 i32.load offset=4 local.get $2 i32.const 1 i32.shl i32.add i32.load16_s - local.set $1 + local.set $5 local.get $6 local.get $2 call $~lib/array/Array#__get local.set $7 local.get $0 - local.get $1 + local.get $5 call $~lib/map/Map#has i32.eqz if @@ -5860,16 +6010,16 @@ unreachable end local.get $3 - local.get $1 - local.get $1 + local.get $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $5 + local.get $4 local.get $7 i32.const 20 i32.sub - local.tee $1 - local.get $1 + local.tee $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $2 @@ -5891,7 +6041,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -6068,13 +6218,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release @@ -6336,24 +6486,13 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (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 - i32.load offset=8 - local.set $4 local.get $0 - i32.load offset=16 - local.tee $7 - local.set $6 - local.get $7 i32.const 536870904 i32.gt_u if @@ -6364,94 +6503,64 @@ call $~lib/builtins/abort unreachable end - local.get $6 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 i32.const 1 i32.shl - local.tee $5 + local.tee $4 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $4 call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 15 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 i32.const 0 i32.store - local.get $0 + local.get $3 i32.const 0 i32.store offset=4 - local.get $0 + local.get $3 i32.const 0 i32.store offset=8 - local.get $0 + local.get $3 i32.const 0 i32.store offset=12 - local.get $2 - local.set $1 - local.get $2 - local.get $0 + local.get $1 + local.set $2 + local.get $1 + local.get $3 i32.load - local.tee $3 + local.tee $5 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $3 + local.set $2 + local.get $5 call $~lib/rt/pure/__release end - local.get $0 - local.get $1 - i32.store - local.get $0 + local.get $3 local.get $2 + i32.store + local.get $3 + local.get $1 i32.store offset=4 - local.get $0 - local.get $5 + local.get $3 + local.get $4 i32.store offset=8 + local.get $3 local.get $0 - local.get $6 i32.store offset=12 - loop $for-loop|0 - local.get $8 - local.get $7 - i32.lt_s - if - local.get $4 - local.get $8 - i32.const 12 - i32.mul - i32.add - local.tee $2 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $9 - local.get $2 - i32.load16_u - call $~lib/array/Array#__set - local.get $9 - i32.const 1 - i32.add - local.set $9 - end - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|0 - end - end - local.get $0 - local.get $9 - call $~lib/array/Array#set:length - local.get $0 + local.get $3 ) (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) (local $2 i32) @@ -6785,9 +6894,12 @@ (local $5 i32) (local $6 i32) (local $7 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 14 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -6980,14 +7092,58 @@ unreachable end local.get $0 - call $~lib/map/Map#keys - local.set $4 + i32.load offset=8 + local.set $5 + local.get $0 + i32.load offset=16 + local.tee $6 + call $~lib/array/Array#constructor + local.set $1 + loop $for-loop|0 + local.get $4 + local.get $6 + i32.lt_s + if + local.get $5 + local.get $4 + i32.const 12 + i32.mul + i32.add + local.tee $7 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + local.get $3 + local.get $7 + i32.load16_u + call $~lib/array/Array#__set + local.get $3 + i32.const 1 + i32.add + local.set $3 + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 + end + end + local.get $1 + local.get $3 + call $~lib/array/Array#set:length local.get $0 call $~lib/map/Map#values local.set $6 + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 16 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $3 i32.const 0 @@ -7010,15 +7166,15 @@ local.get $3 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $5 + local.set $4 loop $for-loop|4 local.get $2 - local.get $4 + local.get $1 i32.load offset=12 i32.lt_s if local.get $2 - local.get $4 + local.get $1 i32.load offset=12 i32.ge_u if @@ -7029,20 +7185,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 i32.load offset=4 local.get $2 i32.const 1 i32.shl i32.add i32.load16_u - local.set $1 + local.set $5 local.get $6 local.get $2 call $~lib/array/Array#__get local.set $7 local.get $0 - local.get $1 + local.get $5 call $~lib/map/Map#has i32.eqz if @@ -7068,16 +7224,16 @@ unreachable end local.get $3 - local.get $1 - local.get $1 + local.get $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $5 + local.get $4 local.get $7 i32.const 20 i32.sub - local.tee $1 - local.get $1 + local.tee $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $2 @@ -7099,7 +7255,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -7268,26 +7424,17 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find - i32.const 0 - i32.ne - ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 @@ -7309,6 +7456,7 @@ ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.get $1 local.get $1 @@ -7331,20 +7479,22 @@ i32.const 1 i32.sub i32.store offset=20 + i32.const 4 + local.get $0 + i32.load offset=20 + local.tee $1 + i32.gt_u + local.set $2 local.get $0 i32.load offset=4 i32.const 1 i32.shr_u - local.tee $2 + local.tee $3 i32.const 1 i32.add i32.const 4 - local.get $0 - i32.load offset=20 - local.tee $1 - i32.const 4 local.get $1 - i32.gt_u + local.get $2 select i32.ge_u if (result i32) @@ -7362,7 +7512,7 @@ end if local.get $0 - local.get $2 + local.get $3 call $~lib/map/Map#rehash end ) @@ -7375,6 +7525,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) call $~lib/map/Map#constructor local.set $0 loop $for-loop|0 @@ -7384,7 +7535,9 @@ if local.get $0 local.get $1 - call $~lib/map/Map#has + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -7402,7 +7555,9 @@ call $~lib/rt/pure/__release local.get $0 local.get $1 - call $~lib/map/Map#has + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7455,7 +7610,9 @@ if local.get $0 local.get $1 - call $~lib/map/Map#has + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7489,7 +7646,9 @@ call $~lib/rt/pure/__release local.get $0 local.get $1 - call $~lib/map/Map#has + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7581,9 +7740,9 @@ call $~lib/map/Map#values local.set $6 call $~lib/map/Map#constructor - local.set $3 - call $~lib/map/Map#constructor local.set $4 + call $~lib/map/Map#constructor + local.set $5 loop $for-loop|2 local.get $2 local.get $1 @@ -7593,14 +7752,16 @@ local.get $1 local.get $2 call $~lib/array/Array#__get - local.set $5 + local.set $3 local.get $6 local.get $2 call $~lib/array/Array#__get local.set $7 local.get $0 - local.get $5 - call $~lib/map/Map#has + local.get $3 + local.get $3 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7614,7 +7775,10 @@ local.get $7 i32.const 20 i32.sub - call $~lib/map/Map#has + local.tee $8 + local.get $8 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7624,17 +7788,17 @@ call $~lib/builtins/abort unreachable end + local.get $4 + local.get $3 local.get $3 - local.get $5 - local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $4 + local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $5 - local.get $5 + local.tee $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $2 @@ -7644,7 +7808,7 @@ br $for-loop|2 end end - local.get $3 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -7656,7 +7820,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.load offset=20 i32.const 100 i32.ne @@ -7677,7 +7841,9 @@ if local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7707,7 +7873,9 @@ call $~lib/map/Map#delete local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -7744,7 +7912,9 @@ if local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -7762,7 +7932,9 @@ call $~lib/rt/pure/__release local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7777,7 +7949,9 @@ call $~lib/map/Map#delete local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -7821,31 +7995,20 @@ call $~lib/rt/pure/__release local.get $6 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 local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (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 - i32.load offset=8 - local.set $4 local.get $0 - i32.load offset=16 - local.tee $7 - local.set $6 - local.get $7 i32.const 268435452 i32.gt_u if @@ -7856,94 +8019,64 @@ call $~lib/builtins/abort unreachable end - local.get $6 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 i32.const 2 i32.shl - local.tee $5 + local.tee $4 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $4 call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 18 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 i32.const 0 i32.store - local.get $0 + local.get $3 i32.const 0 i32.store offset=4 - local.get $0 + local.get $3 i32.const 0 i32.store offset=8 - local.get $0 + local.get $3 i32.const 0 i32.store offset=12 - local.get $2 - local.set $1 - local.get $2 - local.get $0 + local.get $1 + local.set $2 + local.get $1 + local.get $3 i32.load - local.tee $3 + local.tee $5 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $3 + local.set $2 + local.get $5 call $~lib/rt/pure/__release end - local.get $0 - local.get $1 - i32.store - local.get $0 + local.get $3 local.get $2 + i32.store + local.get $3 + local.get $1 i32.store offset=4 - local.get $0 - local.get $5 + local.get $3 + local.get $4 i32.store offset=8 + local.get $3 local.get $0 - local.get $6 i32.store offset=12 - loop $for-loop|0 - local.get $8 - local.get $7 - i32.lt_s - if - local.get $4 - local.get $8 - i32.const 12 - i32.mul - i32.add - local.tee $2 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $9 - local.get $2 - i32.load - call $~lib/array/Array#__set - local.get $9 - i32.const 1 - i32.add - local.set $9 - end - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|0 - end - end - local.get $0 - local.get $9 - call $~lib/array/Array#set:length - local.get $0 + local.get $3 ) (func $std/map/testNumeric (local $0 i32) @@ -7954,9 +8087,13 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 17 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -7985,7 +8122,9 @@ if local.get $0 local.get $1 - call $~lib/map/Map#has + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -8003,7 +8142,9 @@ call $~lib/rt/pure/__release local.get $0 local.get $1 - call $~lib/map/Map#has + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -8056,7 +8197,9 @@ if local.get $0 local.get $1 - call $~lib/map/Map#has + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -8090,7 +8233,9 @@ call $~lib/rt/pure/__release local.get $0 local.get $1 - call $~lib/map/Map#has + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -8135,54 +8280,100 @@ unreachable end local.get $0 - call $~lib/map/Map#keys - local.set $4 + i32.load offset=8 + local.set $5 + local.get $0 + i32.load offset=16 + local.tee $6 + call $~lib/array/Array#constructor + local.set $1 + loop $for-loop|00 + local.get $4 + local.get $6 + i32.lt_s + if + local.get $5 + local.get $4 + i32.const 12 + i32.mul + i32.add + local.tee $7 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + local.get $3 + local.get $7 + i32.load + call $~lib/array/Array#__set + local.get $3 + i32.const 1 + i32.add + local.set $3 + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|00 + end + end + local.get $1 + local.get $3 + call $~lib/array/Array#set:length local.get $0 call $~lib/map/Map#values local.set $6 + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 19 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $1 + local.tee $3 i32.const 0 i32.store - local.get $1 + local.get $3 i32.const 0 i32.store offset=4 - local.get $1 + local.get $3 i32.const 0 i32.store offset=8 - local.get $1 + local.get $3 i32.const 0 i32.store offset=12 - local.get $1 + local.get $3 i32.const 0 i32.store offset=16 - local.get $1 + local.get $3 i32.const 0 i32.store offset=20 - local.get $1 + local.get $3 call $~lib/map/Map#clear call $~lib/map/Map#constructor local.set $5 loop $for-loop|2 local.get $2 - local.get $4 + local.get $1 i32.load offset=12 i32.lt_s if - local.get $4 + local.get $1 local.get $2 call $~lib/array/Array#__get - local.set $3 + local.set $4 local.get $6 local.get $2 call $~lib/array/Array#__get local.set $7 local.get $0 - local.get $3 - call $~lib/map/Map#has + local.get $4 + local.get $4 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -8196,7 +8387,10 @@ local.get $7 i32.const 20 i32.sub - call $~lib/map/Map#has + local.tee $8 + local.get $8 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -8206,17 +8400,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $3 local.get $3 + local.get $4 + local.get $4 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $2 @@ -8226,7 +8420,7 @@ br $for-loop|2 end end - local.get $1 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -8259,7 +8453,9 @@ if local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -8289,7 +8485,9 @@ call $~lib/map/Map#delete local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -8326,7 +8524,9 @@ if local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -8344,7 +8544,9 @@ call $~lib/rt/pure/__release local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -8359,7 +8561,9 @@ call $~lib/map/Map#delete local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -8399,11 +8603,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $1 + local.get $3 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release @@ -8550,15 +8754,6 @@ end i32.const 0 ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i64) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find - i32.const 0 - i32.ne - ) (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -8570,24 +8765,24 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $3 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $8 i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 local.get $0 i32.load offset=16 i32.const 4 @@ -8597,27 +8792,27 @@ local.get $2 local.set $4 loop $while-continue|0 - local.get $3 + local.get $5 local.get $7 i32.ne if - local.get $3 + local.get $5 i32.load offset=12 i32.const 1 i32.and i32.eqz if local.get $4 - local.get $3 + local.get $5 i64.load i64.store local.get $4 - local.get $3 + local.get $5 i32.load offset=8 i32.store offset=8 local.get $4 - local.get $5 local.get $3 + local.get $5 i64.load call $~lib/util/hash/hash64 local.get $1 @@ -8625,10 +8820,10 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $6 i32.load i32.store offset=12 - local.get $8 + local.get $6 local.get $4 i32.store local.get $4 @@ -8636,28 +8831,28 @@ i32.add local.set $4 end - local.get $3 + local.get $5 i32.const 16 i32.add - local.set $3 + local.set $5 br $while-continue|0 end end - local.get $5 - local.tee $3 + local.get $3 + local.tee $5 local.get $0 i32.load local.tee $4 i32.ne if - local.get $3 + local.get $5 call $~lib/rt/pure/__retain - local.set $3 + local.set $5 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $3 + local.get $5 i32.store local.get $0 local.get $1 @@ -8666,26 +8861,26 @@ local.tee $1 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 local.get $1 i32.store offset=8 local.get $0 - local.get $6 + local.get $8 i32.store offset=12 local.get $0 local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $3 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release @@ -8694,13 +8889,11 @@ (local $3 i32) (local $4 i32) (local $5 i32) - local.get $1 - call $~lib/util/hash/hash64 - local.tee $3 - local.set $4 local.get $0 local.get $1 - local.get $3 + local.get $1 + call $~lib/util/hash/hash64 + local.tee $4 call $~lib/map/Map#find local.tee $3 if @@ -8801,6 +8994,82 @@ local.get $0 i32.load offset=8 ) + (func $~lib/array/Array#constructor (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.const 134217726 + i32.gt_u + if + i32.const 1200 + i32.const 1472 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + i32.const 3 + i32.shl + local.tee $4 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $4 + call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 21 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + 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 + local.get $1 + local.set $2 + local.get $1 + local.get $3 + i32.load + local.tee $5 + i32.ne + if + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $5 + call $~lib/rt/pure/__release + end + local.get $3 + local.get $2 + i32.store + local.get $3 + local.get $1 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store offset=8 + local.get $3 + local.get $0 + i32.store offset=12 + local.get $3 + ) (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) local.get $1 @@ -8851,123 +9120,6 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#keys (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 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.tee $7 - local.set $6 - local.get $7 - i32.const 134217726 - i32.gt_u - if - i32.const 1200 - i32.const 1472 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 3 - i32.shl - local.tee $5 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $5 - call $~lib/util/memory/memset - i32.const 16 - i32.const 21 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $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 $2 - local.set $1 - 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 - local.get $5 - i32.store offset=8 - local.get $0 - local.get $6 - i32.store offset=12 - loop $for-loop|0 - local.get $8 - local.get $7 - i32.lt_s - if - local.get $4 - local.get $8 - i32.const 4 - i32.shl - i32.add - local.tee $2 - i32.load offset=12 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $9 - local.get $2 - i64.load - call $~lib/array/Array#__set - local.get $9 - i32.const 1 - i32.add - local.set $9 - end - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|0 - end - end - local.get $0 - local.get $9 - call $~lib/array/Array#set:length - local.get $0 - ) (func $~lib/map/Map#values (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -9085,24 +9237,24 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $3 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $8 i32.const 24 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 local.get $0 i32.load offset=16 i32.const 24 @@ -9112,27 +9264,27 @@ local.get $2 local.set $4 loop $while-continue|0 - local.get $3 + local.get $5 local.get $7 i32.ne if - local.get $3 + local.get $5 i32.load offset=16 i32.const 1 i32.and i32.eqz if local.get $4 - local.get $3 + local.get $5 i64.load i64.store local.get $4 - local.get $3 + local.get $5 i64.load offset=8 i64.store offset=8 local.get $4 - local.get $5 local.get $3 + local.get $5 i64.load call $~lib/util/hash/hash64 local.get $1 @@ -9140,10 +9292,10 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $6 i32.load i32.store offset=16 - local.get $8 + local.get $6 local.get $4 i32.store local.get $4 @@ -9151,28 +9303,28 @@ i32.add local.set $4 end - local.get $3 + local.get $5 i32.const 24 i32.add - local.set $3 + local.set $5 br $while-continue|0 end end - local.get $5 - local.tee $3 + local.get $3 + local.tee $5 local.get $0 i32.load local.tee $4 i32.ne if - local.get $3 + local.get $5 call $~lib/rt/pure/__retain - local.set $3 + local.set $5 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $3 + local.get $5 i32.store local.get $0 local.get $1 @@ -9181,26 +9333,26 @@ local.tee $1 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 local.get $1 i32.store offset=8 local.get $0 - local.get $6 + local.get $8 i32.store offset=12 local.get $0 local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $3 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release @@ -9211,10 +9363,11 @@ (local $5 i32) local.get $1 call $~lib/util/hash/hash64 - local.set $4 + local.tee $3 + local.set $5 local.get $0 i32.load - local.get $4 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -9291,11 +9444,11 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $4 i32.const 1 i32.add i32.store offset=16 - local.get $5 + local.get $4 i32.const 24 i32.mul i32.add @@ -9314,7 +9467,7 @@ local.get $3 local.get $0 i32.load - local.get $4 + local.get $5 local.get $0 i32.load offset=4 i32.and @@ -9334,6 +9487,7 @@ (func $~lib/map/Map#delete (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $0 local.get $1 local.get $1 @@ -9356,20 +9510,22 @@ i32.const 1 i32.sub i32.store offset=20 + i32.const 4 + local.get $0 + i32.load offset=20 + local.tee $2 + i32.gt_u + local.set $3 local.get $0 i32.load offset=4 i32.const 1 i32.shr_u - local.tee $3 + local.tee $4 i32.const 1 i32.add i32.const 4 - local.get $0 - i32.load offset=20 - local.tee $2 - i32.const 4 local.get $2 - i32.gt_u + local.get $3 select i32.ge_u if (result i32) @@ -9387,7 +9543,7 @@ end if local.get $0 - local.get $3 + local.get $4 call $~lib/map/Map#rehash end ) @@ -9400,9 +9556,14 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) + (local $9 i64) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 20 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $1 i32.const 0 @@ -9431,7 +9592,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -9450,7 +9613,9 @@ call $~lib/rt/pure/__release local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -9504,7 +9669,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -9540,7 +9707,9 @@ call $~lib/rt/pure/__release local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -9586,14 +9755,58 @@ unreachable end local.get $1 - call $~lib/map/Map#keys + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 + local.tee $4 + call $~lib/array/Array#constructor local.set $5 + loop $for-loop|00 + local.get $3 + local.get $4 + i32.lt_s + if + local.get $6 + local.get $3 + i32.const 4 + i32.shl + i32.add + local.tee $8 + i32.load offset=12 + i32.const 1 + i32.and + i32.eqz + if + local.get $5 + local.get $2 + local.get $8 + i64.load + call $~lib/array/Array#__set + local.get $2 + i32.const 1 + i32.add + local.set $2 + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|00 + end + end + local.get $5 + local.get $2 + call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values - local.set $7 + local.set $6 + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 22 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $2 i32.const 0 @@ -9616,24 +9829,26 @@ local.get $2 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $6 + local.set $3 loop $for-loop|2 - local.get $3 + local.get $7 local.get $5 i32.load offset=12 i32.lt_s if local.get $5 - local.get $3 + local.get $7 call $~lib/array/Array#__get local.set $0 + local.get $6 local.get $7 - local.get $3 call $~lib/array/Array#__get local.set $4 local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -9648,7 +9863,10 @@ i32.const 20 i32.sub i64.extend_i32_s - call $~lib/map/Map#has + local.tee $9 + local.get $9 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -9663,7 +9881,7 @@ local.get $0 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $6 + local.get $3 local.get $4 i32.const 20 i32.sub @@ -9671,10 +9889,10 @@ local.get $4 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 + local.get $7 i32.const 1 i32.add - local.set $3 + local.set $7 br $for-loop|2 end end @@ -9690,7 +9908,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -9711,7 +9929,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -9742,7 +9962,9 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -9779,7 +10001,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -9798,7 +10022,9 @@ call $~lib/rt/pure/__release local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -9813,7 +10039,9 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -9855,33 +10083,22 @@ end local.get $5 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $6 + local.get $3 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (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 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.tee $7 - local.set $6 - local.get $7 i32.const 134217726 i32.gt_u if @@ -9892,94 +10109,64 @@ call $~lib/builtins/abort unreachable end - local.get $6 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 i32.const 3 i32.shl - local.tee $5 + local.tee $4 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $4 call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 24 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 i32.const 0 i32.store - local.get $0 + local.get $3 i32.const 0 i32.store offset=4 - local.get $0 + local.get $3 i32.const 0 i32.store offset=8 - local.get $0 + local.get $3 i32.const 0 i32.store offset=12 - local.get $2 - local.set $1 - local.get $2 - local.get $0 + local.get $1 + local.set $2 + local.get $1 + local.get $3 i32.load - local.tee $3 + local.tee $5 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $3 + local.set $2 + local.get $5 call $~lib/rt/pure/__release end - local.get $0 - local.get $1 - i32.store - local.get $0 + local.get $3 local.get $2 + i32.store + local.get $3 + local.get $1 i32.store offset=4 - local.get $0 - local.get $5 + local.get $3 + local.get $4 i32.store offset=8 + local.get $3 local.get $0 - local.get $6 i32.store offset=12 - loop $for-loop|0 - local.get $8 - local.get $7 - i32.lt_s - if - local.get $4 - local.get $8 - i32.const 4 - i32.shl - i32.add - local.tee $2 - i32.load offset=12 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $9 - local.get $2 - i64.load - call $~lib/array/Array#__set - local.get $9 - i32.const 1 - i32.add - local.set $9 - end - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|0 - end - end - local.get $0 - local.get $9 - call $~lib/array/Array#set:length - local.get $0 + local.get $3 ) (func $std/map/testNumeric (local $0 i64) @@ -9990,9 +10177,14 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) + (local $9 i64) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 23 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $1 i32.const 0 @@ -10021,7 +10213,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -10040,7 +10234,9 @@ call $~lib/rt/pure/__release local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -10094,7 +10290,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -10130,7 +10328,9 @@ call $~lib/rt/pure/__release local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -10176,14 +10376,58 @@ unreachable end local.get $1 - call $~lib/map/Map#keys + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 + local.tee $4 + call $~lib/array/Array#constructor local.set $5 + loop $for-loop|00 + local.get $3 + local.get $4 + i32.lt_s + if + local.get $6 + local.get $3 + i32.const 4 + i32.shl + i32.add + local.tee $8 + i32.load offset=12 + i32.const 1 + i32.and + i32.eqz + if + local.get $5 + local.get $2 + local.get $8 + i64.load + call $~lib/array/Array#__set + local.get $2 + i32.const 1 + i32.add + local.set $2 + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|00 + end + end + local.get $5 + local.get $2 + call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values - local.set $7 + local.set $6 + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 25 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $2 i32.const 0 @@ -10206,24 +10450,26 @@ local.get $2 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $6 + local.set $3 loop $for-loop|2 - local.get $3 + local.get $7 local.get $5 i32.load offset=12 i32.lt_s if local.get $5 - local.get $3 + local.get $7 call $~lib/array/Array#__get local.set $0 + local.get $6 local.get $7 - local.get $3 call $~lib/array/Array#__get local.set $4 local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -10238,7 +10484,10 @@ i32.const 20 i32.sub i64.extend_i32_s - call $~lib/map/Map#has + local.tee $9 + local.get $9 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -10253,7 +10502,7 @@ local.get $0 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $6 + local.get $3 local.get $4 i32.const 20 i32.sub @@ -10261,10 +10510,10 @@ local.get $4 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 + local.get $7 i32.const 1 i32.add - local.set $3 + local.set $7 br $for-loop|2 end end @@ -10280,7 +10529,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -10301,7 +10550,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -10332,7 +10583,9 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -10369,7 +10622,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -10388,7 +10643,9 @@ call $~lib/rt/pure/__release local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -10403,7 +10660,9 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -10445,11 +10704,11 @@ end local.get $5 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $6 + local.get $3 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -10750,25 +11009,13 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (param $0 i32) (result 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 $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 - i32.load offset=8 - local.set $5 - local.get $0 - i32.load offset=16 - local.tee $8 - local.set $7 - local.get $8 i32.const 268435452 i32.gt_u if @@ -10779,82 +11026,105 @@ call $~lib/builtins/abort unreachable end - local.get $7 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 i32.const 2 i32.shl - local.tee $6 + local.tee $4 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $4 call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 27 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 i32.const 0 i32.store - local.get $0 + local.get $3 i32.const 0 i32.store offset=4 - local.get $0 + local.get $3 i32.const 0 i32.store offset=8 - local.get $0 + local.get $3 i32.const 0 i32.store offset=12 - local.get $2 - local.set $1 - local.get $2 - local.get $0 + local.get $1 + local.set $2 + local.get $1 + local.get $3 i32.load - local.tee $4 + local.tee $5 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $4 + local.set $2 + local.get $5 call $~lib/rt/pure/__release end - local.get $0 - local.get $1 - i32.store - local.get $0 + local.get $3 local.get $2 + i32.store + local.get $3 + local.get $1 i32.store offset=4 - local.get $0 - local.get $6 + local.get $3 + local.get $4 i32.store offset=8 + local.get $3 local.get $0 - local.get $7 i32.store offset=12 + local.get $3 + ) + (func $~lib/map/Map#keys (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 f32) + local.get $0 + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 + local.tee $5 + call $~lib/array/Array#constructor + local.set $0 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $2 + local.get $5 i32.lt_s if - local.get $5 - local.get $9 + local.get $4 + local.get $2 i32.const 12 i32.mul i32.add - local.tee $2 + local.tee $3 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $2 + local.get $3 f32.load - local.set $3 - local.get $10 + local.set $6 + local.get $1 local.get $0 i32.load offset=12 i32.ge_u if - local.get $10 + local.get $1 i32.const 0 i32.lt_s if @@ -10866,38 +11136,38 @@ unreachable end local.get $0 - local.get $10 + local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 2 call $~lib/array/ensureSize local.get $0 - local.get $2 + local.get $3 i32.store offset=12 end local.get $0 i32.load offset=4 - local.get $10 + local.get $1 i32.const 2 i32.shl i32.add - local.get $3 + local.get $6 f32.store - local.get $10 + local.get $1 i32.const 1 i32.add - local.set $10 + local.set $1 end - local.get $9 + local.get $2 i32.const 1 i32.add - local.set $9 + local.set $2 br $for-loop|0 end end local.get $0 - local.get $10 + local.get $1 call $~lib/array/Array#set:length local.get $0 ) @@ -11196,9 +11466,12 @@ (local $5 i32) (local $6 i32) (local $7 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 26 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $1 i32.const 0 @@ -11387,9 +11660,12 @@ local.get $1 call $~lib/map/Map#values local.set $7 + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 28 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $2 i32.const 0 @@ -11972,25 +12248,13 @@ local.get $0 i32.load offset=8 ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 f64) + (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 $0 - i32.load offset=8 - local.set $5 local.get $0 - i32.load offset=16 - local.tee $8 - local.set $7 - local.get $8 i32.const 134217726 i32.gt_u if @@ -12001,82 +12265,105 @@ call $~lib/builtins/abort unreachable end - local.get $7 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 i32.const 3 i32.shl - local.tee $6 + local.tee $4 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $4 call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 30 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 i32.const 0 i32.store - local.get $0 + local.get $3 i32.const 0 i32.store offset=4 - local.get $0 + local.get $3 i32.const 0 i32.store offset=8 - local.get $0 + local.get $3 i32.const 0 i32.store offset=12 - local.get $2 - local.set $1 - local.get $2 - local.get $0 + local.get $1 + local.set $2 + local.get $1 + local.get $3 i32.load - local.tee $4 + local.tee $5 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $4 + local.set $2 + local.get $5 call $~lib/rt/pure/__release end - local.get $0 - local.get $1 - i32.store - local.get $0 + local.get $3 local.get $2 + i32.store + local.get $3 + local.get $1 i32.store offset=4 - local.get $0 - local.get $6 + local.get $3 + local.get $4 i32.store offset=8 + local.get $3 local.get $0 - local.get $7 i32.store offset=12 + local.get $3 + ) + (func $~lib/map/Map#keys (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 f64) + local.get $0 + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 + local.tee $5 + call $~lib/array/Array#constructor + local.set $0 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $2 + local.get $5 i32.lt_s if - local.get $5 - local.get $9 + local.get $4 + local.get $2 i32.const 4 i32.shl i32.add - local.tee $2 + local.tee $3 i32.load offset=12 i32.const 1 i32.and i32.eqz if - local.get $2 + local.get $3 f64.load - local.set $3 - local.get $10 + local.set $6 + local.get $1 local.get $0 i32.load offset=12 i32.ge_u if - local.get $10 + local.get $1 i32.const 0 i32.lt_s if @@ -12088,38 +12375,38 @@ unreachable end local.get $0 - local.get $10 + local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 3 call $~lib/array/ensureSize local.get $0 - local.get $2 + local.get $3 i32.store offset=12 end local.get $0 i32.load offset=4 - local.get $10 + local.get $1 i32.const 3 i32.shl i32.add - local.get $3 + local.get $6 f64.store - local.get $10 + local.get $1 i32.const 1 i32.add - local.set $10 + local.set $1 end - local.get $9 + local.get $2 i32.const 1 i32.add - local.set $9 + local.set $2 br $for-loop|0 end end local.get $0 - local.get $10 + local.get $1 call $~lib/array/Array#set:length local.get $0 ) @@ -12452,9 +12739,12 @@ (local $5 i32) (local $6 i32) (local $7 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 29 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $1 i32.const 0 @@ -12643,9 +12933,12 @@ local.get $1 call $~lib/map/Map#values local.set $7 + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 31 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $2 i32.const 0 diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 2d35645c2b..5c89808da0 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -1,16 +1,15 @@ (module (type $f64_=>_f64 (func (param f64) (result f64))) (type $f64_f64_f64_=>_i32 (func (param f64 f64 f64) (result i32))) - (type $f32_f32_f32_=>_i32 (func (param f32 f32 f32) (result i32))) (type $f32_=>_f32 (func (param f32) (result f32))) (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) - (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) + (type $f32_f32_f32_=>_i32 (func (param f32 f32 f32) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (type $f32_f32_=>_f32 (func (param f32 f32) (result f32))) - (type $f32_f32_f32_f32_=>_i32 (func (param f32 f32 f32 f32) (result i32))) - (type $f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64) (result i32))) (type $none_=>_none (func)) + (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) (type $f64_=>_i32 (func (param f64) (result i32))) + (type $f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64) (result i32))) (type $f32_i32_=>_f32 (func (param f32 i32) (result f32))) (type $f64_=>_f32 (func (param f64) (result f32))) (type $none_=>_f64 (func (result f64))) @@ -25,8 +24,6 @@ (type $f32_=>_i32 (func (param f32) (result i32))) (type $f32_i32_=>_i32 (func (param f32 i32) (result i32))) (type $f32_i32_i32_=>_i32 (func (param f32 i32 i32) (result i32))) - (type $f32_i32_f32_=>_i32 (func (param f32 i32 f32) (result i32))) - (type $f64_i32_f64_=>_i32 (func (param f64 i32 f64) (result i32))) (type $f64_i64_i32_=>_i32 (func (param f64 i64 i32) (result i32))) (type $i64_=>_i64 (func (param i64) (result i64))) (type $i64_i32_=>_i64 (func (param i64 i32) (result i64))) @@ -463,22 +460,6 @@ end i32.const 1 ) - (func $std/math/test_scalbn (param $0 f64) (param $1 i32) (param $2 f64) (result i32) - local.get $0 - local.get $1 - call $~lib/math/NativeMath.scalbn - local.get $2 - f64.const 0 - call $std/math/check - ) - (func $std/math/test_scalbnf (param $0 f32) (param $1 i32) (param $2 f32) (result i32) - local.get $0 - local.get $1 - call $~lib/math/NativeMathf.scalbn - local.get $2 - f32.const 0 - call $std/math/check - ) (func $std/math/test_abs (param $0 f64) (param $1 f64) (result i32) local.get $0 f64.abs @@ -495,13 +476,6 @@ i32.const 0 end ) - (func $std/math/test_absf (param $0 f32) (param $1 f32) (result i32) - local.get $0 - f32.abs - local.get $1 - f32.const 0 - call $std/math/check - ) (func $~lib/math/R (param $0 f64) (result f64) local.get $0 f64.const 0.16666666666666666 @@ -820,13 +794,6 @@ f32.add f32.mul ) - (func $std/math/test_acosf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.acos - local.get $1 - local.get $2 - call $std/math/check - ) (func $~lib/math/NativeMath.log1p (param $0 f64) (result f64) (local $1 f64) (local $2 i32) @@ -1850,13 +1817,6 @@ local.get $1 f32.copysign ) - (func $std/math/test_asinf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.asin - local.get $1 - local.get $2 - call $std/math/check - ) (func $std/math/test_asinh (param $0 f64) (param $1 f64) (param $2 f64) (result i32) (local $3 f64) (local $4 i64) @@ -2446,13 +2406,6 @@ local.get $1 f32.copysign ) - (func $std/math/test_atanf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.atan - local.get $1 - local.get $2 - call $std/math/check - ) (func $std/math/test_atanh (param $0 f64) (param $1 f64) (param $2 f64) (result i32) (local $3 f64) (local $4 i64) @@ -2994,14 +2947,6 @@ i32.and select ) - (func $std/math/test_atan2f (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) - local.get $0 - local.get $1 - call $~lib/math/NativeMathf.atan2 - local.get $2 - local.get $3 - call $std/math/check - ) (func $~lib/math/NativeMath.cbrt (param $0 f64) (result f64) (local $1 f64) (local $2 i32) @@ -3238,13 +3183,6 @@ f64.div f32.demote_f64 ) - (func $std/math/test_cbrtf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.cbrt - local.get $1 - local.get $2 - call $std/math/check - ) (func $std/math/test_ceil (param $0 f64) (param $1 f64) (result i32) local.get $0 f64.ceil @@ -3261,13 +3199,6 @@ i32.const 0 end ) - (func $std/math/test_ceilf (param $0 f32) (param $1 f32) (result i32) - local.get $0 - f32.ceil - local.get $1 - f32.const 0 - call $std/math/check - ) (func $~lib/math/cos_kern (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) @@ -5082,13 +5013,6 @@ i32.const 0 end ) - (func $std/math/test_expf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.exp - local.get $1 - local.get $2 - call $std/math/check - ) (func $std/math/test_expm1 (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.expm1 @@ -5105,13 +5029,6 @@ i32.const 0 end ) - (func $std/math/test_expm1f (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.expm1 - local.get $1 - local.get $2 - call $std/math/check - ) (func $~lib/util/math/exp2_lut (param $0 f64) (result f64) (local $1 f64) (local $2 i64) @@ -5430,13 +5347,6 @@ f64.mul f32.demote_f64 ) - (func $std/math/test_exp2f (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/util/math/exp2f_lut - local.get $1 - local.get $2 - call $std/math/check - ) (func $std/math/test_floor (param $0 f64) (param $1 f64) (result i32) local.get $0 f64.floor @@ -5453,13 +5363,6 @@ i32.const 0 end ) - (func $std/math/test_floorf (param $0 f32) (param $1 f32) (result i32) - local.get $0 - f32.floor - local.get $1 - f32.const 0 - call $std/math/check - ) (func $~lib/math/NativeMath.hypot (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) @@ -5630,14 +5533,6 @@ f64.sqrt f64.mul ) - (func $std/math/test_hypot (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) - local.get $0 - local.get $1 - call $~lib/math/NativeMath.hypot - local.get $2 - local.get $3 - call $std/math/check - ) (func $~lib/math/NativeMathf.hypot (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) @@ -5743,14 +5638,6 @@ f32.sqrt f32.mul ) - (func $std/math/test_hypotf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) - local.get $0 - local.get $1 - call $~lib/math/NativeMathf.hypot - local.get $2 - local.get $3 - call $std/math/check - ) (func $std/math/test_log (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.log @@ -5767,13 +5654,6 @@ i32.const 0 end ) - (func $std/math/test_logf (param $0 f32) (param $1 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.log - local.get $1 - f32.const 0 - call $std/math/check - ) (func $~lib/math/NativeMath.log10 (param $0 f64) (result f64) (local $1 i32) (local $2 i64) @@ -6152,13 +6032,6 @@ f32.mul f32.add ) - (func $std/math/test_log10f (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.log10 - local.get $1 - local.get $2 - call $std/math/check - ) (func $std/math/test_log1p (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.log1p @@ -6175,13 +6048,6 @@ i32.const 0 end ) - (func $std/math/test_log1pf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.log1p - local.get $1 - local.get $2 - call $std/math/check - ) (func $~lib/math/NativeMath.log2 (param $0 f64) (result f64) (local $1 i32) (local $2 i64) @@ -6544,13 +6410,6 @@ f32.convert_i32_s f32.add ) - (func $std/math/test_log2f (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.log2 - local.get $1 - local.get $2 - call $std/math/check - ) (func $std/math/test_max (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 @@ -6569,14 +6428,6 @@ i32.const 0 end ) - (func $std/math/test_maxf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - local.get $1 - f32.max - local.get $2 - f32.const 0 - call $std/math/check - ) (func $std/math/test_min (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 @@ -6595,14 +6446,6 @@ i32.const 0 end ) - (func $std/math/test_minf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - local.get $1 - f32.min - local.get $2 - f32.const 0 - call $std/math/check - ) (func $~lib/math/NativeMath.mod (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) @@ -7016,14 +6859,6 @@ local.get $0 f32.mul ) - (func $std/math/test_modf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - local.get $1 - call $~lib/math/NativeMathf.mod - local.get $2 - f32.const 0 - call $std/math/check - ) (func $~lib/math/NativeMath.pow (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) @@ -8266,14 +8101,6 @@ i32.or f32.reinterpret_i32 ) - (func $std/math/test_powf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) - local.get $0 - local.get $1 - call $~lib/math/NativeMathf.pow - local.get $2 - local.get $3 - call $std/math/check - ) (func $~lib/math/murmurHash3 (param $0 i64) (result i64) local.get $0 local.get $0 @@ -8680,14 +8507,6 @@ end local.get $0 ) - (func $std/math/test_rem (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - local.get $1 - call $~lib/math/NativeMath.rem - local.get $2 - f64.const 0 - call $std/math/check - ) (func $~lib/math/NativeMathf.rem (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) @@ -8931,14 +8750,6 @@ end local.get $0 ) - (func $std/math/test_remf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - local.get $1 - call $~lib/math/NativeMathf.rem - local.get $2 - f32.const 0 - call $std/math/check - ) (func $~lib/math/NativeMath.sin (param $0 f64) (result f64) (local $1 i32) (local $2 f64) @@ -9278,13 +9089,6 @@ i32.const 0 end ) - (func $std/math/test_sqrtf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - f32.sqrt - local.get $1 - local.get $2 - call $std/math/check - ) (func $~lib/math/tan_kern (param $0 f64) (param $1 f64) (param $2 i32) (result f64) (local $3 f64) (local $4 f64) @@ -9829,13 +9633,6 @@ i32.const 0 end ) - (func $std/math/test_truncf (param $0 f32) (param $1 f32) (result i32) - local.get $0 - f32.trunc - local.get $1 - f32.const 0 - call $std/math/check - ) (func $~lib/math/NativeMath.sincos (param $0 f64) (local $1 f64) (local $2 i32) @@ -10143,7 +9940,8 @@ (local $4 i64) (local $5 i32) (local $6 i32) - (local $7 f32) + (local $7 f64) + (local $8 f32) f64.const 2.718281828459045 global.get $~lib/bindings/Math/E f64.const 0 @@ -10335,8 +10133,10 @@ end f64.const -8.06684839057968 i32.const -2 + call $~lib/math/NativeMath.scalbn f64.const -2.01671209764492 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10348,8 +10148,10 @@ end f64.const 4.345239849338305 i32.const -1 + call $~lib/math/NativeMath.scalbn f64.const 2.1726199246691524 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10361,8 +10163,10 @@ end f64.const -8.38143342755525 i32.const 0 + call $~lib/math/NativeMath.scalbn f64.const -8.38143342755525 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10374,8 +10178,10 @@ end f64.const -6.531673581913484 i32.const 1 + call $~lib/math/NativeMath.scalbn f64.const -13.063347163826968 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10387,8 +10193,10 @@ end f64.const 9.267056966972586 i32.const 2 + call $~lib/math/NativeMath.scalbn f64.const 37.06822786789034 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10400,8 +10208,10 @@ end f64.const 0.6619858980995045 i32.const 3 + call $~lib/math/NativeMath.scalbn f64.const 5.295887184796036 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10413,8 +10223,10 @@ end f64.const -0.4066039223853553 i32.const 4 + call $~lib/math/NativeMath.scalbn f64.const -6.505662758165685 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10426,8 +10238,10 @@ end f64.const 0.5617597462207241 i32.const 5 + call $~lib/math/NativeMath.scalbn f64.const 17.97631187906317 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10439,8 +10253,10 @@ end f64.const 0.7741522965913037 i32.const 6 + call $~lib/math/NativeMath.scalbn f64.const 49.545746981843436 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10452,8 +10268,10 @@ end f64.const -0.6787637026394024 i32.const 7 + call $~lib/math/NativeMath.scalbn f64.const -86.88175393784351 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10465,8 +10283,10 @@ end f64.const 0 i32.const 2147483647 + call $~lib/math/NativeMath.scalbn f64.const 0 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10478,8 +10298,10 @@ end f64.const 0 i32.const -2147483647 + call $~lib/math/NativeMath.scalbn f64.const 0 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10491,8 +10313,10 @@ end f64.const -0 i32.const 2147483647 + call $~lib/math/NativeMath.scalbn f64.const -0 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10504,8 +10328,10 @@ end f64.const nan:0x8000000000000 i32.const 0 + call $~lib/math/NativeMath.scalbn f64.const nan:0x8000000000000 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10517,8 +10343,10 @@ end f64.const inf i32.const 0 + call $~lib/math/NativeMath.scalbn f64.const inf - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10530,8 +10358,10 @@ end f64.const -inf i32.const 0 + call $~lib/math/NativeMath.scalbn f64.const -inf - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10543,8 +10373,10 @@ end f64.const 1 i32.const 0 + call $~lib/math/NativeMath.scalbn f64.const 1 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10556,8 +10388,10 @@ end f64.const 1 i32.const 1 + call $~lib/math/NativeMath.scalbn f64.const 2 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10569,8 +10403,10 @@ end f64.const 1 i32.const -1 + call $~lib/math/NativeMath.scalbn f64.const 0.5 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10582,8 +10418,10 @@ end f64.const 1 i32.const 2147483647 + call $~lib/math/NativeMath.scalbn f64.const inf - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10595,8 +10433,10 @@ end f64.const nan:0x8000000000000 i32.const 1 + call $~lib/math/NativeMath.scalbn f64.const nan:0x8000000000000 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10608,8 +10448,10 @@ end f64.const inf i32.const 2147483647 + call $~lib/math/NativeMath.scalbn f64.const inf - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10621,8 +10463,10 @@ end f64.const inf i32.const -2147483647 + call $~lib/math/NativeMath.scalbn f64.const inf - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10634,8 +10478,10 @@ end f64.const -inf i32.const 2147483647 + call $~lib/math/NativeMath.scalbn f64.const -inf - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10647,8 +10493,10 @@ end f64.const 8988465674311579538646525e283 i32.const -2097 + call $~lib/math/NativeMath.scalbn f64.const 5e-324 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10660,8 +10508,10 @@ end f64.const 5e-324 i32.const 2097 + call $~lib/math/NativeMath.scalbn f64.const 8988465674311579538646525e283 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10673,8 +10523,10 @@ end f64.const 1.000244140625 i32.const -1074 + call $~lib/math/NativeMath.scalbn f64.const 5e-324 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10686,8 +10538,10 @@ end f64.const 0.7499999999999999 i32.const -1073 + call $~lib/math/NativeMath.scalbn f64.const 5e-324 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10699,8 +10553,10 @@ end f64.const 0.5000000000000012 i32.const -1024 + call $~lib/math/NativeMath.scalbn f64.const 2.781342323134007e-309 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10712,8 +10568,10 @@ end f32.const -8.066848754882812 i32.const -2 + call $~lib/math/NativeMathf.scalbn f32.const -2.016712188720703 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10725,8 +10583,10 @@ end f32.const 4.345239639282227 i32.const -1 + call $~lib/math/NativeMathf.scalbn f32.const 2.1726198196411133 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10738,8 +10598,10 @@ end f32.const -8.381433486938477 i32.const 0 + call $~lib/math/NativeMathf.scalbn f32.const -8.381433486938477 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10751,8 +10613,10 @@ end f32.const -6.531673431396484 i32.const 1 + call $~lib/math/NativeMathf.scalbn f32.const -13.063346862792969 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10764,8 +10628,10 @@ end f32.const 9.267057418823242 i32.const 2 + call $~lib/math/NativeMathf.scalbn f32.const 37.06822967529297 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10777,8 +10643,10 @@ end f32.const 0.6619858741760254 i32.const 3 + call $~lib/math/NativeMathf.scalbn f32.const 5.295886993408203 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10790,8 +10658,10 @@ end f32.const -0.40660393238067627 i32.const 4 + call $~lib/math/NativeMathf.scalbn f32.const -6.50566291809082 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10803,8 +10673,10 @@ end f32.const 0.5617597699165344 i32.const 5 + call $~lib/math/NativeMathf.scalbn f32.const 17.9763126373291 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10816,8 +10688,10 @@ end f32.const 0.7741522789001465 i32.const 6 + call $~lib/math/NativeMathf.scalbn f32.const 49.545745849609375 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10829,8 +10703,10 @@ end f32.const -0.6787636876106262 i32.const 7 + call $~lib/math/NativeMathf.scalbn f32.const -86.88175201416016 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10842,8 +10718,10 @@ end f32.const 0 i32.const 2147483647 + call $~lib/math/NativeMathf.scalbn + f32.const 0 f32.const 0 - call $std/math/test_scalbnf + call $std/math/check i32.eqz if i32.const 0 @@ -10855,8 +10733,10 @@ end f32.const 0 i32.const -2147483647 + call $~lib/math/NativeMathf.scalbn + f32.const 0 f32.const 0 - call $std/math/test_scalbnf + call $std/math/check i32.eqz if i32.const 0 @@ -10868,8 +10748,10 @@ end f32.const -0 i32.const 2147483647 + call $~lib/math/NativeMathf.scalbn f32.const -0 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10881,8 +10763,10 @@ end f32.const nan:0x400000 i32.const 0 + call $~lib/math/NativeMathf.scalbn f32.const nan:0x400000 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10894,8 +10778,10 @@ end f32.const inf i32.const 0 + call $~lib/math/NativeMathf.scalbn f32.const inf - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10907,8 +10793,10 @@ end f32.const -inf i32.const 0 + call $~lib/math/NativeMathf.scalbn f32.const -inf - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10920,8 +10808,10 @@ end f32.const 1 i32.const 0 + call $~lib/math/NativeMathf.scalbn f32.const 1 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10933,8 +10823,10 @@ end f32.const 1 i32.const 1 + call $~lib/math/NativeMathf.scalbn f32.const 2 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10946,8 +10838,10 @@ end f32.const 1 i32.const -1 + call $~lib/math/NativeMathf.scalbn f32.const 0.5 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10959,8 +10853,10 @@ end f32.const 1 i32.const 2147483647 + call $~lib/math/NativeMathf.scalbn f32.const inf - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10972,8 +10868,10 @@ end f32.const nan:0x400000 i32.const 1 + call $~lib/math/NativeMathf.scalbn f32.const nan:0x400000 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10985,8 +10883,10 @@ end f32.const inf i32.const 2147483647 + call $~lib/math/NativeMathf.scalbn f32.const inf - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -10998,8 +10898,10 @@ end f32.const inf i32.const -2147483647 + call $~lib/math/NativeMathf.scalbn f32.const inf - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11011,8 +10913,10 @@ end f32.const -inf i32.const 2147483647 + call $~lib/math/NativeMathf.scalbn f32.const -inf - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11024,8 +10928,10 @@ end f32.const 1701411834604692317316873e14 i32.const -276 + call $~lib/math/NativeMathf.scalbn f32.const 1.401298464324817e-45 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11037,8 +10943,10 @@ end f32.const 1.401298464324817e-45 i32.const 276 + call $~lib/math/NativeMathf.scalbn f32.const 1701411834604692317316873e14 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11050,8 +10958,10 @@ end f32.const 1.000244140625 i32.const -149 + call $~lib/math/NativeMathf.scalbn f32.const 1.401298464324817e-45 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11063,8 +10973,10 @@ end f32.const 0.7499999403953552 i32.const -148 + call $~lib/math/NativeMathf.scalbn f32.const 1.401298464324817e-45 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11076,8 +10988,10 @@ end f32.const 0.5000006556510925 i32.const -128 + call $~lib/math/NativeMathf.scalbn f32.const 1.4693693398263237e-39 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11291,9 +11205,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.066848754882812 f32.const 8.066848754882812 - call $std/math/test_absf + f32.const 8.066848754882812 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11305,7 +11220,8 @@ end f32.const 4.345239639282227 f32.const 4.345239639282227 - call $std/math/test_absf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11315,9 +11231,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.381433486938477 f32.const 8.381433486938477 - call $std/math/test_absf + f32.const 8.381433486938477 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11327,9 +11244,10 @@ call $~lib/builtins/abort unreachable end - f32.const -6.531673431396484 f32.const 6.531673431396484 - call $std/math/test_absf + f32.const 6.531673431396484 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11341,7 +11259,8 @@ end f32.const 9.267057418823242 f32.const 9.267057418823242 - call $std/math/test_absf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11353,7 +11272,8 @@ end f32.const 0.6619858741760254 f32.const 0.6619858741760254 - call $std/math/test_absf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11363,9 +11283,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.40660393238067627 f32.const 0.40660393238067627 - call $std/math/test_absf + f32.const 0.40660393238067627 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11377,7 +11298,8 @@ end f32.const 0.5617597699165344 f32.const 0.5617597699165344 - call $std/math/test_absf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11389,7 +11311,8 @@ end f32.const 0.7741522789001465 f32.const 0.7741522789001465 - call $std/math/test_absf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11399,9 +11322,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.6787636876106262 f32.const 0.6787636876106262 - call $std/math/test_absf + f32.const 0.6787636876106262 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11413,7 +11337,8 @@ end f32.const 0 f32.const 0 - call $std/math/test_absf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11423,9 +11348,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0 f32.const 0 - call $std/math/test_absf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11437,7 +11363,8 @@ end f32.const 1 f32.const 1 - call $std/math/test_absf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11447,9 +11374,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1 f32.const 1 - call $std/math/test_absf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11461,7 +11389,8 @@ end f32.const inf f32.const inf - call $std/math/test_absf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11471,9 +11400,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf f32.const inf - call $std/math/test_absf + f32.const inf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11485,7 +11415,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_absf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11756,9 +11687,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -11769,9 +11701,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -11782,9 +11715,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -11795,9 +11729,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -11808,9 +11743,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -11821,9 +11757,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.acos f32.const 0.8473311066627502 f32.const -0.13588131964206696 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -11834,9 +11771,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.acos f32.const 1.989530086517334 f32.const 0.03764917701482773 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -11847,9 +11785,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.acos f32.const 0.9742849469184875 f32.const 0.18443739414215088 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -11860,9 +11799,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.acos f32.const 0.6854215264320374 f32.const -0.29158344864845276 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -11873,9 +11813,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.acos f32.const 2.3168740272521973 f32.const -0.3795364499092102 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -11886,9 +11827,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.acos f32.const 1.5707963705062866 f32.const 0.3666777014732361 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -11899,9 +11841,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.acos f32.const 3.1415927410125732 f32.const 0.3666777014732361 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -11912,9 +11855,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.acos f32.const 0 f32.const 0 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -11925,9 +11869,10 @@ unreachable end f32.const 1.0000001192092896 + call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -11938,9 +11883,10 @@ unreachable end f32.const -1.0000001192092896 + call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -11951,9 +11897,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -11964,9 +11911,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -11977,9 +11925,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -11990,9 +11939,10 @@ unreachable end f32.const 0.49965065717697144 + call $~lib/math/NativeMathf.acos f32.const 1.0476008653640747 f32.const -0.21161814033985138 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -12003,9 +11953,10 @@ unreachable end f32.const -0.5051405429840088 + call $~lib/math/NativeMathf.acos f32.const 2.1003410816192627 f32.const -0.20852705836296082 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -12016,9 +11967,10 @@ unreachable end f32.const -0.5189794898033142 + call $~lib/math/NativeMathf.acos f32.const 2.116452932357788 f32.const -0.14600826799869537 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -12783,9 +12735,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -12796,9 +12749,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -12809,9 +12763,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -12822,9 +12777,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -12835,9 +12791,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -12848,9 +12805,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.asin f32.const 0.7234652042388916 f32.const -0.1307632476091385 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -12861,9 +12819,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.asin f32.const -0.41873374581336975 f32.const 0.3161141574382782 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -12874,9 +12833,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.asin f32.const 0.5965113639831543 f32.const -0.4510819613933563 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -12887,9 +12847,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.asin f32.const 0.8853747844696045 f32.const 0.02493886835873127 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -12900,9 +12861,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.asin f32.const -0.7460777759552002 f32.const 0.2515012323856354 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -12913,9 +12875,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.asin f32.const 1.5707963705062866 f32.const 0.3666777014732361 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -12926,9 +12889,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.asin f32.const -1.5707963705062866 f32.const -0.3666777014732361 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -12939,9 +12903,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.asin f32.const 0 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -12952,9 +12917,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.asin f32.const -0 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -12965,9 +12931,10 @@ unreachable end f32.const 1.0000001192092896 + call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -12978,9 +12945,10 @@ unreachable end f32.const -1.0000001192092896 + call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -12991,9 +12959,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -13004,9 +12973,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -13017,9 +12987,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -13030,9 +13001,10 @@ unreachable end f32.const 0.5004770159721375 + call $~lib/math/NativeMathf.asin f32.const 0.5241496562957764 f32.const -0.29427099227905273 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -13667,9 +13639,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.atan f32.const -1.4474613666534424 f32.const 0.12686480581760406 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -13680,9 +13653,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.atan f32.const 1.3445979356765747 f32.const 0.16045434772968292 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -13693,9 +13667,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.atan f32.const -1.4520463943481445 f32.const -0.39581751823425293 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -13706,9 +13681,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.atan f32.const -1.418875813484192 f32.const 0.410570353269577 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -13719,9 +13695,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.atan f32.const 1.4633032083511353 f32.const 0.48403501510620117 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -13732,9 +13709,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.atan f32.const 0.5847550630569458 f32.const 0.2125193476676941 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -13745,9 +13723,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.atan f32.const -0.386186420917511 f32.const 0.18169628083705902 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -13758,9 +13737,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.atan f32.const 0.5118269920349121 f32.const 0.3499770760536194 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -13771,9 +13751,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.atan f32.const 0.6587802171707153 f32.const -0.2505330741405487 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -13784,9 +13765,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.atan f32.const -0.5963307619094849 f32.const 0.17614826560020447 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -13797,9 +13779,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.atan f32.const 0 f32.const 0 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -13810,9 +13793,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.atan f32.const -0 f32.const 0 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -13823,9 +13807,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.atan f32.const 0.7853981852531433 f32.const 0.3666777014732361 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -13836,9 +13821,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.atan f32.const -0.7853981852531433 f32.const -0.3666777014732361 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -13849,9 +13835,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.atan f32.const 1.5707963705062866 f32.const 0.3666777014732361 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -13862,9 +13849,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.atan f32.const -1.5707963705062866 f32.const -0.3666777014732361 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -13875,9 +13863,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.atan f32.const nan:0x400000 f32.const 0 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -15073,9 +15062,10 @@ end f32.const -8.066848754882812 f32.const 4.535662651062012 + call $~lib/math/NativeMathf.atan2 f32.const -1.0585895776748657 f32.const -0.22352588176727295 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15087,9 +15077,10 @@ end f32.const 4.345239639282227 f32.const -8.887990951538086 + call $~lib/math/NativeMathf.atan2 f32.const 2.686873435974121 f32.const 0.09464472532272339 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15101,9 +15092,10 @@ end f32.const -8.381433486938477 f32.const -2.7636072635650635 + call $~lib/math/NativeMathf.atan2 f32.const -1.8893001079559326 f32.const -0.21941901743412018 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15115,9 +15107,10 @@ end f32.const -6.531673431396484 f32.const 4.567535400390625 + call $~lib/math/NativeMathf.atan2 f32.const -0.9605468511581421 f32.const 0.46015575528144836 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15129,9 +15122,10 @@ end f32.const 9.267057418823242 f32.const 4.811392307281494 + call $~lib/math/NativeMathf.atan2 f32.const 1.0919123888015747 f32.const -0.05708503723144531 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15143,9 +15137,10 @@ end f32.const -6.450045585632324 f32.const 0.6620717644691467 + call $~lib/math/NativeMathf.atan2 f32.const -1.4685084819793701 f32.const 0.19611206650733948 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15157,9 +15152,10 @@ end f32.const 7.858890056610107 f32.const 0.052154526114463806 + call $~lib/math/NativeMathf.atan2 f32.const 1.5641601085662842 f32.const 0.48143187165260315 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15171,9 +15167,10 @@ end f32.const -0.7920545339584351 f32.const 7.676402568817139 + call $~lib/math/NativeMathf.atan2 f32.const -0.10281659662723541 f32.const -0.4216274917125702 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15185,9 +15182,10 @@ end f32.const 0.6157026886940002 f32.const 2.0119025707244873 + call $~lib/math/NativeMathf.atan2 f32.const 0.29697975516319275 f32.const 0.2322007566690445 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15199,9 +15197,10 @@ end f32.const -0.5587586760520935 f32.const 0.03223983198404312 + call $~lib/math/NativeMathf.atan2 f32.const -1.5131611824035645 f32.const 0.16620726883411407 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15213,9 +15212,10 @@ end f32.const 0 f32.const 0 + call $~lib/math/NativeMathf.atan2 f32.const 0 f32.const 0 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15227,9 +15227,10 @@ end f32.const 0 f32.const -0 + call $~lib/math/NativeMathf.atan2 f32.const 3.1415927410125732 f32.const 0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15241,9 +15242,10 @@ end f32.const 0 f32.const -1 + call $~lib/math/NativeMathf.atan2 f32.const 3.1415927410125732 f32.const 0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15255,9 +15257,10 @@ end f32.const 0 f32.const -inf + call $~lib/math/NativeMathf.atan2 f32.const 3.1415927410125732 f32.const 0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15269,9 +15272,10 @@ end f32.const 0 f32.const 1 + call $~lib/math/NativeMathf.atan2 f32.const 0 f32.const 0 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15283,9 +15287,10 @@ end f32.const 0 f32.const inf + call $~lib/math/NativeMathf.atan2 f32.const 0 f32.const 0 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15297,9 +15302,10 @@ end f32.const -0 f32.const 0 + call $~lib/math/NativeMathf.atan2 f32.const -0 f32.const 0 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15311,9 +15317,10 @@ end f32.const -0 f32.const -0 + call $~lib/math/NativeMathf.atan2 f32.const -3.1415927410125732 f32.const -0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15325,9 +15332,10 @@ end f32.const -0 f32.const -1 + call $~lib/math/NativeMathf.atan2 f32.const -3.1415927410125732 f32.const -0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15339,9 +15347,10 @@ end f32.const -0 f32.const -inf + call $~lib/math/NativeMathf.atan2 f32.const -3.1415927410125732 f32.const -0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15353,9 +15362,10 @@ end f32.const -0 f32.const 1 + call $~lib/math/NativeMathf.atan2 f32.const -0 f32.const 0 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15367,9 +15377,10 @@ end f32.const -0 f32.const inf + call $~lib/math/NativeMathf.atan2 f32.const -0 f32.const 0 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15381,9 +15392,10 @@ end f32.const -1 f32.const 0 + call $~lib/math/NativeMathf.atan2 f32.const -1.5707963705062866 f32.const -0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15395,9 +15407,10 @@ end f32.const -1 f32.const -0 + call $~lib/math/NativeMathf.atan2 f32.const -1.5707963705062866 f32.const -0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15409,9 +15422,10 @@ end f32.const 1 f32.const 0 + call $~lib/math/NativeMathf.atan2 f32.const 1.5707963705062866 f32.const 0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15423,9 +15437,10 @@ end f32.const 1 f32.const -0 + call $~lib/math/NativeMathf.atan2 f32.const 1.5707963705062866 f32.const 0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15437,9 +15452,10 @@ end f32.const -1 f32.const inf + call $~lib/math/NativeMathf.atan2 f32.const -0 f32.const 0 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15451,9 +15467,10 @@ end f32.const 1 f32.const inf + call $~lib/math/NativeMathf.atan2 f32.const 0 f32.const 0 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15465,9 +15482,10 @@ end f32.const -1 f32.const -inf + call $~lib/math/NativeMathf.atan2 f32.const -3.1415927410125732 f32.const -0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15479,9 +15497,10 @@ end f32.const 1 f32.const -inf + call $~lib/math/NativeMathf.atan2 f32.const 3.1415927410125732 f32.const 0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15493,9 +15512,10 @@ end f32.const inf f32.const 0 + call $~lib/math/NativeMathf.atan2 f32.const 1.5707963705062866 f32.const 0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15507,9 +15527,10 @@ end f32.const -inf f32.const 0 + call $~lib/math/NativeMathf.atan2 f32.const -1.5707963705062866 f32.const -0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15521,9 +15542,10 @@ end f32.const inf f32.const inf + call $~lib/math/NativeMathf.atan2 f32.const 0.7853981852531433 f32.const 0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15535,9 +15557,10 @@ end f32.const inf f32.const -inf + call $~lib/math/NativeMathf.atan2 f32.const 2.356194496154785 f32.const 0.02500828728079796 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15549,9 +15572,10 @@ end f32.const -inf f32.const inf + call $~lib/math/NativeMathf.atan2 f32.const -0.7853981852531433 f32.const -0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15563,9 +15587,10 @@ end f32.const -inf f32.const -inf + call $~lib/math/NativeMathf.atan2 f32.const -2.356194496154785 f32.const -0.02500828728079796 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15577,9 +15602,10 @@ end f32.const 5.877471754111438e-39 f32.const 1 + call $~lib/math/NativeMathf.atan2 f32.const 5.877471754111438e-39 f32.const 0 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15591,9 +15617,10 @@ end f32.const 1 f32.const 1701411834604692317316873e14 + call $~lib/math/NativeMathf.atan2 f32.const 5.877471754111438e-39 f32.const 0 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -15864,9 +15891,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.cbrt f32.const -2.0055553913116455 f32.const -0.44719240069389343 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -15877,9 +15905,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.cbrt f32.const 1.6318162679672241 f32.const 0.44636252522468567 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -15890,9 +15919,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.cbrt f32.const -2.0312938690185547 f32.const 0.19483426213264465 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -15903,9 +15933,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.cbrt f32.const -1.8692820072174072 f32.const -0.17075514793395996 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -15916,9 +15947,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.cbrt f32.const 2.1004576683044434 f32.const -0.36362043023109436 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -15929,9 +15961,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.cbrt f32.const 0.8715311288833618 f32.const -0.12857209146022797 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -15942,9 +15975,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.cbrt f32.const -0.7408390641212463 f32.const -0.4655757546424866 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -15955,9 +15989,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.cbrt f32.const 0.8251195549964905 f32.const 0.05601907894015312 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -15968,9 +16003,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.cbrt f32.const 0.9182102680206299 f32.const 0.45498204231262207 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -15981,9 +16017,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.cbrt f32.const -0.8788326978683472 f32.const -0.22978967428207397 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -15994,9 +16031,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.cbrt f32.const nan:0x400000 f32.const 0 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -16007,9 +16045,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.cbrt f32.const inf f32.const 0 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -16020,9 +16059,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.cbrt f32.const -inf f32.const 0 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -16033,9 +16073,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.cbrt f32.const 0 f32.const 0 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -16046,9 +16087,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.cbrt f32.const -0 f32.const 0 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -16059,9 +16101,10 @@ unreachable end f32.const 9.313225746154785e-10 + call $~lib/math/NativeMathf.cbrt f32.const 0.0009765625 f32.const 0 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -16072,9 +16115,10 @@ unreachable end f32.const -9.313225746154785e-10 + call $~lib/math/NativeMathf.cbrt f32.const -0.0009765625 f32.const 0 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -16085,9 +16129,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.cbrt f32.const 1 f32.const 0 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -16098,9 +16143,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.cbrt f32.const -1 f32.const 0 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -16111,9 +16157,10 @@ unreachable end f32.const 8 + call $~lib/math/NativeMathf.cbrt f32.const 2 f32.const 0 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -16783,9 +16830,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.066848754882812 f32.const -8 - call $std/math/test_ceilf + f32.const -8 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -16795,9 +16843,10 @@ call $~lib/builtins/abort unreachable end - f32.const 4.345239639282227 f32.const 5 - call $std/math/test_ceilf + f32.const 5 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -16807,9 +16856,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.381433486938477 f32.const -8 - call $std/math/test_ceilf + f32.const -8 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -16819,9 +16869,10 @@ call $~lib/builtins/abort unreachable end - f32.const -6.531673431396484 f32.const -6 - call $std/math/test_ceilf + f32.const -6 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -16831,9 +16882,10 @@ call $~lib/builtins/abort unreachable end - f32.const 9.267057418823242 f32.const 10 - call $std/math/test_ceilf + f32.const 10 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -16843,9 +16895,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.6619858741760254 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -16855,9 +16908,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.40660393238067627 f32.const -0 - call $std/math/test_ceilf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -16867,9 +16921,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5617597699165344 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -16879,9 +16934,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.7741522789001465 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -16891,9 +16947,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.6787636876106262 f32.const -0 - call $std/math/test_ceilf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -16905,7 +16962,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -16917,7 +16975,8 @@ end f32.const inf f32.const inf - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -16929,7 +16988,8 @@ end f32.const -inf f32.const -inf - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -16941,7 +17001,8 @@ end f32.const 0 f32.const 0 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -16953,7 +17014,8 @@ end f32.const -0 f32.const -0 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -16965,7 +17027,8 @@ end f32.const 1 f32.const 1 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -16977,7 +17040,8 @@ end f32.const -1 f32.const -1 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -16987,9 +17051,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -16999,9 +17064,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.5 f32.const -0 - call $std/math/test_ceilf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17011,9 +17077,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.0000152587890625 f32.const 2 - call $std/math/test_ceilf + f32.const 2 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17023,9 +17090,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1.0000152587890625 f32.const -1 - call $std/math/test_ceilf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17035,9 +17103,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.9999923706054688 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17047,9 +17116,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.9999923706054688 f32.const -0 - call $std/math/test_ceilf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17059,9 +17129,10 @@ call $~lib/builtins/abort unreachable end - f32.const 7.888609052210118e-31 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17071,9 +17142,10 @@ call $~lib/builtins/abort unreachable end - f32.const -7.888609052210118e-31 f32.const -0 - call $std/math/test_ceilf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17085,7 +17157,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17097,7 +17170,8 @@ end f32.const inf f32.const inf - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17109,7 +17183,8 @@ end f32.const -inf f32.const -inf - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17121,7 +17196,8 @@ end f32.const 0 f32.const 0 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17133,7 +17209,8 @@ end f32.const -0 f32.const -0 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17145,7 +17222,8 @@ end f32.const 1 f32.const 1 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17157,7 +17235,8 @@ end f32.const -1 f32.const -1 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17167,9 +17246,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17179,9 +17259,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.5 f32.const -0 - call $std/math/test_ceilf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17191,9 +17272,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.0000152587890625 f32.const 2 - call $std/math/test_ceilf + f32.const 2 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17203,9 +17285,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1.0000152587890625 f32.const -1 - call $std/math/test_ceilf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17215,9 +17298,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.9999923706054688 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17227,9 +17311,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.9999923706054688 f32.const -0 - call $std/math/test_ceilf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17239,9 +17324,10 @@ call $~lib/builtins/abort unreachable end - f32.const 7.888609052210118e-31 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17251,9 +17337,10 @@ call $~lib/builtins/abort unreachable end - f32.const -7.888609052210118e-31 f32.const -0 - call $std/math/test_ceilf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17265,7 +17352,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17277,7 +17365,8 @@ end f32.const inf f32.const inf - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17289,7 +17378,8 @@ end f32.const -inf f32.const -inf - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17301,7 +17391,8 @@ end f32.const 0 f32.const 0 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17313,7 +17404,8 @@ end f32.const -0 f32.const -0 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17325,7 +17417,8 @@ end f32.const 1 f32.const 1 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17337,7 +17430,8 @@ end f32.const -1 f32.const -1 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17347,9 +17441,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17359,9 +17454,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.5 f32.const -0 - call $std/math/test_ceilf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17371,9 +17467,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.0000152587890625 f32.const 2 - call $std/math/test_ceilf + f32.const 2 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17383,9 +17480,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1.0000152587890625 f32.const -1 - call $std/math/test_ceilf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17395,9 +17493,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.9999923706054688 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17407,9 +17506,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.9999923706054688 f32.const -0 - call $std/math/test_ceilf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17419,9 +17519,10 @@ call $~lib/builtins/abort unreachable end - f32.const 7.888609052210118e-31 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -17431,9 +17532,10 @@ call $~lib/builtins/abort unreachable end - f32.const -7.888609052210118e-31 f32.const -0 - call $std/math/test_ceilf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -21157,9 +21259,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.exp f32.const 3.1377049162983894e-04 f32.const -0.030193336308002472 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21170,9 +21273,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.exp f32.const 77.11051177978516 f32.const -0.2875460684299469 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21183,9 +21287,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.exp f32.const 2.2908132814336568e-04 f32.const 0.2237040400505066 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21196,9 +21301,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.exp f32.const 1.4565663877874613e-03 f32.const 0.36469703912734985 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21209,9 +21315,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.exp f32.const 10583.5634765625 f32.const 0.45962104201316833 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21222,9 +21329,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.exp f32.const 1.93863844871521 f32.const 0.3568260967731476 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21235,9 +21343,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.exp f32.const 0.6659078598022461 f32.const -0.38294991850852966 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21248,9 +21357,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.exp f32.const 1.753756046295166 f32.const 0.44355490803718567 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21261,9 +21371,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.exp f32.const 2.168752908706665 f32.const 0.24562469124794006 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21274,9 +21385,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.exp f32.const 0.5072436928749084 f32.const -0.3974292278289795 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21287,9 +21399,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.exp f32.const 1 f32.const 0 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21300,9 +21413,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.exp f32.const 1 f32.const 0 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21313,9 +21427,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.exp f32.const 2.7182817459106445 f32.const -0.3462330996990204 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21326,9 +21441,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.exp f32.const 0.3678794503211975 f32.const 0.3070148527622223 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21339,9 +21455,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.exp f32.const inf f32.const 0 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21352,9 +21469,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.exp f32.const 0 f32.const 0 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21365,9 +21483,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.exp f32.const nan:0x400000 f32.const 0 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21378,9 +21497,10 @@ unreachable end f32.const 88.72283172607422 + call $~lib/math/NativeMathf.exp f32.const 340279851902147610656242e15 f32.const -0.09067153930664062 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21391,9 +21511,10 @@ unreachable end f32.const 88.72283935546875 + call $~lib/math/NativeMathf.exp f32.const inf f32.const 0 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21404,9 +21525,10 @@ unreachable end f32.const -103.97207641601562 + call $~lib/math/NativeMathf.exp f32.const 1.401298464324817e-45 f32.const 0.49999967217445374 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21417,9 +21539,10 @@ unreachable end f32.const -103.97208404541016 + call $~lib/math/NativeMathf.exp f32.const 0 f32.const -0.49999651312828064 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21430,9 +21553,10 @@ unreachable end f32.const 0.3465735614299774 + call $~lib/math/NativeMathf.exp f32.const 1.4142135381698608 f32.const 0.13922421634197235 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21443,9 +21567,10 @@ unreachable end f32.const 0.3465735912322998 + call $~lib/math/NativeMathf.exp f32.const 1.4142135381698608 f32.const -0.21432916820049286 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21456,9 +21581,10 @@ unreachable end f32.const 0.3465736210346222 + call $~lib/math/NativeMathf.exp f32.const 1.4142136573791504 f32.const 0.43211743235588074 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -21716,9 +21842,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.expm1 f32.const -0.9996862411499023 f32.const -0.19532723724842072 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -21729,9 +21856,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.expm1 f32.const 76.11051177978516 f32.const -0.2875460684299469 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -21742,9 +21870,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.expm1 f32.const -0.9997709393501282 f32.const -0.34686920046806335 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -21755,9 +21884,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.expm1 f32.const -0.9985434412956238 f32.const -0.1281939446926117 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -21768,9 +21898,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.expm1 f32.const 10582.5634765625 f32.const 0.45962104201316833 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -21781,9 +21912,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.expm1 f32.const 0.9386383891105652 f32.const -0.28634780645370483 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -21794,9 +21926,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.expm1 f32.const -0.3340921103954315 f32.const 0.23410017788410187 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -21807,9 +21940,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.expm1 f32.const 0.7537559866905212 f32.const -0.11289017647504807 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -21820,9 +21954,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.expm1 f32.const 1.168752908706665 f32.const 0.4912493824958801 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -21833,9 +21968,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.expm1 f32.const -0.49275627732276917 f32.const 0.20514154434204102 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -21846,9 +21982,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.expm1 f32.const 0 f32.const 0 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -21859,9 +21996,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.expm1 f32.const -0 f32.const 0 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -21872,9 +22010,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.expm1 f32.const 1.718281865119934 f32.const 0.3075338304042816 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -21885,9 +22024,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.expm1 f32.const -0.6321205496788025 f32.const 0.15350742638111115 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -21898,9 +22038,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.expm1 f32.const inf f32.const 0 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -21911,9 +22052,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.expm1 f32.const -1 f32.const 0 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -21924,9 +22066,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.expm1 f32.const nan:0x400000 f32.const 0 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -22392,9 +22535,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/util/math/exp2f_lut f32.const 3.7293792702257633e-03 f32.const -0.0674908235669136 - call $std/math/test_exp2f + call $std/math/check i32.eqz if i32.const 0 @@ -22405,9 +22549,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/util/math/exp2f_lut f32.const 20.32579231262207 f32.const 0.34121403098106384 - call $std/math/test_exp2f + call $std/math/check i32.eqz if i32.const 0 @@ -22418,9 +22563,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/util/math/exp2f_lut f32.const 2.9987283051013947e-03 f32.const 0.15504619479179382 - call $std/math/test_exp2f + call $std/math/check i32.eqz if i32.const 0 @@ -22431,9 +22577,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/util/math/exp2f_lut f32.const 0.010808623395860195 f32.const 0.2603940963745117 - call $std/math/test_exp2f + call $std/math/check i32.eqz if i32.const 0 @@ -22444,9 +22591,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/util/math/exp2f_lut f32.const 616.1156616210938 f32.const -0.1379322111606598 - call $std/math/test_exp2f + call $std/math/check i32.eqz if i32.const 0 @@ -22457,9 +22605,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/util/math/exp2f_lut f32.const 1.5822590589523315 f32.const -0.427890807390213 - call $std/math/test_exp2f + call $std/math/check i32.eqz if i32.const 0 @@ -22470,9 +22619,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/util/math/exp2f_lut f32.const 0.7543970942497253 f32.const -0.38062313199043274 - call $std/math/test_exp2f + call $std/math/check i32.eqz if i32.const 0 @@ -22483,9 +22633,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/util/math/exp2f_lut f32.const 1.4760686159133911 f32.const 0.1507442593574524 - call $std/math/test_exp2f + call $std/math/check i32.eqz if i32.const 0 @@ -22496,9 +22647,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/util/math/exp2f_lut f32.const 1.7101848125457764 f32.const -0.39102980494499207 - call $std/math/test_exp2f + call $std/math/check i32.eqz if i32.const 0 @@ -22509,9 +22661,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/util/math/exp2f_lut f32.const 0.6247003674507141 f32.const -0.20904375612735748 - call $std/math/test_exp2f + call $std/math/check i32.eqz if i32.const 0 @@ -22821,9 +22974,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.066848754882812 f32.const -9 - call $std/math/test_floorf + f32.const -9 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -22833,9 +22987,10 @@ call $~lib/builtins/abort unreachable end - f32.const 4.345239639282227 f32.const 4 - call $std/math/test_floorf + f32.const 4 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -22845,9 +23000,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.381433486938477 f32.const -9 - call $std/math/test_floorf + f32.const -9 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -22857,9 +23013,10 @@ call $~lib/builtins/abort unreachable end - f32.const -6.531673431396484 f32.const -7 - call $std/math/test_floorf + f32.const -7 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -22869,9 +23026,10 @@ call $~lib/builtins/abort unreachable end - f32.const 9.267057418823242 f32.const 9 - call $std/math/test_floorf + f32.const 9 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -22881,9 +23039,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.6619858741760254 f32.const 0 - call $std/math/test_floorf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -22893,9 +23052,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.40660393238067627 f32.const -1 - call $std/math/test_floorf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -22905,9 +23065,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5617597699165344 f32.const 0 - call $std/math/test_floorf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -22917,9 +23078,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.7741522789001465 f32.const 0 - call $std/math/test_floorf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -22929,9 +23091,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.6787636876106262 f32.const -1 - call $std/math/test_floorf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -22943,7 +23106,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_floorf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -22955,7 +23119,8 @@ end f32.const inf f32.const inf - call $std/math/test_floorf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -22967,7 +23132,8 @@ end f32.const -inf f32.const -inf - call $std/math/test_floorf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -22979,7 +23145,8 @@ end f32.const 0 f32.const 0 - call $std/math/test_floorf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -22991,7 +23158,8 @@ end f32.const -0 f32.const -0 - call $std/math/test_floorf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -23003,7 +23171,8 @@ end f32.const 1 f32.const 1 - call $std/math/test_floorf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -23015,7 +23184,8 @@ end f32.const -1 f32.const -1 - call $std/math/test_floorf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -23025,9 +23195,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5 f32.const 0 - call $std/math/test_floorf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -23037,9 +23208,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.5 f32.const -1 - call $std/math/test_floorf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -23049,9 +23221,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.0000152587890625 f32.const 1 - call $std/math/test_floorf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -23061,9 +23234,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1.0000152587890625 f32.const -2 - call $std/math/test_floorf + f32.const -2 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -23073,9 +23247,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.9999923706054688 f32.const 0 - call $std/math/test_floorf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -23085,9 +23260,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.9999923706054688 f32.const -1 - call $std/math/test_floorf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -23097,9 +23273,10 @@ call $~lib/builtins/abort unreachable end - f32.const 7.888609052210118e-31 f32.const 0 - call $std/math/test_floorf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -23109,9 +23286,10 @@ call $~lib/builtins/abort unreachable end - f32.const -7.888609052210118e-31 f32.const -1 - call $std/math/test_floorf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -23123,9 +23301,10 @@ end f64.const -8.06684839057968 f64.const 4.535662560676869 + call $~lib/math/NativeMath.hypot f64.const 9.25452742288464 f64.const -0.31188681721687317 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23137,9 +23316,10 @@ end f64.const 4.345239849338305 f64.const -8.88799136300345 + call $~lib/math/NativeMath.hypot f64.const 9.893305808328252 f64.const 0.4593673348426819 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23151,9 +23331,10 @@ end f64.const -8.38143342755525 f64.const -2.763607337379588 + call $~lib/math/NativeMath.hypot f64.const 8.825301797432132 f64.const -0.1701754331588745 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23165,9 +23346,10 @@ end f64.const -6.531673581913484 f64.const 4.567535276842744 + call $~lib/math/NativeMath.hypot f64.const 7.970265885519092 f64.const -0.3176782727241516 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23179,9 +23361,10 @@ end f64.const 9.267056966972586 f64.const 4.811392084359796 + call $~lib/math/NativeMath.hypot f64.const 10.441639651824575 f64.const -0.2693633437156677 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23193,9 +23376,10 @@ end f64.const -6.450045556060236 f64.const 0.6620717923376739 + call $~lib/math/NativeMath.hypot f64.const 6.483936052542593 f64.const 0.35618898272514343 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23207,9 +23391,10 @@ end f64.const 7.858890253041697 f64.const 0.05215452675006225 + call $~lib/math/NativeMath.hypot f64.const 7.859063309581766 f64.const 0.08044655621051788 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23221,9 +23406,10 @@ end f64.const -0.792054511984896 f64.const 7.67640268511754 + call $~lib/math/NativeMath.hypot f64.const 7.717156764899584 f64.const 0.05178084969520569 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23235,9 +23421,10 @@ end f64.const 0.615702673197924 f64.const 2.0119025790324803 + call $~lib/math/NativeMath.hypot f64.const 2.104006123874314 f64.const -0.0918039008975029 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23249,9 +23436,10 @@ end f64.const -0.5587586823609152 f64.const 0.03223983060263804 + call $~lib/math/NativeMath.hypot f64.const 0.5596880129062913 f64.const 0.1383407711982727 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23263,9 +23451,10 @@ end f64.const 3 f64.const 4 + call $~lib/math/NativeMath.hypot f64.const 5 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23277,9 +23466,10 @@ end f64.const -3 f64.const 4 + call $~lib/math/NativeMath.hypot f64.const 5 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23291,9 +23481,10 @@ end f64.const 4 f64.const 3 + call $~lib/math/NativeMath.hypot f64.const 5 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23305,9 +23496,10 @@ end f64.const 4 f64.const -3 + call $~lib/math/NativeMath.hypot f64.const 5 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23319,9 +23511,10 @@ end f64.const -3 f64.const -4 + call $~lib/math/NativeMath.hypot f64.const 5 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23333,9 +23526,10 @@ end f64.const 1797693134862315708145274e284 f64.const 0 + call $~lib/math/NativeMath.hypot f64.const 1797693134862315708145274e284 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23347,9 +23541,10 @@ end f64.const 1797693134862315708145274e284 f64.const -0 + call $~lib/math/NativeMath.hypot f64.const 1797693134862315708145274e284 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23361,9 +23556,10 @@ end f64.const 5e-324 f64.const 0 + call $~lib/math/NativeMath.hypot f64.const 5e-324 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23375,9 +23571,10 @@ end f64.const 5e-324 f64.const -0 + call $~lib/math/NativeMath.hypot f64.const 5e-324 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23389,9 +23586,10 @@ end f64.const inf f64.const 1 + call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23403,9 +23601,10 @@ end f64.const 1 f64.const inf + call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23417,9 +23616,10 @@ end f64.const inf f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23431,9 +23631,10 @@ end f64.const nan:0x8000000000000 f64.const inf + call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23445,9 +23646,10 @@ end f64.const -inf f64.const 1 + call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23459,9 +23661,10 @@ end f64.const 1 f64.const -inf + call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23473,9 +23676,10 @@ end f64.const -inf f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23487,9 +23691,10 @@ end f64.const nan:0x8000000000000 f64.const -inf + call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23501,9 +23706,10 @@ end f64.const nan:0x8000000000000 f64.const 1 + call $~lib/math/NativeMath.hypot f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23515,9 +23721,10 @@ end f64.const 1 f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.hypot f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23529,9 +23736,10 @@ end f64.const nan:0x8000000000000 f64.const 0 + call $~lib/math/NativeMath.hypot f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23543,9 +23751,10 @@ end f64.const 0 f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.hypot f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -23557,9 +23766,10 @@ end f32.const -8.066848754882812 f32.const 4.535662651062012 + call $~lib/math/NativeMathf.hypot f32.const 9.254528045654297 f32.const 0.2735958993434906 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23571,9 +23781,10 @@ end f32.const 4.345239639282227 f32.const -8.887990951538086 + call $~lib/math/NativeMathf.hypot f32.const 9.893305778503418 f32.const 0.4530770778656006 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23585,9 +23796,10 @@ end f32.const -8.381433486938477 f32.const -2.7636072635650635 + call $~lib/math/NativeMathf.hypot f32.const 8.825302124023438 f32.const 0.30755728483200073 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23599,9 +23811,10 @@ end f32.const -6.531673431396484 f32.const 4.567535400390625 + call $~lib/math/NativeMathf.hypot f32.const 7.970265865325928 f32.const 0.06785223633050919 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23613,9 +23826,10 @@ end f32.const 9.267057418823242 f32.const 4.811392307281494 + call $~lib/math/NativeMathf.hypot f32.const 10.44163990020752 f32.const -0.26776307821273804 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23627,9 +23841,10 @@ end f32.const -6.450045585632324 f32.const 0.6620717644691467 + call $~lib/math/NativeMathf.hypot f32.const 6.483936309814453 f32.const 0.48381292819976807 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23641,9 +23856,10 @@ end f32.const 7.858890056610107 f32.const 0.052154526114463806 + call $~lib/math/NativeMathf.hypot f32.const 7.859063148498535 f32.const 0.07413065433502197 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23655,9 +23871,10 @@ end f32.const -0.7920545339584351 f32.const 7.676402568817139 + call $~lib/math/NativeMathf.hypot f32.const 7.717156887054443 f32.const 0.4940592646598816 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23669,9 +23886,10 @@ end f32.const 0.6157026886940002 f32.const 2.0119025707244873 + call $~lib/math/NativeMathf.hypot f32.const 2.104006052017212 f32.const -0.287089467048645 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23683,9 +23901,10 @@ end f32.const -0.5587586760520935 f32.const 0.03223983198404312 + call $~lib/math/NativeMathf.hypot f32.const 0.5596880316734314 f32.const 0.4191940724849701 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23697,9 +23916,10 @@ end f32.const 3 f32.const 4 + call $~lib/math/NativeMathf.hypot f32.const 5 f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23711,9 +23931,10 @@ end f32.const -3 f32.const 4 + call $~lib/math/NativeMathf.hypot f32.const 5 f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23725,9 +23946,10 @@ end f32.const 4 f32.const 3 + call $~lib/math/NativeMathf.hypot f32.const 5 f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23739,9 +23961,10 @@ end f32.const 4 f32.const -3 + call $~lib/math/NativeMathf.hypot f32.const 5 f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23753,9 +23976,10 @@ end f32.const -3 f32.const -4 + call $~lib/math/NativeMathf.hypot f32.const 5 f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23767,9 +23991,10 @@ end f32.const 3402823466385288598117041e14 f32.const 0 + call $~lib/math/NativeMathf.hypot f32.const 3402823466385288598117041e14 f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23781,9 +24006,10 @@ end f32.const 3402823466385288598117041e14 f32.const -0 + call $~lib/math/NativeMathf.hypot f32.const 3402823466385288598117041e14 f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23795,9 +24021,10 @@ end f32.const 1.401298464324817e-45 f32.const 0 + call $~lib/math/NativeMathf.hypot f32.const 1.401298464324817e-45 f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23809,9 +24036,10 @@ end f32.const 1.401298464324817e-45 f32.const -0 + call $~lib/math/NativeMathf.hypot f32.const 1.401298464324817e-45 f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23823,9 +24051,10 @@ end f32.const inf f32.const 1 + call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23837,9 +24066,10 @@ end f32.const 1 f32.const inf + call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23851,9 +24081,10 @@ end f32.const inf f32.const nan:0x400000 + call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23865,9 +24096,10 @@ end f32.const nan:0x400000 f32.const inf + call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23879,9 +24111,10 @@ end f32.const -inf f32.const 1 + call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23893,9 +24126,10 @@ end f32.const 1 f32.const -inf + call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23907,9 +24141,10 @@ end f32.const -inf f32.const nan:0x400000 + call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23921,9 +24156,10 @@ end f32.const nan:0x400000 f32.const -inf + call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23935,9 +24171,10 @@ end f32.const nan:0x400000 f32.const 1 + call $~lib/math/NativeMathf.hypot f32.const nan:0x400000 f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -23949,9 +24186,10 @@ end f32.const 1 f32.const nan:0x400000 + call $~lib/math/NativeMathf.hypot f32.const nan:0x400000 f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -24196,8 +24434,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.log f32.const -inf - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24208,8 +24448,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.log f32.const -inf - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24220,8 +24462,10 @@ unreachable end f32.const -7.888609052210118e-31 + call $~lib/math/NativeMathf.log f32.const nan:0x400000 - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24232,8 +24476,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.log f32.const 0 - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24244,8 +24490,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.log f32.const nan:0x400000 - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24256,8 +24504,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.log f32.const inf - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24268,8 +24518,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.log f32.const nan:0x400000 - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24280,8 +24532,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.log f32.const nan:0x400000 - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24292,8 +24546,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.log f32.const -inf - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24304,8 +24560,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.log f32.const -inf - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24316,8 +24574,10 @@ unreachable end f32.const -7.888609052210118e-31 + call $~lib/math/NativeMathf.log f32.const nan:0x400000 - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24328,8 +24588,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.log f32.const 0 - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24340,8 +24602,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.log f32.const nan:0x400000 - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24352,8 +24616,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.log f32.const inf - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24364,8 +24630,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.log f32.const nan:0x400000 - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24376,8 +24644,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.log f32.const nan:0x400000 - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24622,9 +24892,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -24635,9 +24906,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.log10 f32.const 0.6380137205123901 f32.const -0.20476758480072021 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -24648,9 +24920,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -24661,9 +24934,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -24674,9 +24948,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.log10 f32.const 0.9669418334960938 f32.const -0.34273025393486023 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -24687,9 +24962,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.log10 f32.const -0.1791512817144394 f32.const -0.27078554034233093 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -24700,9 +24976,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -24713,9 +24990,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.log10 f32.const -0.25044935941696167 f32.const 0.2126826047897339 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -24726,9 +25004,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.log10 f32.const -0.1111735999584198 f32.const 0.46515095233917236 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -24739,9 +25018,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -24752,9 +25032,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.log10 f32.const -inf f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -24765,9 +25046,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.log10 f32.const -inf f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -24778,9 +25060,10 @@ unreachable end f32.const -7.888609052210118e-31 + call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -24791,9 +25074,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.log10 f32.const 0 f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -24804,9 +25088,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -24817,9 +25102,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.log10 f32.const inf f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -24830,9 +25116,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -24843,9 +25130,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -25090,9 +25378,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.log1p f32.const nan:0x400000 f32.const 0 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -25103,9 +25392,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.log1p f32.const 1.676206350326538 f32.const -0.23014859855175018 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -25116,9 +25406,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.log1p f32.const nan:0x400000 f32.const 0 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -25129,9 +25420,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.log1p f32.const nan:0x400000 f32.const 0 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -25142,9 +25434,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.log1p f32.const 2.3289403915405273 f32.const -0.29075589776039124 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -25155,9 +25448,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.log1p f32.const 0.5080131888389587 f32.const -0.1386766880750656 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -25168,9 +25462,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.log1p f32.const -0.5218932032585144 f32.const -0.08804433047771454 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -25181,9 +25476,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.log1p f32.const 0.44581323862075806 f32.const -0.15101368725299835 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -25194,9 +25490,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.log1p f32.const 0.5733227133750916 f32.const -0.10264533013105392 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -25207,9 +25504,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.log1p f32.const -1.1355782747268677 f32.const -0.19879481196403503 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -25220,9 +25518,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.log1p f32.const 0 f32.const 0 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -25233,9 +25532,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.log1p f32.const -0 f32.const 0 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -25246,9 +25546,10 @@ unreachable end f32.const -7.888609052210118e-31 + call $~lib/math/NativeMathf.log1p f32.const -7.888609052210118e-31 f32.const 3.308722450212111e-24 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -25259,9 +25560,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.log1p f32.const 0.6931471824645996 f32.const 0.031954795122146606 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -25272,9 +25574,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.log1p f32.const -inf f32.const 0 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -25285,9 +25588,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.log1p f32.const inf f32.const 0 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -25298,9 +25602,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.log1p f32.const nan:0x400000 f32.const 0 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -25311,9 +25616,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.log1p f32.const nan:0x400000 f32.const 0 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -25324,9 +25630,10 @@ unreachable end f32.const -1.1754942106924411e-38 + call $~lib/math/NativeMathf.log1p f32.const -1.1754942106924411e-38 f32.const 4.930380657631324e-32 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -25571,9 +25878,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -25584,9 +25892,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.log2 f32.const 2.1194357872009277 f32.const 0.18271538615226746 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -25597,9 +25906,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -25610,9 +25920,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -25623,9 +25934,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.log2 f32.const 3.212111234664917 f32.const -0.3188050389289856 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -25636,9 +25948,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.log2 f32.const -0.5951276421546936 f32.const 0.34231460094451904 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -25649,9 +25962,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -25662,9 +25976,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.log2 f32.const -0.8319748044013977 f32.const -0.33473604917526245 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -25675,9 +25990,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.log2 f32.const -0.3693107068538666 f32.const 0.3278401792049408 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -25688,9 +26004,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -25701,9 +26018,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.log2 f32.const -inf f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -25714,9 +26032,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.log2 f32.const -inf f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -25727,9 +26046,10 @@ unreachable end f32.const -7.888609052210118e-31 + call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -25740,9 +26060,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.log2 f32.const 0 f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -25753,9 +26074,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -25766,9 +26088,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.log2 f32.const inf f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -25779,9 +26102,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -25792,9 +26116,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -26688,10 +27013,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.066848754882812 f32.const 4.535662651062012 f32.const 4.535662651062012 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26702,9 +27027,9 @@ unreachable end f32.const 4.345239639282227 - f32.const -8.887990951538086 f32.const 4.345239639282227 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26714,10 +27039,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.381433486938477 f32.const -2.7636072635650635 f32.const -2.7636072635650635 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26727,10 +27052,10 @@ call $~lib/builtins/abort unreachable end - f32.const -6.531673431396484 f32.const 4.567535400390625 f32.const 4.567535400390625 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26741,9 +27066,9 @@ unreachable end f32.const 9.267057418823242 - f32.const 4.811392307281494 f32.const 9.267057418823242 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26753,10 +27078,10 @@ call $~lib/builtins/abort unreachable end - f32.const -6.450045585632324 f32.const 0.6620717644691467 f32.const 0.6620717644691467 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26767,9 +27092,9 @@ unreachable end f32.const 7.858890056610107 - f32.const 0.052154526114463806 f32.const 7.858890056610107 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26779,10 +27104,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.7920545339584351 f32.const 7.676402568817139 f32.const 7.676402568817139 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26792,10 +27117,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.6157026886940002 f32.const 2.0119025707244873 f32.const 2.0119025707244873 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26805,10 +27130,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.5587586760520935 f32.const 0.03223983198404312 f32.const 0.03223983198404312 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26818,10 +27143,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0 f32.const 1 f32.const 1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26831,10 +27156,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0 f32.const 1 f32.const 1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26844,10 +27169,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5 f32.const 1 f32.const 1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26857,10 +27182,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.5 f32.const 1 f32.const 1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26872,8 +27197,8 @@ end f32.const 1 f32.const 1 - f32.const 1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26883,10 +27208,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1 f32.const 1 f32.const 1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26897,9 +27222,9 @@ unreachable end f32.const inf - f32.const 1 f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26909,10 +27234,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf f32.const 1 f32.const 1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26923,9 +27248,9 @@ unreachable end f32.const nan:0x400000 - f32.const 1 f32.const nan:0x400000 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26936,9 +27261,9 @@ unreachable end f32.const 0 - f32.const -1 f32.const 0 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26949,9 +27274,9 @@ unreachable end f32.const -0 - f32.const -1 f32.const -0 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26962,9 +27287,9 @@ unreachable end f32.const 0.5 - f32.const -1 f32.const 0.5 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26975,9 +27300,9 @@ unreachable end f32.const -0.5 - f32.const -1 f32.const -0.5 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26988,9 +27313,9 @@ unreachable end f32.const 1 - f32.const -1 f32.const 1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27002,8 +27327,8 @@ end f32.const -1 f32.const -1 - f32.const -1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27014,9 +27339,9 @@ unreachable end f32.const inf - f32.const -1 f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27026,10 +27351,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf f32.const -1 f32.const -1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27040,9 +27365,9 @@ unreachable end f32.const nan:0x400000 - f32.const -1 f32.const nan:0x400000 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27055,7 +27380,7 @@ f32.const 0 f32.const 0 f32.const 0 - call $std/math/test_maxf + call $std/math/check i32.eqz if i32.const 0 @@ -27066,9 +27391,9 @@ unreachable end f32.const 0 - f32.const -0 f32.const 0 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27078,10 +27403,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0 f32.const inf f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27092,9 +27417,9 @@ unreachable end f32.const 0 - f32.const -inf f32.const 0 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27104,10 +27429,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0 f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27117,10 +27442,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0 f32.const 0 f32.const 0 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27132,8 +27457,8 @@ end f32.const -0 f32.const -0 - f32.const -0 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27143,10 +27468,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0 f32.const inf f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27157,9 +27482,9 @@ unreachable end f32.const -0 - f32.const -inf f32.const -0 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27169,10 +27494,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0 f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27183,9 +27508,9 @@ unreachable end f32.const 1 - f32.const 0 f32.const 1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27195,10 +27520,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1 f32.const 0 f32.const 0 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27209,9 +27534,9 @@ unreachable end f32.const inf - f32.const 0 f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27221,10 +27546,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf f32.const 0 f32.const 0 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27235,9 +27560,9 @@ unreachable end f32.const nan:0x400000 - f32.const 0 f32.const nan:0x400000 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27247,10 +27572,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1 f32.const -0 f32.const -0 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27261,9 +27586,9 @@ unreachable end f32.const inf - f32.const -0 f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27273,10 +27598,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf f32.const -0 f32.const -0 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27287,9 +27612,9 @@ unreachable end f32.const nan:0x400000 - f32.const -0 f32.const nan:0x400000 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27300,9 +27625,9 @@ unreachable end f32.const inf - f32.const 2 f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27313,9 +27638,9 @@ unreachable end f32.const inf - f32.const -0.5 f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27325,10 +27650,10 @@ call $~lib/builtins/abort unreachable end - f32.const inf f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27338,10 +27663,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf f32.const 2 f32.const 2 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27351,10 +27676,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf f32.const -0.5 f32.const -0.5 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27364,10 +27689,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27379,8 +27704,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - f32.const nan:0x400000 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27390,10 +27715,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1 f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27403,10 +27728,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1 f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27416,10 +27741,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1 f32.const inf f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27429,10 +27754,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1 f32.const inf f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27444,8 +27769,8 @@ end f32.const inf f32.const inf - f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27455,10 +27780,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf f32.const inf f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27469,9 +27794,9 @@ unreachable end f32.const 1 - f32.const -inf f32.const 1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27482,9 +27807,9 @@ unreachable end f32.const -1 - f32.const -inf f32.const -1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27495,9 +27820,9 @@ unreachable end f32.const inf - f32.const -inf f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27509,8 +27834,8 @@ end f32.const -inf f32.const -inf - f32.const -inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27521,9 +27846,9 @@ unreachable end f32.const 1.75 - f32.const 0.5 f32.const 1.75 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27533,10 +27858,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1.75 f32.const 0.5 f32.const 0.5 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27547,9 +27872,9 @@ unreachable end f32.const 1.75 - f32.const -0.5 f32.const 1.75 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -27559,10 +27884,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1.75 f32.const -0.5 f32.const -0.5 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28457,9 +28782,9 @@ unreachable end f32.const -8.066848754882812 - f32.const 4.535662651062012 f32.const -8.066848754882812 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28469,10 +28794,10 @@ call $~lib/builtins/abort unreachable end - f32.const 4.345239639282227 f32.const -8.887990951538086 f32.const -8.887990951538086 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28483,9 +28808,9 @@ unreachable end f32.const -8.381433486938477 - f32.const -2.7636072635650635 f32.const -8.381433486938477 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28496,9 +28821,9 @@ unreachable end f32.const -6.531673431396484 - f32.const 4.567535400390625 f32.const -6.531673431396484 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28508,10 +28833,10 @@ call $~lib/builtins/abort unreachable end - f32.const 9.267057418823242 f32.const 4.811392307281494 f32.const 4.811392307281494 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28522,9 +28847,9 @@ unreachable end f32.const -6.450045585632324 - f32.const 0.6620717644691467 f32.const -6.450045585632324 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28534,10 +28859,10 @@ call $~lib/builtins/abort unreachable end - f32.const 7.858890056610107 f32.const 0.052154526114463806 f32.const 0.052154526114463806 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28548,9 +28873,9 @@ unreachable end f32.const -0.7920545339584351 - f32.const 7.676402568817139 f32.const -0.7920545339584351 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28561,9 +28886,9 @@ unreachable end f32.const 0.6157026886940002 - f32.const 2.0119025707244873 f32.const 0.6157026886940002 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28574,9 +28899,9 @@ unreachable end f32.const -0.5587586760520935 - f32.const 0.03223983198404312 f32.const -0.5587586760520935 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28587,9 +28912,9 @@ unreachable end f32.const 0 - f32.const 1 f32.const 0 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28600,9 +28925,9 @@ unreachable end f32.const -0 - f32.const 1 f32.const -0 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28613,9 +28938,9 @@ unreachable end f32.const 0.5 - f32.const 1 f32.const 0.5 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28626,9 +28951,9 @@ unreachable end f32.const -0.5 - f32.const 1 f32.const -0.5 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28640,8 +28965,8 @@ end f32.const 1 f32.const 1 - f32.const 1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28652,9 +28977,9 @@ unreachable end f32.const -1 - f32.const 1 f32.const -1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28664,10 +28989,10 @@ call $~lib/builtins/abort unreachable end - f32.const inf f32.const 1 f32.const 1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28678,9 +29003,9 @@ unreachable end f32.const -inf - f32.const 1 f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28691,9 +29016,9 @@ unreachable end f32.const nan:0x400000 - f32.const 1 f32.const nan:0x400000 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28703,10 +29028,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0 f32.const -1 f32.const -1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28716,10 +29041,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0 f32.const -1 f32.const -1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28729,10 +29054,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5 f32.const -1 f32.const -1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28742,10 +29067,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.5 f32.const -1 f32.const -1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28755,10 +29080,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1 f32.const -1 f32.const -1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28770,8 +29095,8 @@ end f32.const -1 f32.const -1 - f32.const -1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28781,10 +29106,10 @@ call $~lib/builtins/abort unreachable end - f32.const inf f32.const -1 f32.const -1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28795,9 +29120,9 @@ unreachable end f32.const -inf - f32.const -1 f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28808,9 +29133,9 @@ unreachable end f32.const nan:0x400000 - f32.const -1 f32.const nan:0x400000 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28823,7 +29148,7 @@ f32.const 0 f32.const 0 f32.const 0 - call $std/math/test_minf + call $std/math/check i32.eqz if i32.const 0 @@ -28833,10 +29158,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0 f32.const -0 f32.const -0 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28847,9 +29172,9 @@ unreachable end f32.const 0 - f32.const inf f32.const 0 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28859,10 +29184,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0 f32.const -inf f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28872,10 +29197,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0 f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28886,9 +29211,9 @@ unreachable end f32.const -0 - f32.const 0 f32.const -0 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28900,8 +29225,8 @@ end f32.const -0 f32.const -0 - f32.const -0 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28912,9 +29237,9 @@ unreachable end f32.const -0 - f32.const inf f32.const -0 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28924,10 +29249,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0 f32.const -inf f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28937,10 +29262,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0 f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28950,10 +29275,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1 f32.const 0 f32.const 0 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28964,9 +29289,9 @@ unreachable end f32.const -1 - f32.const 0 f32.const -1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28976,10 +29301,10 @@ call $~lib/builtins/abort unreachable end - f32.const inf f32.const 0 f32.const 0 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28990,9 +29315,9 @@ unreachable end f32.const -inf - f32.const 0 f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29003,9 +29328,9 @@ unreachable end f32.const nan:0x400000 - f32.const 0 f32.const nan:0x400000 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29016,9 +29341,9 @@ unreachable end f32.const -1 - f32.const -0 f32.const -1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29028,10 +29353,10 @@ call $~lib/builtins/abort unreachable end - f32.const inf f32.const -0 f32.const -0 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29042,9 +29367,9 @@ unreachable end f32.const -inf - f32.const -0 f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29055,9 +29380,9 @@ unreachable end f32.const nan:0x400000 - f32.const -0 f32.const nan:0x400000 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29067,10 +29392,10 @@ call $~lib/builtins/abort unreachable end - f32.const inf f32.const 2 f32.const 2 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29080,10 +29405,10 @@ call $~lib/builtins/abort unreachable end - f32.const inf f32.const -0.5 f32.const -0.5 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29093,10 +29418,10 @@ call $~lib/builtins/abort unreachable end - f32.const inf f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29107,9 +29432,9 @@ unreachable end f32.const -inf - f32.const 2 f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29120,9 +29445,9 @@ unreachable end f32.const -inf - f32.const -0.5 f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29132,10 +29457,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29147,8 +29472,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - f32.const nan:0x400000 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29158,10 +29483,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1 f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29171,10 +29496,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1 f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29185,9 +29510,9 @@ unreachable end f32.const 1 - f32.const inf f32.const 1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29198,9 +29523,9 @@ unreachable end f32.const -1 - f32.const inf f32.const -1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29212,8 +29537,8 @@ end f32.const inf f32.const inf - f32.const inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29224,9 +29549,9 @@ unreachable end f32.const -inf - f32.const inf f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29236,10 +29561,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1 f32.const -inf f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29249,10 +29574,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1 f32.const -inf f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29262,10 +29587,10 @@ call $~lib/builtins/abort unreachable end - f32.const inf f32.const -inf f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29277,8 +29602,8 @@ end f32.const -inf f32.const -inf - f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29288,10 +29613,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.75 f32.const 0.5 f32.const 0.5 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29302,9 +29627,9 @@ unreachable end f32.const -1.75 - f32.const 0.5 f32.const -1.75 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29314,10 +29639,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.75 f32.const -0.5 f32.const -0.5 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29328,9 +29653,9 @@ unreachable end f32.const -1.75 - f32.const -0.5 f32.const -1.75 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31136,8 +31461,10 @@ end f32.const -8.066848754882812 f32.const 4.535662651062012 + call $~lib/math/NativeMathf.mod f32.const -3.531186103820801 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31149,8 +31476,10 @@ end f32.const 4.345239639282227 f32.const -8.887990951538086 + call $~lib/math/NativeMathf.mod f32.const 4.345239639282227 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31162,8 +31491,10 @@ end f32.const -8.381433486938477 f32.const -2.7636072635650635 + call $~lib/math/NativeMathf.mod f32.const -0.09061169624328613 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31175,8 +31506,10 @@ end f32.const -6.531673431396484 f32.const 4.567535400390625 + call $~lib/math/NativeMathf.mod f32.const -1.9641380310058594 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31188,8 +31521,10 @@ end f32.const 9.267057418823242 f32.const 4.811392307281494 + call $~lib/math/NativeMathf.mod f32.const 4.455665111541748 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31201,8 +31536,10 @@ end f32.const -6.450045585632324 f32.const 0.6620717644691467 + call $~lib/math/NativeMathf.mod f32.const -0.49139970541000366 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31214,8 +31551,10 @@ end f32.const 7.858890056610107 f32.const 0.052154526114463806 + call $~lib/math/NativeMathf.mod f32.const 0.0357111394405365 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31227,8 +31566,10 @@ end f32.const -0.7920545339584351 f32.const 7.676402568817139 + call $~lib/math/NativeMathf.mod f32.const -0.7920545339584351 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31240,8 +31581,10 @@ end f32.const 0.6157026886940002 f32.const 2.0119025707244873 + call $~lib/math/NativeMathf.mod f32.const 0.6157026886940002 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31253,8 +31596,10 @@ end f32.const -0.5587586760520935 f32.const 0.03223983198404312 + call $~lib/math/NativeMathf.mod f32.const -0.010681532323360443 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31266,8 +31611,10 @@ end f32.const 0 f32.const 1 + call $~lib/math/NativeMathf.mod f32.const 0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31279,8 +31626,10 @@ end f32.const -0 f32.const 1 + call $~lib/math/NativeMathf.mod f32.const -0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31292,8 +31641,10 @@ end f32.const 0.5 f32.const 1 + call $~lib/math/NativeMathf.mod f32.const 0.5 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31305,8 +31656,10 @@ end f32.const -0.5 f32.const 1 + call $~lib/math/NativeMathf.mod f32.const -0.5 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31318,8 +31671,10 @@ end f32.const 1 f32.const 1 + call $~lib/math/NativeMathf.mod + f32.const 0 f32.const 0 - call $std/math/test_modf + call $std/math/check i32.eqz if i32.const 0 @@ -31331,8 +31686,10 @@ end f32.const -1 f32.const 1 + call $~lib/math/NativeMathf.mod f32.const -0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31344,8 +31701,10 @@ end f32.const 1.5 f32.const 1 + call $~lib/math/NativeMathf.mod f32.const 0.5 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31357,8 +31716,10 @@ end f32.const -1.5 f32.const 1 + call $~lib/math/NativeMathf.mod f32.const -0.5 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31370,8 +31731,10 @@ end f32.const 2 f32.const 1 + call $~lib/math/NativeMathf.mod + f32.const 0 f32.const 0 - call $std/math/test_modf + call $std/math/check i32.eqz if i32.const 0 @@ -31383,8 +31746,10 @@ end f32.const -2 f32.const 1 + call $~lib/math/NativeMathf.mod f32.const -0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31396,8 +31761,10 @@ end f32.const inf f32.const 1 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31409,8 +31776,10 @@ end f32.const -inf f32.const 1 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31422,8 +31791,10 @@ end f32.const nan:0x400000 f32.const 1 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31435,8 +31806,10 @@ end f32.const 0 f32.const -1 + call $~lib/math/NativeMathf.mod + f32.const 0 f32.const 0 - call $std/math/test_modf + call $std/math/check i32.eqz if i32.const 0 @@ -31448,8 +31821,10 @@ end f32.const -0 f32.const -1 + call $~lib/math/NativeMathf.mod f32.const -0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31461,8 +31836,10 @@ end f32.const 0.5 f32.const -1 + call $~lib/math/NativeMathf.mod f32.const 0.5 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31474,8 +31851,10 @@ end f32.const -0.5 f32.const -1 + call $~lib/math/NativeMathf.mod f32.const -0.5 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31487,8 +31866,10 @@ end f32.const 1 f32.const -1 + call $~lib/math/NativeMathf.mod + f32.const 0 f32.const 0 - call $std/math/test_modf + call $std/math/check i32.eqz if i32.const 0 @@ -31500,8 +31881,10 @@ end f32.const -1 f32.const -1 + call $~lib/math/NativeMathf.mod f32.const -0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31513,8 +31896,10 @@ end f32.const 1.5 f32.const -1 + call $~lib/math/NativeMathf.mod f32.const 0.5 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31526,8 +31911,10 @@ end f32.const -1.5 f32.const -1 + call $~lib/math/NativeMathf.mod f32.const -0.5 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31539,8 +31926,10 @@ end f32.const 2 f32.const -1 + call $~lib/math/NativeMathf.mod f32.const 0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31552,8 +31941,10 @@ end f32.const -2 f32.const -1 + call $~lib/math/NativeMathf.mod f32.const -0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31565,8 +31956,10 @@ end f32.const inf f32.const -1 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31578,8 +31971,10 @@ end f32.const -inf f32.const -1 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31591,8 +31986,10 @@ end f32.const nan:0x400000 f32.const -1 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31604,8 +32001,10 @@ end f32.const 0 f32.const 0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31617,8 +32016,10 @@ end f32.const 0 f32.const -0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31630,8 +32031,10 @@ end f32.const 0 f32.const inf + call $~lib/math/NativeMathf.mod f32.const 0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31643,8 +32046,10 @@ end f32.const 0 f32.const -inf + call $~lib/math/NativeMathf.mod f32.const 0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31656,8 +32061,10 @@ end f32.const 0 f32.const nan:0x400000 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31669,8 +32076,10 @@ end f32.const -0 f32.const 0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31682,8 +32091,10 @@ end f32.const -0 f32.const -0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31695,8 +32106,10 @@ end f32.const -0 f32.const inf + call $~lib/math/NativeMathf.mod f32.const -0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31708,8 +32121,10 @@ end f32.const -0 f32.const -inf + call $~lib/math/NativeMathf.mod f32.const -0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31721,8 +32136,10 @@ end f32.const -0 f32.const nan:0x400000 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31734,8 +32151,10 @@ end f32.const 1 f32.const 0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31747,8 +32166,10 @@ end f32.const -1 f32.const 0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31760,8 +32181,10 @@ end f32.const inf f32.const 0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31773,8 +32196,10 @@ end f32.const -inf f32.const 0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31786,8 +32211,10 @@ end f32.const nan:0x400000 f32.const 0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31799,8 +32226,10 @@ end f32.const -1 f32.const -0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31812,8 +32241,10 @@ end f32.const inf f32.const -0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31825,8 +32256,10 @@ end f32.const -inf f32.const -0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31838,8 +32271,10 @@ end f32.const nan:0x400000 f32.const -0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31851,8 +32286,10 @@ end f32.const inf f32.const 2 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31864,8 +32301,10 @@ end f32.const inf f32.const -0.5 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31877,8 +32316,10 @@ end f32.const inf f32.const nan:0x400000 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31890,8 +32331,10 @@ end f32.const -inf f32.const 2 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31903,8 +32346,10 @@ end f32.const -inf f32.const -0.5 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31916,8 +32361,10 @@ end f32.const -inf f32.const nan:0x400000 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31929,8 +32376,10 @@ end f32.const nan:0x400000 f32.const nan:0x400000 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31942,8 +32391,10 @@ end f32.const 1 f32.const nan:0x400000 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31955,8 +32406,10 @@ end f32.const -1 f32.const nan:0x400000 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31968,8 +32421,10 @@ end f32.const 1 f32.const inf + call $~lib/math/NativeMathf.mod f32.const 1 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31981,8 +32436,10 @@ end f32.const -1 f32.const inf + call $~lib/math/NativeMathf.mod f32.const -1 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -31994,8 +32451,10 @@ end f32.const inf f32.const inf + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32007,8 +32466,10 @@ end f32.const -inf f32.const inf + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32020,8 +32481,10 @@ end f32.const 1 f32.const -inf + call $~lib/math/NativeMathf.mod f32.const 1 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32033,8 +32496,10 @@ end f32.const -1 f32.const -inf + call $~lib/math/NativeMathf.mod f32.const -1 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32046,8 +32511,10 @@ end f32.const inf f32.const -inf + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32059,8 +32526,10 @@ end f32.const -inf f32.const -inf + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32072,8 +32541,10 @@ end f32.const 1.75 f32.const 0.5 + call $~lib/math/NativeMathf.mod f32.const 0.25 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32085,8 +32556,10 @@ end f32.const -1.75 f32.const 0.5 + call $~lib/math/NativeMathf.mod f32.const -0.25 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32098,8 +32571,10 @@ end f32.const 1.75 f32.const -0.5 + call $~lib/math/NativeMathf.mod f32.const 0.25 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32111,8 +32586,10 @@ end f32.const -1.75 f32.const -0.5 + call $~lib/math/NativeMathf.mod f32.const -0.25 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -34051,9 +34528,10 @@ end f32.const -8.066848754882812 f32.const 4.535662651062012 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34065,9 +34543,10 @@ end f32.const 4.345239639282227 f32.const -8.887990951538086 + call $~lib/math/NativeMathf.pow f32.const 2.134714122803416e-06 f32.const 0.1436440795660019 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34079,9 +34558,10 @@ end f32.const -8.381433486938477 f32.const -2.7636072635650635 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34093,9 +34573,10 @@ end f32.const -6.531673431396484 f32.const 4.567535400390625 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34107,9 +34588,10 @@ end f32.const 9.267057418823242 f32.const 4.811392307281494 + call $~lib/math/NativeMathf.pow f32.const 44909.33203125 f32.const -0.05356409028172493 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34121,9 +34603,10 @@ end f32.const -6.450045585632324 f32.const 0.6620717644691467 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34135,9 +34618,10 @@ end f32.const 7.858890056610107 f32.const 0.052154526114463806 + call $~lib/math/NativeMathf.pow f32.const 1.1135177612304688 f32.const 0.19122089445590973 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34149,9 +34633,10 @@ end f32.const -0.7920545339584351 f32.const 7.676402568817139 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34163,9 +34648,10 @@ end f32.const 0.6157026886940002 f32.const 2.0119025707244873 + call $~lib/math/NativeMathf.pow f32.const 0.3769077658653259 f32.const 0.337149053812027 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34177,9 +34663,10 @@ end f32.const -0.5587586760520935 f32.const 0.03223983198404312 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34191,9 +34678,10 @@ end f32.const 0 f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34205,9 +34693,10 @@ end f32.const 0 f32.const inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34219,9 +34708,10 @@ end f32.const 0 f32.const 3 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34233,9 +34723,10 @@ end f32.const 0 f32.const 2 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34247,9 +34738,10 @@ end f32.const 0 f32.const 1 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34261,9 +34753,10 @@ end f32.const 0 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34275,9 +34768,10 @@ end f32.const 0 f32.const 0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34289,9 +34783,10 @@ end f32.const 0 f32.const -0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34303,9 +34798,10 @@ end f32.const 0 f32.const -0.5 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34317,9 +34813,10 @@ end f32.const 0 f32.const -1 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34331,9 +34828,10 @@ end f32.const 0 f32.const -2 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34345,9 +34843,10 @@ end f32.const 0 f32.const -3 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34359,9 +34858,10 @@ end f32.const 0 f32.const -4 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34373,9 +34873,10 @@ end f32.const 0 f32.const -inf + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34387,9 +34888,10 @@ end f32.const -0 f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34401,9 +34903,10 @@ end f32.const -0 f32.const inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34415,9 +34918,10 @@ end f32.const -0 f32.const 3 + call $~lib/math/NativeMathf.pow f32.const -0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34429,9 +34933,10 @@ end f32.const -0 f32.const 2 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34443,9 +34948,10 @@ end f32.const -0 f32.const 1 + call $~lib/math/NativeMathf.pow f32.const -0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34457,9 +34963,10 @@ end f32.const -0 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34471,9 +34978,10 @@ end f32.const -0 f32.const 0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34485,9 +34993,10 @@ end f32.const -0 f32.const -0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34499,9 +35008,10 @@ end f32.const -0 f32.const -0.5 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34513,9 +35023,10 @@ end f32.const -0 f32.const -1 + call $~lib/math/NativeMathf.pow f32.const -inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34527,9 +35038,10 @@ end f32.const -0 f32.const -2 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34541,9 +35053,10 @@ end f32.const -0 f32.const -3 + call $~lib/math/NativeMathf.pow f32.const -inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34555,9 +35068,10 @@ end f32.const -0 f32.const -4 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34569,9 +35083,10 @@ end f32.const -0 f32.const -inf + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34583,9 +35098,10 @@ end f32.const nan:0x400000 f32.const 0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34597,9 +35113,10 @@ end f32.const inf f32.const 0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34611,9 +35128,10 @@ end f32.const -inf f32.const 0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34625,9 +35143,10 @@ end f32.const 1 f32.const 0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34639,9 +35158,10 @@ end f32.const -1 f32.const 0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34653,9 +35173,10 @@ end f32.const -0.5 f32.const 0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34667,9 +35188,10 @@ end f32.const nan:0x400000 f32.const -0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34681,9 +35203,10 @@ end f32.const inf f32.const -0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34695,9 +35218,10 @@ end f32.const -inf f32.const -0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34709,9 +35233,10 @@ end f32.const 1 f32.const -0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34723,9 +35248,10 @@ end f32.const -1 f32.const -0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34737,9 +35263,10 @@ end f32.const -0.5 f32.const -0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34751,9 +35278,10 @@ end f32.const -1 f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34765,9 +35293,10 @@ end f32.const -1 f32.const inf + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34779,9 +35308,10 @@ end f32.const -1 f32.const -inf + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34793,9 +35323,10 @@ end f32.const -1 f32.const 2 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34807,9 +35338,10 @@ end f32.const -1 f32.const -1 + call $~lib/math/NativeMathf.pow f32.const -1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34821,9 +35353,10 @@ end f32.const -1 f32.const -2 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34835,9 +35368,10 @@ end f32.const -1 f32.const -3 + call $~lib/math/NativeMathf.pow f32.const -1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34849,9 +35383,10 @@ end f32.const -1 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34863,9 +35398,10 @@ end f32.const 1 f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34877,9 +35413,10 @@ end f32.const 1 f32.const inf + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34891,9 +35428,10 @@ end f32.const 1 f32.const -inf + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34905,9 +35443,10 @@ end f32.const 1 f32.const 3 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34919,9 +35458,10 @@ end f32.const 1 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34933,9 +35473,10 @@ end f32.const 1 f32.const -0.5 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34947,9 +35488,10 @@ end f32.const 1 f32.const -3 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34961,9 +35503,10 @@ end f32.const -0.5 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34975,9 +35518,10 @@ end f32.const -0.5 f32.const 1.5 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -34989,9 +35533,10 @@ end f32.const -0.5 f32.const 2 + call $~lib/math/NativeMathf.pow f32.const 0.25 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35003,9 +35548,10 @@ end f32.const -0.5 f32.const 3 + call $~lib/math/NativeMathf.pow f32.const -0.125 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35017,9 +35563,10 @@ end f32.const -0.5 f32.const inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35031,9 +35578,10 @@ end f32.const -0.5 f32.const -inf + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35045,9 +35593,10 @@ end f32.const -0.5 f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35059,9 +35608,10 @@ end f32.const 0.5 f32.const inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35073,9 +35623,10 @@ end f32.const 0.5 f32.const -inf + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35087,9 +35638,10 @@ end f32.const 0.5 f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35101,9 +35653,10 @@ end f32.const 1.5 f32.const inf + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35115,9 +35668,10 @@ end f32.const 1.5 f32.const -inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35129,9 +35683,10 @@ end f32.const 1.5 f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35143,9 +35698,10 @@ end f32.const inf f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35157,9 +35713,10 @@ end f32.const inf f32.const inf + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35171,9 +35728,10 @@ end f32.const inf f32.const -inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35185,9 +35743,10 @@ end f32.const inf f32.const 3 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35199,9 +35758,10 @@ end f32.const inf f32.const 2 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35213,9 +35773,10 @@ end f32.const inf f32.const 1 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35227,9 +35788,10 @@ end f32.const inf f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35241,9 +35803,10 @@ end f32.const inf f32.const -0.5 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35255,9 +35818,10 @@ end f32.const inf f32.const -1 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35269,9 +35833,10 @@ end f32.const inf f32.const -2 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35283,9 +35848,10 @@ end f32.const -inf f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35297,9 +35863,10 @@ end f32.const -inf f32.const inf + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35311,9 +35878,10 @@ end f32.const -inf f32.const -inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35325,9 +35893,10 @@ end f32.const -inf f32.const 3 + call $~lib/math/NativeMathf.pow f32.const -inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35339,9 +35908,10 @@ end f32.const -inf f32.const 2 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35353,9 +35923,10 @@ end f32.const -inf f32.const 1 + call $~lib/math/NativeMathf.pow f32.const -inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35367,9 +35938,10 @@ end f32.const -inf f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35381,9 +35953,10 @@ end f32.const -inf f32.const -0.5 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35395,9 +35968,10 @@ end f32.const -inf f32.const -1 + call $~lib/math/NativeMathf.pow f32.const -0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35409,9 +35983,10 @@ end f32.const -inf f32.const -2 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35423,9 +35998,10 @@ end f32.const nan:0x400000 f32.const 1 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35437,9 +36013,10 @@ end f32.const nan:0x400000 f32.const -1 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35451,9 +36028,10 @@ end f32.const -2 f32.const 1 + call $~lib/math/NativeMathf.pow f32.const -2 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35465,9 +36043,10 @@ end f32.const -2 f32.const -1 + call $~lib/math/NativeMathf.pow f32.const -0.5 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35479,9 +36058,10 @@ end f32.const 0 f32.const 1 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35493,9 +36073,10 @@ end f32.const -0 f32.const 1 + call $~lib/math/NativeMathf.pow f32.const -0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35507,9 +36088,10 @@ end f32.const 1.1754943508222875e-38 f32.const 1 + call $~lib/math/NativeMathf.pow f32.const 1.1754943508222875e-38 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35521,9 +36103,10 @@ end f32.const -1.1754943508222875e-38 f32.const 1 + call $~lib/math/NativeMathf.pow f32.const -1.1754943508222875e-38 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35535,9 +36118,10 @@ end f32.const 3402823466385288598117041e14 f32.const 1 + call $~lib/math/NativeMathf.pow f32.const 3402823466385288598117041e14 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35549,9 +36133,10 @@ end f32.const -3402823466385288598117041e14 f32.const 1 + call $~lib/math/NativeMathf.pow f32.const -3402823466385288598117041e14 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35563,9 +36148,10 @@ end f32.const 0 f32.const 3402823466385288598117041e14 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35577,9 +36163,10 @@ end f32.const 0 f32.const 1.1754943508222875e-38 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35591,9 +36178,10 @@ end f32.const -0 f32.const 3402823466385288598117041e14 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35605,9 +36193,10 @@ end f32.const -0 f32.const 17 + call $~lib/math/NativeMathf.pow f32.const -0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35619,9 +36208,10 @@ end f32.const -0 f32.const 2 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35633,9 +36223,10 @@ end f32.const -0 f32.const 1.1754943508222875e-38 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35647,9 +36238,10 @@ end f32.const -1.100000023841858 f32.const 101 + call $~lib/math/NativeMathf.pow f32.const -15158.70703125 f32.const -0.2798735499382019 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35661,9 +36253,10 @@ end f32.const 19 f32.const 5 + call $~lib/math/NativeMathf.pow f32.const 2476099 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35675,9 +36268,10 @@ end f32.const -19 f32.const 5 + call $~lib/math/NativeMathf.pow f32.const -2476099 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35689,9 +36283,10 @@ end f32.const -193 f32.const 3 + call $~lib/math/NativeMathf.pow f32.const -7189057 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35703,9 +36298,10 @@ end f32.const -1201 f32.const 2 + call $~lib/math/NativeMathf.pow f32.const 1442401 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35717,9 +36313,10 @@ end f32.const 7.312918663024902 f32.const 17.122268676757812 + call $~lib/math/NativeMathf.pow f32.const 624013315407872 f32.const -0.14995409548282623 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35731,9 +36328,10 @@ end f32.const 18.804489135742188 f32.const 3.3214492797851562 + call $~lib/math/NativeMathf.pow f32.const 17076.3515625 f32.const 0.3042995035648346 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35745,9 +36343,10 @@ end f32.const 7.290969371795654 f32.const 9.60707950592041 + call $~lib/math/NativeMathf.pow f32.const 194467360 f32.const -0.10728006064891815 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35759,9 +36358,10 @@ end f32.const 15.783316612243652 f32.const 18.55087661743164 + call $~lib/math/NativeMathf.pow f32.const 16889945384019652771840 f32.const 0.09180249273777008 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35773,9 +36373,10 @@ end f32.const 8.319306373596191 f32.const 0.4197559952735901 + call $~lib/math/NativeMathf.pow f32.const 2.43339204788208 f32.const 0.009661106392741203 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35787,9 +36388,10 @@ end f32.const 5.831245422363281 f32.const 10.462174415588379 + call $~lib/math/NativeMathf.pow f32.const 102690080 f32.const -1.4237762661650777e-03 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35801,9 +36403,10 @@ end f32.const 2.415773391723633 f32.const 17.12181282043457 + call $~lib/math/NativeMathf.pow f32.const 3619232.25 f32.const 0.2961936891078949 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35815,9 +36418,10 @@ end f32.const 0.03832307085394859 f32.const 0.011254354380071163 + call $~lib/math/NativeMathf.pow f32.const 0.9639571905136108 f32.const -0.4840981066226959 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35829,9 +36433,10 @@ end f32.const 5.4462971687316895 f32.const 15.814705848693848 + call $~lib/math/NativeMathf.pow f32.const 437749907456 f32.const -0.40305933356285095 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35843,9 +36448,10 @@ end f32.const 12.87027645111084 f32.const 14.93734359741211 + call $~lib/math/NativeMathf.pow f32.const 37522809982812160 f32.const 0.10445278882980347 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35857,9 +36463,10 @@ end f32.const nan:0x400000 f32.const 0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35871,9 +36478,10 @@ end f32.const nan:0x400000 f32.const 0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35885,9 +36493,10 @@ end f32.const inf f32.const 0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35899,9 +36508,10 @@ end f32.const -inf f32.const 0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35913,9 +36523,10 @@ end f32.const 1.401298464324817e-45 f32.const 0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35927,9 +36538,10 @@ end f32.const -1.401298464324817e-45 f32.const 0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35941,9 +36553,10 @@ end f32.const nan:0x400000 f32.const 1 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35955,9 +36568,10 @@ end f32.const nan:0x400000 f32.const 1 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35969,9 +36583,10 @@ end f32.const inf f32.const 1 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35983,9 +36598,10 @@ end f32.const -inf f32.const 1 + call $~lib/math/NativeMathf.pow f32.const -inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35997,9 +36613,10 @@ end f32.const nan:0x400000 f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36011,9 +36628,10 @@ end f32.const inf f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36025,9 +36643,10 @@ end f32.const -inf f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36039,9 +36658,10 @@ end f32.const 1 f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36053,9 +36673,10 @@ end f32.const -1 f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36067,9 +36688,10 @@ end f32.const -0 f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36081,9 +36703,10 @@ end f32.const 0 f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36095,9 +36718,10 @@ end f32.const 1.0000001192092896 f32.const inf + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36109,9 +36733,10 @@ end f32.const inf f32.const inf + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36123,9 +36748,10 @@ end f32.const -1.0000001192092896 f32.const inf + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36137,9 +36763,10 @@ end f32.const -inf f32.const inf + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36151,9 +36778,10 @@ end f32.const 1.0000001192092896 f32.const -inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36165,9 +36793,10 @@ end f32.const inf f32.const -inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36179,9 +36808,10 @@ end f32.const -1.0000001192092896 f32.const -inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36193,9 +36823,10 @@ end f32.const -inf f32.const -inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36207,9 +36838,10 @@ end f32.const 0.9999999403953552 f32.const inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36221,9 +36853,10 @@ end f32.const 1.401298464324817e-45 f32.const inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36235,9 +36868,10 @@ end f32.const 0 f32.const inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36249,9 +36883,10 @@ end f32.const -0.9999999403953552 f32.const inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36263,9 +36898,10 @@ end f32.const -1.401298464324817e-45 f32.const inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36277,9 +36913,10 @@ end f32.const -0 f32.const inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36291,9 +36928,10 @@ end f32.const 0 f32.const 1.401298464324817e-45 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36305,9 +36943,10 @@ end f32.const -0 f32.const 1.401298464324817e-45 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36319,9 +36958,10 @@ end f32.const 0 f32.const -3402823466385288598117041e14 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36333,9 +36973,10 @@ end f32.const 0 f32.const -1.401298464324817e-45 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36347,9 +36988,10 @@ end f32.const -0 f32.const -3402823466385288598117041e14 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36361,9 +37003,10 @@ end f32.const -0 f32.const -2 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36375,9 +37018,10 @@ end f32.const -0 f32.const -1.401298464324817e-45 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36389,9 +37033,10 @@ end f32.const -0 f32.const -1 + call $~lib/math/NativeMathf.pow f32.const -inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36403,9 +37048,10 @@ end f32.const -0 f32.const -17 + call $~lib/math/NativeMathf.pow f32.const -inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36417,9 +37063,10 @@ end f32.const inf f32.const 1.401298464324817e-45 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36431,9 +37078,10 @@ end f32.const inf f32.const -1.401298464324817e-45 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36445,9 +37093,10 @@ end f32.const -inf f32.const 3402823466385288598117041e14 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36459,9 +37108,10 @@ end f32.const -inf f32.const 1.401298464324817e-45 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36473,9 +37123,10 @@ end f32.const -inf f32.const -3402823466385288598117041e14 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36487,9 +37138,10 @@ end f32.const -inf f32.const -1.401298464324817e-45 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36501,9 +37153,10 @@ end f32.const -inf f32.const 5 + call $~lib/math/NativeMathf.pow f32.const -inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36515,9 +37168,10 @@ end f32.const -inf f32.const -5 + call $~lib/math/NativeMathf.pow f32.const -0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36529,9 +37183,10 @@ end f32.const -inf f32.const 6 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36543,9 +37198,10 @@ end f32.const -inf f32.const -6 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36557,9 +37213,10 @@ end f32.const -inf f32.const 2.000000238418579 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36571,9 +37228,10 @@ end f32.const -1 f32.const 1.0000001192092896 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36585,9 +37243,10 @@ end f32.const -1.401298464324817e-45 f32.const -1.9999998807907104 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36599,9 +37258,10 @@ end f32.const -10 f32.const 309 + call $~lib/math/NativeMathf.pow f32.const -inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36613,9 +37273,10 @@ end f32.const -inf f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36627,9 +37288,10 @@ end f32.const 2.802596928649634e-45 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const 5.293955920339377e-23 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36641,9 +37303,10 @@ end f32.const 1.1210387714598537e-44 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const 1.0587911840678754e-22 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36655,9 +37318,10 @@ end f32.const 2.938735877055719e-39 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const 5.421010862427522e-20 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36669,9 +37333,10 @@ end f32.const 5.877471754111438e-39 f32.const -1 + call $~lib/math/NativeMathf.pow f32.const 1701411834604692317316873e14 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36683,9 +37348,10 @@ end f32.const 1.1754943508222875e-38 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const 1.0842021724855044e-19 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36697,9 +37363,10 @@ end f32.const 1.1754943508222875e-38 f32.const -1 + call $~lib/math/NativeMathf.pow f32.const 8507059173023461586584365e13 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36711,9 +37378,10 @@ end f32.const 2.350988701644575e-38 f32.const -1 + call $~lib/math/NativeMathf.pow f32.const 4253529586511730793292182e13 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36725,9 +37393,10 @@ end f32.const 4.70197740328915e-38 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const 2.168404344971009e-19 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36739,9 +37408,10 @@ end f32.const 4.70197740328915e-38 f32.const -1 + call $~lib/math/NativeMathf.pow f32.const 2126764793255865396646091e13 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36753,9 +37423,10 @@ end f32.const 5.293955920339377e-23 f32.const 2 + call $~lib/math/NativeMathf.pow f32.const 2.802596928649634e-45 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36767,9 +37438,10 @@ end f32.const 2.168404344971009e-19 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const 4.656612873077393e-10 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36781,9 +37453,10 @@ end f32.const 2.3283064365386963e-10 f32.const 2 + call $~lib/math/NativeMathf.pow f32.const 5.421010862427522e-20 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36795,9 +37468,10 @@ end f32.const 4.656612873077393e-10 f32.const 2 + call $~lib/math/NativeMathf.pow f32.const 2.168404344971009e-19 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36809,9 +37483,10 @@ end f32.const 1.1920928955078125e-07 f32.const -1 + call $~lib/math/NativeMathf.pow f32.const 8388608 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36823,9 +37498,10 @@ end f32.const 0.000034332275390625 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const 0.005859375 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36837,9 +37513,10 @@ end f32.const 0.00006103515625 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const 0.0078125 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36851,9 +37528,10 @@ end f32.const 0.00390625 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const 0.0625 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36865,9 +37543,10 @@ end f32.const 0.03515625 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const 0.1875 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36879,9 +37558,10 @@ end f32.const 0.0625 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const 0.25 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36893,9 +37573,10 @@ end f32.const 0.25 f32.const 2 + call $~lib/math/NativeMathf.pow f32.const 0.0625 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36907,9 +37588,10 @@ end f32.const 2126764793255865396646091e13 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const 4611686018427387904 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36921,9 +37603,10 @@ end f32.const 2126764793255865396646091e13 f32.const -1 + call $~lib/math/NativeMathf.pow f32.const 4.70197740328915e-38 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36935,9 +37618,10 @@ end f32.const 4253529586511730793292182e13 f32.const inf + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36949,9 +37633,10 @@ end f32.const 4253529586511730793292182e13 f32.const -1 + call $~lib/math/NativeMathf.pow f32.const 2.350988701644575e-38 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36963,9 +37648,10 @@ end f32.const 4253529586511730793292182e13 f32.const -inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36977,9 +37663,10 @@ end f32.const 8507059173023461586584365e13 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const 9223372036854775808 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36991,9 +37678,10 @@ end f32.const 8507059173023461586584365e13 f32.const -1 + call $~lib/math/NativeMathf.pow f32.const 1.1754943508222875e-38 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -37005,9 +37693,10 @@ end f32.const 3402823466385288598117041e14 f32.const inf + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -37019,9 +37708,10 @@ end f32.const 3402823466385288598117041e14 f32.const -inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -37033,9 +37723,10 @@ end f32.const 1701411834604692317316873e14 f32.const -2 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const -2.465190328815662e-32 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -37047,9 +37738,10 @@ end f32.const 1701411834604692317316873e14 f32.const -3 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const -0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -37061,9 +37753,10 @@ end f32.const 1701411834604692317316873e14 f32.const -255 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const -0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -37075,9 +37768,10 @@ end f32.const 1701411834604692317316873e14 f32.const -256 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const -0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -37089,9 +37783,10 @@ end f32.const 1701411834604692317316873e14 f32.const -257 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const -0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -37103,9 +37798,10 @@ end f32.const 1701411834604692317316873e14 f32.const -260 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const -0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -37117,9 +37813,10 @@ end f32.const 1701411834604692317316873e14 f32.const -261 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const -0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -37131,9 +37828,10 @@ end f32.const 1701411834604692317316873e14 f32.const -32767 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const -0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -37145,9 +37843,10 @@ end f32.const 1701411834604692317316873e14 f32.const -32768 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const -0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -37159,9 +37858,10 @@ end f32.const 3402822046616616342500112e14 f32.const -1 + call $~lib/math/NativeMathf.pow f32.const 2.938737278354183e-39 f32.const -4.768373855768004e-07 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -37173,9 +37873,10 @@ end f32.const 3402822046616616342500112e14 f32.const -2 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const -6.162981699510909e-33 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -37187,9 +37888,10 @@ end f32.const -1701411834604692317316873e14 f32.const -32767 + call $~lib/math/NativeMathf.pow f32.const -0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -37201,9 +37903,10 @@ end f32.const -1701411834604692317316873e14 f32.const -32768 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const -0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -37215,9 +37918,10 @@ end f32.const -3402822046616616342500112e14 f32.const -1 + call $~lib/math/NativeMathf.pow f32.const -2.938737278354183e-39 f32.const 4.768373855768004e-07 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -37229,9 +37933,10 @@ end f32.const -3402822046616616342500112e14 f32.const -2 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const -6.162981699510909e-33 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -38423,8 +39128,10 @@ end f64.const -8.06684839057968 f64.const 4.535662560676869 + call $~lib/math/NativeMath.rem f64.const 1.0044767307740567 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38436,8 +39143,10 @@ end f64.const 4.345239849338305 f64.const -8.88799136300345 + call $~lib/math/NativeMath.rem f64.const 4.345239849338305 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38449,8 +39158,10 @@ end f64.const -8.38143342755525 f64.const -2.763607337379588 + call $~lib/math/NativeMath.rem f64.const -0.09061141541648476 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38462,8 +39173,10 @@ end f64.const -6.531673581913484 f64.const 4.567535276842744 + call $~lib/math/NativeMath.rem f64.const -1.9641383050707404 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38475,8 +39188,10 @@ end f64.const 9.267056966972586 f64.const 4.811392084359796 + call $~lib/math/NativeMath.rem f64.const -0.35572720174700656 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38488,8 +39203,10 @@ end f64.const -6.450045556060236 f64.const 0.6620717923376739 + call $~lib/math/NativeMath.rem f64.const 0.17067236731650248 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38501,8 +39218,10 @@ end f64.const 7.858890253041697 f64.const 0.05215452675006225 + call $~lib/math/NativeMath.rem f64.const -0.016443286217702822 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38514,8 +39233,10 @@ end f64.const -0.792054511984896 f64.const 7.67640268511754 + call $~lib/math/NativeMath.rem f64.const -0.792054511984896 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38527,8 +39248,10 @@ end f64.const 0.615702673197924 f64.const 2.0119025790324803 + call $~lib/math/NativeMath.rem f64.const 0.615702673197924 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38540,8 +39263,10 @@ end f64.const -0.5587586823609152 f64.const 0.03223983060263804 + call $~lib/math/NativeMath.rem f64.const -0.0106815621160685 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38553,8 +39278,10 @@ end f64.const 0 f64.const 1 + call $~lib/math/NativeMath.rem + f64.const 0 f64.const 0 - call $std/math/test_rem + call $std/math/check i32.eqz if i32.const 0 @@ -38566,8 +39293,10 @@ end f64.const -0 f64.const 1 + call $~lib/math/NativeMath.rem f64.const -0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38579,8 +39308,10 @@ end f64.const 0.5 f64.const 1 + call $~lib/math/NativeMath.rem f64.const 0.5 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38592,8 +39323,10 @@ end f64.const -0.5 f64.const 1 + call $~lib/math/NativeMath.rem f64.const -0.5 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38605,8 +39338,10 @@ end f64.const 1 f64.const 1 + call $~lib/math/NativeMath.rem f64.const 0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38618,8 +39353,10 @@ end f64.const -1 f64.const 1 + call $~lib/math/NativeMath.rem f64.const -0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38631,8 +39368,10 @@ end f64.const 1.5 f64.const 1 + call $~lib/math/NativeMath.rem f64.const -0.5 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38644,8 +39383,10 @@ end f64.const -1.5 f64.const 1 + call $~lib/math/NativeMath.rem f64.const 0.5 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38657,8 +39398,10 @@ end f64.const 2 f64.const 1 + call $~lib/math/NativeMath.rem f64.const 0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38670,8 +39413,10 @@ end f64.const -2 f64.const 1 + call $~lib/math/NativeMath.rem f64.const -0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38683,8 +39428,10 @@ end f64.const inf f64.const 1 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38696,8 +39443,10 @@ end f64.const -inf f64.const 1 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38709,8 +39458,10 @@ end f64.const nan:0x8000000000000 f64.const 1 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38722,8 +39473,10 @@ end f64.const 0 f64.const -1 + call $~lib/math/NativeMath.rem f64.const 0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38735,8 +39488,10 @@ end f64.const -0 f64.const -1 + call $~lib/math/NativeMath.rem f64.const -0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38748,8 +39503,10 @@ end f64.const 0.5 f64.const -1 + call $~lib/math/NativeMath.rem f64.const 0.5 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38761,8 +39518,10 @@ end f64.const -0.5 f64.const -1 + call $~lib/math/NativeMath.rem f64.const -0.5 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38774,8 +39533,10 @@ end f64.const 1 f64.const -1 + call $~lib/math/NativeMath.rem f64.const 0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38787,8 +39548,10 @@ end f64.const -1 f64.const -1 + call $~lib/math/NativeMath.rem f64.const -0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38800,8 +39563,10 @@ end f64.const 1.5 f64.const -1 + call $~lib/math/NativeMath.rem f64.const -0.5 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38813,8 +39578,10 @@ end f64.const -1.5 f64.const -1 + call $~lib/math/NativeMath.rem f64.const 0.5 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38826,8 +39593,10 @@ end f64.const 2 f64.const -1 + call $~lib/math/NativeMath.rem f64.const 0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38839,8 +39608,10 @@ end f64.const -2 f64.const -1 + call $~lib/math/NativeMath.rem f64.const -0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38852,8 +39623,10 @@ end f64.const inf f64.const -1 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38865,8 +39638,10 @@ end f64.const -inf f64.const -1 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38878,8 +39653,10 @@ end f64.const nan:0x8000000000000 f64.const -1 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38891,8 +39668,10 @@ end f64.const 0 f64.const 0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38904,8 +39683,10 @@ end f64.const 0 f64.const -0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38917,8 +39698,10 @@ end f64.const 0 f64.const inf + call $~lib/math/NativeMath.rem + f64.const 0 f64.const 0 - call $std/math/test_rem + call $std/math/check i32.eqz if i32.const 0 @@ -38930,8 +39713,10 @@ end f64.const 0 f64.const -inf + call $~lib/math/NativeMath.rem f64.const 0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38943,8 +39728,10 @@ end f64.const 0 f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38956,8 +39743,10 @@ end f64.const -0 f64.const 0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38969,8 +39758,10 @@ end f64.const -0 f64.const -0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38982,8 +39773,10 @@ end f64.const -0 f64.const inf + call $~lib/math/NativeMath.rem f64.const -0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38995,8 +39788,10 @@ end f64.const -0 f64.const -inf + call $~lib/math/NativeMath.rem f64.const -0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39008,8 +39803,10 @@ end f64.const -0 f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39021,8 +39818,10 @@ end f64.const 1 f64.const 0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39034,8 +39833,10 @@ end f64.const -1 f64.const 0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39047,8 +39848,10 @@ end f64.const inf f64.const 0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39060,8 +39863,10 @@ end f64.const -inf f64.const 0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39073,8 +39878,10 @@ end f64.const nan:0x8000000000000 f64.const 0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39086,8 +39893,10 @@ end f64.const -1 f64.const -0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39099,8 +39908,10 @@ end f64.const inf f64.const -0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39112,8 +39923,10 @@ end f64.const -inf f64.const -0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39125,8 +39938,10 @@ end f64.const nan:0x8000000000000 f64.const -0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39138,8 +39953,10 @@ end f64.const inf f64.const 2 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39151,8 +39968,10 @@ end f64.const inf f64.const -0.5 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39164,8 +39983,10 @@ end f64.const inf f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39177,8 +39998,10 @@ end f64.const -inf f64.const 2 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39190,8 +40013,10 @@ end f64.const -inf f64.const -0.5 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39203,8 +40028,10 @@ end f64.const -inf f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39216,8 +40043,10 @@ end f64.const nan:0x8000000000000 f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39229,8 +40058,10 @@ end f64.const 1 f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39242,8 +40073,10 @@ end f64.const -1 f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39255,8 +40088,10 @@ end f64.const 1 f64.const inf + call $~lib/math/NativeMath.rem f64.const 1 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39268,8 +40103,10 @@ end f64.const -1 f64.const inf + call $~lib/math/NativeMath.rem f64.const -1 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39281,8 +40118,10 @@ end f64.const inf f64.const inf + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39294,8 +40133,10 @@ end f64.const -inf f64.const inf + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39307,8 +40148,10 @@ end f64.const 1 f64.const -inf + call $~lib/math/NativeMath.rem f64.const 1 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39320,8 +40163,10 @@ end f64.const -1 f64.const -inf + call $~lib/math/NativeMath.rem f64.const -1 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39333,8 +40178,10 @@ end f64.const inf f64.const -inf + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39346,8 +40193,10 @@ end f64.const -inf f64.const -inf + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39359,8 +40208,10 @@ end f64.const 1.75 f64.const 0.5 + call $~lib/math/NativeMath.rem f64.const -0.25 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39372,8 +40223,10 @@ end f64.const -1.75 f64.const 0.5 + call $~lib/math/NativeMath.rem f64.const 0.25 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39385,8 +40238,10 @@ end f64.const 1.75 f64.const -0.5 + call $~lib/math/NativeMath.rem f64.const -0.25 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39398,8 +40253,10 @@ end f64.const -1.75 f64.const -0.5 + call $~lib/math/NativeMath.rem f64.const 0.25 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39411,8 +40268,10 @@ end f64.const 8e-323 f64.const inf + call $~lib/math/NativeMath.rem f64.const 8e-323 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39424,8 +40283,10 @@ end f32.const -8.066848754882812 f32.const 4.535662651062012 + call $~lib/math/NativeMathf.rem f32.const 1.004476547241211 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39437,8 +40298,10 @@ end f32.const 4.345239639282227 f32.const -8.887990951538086 + call $~lib/math/NativeMathf.rem f32.const 4.345239639282227 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39450,8 +40313,10 @@ end f32.const -8.381433486938477 f32.const -2.7636072635650635 + call $~lib/math/NativeMathf.rem f32.const -0.09061169624328613 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39463,8 +40328,10 @@ end f32.const -6.531673431396484 f32.const 4.567535400390625 + call $~lib/math/NativeMathf.rem f32.const -1.9641380310058594 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39476,8 +40343,10 @@ end f32.const 9.267057418823242 f32.const 4.811392307281494 + call $~lib/math/NativeMathf.rem f32.const -0.3557271957397461 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39489,8 +40358,10 @@ end f32.const -6.450045585632324 f32.const 0.6620717644691467 + call $~lib/math/NativeMathf.rem f32.const 0.17067205905914307 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39502,8 +40373,10 @@ end f32.const 7.858890056610107 f32.const 0.052154526114463806 + call $~lib/math/NativeMathf.rem f32.const -0.016443386673927307 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39515,8 +40388,10 @@ end f32.const -0.7920545339584351 f32.const 7.676402568817139 + call $~lib/math/NativeMathf.rem f32.const -0.7920545339584351 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39528,8 +40403,10 @@ end f32.const 0.6157026886940002 f32.const 2.0119025707244873 + call $~lib/math/NativeMathf.rem f32.const 0.6157026886940002 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39541,8 +40418,10 @@ end f32.const -0.5587586760520935 f32.const 0.03223983198404312 + call $~lib/math/NativeMathf.rem f32.const -0.010681532323360443 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39554,8 +40433,10 @@ end f32.const 0 f32.const 1 + call $~lib/math/NativeMathf.rem + f32.const 0 f32.const 0 - call $std/math/test_remf + call $std/math/check i32.eqz if i32.const 0 @@ -39567,8 +40448,10 @@ end f32.const -0 f32.const 1 + call $~lib/math/NativeMathf.rem f32.const -0 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39580,8 +40463,10 @@ end f32.const 0.5 f32.const 1 + call $~lib/math/NativeMathf.rem f32.const 0.5 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39593,8 +40478,10 @@ end f32.const -0.5 f32.const 1 + call $~lib/math/NativeMathf.rem f32.const -0.5 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39606,8 +40493,10 @@ end f32.const 1 f32.const 1 + call $~lib/math/NativeMathf.rem + f32.const 0 f32.const 0 - call $std/math/test_remf + call $std/math/check i32.eqz if i32.const 0 @@ -39619,8 +40508,10 @@ end f32.const -1 f32.const 1 + call $~lib/math/NativeMathf.rem f32.const -0 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39632,8 +40523,10 @@ end f32.const 1.5 f32.const 1 + call $~lib/math/NativeMathf.rem f32.const -0.5 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39645,8 +40538,10 @@ end f32.const -1.5 f32.const 1 + call $~lib/math/NativeMathf.rem f32.const 0.5 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39658,8 +40553,10 @@ end f32.const 2 f32.const 1 + call $~lib/math/NativeMathf.rem + f32.const 0 f32.const 0 - call $std/math/test_remf + call $std/math/check i32.eqz if i32.const 0 @@ -39671,8 +40568,10 @@ end f32.const -2 f32.const 1 + call $~lib/math/NativeMathf.rem f32.const -0 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39684,8 +40583,10 @@ end f32.const inf f32.const 1 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39697,8 +40598,10 @@ end f32.const -inf f32.const 1 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39710,8 +40613,10 @@ end f32.const nan:0x400000 f32.const 1 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39723,8 +40628,10 @@ end f32.const 0 f32.const -1 + call $~lib/math/NativeMathf.rem + f32.const 0 f32.const 0 - call $std/math/test_remf + call $std/math/check i32.eqz if i32.const 0 @@ -39736,8 +40643,10 @@ end f32.const -0 f32.const -1 + call $~lib/math/NativeMathf.rem f32.const -0 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39749,8 +40658,10 @@ end f32.const 0.5 f32.const -1 + call $~lib/math/NativeMathf.rem f32.const 0.5 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39762,8 +40673,10 @@ end f32.const -0.5 f32.const -1 + call $~lib/math/NativeMathf.rem f32.const -0.5 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39775,8 +40688,10 @@ end f32.const 1 f32.const -1 + call $~lib/math/NativeMathf.rem + f32.const 0 f32.const 0 - call $std/math/test_remf + call $std/math/check i32.eqz if i32.const 0 @@ -39788,8 +40703,10 @@ end f32.const -1 f32.const -1 + call $~lib/math/NativeMathf.rem f32.const -0 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39801,8 +40718,10 @@ end f32.const 1.5 f32.const -1 + call $~lib/math/NativeMathf.rem f32.const -0.5 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39814,8 +40733,10 @@ end f32.const -1.5 f32.const -1 + call $~lib/math/NativeMathf.rem f32.const 0.5 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39827,8 +40748,10 @@ end f32.const 2 f32.const -1 + call $~lib/math/NativeMathf.rem + f32.const 0 f32.const 0 - call $std/math/test_remf + call $std/math/check i32.eqz if i32.const 0 @@ -39840,8 +40763,10 @@ end f32.const -2 f32.const -1 + call $~lib/math/NativeMathf.rem f32.const -0 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39853,8 +40778,10 @@ end f32.const inf f32.const -1 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39866,8 +40793,10 @@ end f32.const -inf f32.const -1 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39879,8 +40808,10 @@ end f32.const nan:0x400000 f32.const -1 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39892,8 +40823,10 @@ end f32.const 0 f32.const 0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39905,8 +40838,10 @@ end f32.const 0 f32.const -0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39918,8 +40853,10 @@ end f32.const 0 f32.const inf + call $~lib/math/NativeMathf.rem + f32.const 0 f32.const 0 - call $std/math/test_remf + call $std/math/check i32.eqz if i32.const 0 @@ -39931,8 +40868,10 @@ end f32.const 0 f32.const -inf + call $~lib/math/NativeMathf.rem f32.const 0 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39944,8 +40883,10 @@ end f32.const 0 f32.const nan:0x400000 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39957,8 +40898,10 @@ end f32.const -0 f32.const 0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39970,8 +40913,10 @@ end f32.const -0 f32.const -0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39983,8 +40928,10 @@ end f32.const -0 f32.const inf + call $~lib/math/NativeMathf.rem f32.const -0 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39996,8 +40943,10 @@ end f32.const -0 f32.const -inf + call $~lib/math/NativeMathf.rem f32.const -0 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40009,8 +40958,10 @@ end f32.const -0 f32.const nan:0x400000 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40022,8 +40973,10 @@ end f32.const 1 f32.const 0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40035,8 +40988,10 @@ end f32.const -1 f32.const 0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40048,8 +41003,10 @@ end f32.const inf f32.const 0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40061,8 +41018,10 @@ end f32.const -inf f32.const 0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40074,8 +41033,10 @@ end f32.const nan:0x400000 f32.const 0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40087,8 +41048,10 @@ end f32.const -1 f32.const -0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40100,8 +41063,10 @@ end f32.const inf f32.const -0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40113,8 +41078,10 @@ end f32.const -inf f32.const -0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40126,8 +41093,10 @@ end f32.const nan:0x400000 f32.const -0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40139,8 +41108,10 @@ end f32.const inf f32.const 2 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40152,8 +41123,10 @@ end f32.const inf f32.const -0.5 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40165,8 +41138,10 @@ end f32.const inf f32.const nan:0x400000 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40178,8 +41153,10 @@ end f32.const -inf f32.const 2 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40191,8 +41168,10 @@ end f32.const -inf f32.const -0.5 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40204,8 +41183,10 @@ end f32.const -inf f32.const nan:0x400000 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40217,8 +41198,10 @@ end f32.const nan:0x400000 f32.const nan:0x400000 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40230,8 +41213,10 @@ end f32.const 1 f32.const nan:0x400000 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40243,8 +41228,10 @@ end f32.const -1 f32.const nan:0x400000 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40256,8 +41243,10 @@ end f32.const 1 f32.const inf + call $~lib/math/NativeMathf.rem f32.const 1 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40269,8 +41258,10 @@ end f32.const -1 f32.const inf + call $~lib/math/NativeMathf.rem f32.const -1 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40282,8 +41273,10 @@ end f32.const inf f32.const inf + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40295,8 +41288,10 @@ end f32.const -inf f32.const inf + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40308,8 +41303,10 @@ end f32.const 1 f32.const -inf + call $~lib/math/NativeMathf.rem f32.const 1 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40321,8 +41318,10 @@ end f32.const -1 f32.const -inf + call $~lib/math/NativeMathf.rem f32.const -1 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40334,8 +41333,10 @@ end f32.const inf f32.const -inf + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40347,8 +41348,10 @@ end f32.const -inf f32.const -inf + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40360,8 +41363,10 @@ end f32.const 1.75 f32.const 0.5 + call $~lib/math/NativeMathf.rem f32.const -0.25 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40373,8 +41378,10 @@ end f32.const -1.75 f32.const 0.5 + call $~lib/math/NativeMathf.rem f32.const 0.25 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40386,8 +41393,10 @@ end f32.const 1.75 f32.const -0.5 + call $~lib/math/NativeMathf.rem f32.const -0.25 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40399,8 +41408,10 @@ end f32.const -1.75 f32.const -0.5 + call $~lib/math/NativeMathf.rem f32.const 0.25 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40412,8 +41423,10 @@ end f32.const 5.877471754111438e-39 f32.const inf + call $~lib/math/NativeMathf.rem f32.const 5.877471754111438e-39 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -43682,10 +44695,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.066848754882812 + f32.const -nan:0x400000 f32.const nan:0x400000 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43695,10 +44708,10 @@ call $~lib/builtins/abort unreachable end - f32.const 4.345239639282227 + f32.const 2.084523916244507 f32.const 2.084523916244507 f32.const 0.3200402557849884 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43708,10 +44721,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.381433486938477 + f32.const -nan:0x400000 f32.const nan:0x400000 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43721,10 +44734,10 @@ call $~lib/builtins/abort unreachable end - f32.const -6.531673431396484 + f32.const -nan:0x400000 f32.const nan:0x400000 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43734,10 +44747,10 @@ call $~lib/builtins/abort unreachable end - f32.const 9.267057418823242 + f32.const 3.0441842079162598 f32.const 3.0441842079162598 f32.const 0.05022354796528816 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43747,10 +44760,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.6619858741760254 + f32.const 0.813625156879425 f32.const 0.813625156879425 f32.const 0.2240506112575531 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43760,10 +44773,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.40660393238067627 + f32.const -nan:0x400000 f32.const nan:0x400000 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43773,10 +44786,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5617597699165344 + f32.const 0.7495063543319702 f32.const 0.7495063543319702 f32.const 0.05895441770553589 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43786,10 +44799,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.7741522789001465 + f32.const 0.879859209060669 f32.const 0.879859209060669 f32.const -0.4874873757362366 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43799,10 +44812,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.6787636876106262 + f32.const -nan:0x400000 f32.const nan:0x400000 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43815,7 +44828,7 @@ f32.const nan:0x400000 f32.const nan:0x400000 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43828,7 +44841,7 @@ f32.const inf f32.const inf f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43838,10 +44851,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf + f32.const -nan:0x400000 f32.const nan:0x400000 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43854,7 +44867,7 @@ f32.const 0 f32.const 0 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43867,7 +44880,7 @@ f32.const -0 f32.const -0 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43880,7 +44893,7 @@ f32.const 1 f32.const 1 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43890,10 +44903,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1 + f32.const -nan:0x400000 f32.const nan:0x400000 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43903,10 +44916,10 @@ call $~lib/builtins/abort unreachable end - f32.const 4 + f32.const 2 f32.const 2 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43916,10 +44929,10 @@ call $~lib/builtins/abort unreachable end - f32.const 2.802596928649634e-45 + f32.const 5.293955920339377e-23 f32.const 5.293955920339377e-23 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43929,10 +44942,10 @@ call $~lib/builtins/abort unreachable end - f32.const 4.203895392974451e-45 + f32.const 6.483745598763743e-23 f32.const 6.483745598763743e-23 f32.const 0.37388554215431213 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43942,10 +44955,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.401298464324817e-45 + f32.const 3.743392066509216e-23 f32.const 3.743392066509216e-23 f32.const -0.20303145051002502 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43955,10 +44968,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1.401298464324817e-45 + f32.const -nan:0x400000 f32.const nan:0x400000 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43968,10 +44981,10 @@ call $~lib/builtins/abort unreachable end - f32.const 3402823466385288598117041e14 + f32.const 18446742974197923840 f32.const 18446742974197923840 f32.const -0.5 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43981,10 +44994,10 @@ call $~lib/builtins/abort unreachable end - f32.const -3402823466385288598117041e14 + f32.const -nan:0x400000 f32.const nan:0x400000 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43994,10 +45007,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.9999998807907104 + f32.const 0.9999999403953552 f32.const 0.9999999403953552 f32.const 2.980232594040899e-08 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -44010,7 +45023,7 @@ f32.const 0.9999999403953552 f32.const 0.9999999403953552 f32.const -0.5 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -44020,10 +45033,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.999999761581421 + f32.const 1.4142134189605713 f32.const 1.4142134189605713 f32.const -0.4959246516227722 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -44033,10 +45046,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.9999998807907104 + f32.const 1.4142135381698608 f32.const 1.4142135381698608 f32.const 0.15052194893360138 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -44046,10 +45059,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.0000001192092896 + f32.const 1 f32.const 1 f32.const -0.5 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -44059,10 +45072,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.000000238418579 + f32.const 1.0000001192092896 f32.const 1.0000001192092896 f32.const 5.960463766996327e-08 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -44072,10 +45085,10 @@ call $~lib/builtins/abort unreachable end - f32.const 2.000000238418579 + f32.const 1.4142136573791504 f32.const 1.4142136573791504 f32.const 0.08986179530620575 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -44085,10 +45098,10 @@ call $~lib/builtins/abort unreachable end - f32.const 2.000000476837158 + f32.const 1.41421377658844 f32.const 1.41421377658844 f32.const 0.3827550709247589 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -46348,9 +47361,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.066848754882812 f32.const -8 - call $std/math/test_truncf + f32.const -8 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46360,9 +47374,10 @@ call $~lib/builtins/abort unreachable end - f32.const 4.345239639282227 f32.const 4 - call $std/math/test_truncf + f32.const 4 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46372,9 +47387,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.381433486938477 f32.const -8 - call $std/math/test_truncf + f32.const -8 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46384,9 +47400,10 @@ call $~lib/builtins/abort unreachable end - f32.const -6.531673431396484 f32.const -6 - call $std/math/test_truncf + f32.const -6 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46396,9 +47413,10 @@ call $~lib/builtins/abort unreachable end - f32.const 9.267057418823242 f32.const 9 - call $std/math/test_truncf + f32.const 9 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46408,9 +47426,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.6619858741760254 f32.const 0 - call $std/math/test_truncf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46420,9 +47439,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.40660393238067627 f32.const -0 - call $std/math/test_truncf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46432,9 +47452,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5617597699165344 f32.const 0 - call $std/math/test_truncf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46444,9 +47465,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.7741522789001465 f32.const 0 - call $std/math/test_truncf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46456,9 +47478,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.6787636876106262 f32.const -0 - call $std/math/test_truncf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46470,7 +47493,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_truncf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46482,7 +47506,8 @@ end f32.const inf f32.const inf - call $std/math/test_truncf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46494,7 +47519,8 @@ end f32.const -inf f32.const -inf - call $std/math/test_truncf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46506,7 +47532,8 @@ end f32.const 0 f32.const 0 - call $std/math/test_truncf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46518,7 +47545,8 @@ end f32.const -0 f32.const -0 - call $std/math/test_truncf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46530,7 +47558,8 @@ end f32.const 1 f32.const 1 - call $std/math/test_truncf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46542,7 +47571,8 @@ end f32.const -1 f32.const -1 - call $std/math/test_truncf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46552,9 +47582,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5 f32.const 0 - call $std/math/test_truncf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46564,9 +47595,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.5 f32.const -0 - call $std/math/test_truncf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46576,9 +47608,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.0000152587890625 f32.const 1 - call $std/math/test_truncf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46588,9 +47621,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1.0000152587890625 f32.const -1 - call $std/math/test_truncf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46600,9 +47634,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.9999923706054688 f32.const 0 - call $std/math/test_truncf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46612,9 +47647,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.9999923706054688 f32.const -0 - call $std/math/test_truncf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46624,9 +47660,10 @@ call $~lib/builtins/abort unreachable end - f32.const 7.888609052210118e-31 f32.const 0 - call $std/math/test_truncf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46636,9 +47673,10 @@ call $~lib/builtins/abort unreachable end - f32.const -7.888609052210118e-31 f32.const -0 - call $std/math/test_truncf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 diff --git a/tests/compiler/std/object.optimized.wat b/tests/compiler/std/object.optimized.wat index 856757bab1..f5ee467af6 100644 --- a/tests/compiler/std/object.optimized.wat +++ b/tests/compiler/std/object.optimized.wat @@ -1,8 +1,7 @@ (module (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 (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 $f32_f32_=>_i32 (func (param f32 f32) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) @@ -55,23 +54,6 @@ f32.ne i32.and ) - (func $~lib/object/Object.is (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - local.get $1 - i32.const 0 - i32.ne - i32.eq - ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - 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) @@ -148,38 +130,45 @@ end i32.const 0 ) - (func $~lib/object/Object.is<~lib/string/String> (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - block $__inlined_func$~lib/string/String.__eq (result i32) + local.get $0 + local.get $1 + i32.eq + if i32.const 1 + return + end + block $folding-inner0 + local.get $1 + i32.eqz + i32.const 1 + local.get $0 + select + br_if $folding-inner0 local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $2 local.get $1 - i32.eq - br_if $__inlined_func$~lib/string/String.__eq - drop - block $folding-inner0 - local.get $1 - i32.eqz - i32.const 1 - local.get $0 - select - br_if $folding-inner0 - local.get $0 - call $~lib/string/String#get:length - local.tee $2 - local.get $1 - call $~lib/string/String#get:length - i32.ne - br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz - br $__inlined_func$~lib/string/String.__eq - end - i32.const 0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + i32.ne + br_if $folding-inner0 + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/string/compareImpl + i32.eqz + return end + i32.const 0 ) (func $start:std/object f64.const 0 @@ -523,46 +512,9 @@ call $~lib/builtins/abort unreachable end - i32.const 1 - i32.const 1 - call $~lib/object/Object.is - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 41 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - i32.const 0 - call $~lib/object/Object.is - if - i32.const 0 - i32.const 1040 - i32.const 42 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - i32.const 0 - call $~lib/object/Object.is - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 43 - i32.const 1 - call $~lib/builtins/abort - unreachable - end i32.const 1088 i32.const 1088 - call $~lib/object/Object.is<~lib/string/String> + call $~lib/string/String.__eq i32.const 1 i32.ne if @@ -575,7 +527,7 @@ end i32.const 1088 i32.const 1120 - call $~lib/object/Object.is<~lib/string/String> + call $~lib/string/String.__eq if i32.const 0 i32.const 1040 @@ -586,7 +538,7 @@ end i32.const 1088 i32.const 1152 - call $~lib/object/Object.is<~lib/string/String> + call $~lib/string/String.__eq if i32.const 0 i32.const 1040 @@ -597,7 +549,7 @@ end i32.const 0 i32.const 0 - call $~lib/object/Object.is<~lib/string/String> + call $~lib/string/String.__eq i32.const 1 i32.ne if @@ -610,7 +562,7 @@ end i32.const 1184 i32.const 0 - call $~lib/object/Object.is<~lib/string/String> + call $~lib/string/String.__eq if i32.const 0 i32.const 1040 @@ -621,7 +573,7 @@ end i32.const 0 i32.const 1184 - call $~lib/object/Object.is<~lib/string/String> + call $~lib/string/String.__eq if i32.const 0 i32.const 1040 diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index fc82d12ebf..6d1b020b39 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -2120,12 +2120,10 @@ global.set $std/operator-overloading/incdec global.get $std/operator-overloading/incdec local.tee $0 + local.get $0 i32.load i32.const 1 i32.add - local.set $1 - local.get $0 - local.get $1 i32.store local.get $0 local.get $0 @@ -2158,12 +2156,10 @@ end global.get $std/operator-overloading/incdec local.tee $0 + local.get $0 i32.load i32.const 1 i32.sub - local.set $1 - local.get $0 - local.get $1 i32.store local.get $0 local.get $0 diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 879cb6859c..854a6780a7 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -8,13 +8,13 @@ (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i32_i64_=>_none (func (param i32 i64))) (type $i32_f32_=>_none (func (param i32 f32))) (type $i32_f64_=>_none (func (param i32 f64))) + (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) @@ -41,15 +41,6 @@ (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -85,14 +76,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -211,9 +194,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -221,7 +210,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -387,12 +376,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -482,14 +471,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -643,10 +638,13 @@ i32.const 23 i32.lt_u if - i32.const 1456 local.get $1 + i32.const 2 + i32.shl + i32.const 1456 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -710,6 +708,7 @@ ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $1 i32.const 256 i32.lt_u @@ -719,23 +718,22 @@ i32.shr_u local.set $1 else + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 local.get $1 i32.const 536870904 i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.set $1 - end - local.get $1 + select + local.tee $1 i32.const 31 local.get $1 i32.clz @@ -771,7 +769,10 @@ end local.get $0 local.get $2 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const -1 local.get $1 i32.shl @@ -798,8 +799,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -811,7 +817,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -887,6 +893,7 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -917,11 +924,13 @@ memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 + i32.shl + local.set $5 local.get $3 i32.const 16 - i32.shl + local.get $0 + i32.load offset=1568 + local.get $5 i32.const 16 i32.sub i32.ne @@ -949,9 +958,11 @@ i32.const 16 i32.shr_u local.tee $5 + i32.gt_s + local.set $6 local.get $3 local.get $5 - i32.gt_s + local.get $6 select memory.grow i32.const 0 @@ -1022,14 +1033,6 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -1262,9 +1265,12 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize local.get $0 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $1 local.get $0 call $~lib/util/memory/memset @@ -1317,9 +1323,12 @@ ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 3 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -1343,20 +1352,16 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash8 (param $0 i32) (result i32) - local.get $0 - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - ) (func $~lib/util/hash/HASH (param $0 i32) (result i32) local.get $0 i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/util/hash/hash8 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -1401,15 +1406,6 @@ end i32.const 0 ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/set/Set#find - i32.const 0 - i32.ne - ) (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -1620,6 +1616,78 @@ local.get $0 call $~lib/rt/pure/__retain ) + (func $~lib/array/Array#constructor (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + i32.const 1200 + i32.const 1360 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $0 + call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + 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 + local.get $1 + local.set $2 + local.get $1 + local.get $3 + i32.load + local.tee $4 + i32.ne + if + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $4 + call $~lib/rt/pure/__release + end + local.get $3 + local.get $2 + i32.store + local.get $3 + local.get $1 + i32.store offset=4 + local.get $3 + local.get $0 + i32.store offset=8 + local.get $3 + local.get $0 + i32.store offset=12 + local.get $3 + ) (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -2052,154 +2120,42 @@ local.get $1 i32.store offset=12 ) - (func $~lib/set/Set#values (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.get $0 - i32.load offset=8 - local.set $5 + (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 - i32.load offset=16 - local.tee $4 - local.tee $8 - i32.const 1073741808 - i32.gt_u + i32.load offset=12 + i32.ge_u if - i32.const 1200 + i32.const 1408 i32.const 1360 - i32.const 57 - i32.const 60 + i32.const 104 + i32.const 42 call $~lib/builtins/abort unreachable end - local.get $8 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $8 - call $~lib/util/memory/memset - i32.const 16 - i32.const 4 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $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 $2 - local.set $1 - 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 - local.get $8 - i32.store offset=8 - local.get $0 - local.get $8 - i32.store offset=12 - loop $for-loop|0 - local.get $6 - local.get $4 - i32.lt_s - if - local.get $5 - local.get $6 - i32.const 3 - i32.shl - i32.add - local.tee $2 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $7 - local.get $2 - i32.load8_s - call $~lib/array/Array#__set - local.get $7 - i32.const 1 - i32.add - local.set $7 - end - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|0 - end - end - local.get $0 - local.get $7 - call $~lib/array/Array#set:length - local.get $0 - ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 1408 - i32.const 1360 - i32.const 104 - i32.const 42 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.add - i32.load8_s - ) - (func $~lib/set/Set#delete (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/set/Set#find - local.tee $1 - i32.eqz - if - return - end - local.get $1 - local.get $1 - i32.load offset=4 - i32.const 1 - i32.or + i32.load offset=4 + local.get $1 + i32.add + i32.load8_s + ) + (func $~lib/set/Set#delete (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + local.get $1 + call $~lib/util/hash/HASH + call $~lib/set/Set#find + local.tee $1 + i32.eqz + if + return + end + local.get $1 + local.get $1 + i32.load offset=4 + i32.const 1 + i32.or i32.store offset=4 local.get $0 local.get $0 @@ -2247,6 +2203,10 @@ (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) call $~lib/set/Set#constructor local.set $0 loop $for-loop|1 @@ -2260,7 +2220,9 @@ if local.get $0 local.get $2 - call $~lib/set/Set#has + local.get $2 + call $~lib/util/hash/HASH + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -2275,7 +2237,9 @@ call $~lib/rt/pure/__release local.get $0 local.get $2 - call $~lib/set/Set#has + local.get $2 + call $~lib/util/hash/HASH + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -2317,7 +2281,9 @@ if local.get $0 local.get $2 - call $~lib/set/Set#has + local.get $2 + call $~lib/util/hash/HASH + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -2333,7 +2299,9 @@ call $~lib/rt/pure/__release local.get $0 local.get $2 - call $~lib/set/Set#has + local.get $2 + call $~lib/util/hash/HASH + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -2363,8 +2331,49 @@ unreachable end local.get $0 - call $~lib/set/Set#values + i32.load offset=8 + local.set $5 + local.get $0 + i32.load offset=16 + local.tee $6 + call $~lib/array/Array#constructor local.set $2 + loop $for-loop|0 + local.get $4 + local.get $6 + i32.lt_s + if + local.get $5 + local.get $4 + i32.const 3 + i32.shl + i32.add + local.tee $7 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $2 + local.get $3 + local.get $7 + i32.load8_s + call $~lib/array/Array#__set + local.get $3 + i32.const 1 + i32.add + local.set $3 + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 + end + end + local.get $2 + local.get $3 + call $~lib/array/Array#set:length call $~lib/set/Set#constructor local.set $3 loop $for-loop|4 @@ -2373,11 +2382,16 @@ i32.load offset=12 i32.lt_s if - local.get $0 local.get $2 local.get $1 call $~lib/array/Array#__get - call $~lib/set/Set#has + local.tee $4 + call $~lib/util/hash/HASH + local.set $5 + local.get $0 + local.get $4 + local.get $5 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -2426,7 +2440,9 @@ if local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + call $~lib/util/hash/HASH + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -2441,7 +2457,9 @@ call $~lib/set/Set#delete local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + call $~lib/util/hash/HASH + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -2482,7 +2500,9 @@ if local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + call $~lib/util/hash/HASH + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -2497,7 +2517,9 @@ call $~lib/rt/pure/__release local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + call $~lib/util/hash/HASH + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -2512,7 +2534,9 @@ call $~lib/set/Set#delete local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + call $~lib/util/hash/HASH + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -2561,9 +2585,12 @@ ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 5 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -2587,17 +2614,6 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - i32.const 255 - i32.and - call $~lib/util/hash/hash8 - call $~lib/set/Set#find - i32.const 0 - i32.ne - ) (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -2619,7 +2635,7 @@ i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $6 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor @@ -2632,11 +2648,11 @@ i32.const 3 i32.shl i32.add - local.set $6 + local.set $5 local.get $2 local.set $3 loop $while-continue|0 - local.get $6 + local.get $5 local.get $8 i32.ne if @@ -2652,18 +2668,21 @@ i32.store8 local.get $3 local.get $4 + local.get $1 local.get $8 i32.load8_u - call $~lib/util/hash/hash8 - local.get $1 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul i32.and i32.const 2 i32.shl i32.add - local.tee $5 + local.tee $7 i32.load i32.store offset=4 - local.get $5 + local.get $7 local.get $3 i32.store local.get $3 @@ -2682,13 +2701,13 @@ local.tee $3 local.get $0 i32.load - local.tee $8 + local.tee $7 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $8 + local.get $7 call $~lib/rt/pure/__release end local.get $0 @@ -2714,7 +2733,7 @@ local.get $1 i32.store offset=8 local.get $0 - local.get $7 + local.get $6 i32.store offset=12 local.get $0 local.get $0 @@ -2732,7 +2751,10 @@ local.get $1 i32.const 255 i32.and - call $~lib/util/hash/hash8 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul local.tee $2 local.set $3 local.get $0 @@ -2812,22 +2834,12 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/set/Set#values (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (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.get $0 - i32.load offset=8 - local.set $5 - local.get $0 - i32.load offset=16 - local.tee $4 - local.tee $8 i32.const 1073741808 i32.gt_u if @@ -2838,91 +2850,61 @@ call $~lib/builtins/abort unreachable end - local.get $8 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $0 call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 6 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 i32.const 0 i32.store - local.get $0 + local.get $3 i32.const 0 i32.store offset=4 - local.get $0 + local.get $3 i32.const 0 i32.store offset=8 - local.get $0 + local.get $3 i32.const 0 i32.store offset=12 - local.get $2 - local.set $1 - local.get $2 - local.get $0 + local.get $1 + local.set $2 + local.get $1 + local.get $3 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $3 + local.set $2 + local.get $4 call $~lib/rt/pure/__release end - local.get $0 - local.get $1 - i32.store - local.get $0 + local.get $3 local.get $2 + i32.store + local.get $3 + local.get $1 i32.store offset=4 + local.get $3 local.get $0 - local.get $8 i32.store offset=8 + local.get $3 local.get $0 - local.get $8 i32.store offset=12 - loop $for-loop|0 - local.get $6 - local.get $4 - i32.lt_s - if - local.get $5 - local.get $6 - i32.const 3 - i32.shl - i32.add - local.tee $2 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $7 - local.get $2 - i32.load8_u - call $~lib/array/Array#__set - local.get $7 - i32.const 1 - i32.add - local.set $7 - end - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|0 - end - end - local.get $0 - local.get $7 - call $~lib/array/Array#set:length - local.get $0 + local.get $3 ) (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 @@ -2950,7 +2932,10 @@ local.get $1 i32.const 255 i32.and - call $~lib/util/hash/hash8 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/set/Set#find local.tee $1 i32.eqz @@ -3009,6 +2994,10 @@ (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) call $~lib/set/Set#constructor local.set $0 loop $for-loop|1 @@ -3020,7 +3009,14 @@ if local.get $0 local.get $2 - call $~lib/set/Set#has + local.get $2 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -3035,7 +3031,14 @@ call $~lib/rt/pure/__release local.get $0 local.get $2 - call $~lib/set/Set#has + local.get $2 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -3075,7 +3078,14 @@ if local.get $0 local.get $2 - call $~lib/set/Set#has + local.get $2 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -3091,7 +3101,14 @@ call $~lib/rt/pure/__release local.get $0 local.get $2 - call $~lib/set/Set#has + local.get $2 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -3121,8 +3138,49 @@ unreachable end local.get $0 - call $~lib/set/Set#values + i32.load offset=8 + local.set $5 + local.get $0 + i32.load offset=16 + local.tee $6 + call $~lib/array/Array#constructor local.set $2 + loop $for-loop|0 + local.get $4 + local.get $6 + i32.lt_s + if + local.get $5 + local.get $4 + i32.const 3 + i32.shl + i32.add + local.tee $7 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $2 + local.get $3 + local.get $7 + i32.load8_u + call $~lib/array/Array#__set + local.get $3 + i32.const 1 + i32.add + local.set $3 + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 + end + end + local.get $2 + local.get $3 + call $~lib/array/Array#set:length call $~lib/set/Set#constructor local.set $3 loop $for-loop|4 @@ -3131,11 +3189,21 @@ i32.load offset=12 i32.lt_s if - local.get $0 local.get $2 local.get $1 call $~lib/array/Array#__get - call $~lib/set/Set#has + local.tee $4 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + local.set $5 + local.get $0 + local.get $4 + local.get $5 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -3182,7 +3250,14 @@ if local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -3197,7 +3272,14 @@ call $~lib/set/Set#delete local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -3236,7 +3318,14 @@ if local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -3251,7 +3340,14 @@ call $~lib/rt/pure/__release local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -3266,7 +3362,14 @@ call $~lib/set/Set#delete local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -3315,9 +3418,12 @@ ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 7 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -3356,14 +3462,6 @@ i32.const 16777619 i32.mul ) - (func $~lib/util/hash/HASH (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load @@ -3411,7 +3509,11 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 call $~lib/set/Set#find i32.const 0 i32.ne @@ -3472,7 +3574,7 @@ local.get $4 local.get $8 i32.load16_s - call $~lib/util/hash/HASH + call $~lib/util/hash/hash16 local.get $1 i32.and i32.const 2 @@ -3547,11 +3649,17 @@ (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + local.tee $2 + local.set $3 + local.get $0 local.get $1 - call $~lib/util/hash/HASH - local.tee $3 + local.get $2 call $~lib/set/Set#find i32.eqz if @@ -3626,6 +3734,82 @@ local.get $0 call $~lib/rt/pure/__retain ) + (func $~lib/array/Array#constructor (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.const 536870904 + i32.gt_u + if + i32.const 1200 + i32.const 1360 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + i32.const 1 + i32.shl + local.tee $4 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $4 + call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + 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 + local.get $1 + local.set $2 + local.get $1 + local.get $3 + i32.load + local.tee $5 + i32.ne + if + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $5 + call $~lib/rt/pure/__release + end + local.get $3 + local.get $2 + i32.store + local.get $3 + local.get $1 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store offset=8 + local.get $3 + local.get $0 + i32.store offset=12 + local.get $3 + ) (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 @@ -3676,130 +3860,13 @@ local.get $1 i32.store offset=12 ) - (func $~lib/set/Set#values (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 - i32.load offset=8 - local.set $4 + (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 - i32.load offset=16 - local.tee $7 - local.set $6 - local.get $7 - i32.const 536870904 - i32.gt_u + i32.load offset=12 + i32.ge_u if - i32.const 1200 - i32.const 1360 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 1 - i32.shl - local.tee $5 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $5 - call $~lib/util/memory/memset - i32.const 16 - i32.const 8 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $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 $2 - local.set $1 - 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 - local.get $5 - i32.store offset=8 - local.get $0 - local.get $6 - i32.store offset=12 - loop $for-loop|0 - local.get $8 - local.get $7 - i32.lt_s - if - local.get $4 - local.get $8 - i32.const 3 - i32.shl - i32.add - local.tee $2 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $9 - local.get $2 - i32.load16_s - call $~lib/array/Array#__set - local.get $9 - i32.const 1 - i32.add - local.set $9 - end - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|0 - end - end - local.get $0 - local.get $9 - call $~lib/array/Array#set:length - local.get $0 - ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 1408 + i32.const 1408 i32.const 1360 i32.const 104 i32.const 42 @@ -3819,7 +3886,11 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 call $~lib/set/Set#find local.tee $1 i32.eqz @@ -3878,6 +3949,10 @@ (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) call $~lib/set/Set#constructor local.set $0 loop $for-loop|1 @@ -3994,8 +4069,49 @@ unreachable end local.get $0 - call $~lib/set/Set#values + i32.load offset=8 + local.set $5 + local.get $0 + i32.load offset=16 + local.tee $6 + call $~lib/array/Array#constructor local.set $2 + loop $for-loop|0 + local.get $4 + local.get $6 + i32.lt_s + if + local.get $5 + local.get $4 + i32.const 3 + i32.shl + i32.add + local.tee $7 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $2 + local.get $3 + local.get $7 + i32.load16_s + call $~lib/array/Array#__set + local.get $3 + i32.const 1 + i32.add + local.set $3 + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 + end + end + local.get $2 + local.get $3 + call $~lib/array/Array#set:length call $~lib/set/Set#constructor local.set $3 loop $for-loop|4 @@ -4192,9 +4308,12 @@ ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 9 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -4443,24 +4562,13 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/set/Set#values (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (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 - i32.load offset=8 - local.set $4 local.get $0 - i32.load offset=16 - local.tee $7 - local.set $6 - local.get $7 i32.const 536870904 i32.gt_u if @@ -4471,94 +4579,64 @@ call $~lib/builtins/abort unreachable end - local.get $6 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 i32.const 1 i32.shl - local.tee $5 + local.tee $4 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $4 call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 10 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 i32.const 0 i32.store - local.get $0 + local.get $3 i32.const 0 i32.store offset=4 - local.get $0 + local.get $3 i32.const 0 i32.store offset=8 - local.get $0 + local.get $3 i32.const 0 i32.store offset=12 - local.get $2 - local.set $1 - local.get $2 - local.get $0 + local.get $1 + local.set $2 + local.get $1 + local.get $3 i32.load - local.tee $3 + local.tee $5 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $3 + local.set $2 + local.get $5 call $~lib/rt/pure/__release end - local.get $0 - local.get $1 - i32.store - local.get $0 + local.get $3 local.get $2 + i32.store + local.get $3 + local.get $1 i32.store offset=4 - local.get $0 - local.get $5 + local.get $3 + local.get $4 i32.store offset=8 + local.get $3 local.get $0 - local.get $6 i32.store offset=12 - loop $for-loop|0 - local.get $8 - local.get $7 - i32.lt_s - if - local.get $4 - local.get $8 - i32.const 3 - i32.shl - i32.add - local.tee $2 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $9 - local.get $2 - i32.load16_u - call $~lib/array/Array#__set - local.get $9 - i32.const 1 - i32.add - local.set $9 - end - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|0 - end - end - local.get $0 - local.get $9 - call $~lib/array/Array#set:length - local.get $0 + local.get $3 ) (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 @@ -4647,6 +4725,10 @@ (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) call $~lib/set/Set#constructor local.set $0 loop $for-loop|1 @@ -4759,10 +4841,51 @@ unreachable end local.get $0 - call $~lib/set/Set#values + i32.load offset=8 + local.set $5 + local.get $0 + i32.load offset=16 + local.tee $6 + call $~lib/array/Array#constructor local.set $2 - call $~lib/set/Set#constructor - local.set $3 + loop $for-loop|0 + local.get $4 + local.get $6 + i32.lt_s + if + local.get $5 + local.get $4 + i32.const 3 + i32.shl + i32.add + local.tee $7 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $2 + local.get $3 + local.get $7 + i32.load16_u + call $~lib/array/Array#__set + local.get $3 + i32.const 1 + i32.add + local.set $3 + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 + end + end + local.get $2 + local.get $3 + call $~lib/array/Array#set:length + call $~lib/set/Set#constructor + local.set $3 loop $for-loop|4 local.get $1 local.get $2 @@ -4953,9 +5076,12 @@ ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 11 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -5051,15 +5177,6 @@ end i32.const 0 ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find - i32.const 0 - i32.ne - ) (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -5075,46 +5192,46 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $3 local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $8 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $2 local.get $0 i32.load offset=8 - local.tee $8 + local.tee $5 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $6 + local.set $7 local.get $2 - local.set $3 + local.set $4 loop $while-continue|0 - local.get $6 - local.get $8 + local.get $5 + local.get $7 i32.ne if - local.get $8 + local.get $5 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $3 - local.get $8 + local.get $4 + local.get $5 i32.load i32.store - local.get $3 local.get $4 - local.get $8 + local.get $3 + local.get $5 i32.load call $~lib/util/hash/hash32 local.get $1 @@ -5122,39 +5239,39 @@ i32.const 2 i32.shl i32.add - local.tee $5 + local.tee $6 i32.load i32.store offset=4 - local.get $5 - local.get $3 + local.get $6 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 8 i32.add - local.set $3 + local.set $4 end - local.get $8 + local.get $5 i32.const 8 i32.add - local.set $8 + local.set $5 br $while-continue|0 end end - local.get $4 - local.tee $3 + local.get $3 + local.tee $5 local.get $0 i32.load - local.tee $8 + local.tee $4 i32.ne if - local.get $3 + local.get $5 call $~lib/rt/pure/__retain - local.set $3 - local.get $8 + local.set $5 + local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $3 + local.get $5 i32.store local.get $0 local.get $1 @@ -5163,26 +5280,26 @@ local.tee $1 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 local.get $1 i32.store offset=8 local.get $0 - local.get $7 + local.get $8 i32.store offset=12 local.get $0 local.get $0 i32.load offset=20 i32.store offset=16 - local.get $4 + local.get $3 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release @@ -5191,13 +5308,11 @@ (local $2 i32) (local $3 i32) (local $4 i32) - local.get $1 - call $~lib/util/hash/hash32 - local.tee $2 - local.set $3 local.get $0 local.get $1 - local.get $2 + local.get $1 + call $~lib/util/hash/hash32 + local.tee $3 call $~lib/set/Set#find i32.eqz if @@ -5272,74 +5387,13 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 1408 - i32.const 1360 - i32.const 120 - i32.const 22 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 2 - call $~lib/array/ensureSize - local.get $0 - local.get $3 - i32.store offset=12 - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store - ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - i32.load offset=12 - drop - local.get $0 - local.get $1 - i32.const 2 - call $~lib/array/ensureSize - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/set/Set#values (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (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 - i32.load offset=8 - local.set $4 local.get $0 - i32.load offset=16 - local.tee $7 - local.set $6 - local.get $7 i32.const 268435452 i32.gt_u if @@ -5350,94 +5404,114 @@ call $~lib/builtins/abort unreachable end - local.get $6 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 i32.const 2 i32.shl - local.tee $5 + local.tee $4 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $4 call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 12 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 i32.const 0 i32.store - local.get $0 + local.get $3 i32.const 0 i32.store offset=4 - local.get $0 + local.get $3 i32.const 0 i32.store offset=8 - local.get $0 + local.get $3 i32.const 0 i32.store offset=12 - local.get $2 - local.set $1 - local.get $2 - local.get $0 + local.get $1 + local.set $2 + local.get $1 + local.get $3 i32.load - local.tee $3 + local.tee $5 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $3 + local.set $2 + local.get $5 call $~lib/rt/pure/__release end - local.get $0 - local.get $1 - i32.store - local.get $0 + local.get $3 local.get $2 + i32.store + local.get $3 + local.get $1 i32.store offset=4 - local.get $0 - local.get $5 + local.get $3 + local.get $4 i32.store offset=8 + local.get $3 local.get $0 - local.get $6 i32.store offset=12 - loop $for-loop|0 - local.get $8 - local.get $7 + local.get $3 + ) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + local.get $1 + i32.const 0 i32.lt_s if - local.get $4 - local.get $8 - i32.const 3 - i32.shl - i32.add - local.tee $2 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $9 - local.get $2 - i32.load - call $~lib/array/Array#__set - local.get $9 - i32.const 1 - i32.add - local.set $9 - end - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|0 + i32.const 1408 + i32.const 1360 + i32.const 120 + i32.const 22 + call $~lib/builtins/abort + unreachable end + local.get $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 2 + call $~lib/array/ensureSize + local.get $0 + local.get $3 + i32.store offset=12 end local.get $0 - local.get $9 - call $~lib/array/Array#set:length + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + ) + (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=12 + drop + local.get $0 + local.get $1 + i32.const 2 + call $~lib/array/ensureSize local.get $0 + local.get $1 + i32.store offset=12 ) (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 @@ -5462,6 +5536,7 @@ ) (func $~lib/set/Set#delete (param $0 i32) (param $1 i32) (local $2 i32) + (local $3 i32) local.get $0 local.get $1 local.get $1 @@ -5484,20 +5559,22 @@ i32.const 1 i32.sub i32.store offset=20 + i32.const 4 + local.get $0 + i32.load offset=20 + local.tee $1 + i32.gt_u + local.set $2 local.get $0 i32.load offset=4 i32.const 1 i32.shr_u - local.tee $2 + local.tee $3 i32.const 1 i32.add i32.const 4 - local.get $0 - i32.load offset=20 - local.tee $1 - i32.const 4 local.get $1 - i32.gt_u + local.get $2 select i32.ge_u if (result i32) @@ -5515,7 +5592,7 @@ end if local.get $0 - local.get $2 + local.get $3 call $~lib/set/Set#rehash end ) @@ -5524,6 +5601,10 @@ (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) call $~lib/set/Set#constructor local.set $0 loop $for-loop|0 @@ -5533,7 +5614,9 @@ if local.get $0 local.get $2 - call $~lib/set/Set#has + local.get $2 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -5548,7 +5631,9 @@ call $~lib/rt/pure/__release local.get $0 local.get $2 - call $~lib/set/Set#has + local.get $2 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -5586,7 +5671,9 @@ if local.get $0 local.get $2 - call $~lib/set/Set#has + local.get $2 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -5602,7 +5689,9 @@ call $~lib/rt/pure/__release local.get $0 local.get $2 - call $~lib/set/Set#has + local.get $2 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -5632,8 +5721,49 @@ unreachable end local.get $0 - call $~lib/set/Set#values + i32.load offset=8 + local.set $5 + local.get $0 + i32.load offset=16 + local.tee $6 + call $~lib/array/Array#constructor local.set $2 + loop $for-loop|00 + local.get $4 + local.get $6 + i32.lt_s + if + local.get $5 + local.get $4 + i32.const 3 + i32.shl + i32.add + local.tee $7 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $2 + local.get $3 + local.get $7 + i32.load + call $~lib/array/Array#__set + local.get $3 + i32.const 1 + i32.add + local.set $3 + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|00 + end + end + local.get $2 + local.get $3 + call $~lib/array/Array#set:length call $~lib/set/Set#constructor local.set $3 loop $for-loop|2 @@ -5646,7 +5776,10 @@ local.get $2 local.get $1 call $~lib/array/Array#__get - call $~lib/set/Set#has + local.tee $4 + local.get $4 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -5691,7 +5824,9 @@ if local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -5706,7 +5841,9 @@ call $~lib/set/Set#delete local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -5743,7 +5880,9 @@ if local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -5758,7 +5897,9 @@ call $~lib/rt/pure/__release local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -5773,7 +5914,9 @@ call $~lib/set/Set#delete local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -5822,9 +5965,12 @@ ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 13 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -5848,24 +5994,13 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#values (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (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 - i32.load offset=8 - local.set $4 local.get $0 - i32.load offset=16 - local.tee $7 - local.set $6 - local.get $7 i32.const 268435452 i32.gt_u if @@ -5876,100 +6011,74 @@ call $~lib/builtins/abort unreachable end - local.get $6 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 i32.const 2 i32.shl - local.tee $5 + local.tee $4 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $4 call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 14 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 i32.const 0 i32.store - local.get $0 + local.get $3 i32.const 0 i32.store offset=4 - local.get $0 + local.get $3 i32.const 0 i32.store offset=8 - local.get $0 + local.get $3 i32.const 0 i32.store offset=12 - local.get $2 - local.set $1 - local.get $2 - local.get $0 + local.get $1 + local.set $2 + local.get $1 + local.get $3 i32.load - local.tee $3 + local.tee $5 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $3 + local.set $2 + local.get $5 call $~lib/rt/pure/__release end - local.get $0 - local.get $1 - i32.store - local.get $0 + local.get $3 local.get $2 + i32.store + local.get $3 + local.get $1 i32.store offset=4 - local.get $0 - local.get $5 + local.get $3 + local.get $4 i32.store offset=8 + local.get $3 local.get $0 - local.get $6 i32.store offset=12 - loop $for-loop|0 - local.get $8 - local.get $7 - i32.lt_s - if - local.get $4 - local.get $8 - i32.const 3 - i32.shl - i32.add - local.tee $2 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $9 - local.get $2 - i32.load - call $~lib/array/Array#__set - local.get $9 - i32.const 1 - i32.add - local.set $9 - end - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|0 - end - end - local.get $0 - local.get $9 - call $~lib/array/Array#set:length - local.get $0 + local.get $3 ) (func $std/set/testNumeric (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) call $~lib/set/Set#constructor local.set $0 loop $for-loop|0 @@ -5979,7 +6088,9 @@ if local.get $0 local.get $2 - call $~lib/set/Set#has + local.get $2 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -5994,7 +6105,9 @@ call $~lib/rt/pure/__release local.get $0 local.get $2 - call $~lib/set/Set#has + local.get $2 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -6032,7 +6145,9 @@ if local.get $0 local.get $2 - call $~lib/set/Set#has + local.get $2 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -6048,7 +6163,9 @@ call $~lib/rt/pure/__release local.get $0 local.get $2 - call $~lib/set/Set#has + local.get $2 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -6058,28 +6175,69 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|1 + end + end + local.get $0 + i32.load offset=20 + i32.const 100 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 18 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=8 + local.set $5 + local.get $0 + i32.load offset=16 + local.tee $6 + call $~lib/array/Array#constructor + local.set $2 + loop $for-loop|00 + local.get $4 + local.get $6 + i32.lt_s + if + local.get $5 + local.get $4 + i32.const 3 + i32.shl + i32.add + local.tee $7 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $2 + local.get $3 + local.get $7 + i32.load + call $~lib/array/Array#__set + local.get $3 + i32.const 1 + i32.add + local.set $3 + end + local.get $4 i32.const 1 i32.add - local.set $2 - br $for-loop|1 + local.set $4 + br $for-loop|00 end end - local.get $0 - i32.load offset=20 - i32.const 100 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 18 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/set/Set#values - local.set $2 + local.get $2 + local.get $3 + call $~lib/array/Array#set:length call $~lib/set/Set#constructor local.set $3 loop $for-loop|2 @@ -6092,7 +6250,10 @@ local.get $2 local.get $1 call $~lib/array/Array#__get - call $~lib/set/Set#has + local.tee $4 + local.get $4 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -6137,7 +6298,9 @@ if local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -6152,7 +6315,9 @@ call $~lib/set/Set#delete local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -6189,7 +6354,9 @@ if local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -6204,7 +6371,9 @@ call $~lib/rt/pure/__release local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -6219,7 +6388,9 @@ call $~lib/set/Set#delete local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -6301,9 +6472,12 @@ ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 15 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -6434,15 +6608,6 @@ end i32.const 0 ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i64) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find - i32.const 0 - i32.ne - ) (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -6458,46 +6623,46 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $3 local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $8 i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $2 local.get $0 i32.load offset=8 - local.tee $8 + local.tee $5 local.get $0 i32.load offset=16 i32.const 4 i32.shl i32.add - local.set $6 + local.set $7 local.get $2 - local.set $3 + local.set $4 loop $while-continue|0 - local.get $6 - local.get $8 + local.get $5 + local.get $7 i32.ne if - local.get $8 + local.get $5 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 - local.get $8 + local.get $4 + local.get $5 i64.load i64.store - local.get $3 local.get $4 - local.get $8 + local.get $3 + local.get $5 i64.load call $~lib/util/hash/hash64 local.get $1 @@ -6505,39 +6670,39 @@ i32.const 2 i32.shl i32.add - local.tee $5 + local.tee $6 i32.load i32.store offset=8 - local.get $5 - local.get $3 + local.get $6 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 16 i32.add - local.set $3 + local.set $4 end - local.get $8 + local.get $5 i32.const 16 i32.add - local.set $8 + local.set $5 br $while-continue|0 end end - local.get $4 - local.tee $3 + local.get $3 + local.tee $5 local.get $0 i32.load - local.tee $8 + local.tee $4 i32.ne if - local.get $3 + local.get $5 call $~lib/rt/pure/__retain - local.set $3 - local.get $8 + local.set $5 + local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $3 + local.get $5 i32.store local.get $0 local.get $1 @@ -6546,26 +6711,26 @@ local.tee $1 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $3 + local.get $5 call $~lib/rt/pure/__release end local.get $0 local.get $1 i32.store offset=8 local.get $0 - local.get $7 + local.get $8 i32.store offset=12 local.get $0 local.get $0 i32.load offset=20 i32.store offset=16 - local.get $4 + local.get $3 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release @@ -6655,74 +6820,13 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i64) - (local $3 i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 1408 - i32.const 1360 - i32.const 120 - i32.const 22 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 3 - call $~lib/array/ensureSize - local.get $0 - local.get $3 - i32.store offset=12 - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.get $2 - i64.store - ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - i32.load offset=12 - drop - local.get $0 - local.get $1 - i32.const 3 - call $~lib/array/ensureSize - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/set/Set#values (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (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 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.tee $7 - local.set $6 - local.get $7 i32.const 134217726 i32.gt_u if @@ -6733,94 +6837,114 @@ call $~lib/builtins/abort unreachable end - local.get $6 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 i32.const 3 i32.shl - local.tee $5 + local.tee $4 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $4 call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 16 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 i32.const 0 i32.store - local.get $0 + local.get $3 i32.const 0 i32.store offset=4 - local.get $0 + local.get $3 i32.const 0 i32.store offset=8 - local.get $0 + local.get $3 i32.const 0 i32.store offset=12 - local.get $2 - local.set $1 - local.get $2 - local.get $0 + local.get $1 + local.set $2 + local.get $1 + local.get $3 i32.load - local.tee $3 + local.tee $5 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $3 + local.set $2 + local.get $5 call $~lib/rt/pure/__release end - local.get $0 - local.get $1 - i32.store - local.get $0 + local.get $3 local.get $2 + i32.store + local.get $3 + local.get $1 i32.store offset=4 - local.get $0 - local.get $5 + local.get $3 + local.get $4 i32.store offset=8 + local.get $3 local.get $0 - local.get $6 i32.store offset=12 - loop $for-loop|0 - local.get $8 - local.get $7 + local.get $3 + ) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i64) + (local $3 i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + local.get $1 + i32.const 0 i32.lt_s if - local.get $4 - local.get $8 - i32.const 4 - i32.shl - i32.add - local.tee $2 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $9 - local.get $2 - i64.load - call $~lib/array/Array#__set - local.get $9 - i32.const 1 - i32.add - local.set $9 - end - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|0 + i32.const 1408 + i32.const 1360 + i32.const 120 + i32.const 22 + call $~lib/builtins/abort + unreachable end + local.get $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 3 + call $~lib/array/ensureSize + local.get $0 + local.get $3 + i32.store offset=12 end local.get $0 - local.get $9 - call $~lib/array/Array#set:length + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + i64.store + ) + (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=12 + drop + local.get $0 + local.get $1 + i32.const 3 + call $~lib/array/ensureSize local.get $0 + local.get $1 + i32.store offset=12 ) (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i64) local.get $1 @@ -6846,6 +6970,7 @@ (func $~lib/set/Set#delete (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $0 local.get $1 local.get $1 @@ -6868,20 +6993,22 @@ i32.const 1 i32.sub i32.store offset=20 + i32.const 4 + local.get $0 + i32.load offset=20 + local.tee $2 + i32.gt_u + local.set $3 local.get $0 i32.load offset=4 i32.const 1 i32.shr_u - local.tee $3 + local.tee $4 i32.const 1 i32.add i32.const 4 - local.get $0 - i32.load offset=20 - local.tee $2 - i32.const 4 local.get $2 - i32.gt_u + local.get $3 select i32.ge_u if (result i32) @@ -6899,7 +7026,7 @@ end if local.get $0 - local.get $3 + local.get $4 call $~lib/set/Set#rehash end ) @@ -6909,6 +7036,10 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) call $~lib/set/Set#constructor local.set $1 loop $for-loop|0 @@ -6918,7 +7049,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -6933,7 +7066,9 @@ call $~lib/rt/pure/__release local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -6971,7 +7106,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -6987,7 +7124,9 @@ call $~lib/rt/pure/__release local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -7017,21 +7156,65 @@ unreachable end local.get $1 - call $~lib/set/Set#values - local.set $2 + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 + local.tee $7 + call $~lib/array/Array#constructor + local.set $3 + loop $for-loop|00 + local.get $4 + local.get $7 + i32.lt_s + if + local.get $6 + local.get $4 + i32.const 4 + i32.shl + i32.add + local.tee $8 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $3 + local.get $2 + local.get $8 + i64.load + call $~lib/array/Array#__set + local.get $2 + i32.const 1 + i32.add + local.set $2 + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|00 + end + end + local.get $3 + local.get $2 + call $~lib/array/Array#set:length call $~lib/set/Set#constructor - local.set $4 + local.set $2 loop $for-loop|2 + local.get $5 local.get $3 - local.get $2 i32.load offset=12 i32.lt_s if local.get $1 - local.get $2 local.get $3 + local.get $5 call $~lib/array/Array#__get - call $~lib/set/Set#has + local.tee $0 + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -7041,20 +7224,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 local.get $2 local.get $3 + local.get $5 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $3 + local.get $5 i32.const 1 i32.add - local.set $3 + local.set $5 br $for-loop|2 end end - local.get $4 + local.get $2 i32.load offset=20 local.get $1 i32.load offset=20 @@ -7076,7 +7259,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -7091,7 +7276,9 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -7128,7 +7315,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -7143,7 +7332,9 @@ call $~lib/rt/pure/__release local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -7158,7 +7349,9 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -7198,18 +7391,21 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 17 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -7233,24 +7429,13 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#values (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (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 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.tee $7 - local.set $6 - local.get $7 i32.const 134217726 i32.gt_u if @@ -7261,94 +7446,64 @@ call $~lib/builtins/abort unreachable end - local.get $6 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 i32.const 3 i32.shl - local.tee $5 + local.tee $4 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $4 call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 18 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 i32.const 0 i32.store - local.get $0 + local.get $3 i32.const 0 i32.store offset=4 - local.get $0 + local.get $3 i32.const 0 i32.store offset=8 - local.get $0 + local.get $3 i32.const 0 i32.store offset=12 - local.get $2 - local.set $1 - local.get $2 - local.get $0 + local.get $1 + local.set $2 + local.get $1 + local.get $3 i32.load - local.tee $3 + local.tee $5 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $3 + local.set $2 + local.get $5 call $~lib/rt/pure/__release end - local.get $0 - local.get $1 - i32.store - local.get $0 + local.get $3 local.get $2 + i32.store + local.get $3 + local.get $1 i32.store offset=4 - local.get $0 - local.get $5 + local.get $3 + local.get $4 i32.store offset=8 + local.get $3 local.get $0 - local.get $6 i32.store offset=12 - loop $for-loop|0 - local.get $8 - local.get $7 - i32.lt_s - if - local.get $4 - local.get $8 - i32.const 4 - i32.shl - i32.add - local.tee $2 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $9 - local.get $2 - i64.load - call $~lib/array/Array#__set - local.get $9 - i32.const 1 - i32.add - local.set $9 - end - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|0 - end - end - local.get $0 - local.get $9 - call $~lib/array/Array#set:length - local.get $0 + local.get $3 ) (func $std/set/testNumeric (local $0 i64) @@ -7356,6 +7511,10 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) call $~lib/set/Set#constructor local.set $1 loop $for-loop|0 @@ -7365,7 +7524,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -7380,7 +7541,9 @@ call $~lib/rt/pure/__release local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -7418,7 +7581,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -7434,7 +7599,9 @@ call $~lib/rt/pure/__release local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -7463,22 +7630,66 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/set/Set#values - local.set $2 + local.get $1 + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 + local.tee $7 + call $~lib/array/Array#constructor + local.set $3 + loop $for-loop|00 + local.get $4 + local.get $7 + i32.lt_s + if + local.get $6 + local.get $4 + i32.const 4 + i32.shl + i32.add + local.tee $8 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $3 + local.get $2 + local.get $8 + i64.load + call $~lib/array/Array#__set + local.get $2 + i32.const 1 + i32.add + local.set $2 + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|00 + end + end + local.get $3 + local.get $2 + call $~lib/array/Array#set:length call $~lib/set/Set#constructor - local.set $4 + local.set $2 loop $for-loop|2 + local.get $5 local.get $3 - local.get $2 i32.load offset=12 i32.lt_s if local.get $1 - local.get $2 local.get $3 + local.get $5 call $~lib/array/Array#__get - call $~lib/set/Set#has + local.tee $0 + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -7488,20 +7699,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 local.get $2 local.get $3 + local.get $5 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $3 + local.get $5 i32.const 1 i32.add - local.set $3 + local.set $5 br $for-loop|2 end end - local.get $4 + local.get $2 i32.load offset=20 local.get $1 i32.load offset=20 @@ -7523,7 +7734,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -7538,7 +7751,9 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -7575,7 +7790,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -7590,7 +7807,9 @@ call $~lib/rt/pure/__release local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -7605,7 +7824,9 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -7645,18 +7866,21 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 19 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -7945,25 +8169,13 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/set/Set#values (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (param $0 i32) (result 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 $8 i32) - (local $9 i32) - (local $10 i32) - local.get $0 - i32.load offset=8 - local.set $5 local.get $0 - i32.load offset=16 - local.tee $8 - local.set $7 - local.get $8 i32.const 268435452 i32.gt_u if @@ -7974,82 +8186,105 @@ call $~lib/builtins/abort unreachable end - local.get $7 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 i32.const 2 i32.shl - local.tee $6 + local.tee $4 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $4 call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 20 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 i32.const 0 i32.store - local.get $0 + local.get $3 i32.const 0 i32.store offset=4 - local.get $0 + local.get $3 i32.const 0 i32.store offset=8 - local.get $0 + local.get $3 i32.const 0 i32.store offset=12 - local.get $2 - local.set $1 - local.get $2 - local.get $0 + local.get $1 + local.set $2 + local.get $1 + local.get $3 i32.load - local.tee $4 + local.tee $5 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $4 + local.set $2 + local.get $5 call $~lib/rt/pure/__release end - local.get $0 - local.get $1 - i32.store - local.get $0 + local.get $3 local.get $2 + i32.store + local.get $3 + local.get $1 i32.store offset=4 - local.get $0 - local.get $6 + local.get $3 + local.get $4 i32.store offset=8 + local.get $3 local.get $0 - local.get $7 i32.store offset=12 + local.get $3 + ) + (func $~lib/set/Set#values (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 f32) + local.get $0 + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 + local.tee $5 + call $~lib/array/Array#constructor + local.set $0 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $2 + local.get $5 i32.lt_s if - local.get $5 - local.get $9 + local.get $4 + local.get $2 i32.const 3 i32.shl i32.add - local.tee $2 + local.tee $3 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $2 + local.get $3 f32.load - local.set $3 - local.get $10 + local.set $6 + local.get $1 local.get $0 i32.load offset=12 i32.ge_u if - local.get $10 + local.get $1 i32.const 0 i32.lt_s if @@ -8061,38 +8296,38 @@ unreachable end local.get $0 - local.get $10 + local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 2 call $~lib/array/ensureSize local.get $0 - local.get $2 + local.get $3 i32.store offset=12 end local.get $0 i32.load offset=4 - local.get $10 + local.get $1 i32.const 2 i32.shl i32.add - local.get $3 + local.get $6 f32.store - local.get $10 + local.get $1 i32.const 1 i32.add - local.set $10 + local.set $1 end - local.get $9 + local.get $2 i32.const 1 i32.add - local.set $9 + local.set $2 br $for-loop|0 end end local.get $0 - local.get $10 + local.get $1 call $~lib/array/Array#set:length local.get $0 ) @@ -8482,9 +8717,12 @@ ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 21 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -8773,25 +9011,13 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/set/Set#values (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 f64) + (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 $0 - i32.load offset=8 - local.set $5 local.get $0 - i32.load offset=16 - local.tee $8 - local.set $7 - local.get $8 i32.const 134217726 i32.gt_u if @@ -8802,82 +9028,105 @@ call $~lib/builtins/abort unreachable end - local.get $7 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 i32.const 3 i32.shl - local.tee $6 + local.tee $4 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $4 call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 22 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 i32.const 0 i32.store - local.get $0 + local.get $3 i32.const 0 i32.store offset=4 - local.get $0 + local.get $3 i32.const 0 i32.store offset=8 - local.get $0 + local.get $3 i32.const 0 i32.store offset=12 - local.get $2 - local.set $1 - local.get $2 - local.get $0 + local.get $1 + local.set $2 + local.get $1 + local.get $3 i32.load - local.tee $4 + local.tee $5 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $4 + local.set $2 + local.get $5 call $~lib/rt/pure/__release end - local.get $0 - local.get $1 - i32.store - local.get $0 + local.get $3 local.get $2 + i32.store + local.get $3 + local.get $1 i32.store offset=4 - local.get $0 - local.get $6 + local.get $3 + local.get $4 i32.store offset=8 + local.get $3 local.get $0 - local.get $7 i32.store offset=12 + local.get $3 + ) + (func $~lib/set/Set#values (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 f64) + local.get $0 + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 + local.tee $5 + call $~lib/array/Array#constructor + local.set $0 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $2 + local.get $5 i32.lt_s if - local.get $5 - local.get $9 + local.get $4 + local.get $2 i32.const 4 i32.shl i32.add - local.tee $2 + local.tee $3 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $2 + local.get $3 f64.load - local.set $3 - local.get $10 + local.set $6 + local.get $1 local.get $0 i32.load offset=12 i32.ge_u if - local.get $10 + local.get $1 i32.const 0 i32.lt_s if @@ -8889,38 +9138,38 @@ unreachable end local.get $0 - local.get $10 + local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 3 call $~lib/array/ensureSize local.get $0 - local.get $2 + local.get $3 i32.store offset=12 end local.get $0 i32.load offset=4 - local.get $10 + local.get $1 i32.const 3 i32.shl i32.add - local.get $3 + local.get $6 f64.store - local.get $10 + local.get $1 i32.const 1 i32.add - local.set $10 + local.set $1 end - local.get $9 + local.get $2 i32.const 1 i32.add - local.set $9 + local.set $2 br $for-loop|0 end end local.get $0 - local.get $10 + local.get $1 call $~lib/array/Array#set:length local.get $0 ) diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index bba2fc3912..e823ed5b6b 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -1,12 +1,12 @@ (module (type $i32_=>_none (func (param i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result 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))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) @@ -30,18 +30,14 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/staticarray/StaticArray#get:length (param $0 i32) (result i32) + (func $~lib/staticarray/StaticArray#__get (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 i32.const 16 i32.sub i32.load offset=12 i32.const 2 i32.shr_u - ) - (func $~lib/staticarray/StaticArray#__get (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - call $~lib/staticarray/StaticArray#get:length i32.ge_u if i32.const 1072 @@ -61,7 +57,11 @@ (func $~lib/staticarray/StaticArray#__set (param $0 i32) (param $1 i32) i32.const 1 local.get $0 - call $~lib/staticarray/StaticArray#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_u i32.ge_u if i32.const 1072 @@ -75,15 +75,6 @@ local.get $1 i32.store offset=4 ) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -119,14 +110,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -245,9 +228,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -255,7 +244,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -421,12 +410,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -516,14 +505,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -677,10 +672,13 @@ i32.const 23 i32.lt_u if - i32.const 1472 local.get $1 + i32.const 2 + i32.shl + i32.const 1472 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -720,6 +718,7 @@ ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $1 i32.const 256 i32.lt_u @@ -729,23 +728,22 @@ i32.shr_u local.set $1 else + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 local.get $1 i32.const 536870904 i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.set $1 - end - local.get $1 + select + local.tee $1 i32.const 31 local.get $1 i32.clz @@ -781,7 +779,10 @@ end local.get $0 local.get $2 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const -1 local.get $1 i32.shl @@ -808,8 +809,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -821,7 +827,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -833,6 +839,7 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -884,11 +891,13 @@ memory.size local.tee $1 i32.const 16 - local.get $0 - i32.load offset=1568 + i32.shl + local.set $5 local.get $1 i32.const 16 - i32.shl + local.get $0 + i32.load offset=1568 + local.get $5 i32.const 16 i32.sub i32.ne @@ -916,9 +925,11 @@ i32.const 16 i32.shr_u local.tee $5 + i32.gt_s + local.set $6 local.get $1 local.get $5 - i32.gt_s + local.get $6 select memory.grow i32.const 0 @@ -1045,14 +1056,6 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -1229,9 +1232,12 @@ end ) (func $~lib/rt/__allocBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 local.get $2 if @@ -1293,13 +1299,6 @@ end local.get $0 ) - (func $std/staticarray/test (result i32) - i32.const 12 - i32.const 3 - i32.const 1296 - call $~lib/rt/__allocBuffer - call $~lib/rt/pure/__retain - ) (func $~lib/rt/pure/__release (param $0 i32) local.get $0 i32.const 1472 @@ -1326,8 +1325,10 @@ call $~lib/builtins/abort unreachable end - i32.const 1040 - call $~lib/staticarray/StaticArray#get:length + i32.const 1036 + i32.load + i32.const 2 + i32.shr_u i32.const 3 i32.ne if @@ -1367,8 +1368,10 @@ call $~lib/builtins/abort unreachable end - i32.const 1264 - call $~lib/staticarray/StaticArray#get:length + i32.const 1260 + i32.load + i32.const 2 + i32.shr_u i32.const 3 i32.ne if @@ -1395,7 +1398,11 @@ call $~lib/builtins/abort unreachable end - call $std/staticarray/test + i32.const 12 + i32.const 3 + i32.const 1296 + call $~lib/rt/__allocBuffer + call $~lib/rt/pure/__retain global.set $std/staticarray/arr3 global.get $std/staticarray/arr3 i32.const 0 @@ -1437,7 +1444,11 @@ unreachable end global.get $std/staticarray/arr3 - call $~lib/staticarray/StaticArray#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_u i32.const 3 i32.ne if @@ -1464,7 +1475,11 @@ call $~lib/builtins/abort unreachable end - call $std/staticarray/test + i32.const 12 + i32.const 3 + i32.const 1296 + call $~lib/rt/__allocBuffer + call $~lib/rt/pure/__retain global.get $std/staticarray/arr3 call $~lib/rt/pure/__release global.set $std/staticarray/arr3 @@ -1487,15 +1502,21 @@ call $~lib/rt/__allocBuffer call $~lib/rt/pure/__retain local.tee $0 + call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 4 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain i32.store local.get $0 + call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 4 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain i32.store offset=4 local.get $0 diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 3bc86e7efe..6754f0fa77 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) @@ -305,14 +305,6 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -364,15 +356,6 @@ end local.get $0 ) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -408,14 +391,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -534,9 +509,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -544,7 +525,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -710,12 +691,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -805,14 +786,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -966,10 +953,13 @@ i32.const 23 i32.lt_u if - i32.const 18624 local.get $1 + i32.const 2 + i32.shl + i32.const 18624 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -1033,6 +1023,7 @@ ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $1 i32.const 256 i32.lt_u @@ -1042,23 +1033,22 @@ i32.shr_u local.set $1 else + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 local.get $1 i32.const 536870904 i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.set $1 - end - local.get $1 + select + local.tee $1 i32.const 31 local.get $1 i32.clz @@ -1094,7 +1084,10 @@ end local.get $0 local.get $2 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const -1 local.get $1 i32.shl @@ -1121,8 +1114,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -1134,7 +1132,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -1210,6 +1208,7 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1240,11 +1239,13 @@ memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 + i32.shl + local.set $5 local.get $3 i32.const 16 - i32.shl + local.get $0 + i32.load offset=1568 + local.get $5 i32.const 16 i32.sub i32.ne @@ -1272,9 +1273,11 @@ i32.const 16 i32.shr_u local.tee $5 + i32.gt_s + local.set $6 local.get $3 local.get $5 - i32.gt_s + local.get $6 select memory.grow i32.const 0 @@ -1345,14 +1348,6 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) (func $~lib/util/casemap/casemap (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -1849,7 +1844,11 @@ (local $9 i32) (local $10 i32) local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $8 i32.eqz if @@ -1857,15 +1856,21 @@ call $~lib/rt/pure/__retain return end + call $~lib/rt/tlsf/maybeInitialize local.get $8 i32.const 3 i32.mul i32.const 1 i32.shl - call $~lib/rt/tlsf/__alloc + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $6 - i32.const 1216 - call $~lib/string/String#get:length + i32.const 1212 + i32.load + i32.const 1 + i32.shr_u local.set $4 loop $for-loop|0 local.get $7 @@ -2241,10 +2246,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 @@ -2512,7 +2525,11 @@ (local $6 i32) (local $7 i32) local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $4 i32.eqz if @@ -2520,10 +2537,14 @@ call $~lib/rt/pure/__retain return end + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 2 i32.shl - call $~lib/rt/tlsf/__alloc + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $6 loop $for-loop|0 local.get $5 @@ -2761,13 +2782,17 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize i32.const 2 local.get $0 i32.const 65535 i32.gt_s local.tee $2 i32.shl - call $~lib/rt/tlsf/__alloc + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 local.get $2 if @@ -2800,10 +2825,16 @@ (func $~lib/string/String#codePointAt (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - local.get $1 local.get $0 - call $~lib/string/String#get:length - local.tee $3 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $2 + local.set $3 + local.get $1 + local.get $2 i32.ge_u if i32.const -1 @@ -2848,10 +2879,10 @@ local.get $2 return end + local.get $0 local.get $2 i32.const 10 i32.shl - local.get $0 i32.add i32.const -56613888 i32.add @@ -2872,6 +2903,7 @@ i64.const 4294967295 i64.le_u if + call $~lib/rt/tlsf/maybeInitialize local.get $0 i32.wrap_i64 local.tee $1 @@ -2917,7 +2949,10 @@ local.tee $2 i32.const 1 i32.shl - call $~lib/rt/tlsf/__alloc + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $4 local.set $3 loop $do-continue|0 @@ -2945,6 +2980,7 @@ br_if $do-continue|0 end else + call $~lib/rt/tlsf/maybeInitialize local.get $0 i64.const 100000000000 i64.ge_u @@ -2992,10 +3028,13 @@ local.tee $1 i32.const 1 i32.shl - call $~lib/rt/tlsf/__alloc + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $4 local.set $2 - loop $do-continue|00 + loop $do-continue|01 local.get $0 i64.const 10 i64.rem_u @@ -3020,21 +3059,16 @@ local.get $0 i64.const 0 i64.ne - br_if $do-continue|00 + br_if $do-continue|01 end end local.get $4 call $~lib/rt/pure/__retain ) - (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - i32.const 18336 - local.get $0 - select - local.set $2 local.get $1 call $~lib/rt/pure/__retain local.tee $1 @@ -3050,44 +3084,53 @@ i32.const 18336 local.set $1 end - block $__inlined_func$~lib/string/String#concat - local.get $2 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $3 - local.get $1 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $4 - i32.add - local.tee $0 - i32.eqz - if - i32.const 1040 - local.set $0 - local.get $1 - call $~lib/rt/pure/__release - br $__inlined_func$~lib/string/String#concat - end - local.get $0 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $0 - local.get $2 - local.get $3 - call $~lib/util/memory/memmove - local.get $0 - local.get $3 - i32.add - local.get $1 - local.get $4 - call $~lib/util/memory/memmove + local.get $1 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $4 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $2 + i32.add + local.tee $3 + i32.eqz + if local.get $1 call $~lib/rt/pure/__release + i32.const 1040 + return end + call $~lib/rt/tlsf/maybeInitialize + local.get $3 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $3 local.get $0 + local.get $2 + call $~lib/util/memory/memmove + local.get $2 + local.get $3 + i32.add + local.get $1 + local.get $4 + call $~lib/util/memory/memmove + local.get $1 + call $~lib/rt/pure/__release + local.get $3 ) (func $start:std/string-casemapping (local $0 i64) @@ -4503,7 +4546,7 @@ local.get $4 call $~lib/util/number/utoa64 local.tee $8 - call $~lib/string/String.__concat + call $~lib/string/String#concat local.tee $9 i32.const 0 f64.const 0 @@ -4516,7 +4559,7 @@ local.get $1 call $~lib/util/number/utoa64 local.tee $10 - call $~lib/string/String.__concat + call $~lib/string/String#concat local.tee $11 i32.const 0 f64.const 0 @@ -4551,7 +4594,7 @@ local.get $0 call $~lib/util/number/utoa64 local.tee $8 - call $~lib/string/String.__concat + call $~lib/string/String#concat local.tee $9 i32.const 0 f64.const 0 @@ -4564,7 +4607,7 @@ local.get $2 call $~lib/util/number/utoa64 local.tee $10 - call $~lib/string/String.__concat + call $~lib/string/String#concat local.tee $11 i32.const 0 f64.const 0 diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index ce353311a7..d931c90c0c 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -1,10 +1,10 @@ (module (type $none_=>_none (func)) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_none (func (param 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_=>_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))) @@ -97,15 +97,6 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -141,14 +132,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -267,9 +250,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -277,7 +266,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -443,12 +432,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -538,14 +527,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -699,10 +694,13 @@ i32.const 23 i32.lt_u if - i32.const 22064 local.get $1 + i32.const 2 + i32.shl + i32.const 22064 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -766,6 +764,7 @@ ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $1 i32.const 256 i32.lt_u @@ -775,23 +774,22 @@ i32.shr_u local.set $1 else + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 local.get $1 i32.const 536870904 i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.set $1 - end - local.get $1 + select + local.tee $1 i32.const 31 local.get $1 i32.clz @@ -827,7 +825,10 @@ end local.get $0 local.get $2 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const -1 local.get $1 i32.shl @@ -854,8 +855,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -867,7 +873,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -943,6 +949,7 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -973,11 +980,13 @@ memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 + i32.shl + local.set $5 local.get $3 i32.const 16 - i32.shl + local.get $0 + i32.load offset=1568 + local.get $5 i32.const 16 i32.sub i32.ne @@ -1005,9 +1014,11 @@ i32.const 16 i32.shr_u local.tee $5 + i32.gt_s + local.set $6 local.get $3 local.get $5 - i32.gt_s + local.get $6 select memory.grow i32.const 0 @@ -1078,22 +1089,6 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -1275,12 +1270,21 @@ i32.const 16 i32.sub i32.load offset=12 + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $1 local.get $0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.const 1 i32.shl call $~lib/util/memory/memmove @@ -1452,12 +1456,15 @@ ) (func $~lib/string/String.UTF16.decodeUnsafe (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const -2 i32.and local.tee $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $0 local.get $1 @@ -1465,14 +1472,6 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String.UTF16.decode (param $0 i32) (result i32) - local.get $0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - call $~lib/string/String.UTF16.decodeUnsafe - ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -1566,10 +1565,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 @@ -1996,12 +2003,21 @@ local.get $0 local.get $1 call $~lib/string/String.UTF8.byteLength + local.set $2 + call $~lib/rt/tlsf/maybeInitialize + local.get $2 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $2 local.get $0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.get $2 local.get $1 call $~lib/string/String.UTF8.encodeUnsafe @@ -2436,11 +2452,14 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 1 i32.shl i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $5 local.set $1 loop $while-continue|0 @@ -2647,15 +2666,6 @@ i32.add call $~lib/rt/pure/__retain ) - (func $~lib/string/String.UTF8.decode (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.get $1 - call $~lib/string/String.UTF8.decodeUnsafe - ) (func $std/string-encoding/testUTF8DecodeNullTerminated (local $0 i32) (local $1 i32) @@ -2663,13 +2673,19 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 1040 i32.const 1 call $~lib/string/String.UTF8.encode - local.tee $1 - i32.const 1 - call $~lib/string/String.UTF8.decode local.tee $2 + local.get $2 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + call $~lib/string/String.UTF8.decodeUnsafe + local.tee $0 + local.get $0 i32.const 1040 call $~lib/string/String.__eq i32.eqz @@ -2725,9 +2741,15 @@ unreachable end local.get $0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 i32.const 1 - call $~lib/string/String.UTF8.decode - local.tee $3 + call $~lib/string/String.UTF8.decodeUnsafe + local.tee $1 + local.set $4 + local.get $1 i32.const 1520 call $~lib/string/String.__eq i32.eqz @@ -2742,10 +2764,16 @@ i32.const 1488 i32.const 0 call $~lib/string/String.UTF8.encode - local.tee $4 + local.tee $1 + local.get $1 + i32.const 16 + i32.sub + i32.load offset=12 i32.const 1 - call $~lib/string/String.UTF8.decode + call $~lib/string/String.UTF8.decodeUnsafe local.tee $5 + local.set $6 + local.get $5 i32.const 1520 call $~lib/string/String.__eq i32.eqz @@ -2757,17 +2785,16 @@ call $~lib/builtins/abort unreachable end - local.get $2 call $~lib/rt/pure/__release - local.get $3 + local.get $4 call $~lib/rt/pure/__release - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $1 + local.get $2 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $4 + local.get $1 call $~lib/rt/pure/__release ) (func $std/string-encoding/testUTF8DecodeUnsafe @@ -2972,13 +2999,19 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) local.get $0 i32.const 0 call $~lib/string/String.UTF8.encode - local.tee $1 - i32.const 0 - call $~lib/string/String.UTF8.decode local.tee $2 + local.get $2 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 0 + call $~lib/string/String.UTF8.decodeUnsafe + local.tee $1 + local.get $1 local.get $0 call $~lib/string/String.__eq i32.eqz @@ -2992,9 +3025,15 @@ end local.get $0 call $~lib/string/String.UTF16.encode - local.tee $3 - call $~lib/string/String.UTF16.decode + local.tee $1 + local.get $1 + i32.const 16 + i32.sub + i32.load offset=12 + call $~lib/string/String.UTF16.decodeUnsafe local.tee $4 + local.set $5 + local.get $4 local.get $0 call $~lib/string/String.__eq i32.eqz @@ -3006,18 +3045,18 @@ call $~lib/builtins/abort unreachable end - local.get $2 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.get $3 + local.get $1 call $~lib/rt/pure/__release ) (func $start:std/string-encoding (local $0 i32) (local $1 i32) + (local $2 i32) i32.const 1036 i32.load i32.const 12 @@ -3034,8 +3073,13 @@ i32.const 1040 call $~lib/string/String.UTF16.encode local.tee $0 - call $~lib/string/String.UTF16.decode + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + call $~lib/string/String.UTF16.decodeUnsafe local.tee $1 + local.get $1 i32.const 1040 call $~lib/string/String.__eq i32.eqz @@ -3047,7 +3091,6 @@ call $~lib/builtins/abort unreachable end - local.get $1 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release @@ -3084,9 +3127,14 @@ i32.const 0 call $~lib/string/String.UTF8.encode local.tee $0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 i32.const 0 - call $~lib/string/String.UTF8.decode + call $~lib/string/String.UTF8.decodeUnsafe local.tee $1 + local.get $1 i32.const 1040 call $~lib/string/String.__eq i32.eqz @@ -3098,7 +3146,6 @@ call $~lib/builtins/abort unreachable end - local.get $1 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 6a04110095..c8cd42c88e 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -1,20 +1,20 @@ (module (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_=>_i32 (func (param i32 i32) (result i32))) (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))) (type $i64_=>_i32 (func (param i64) (result i32))) - (type $i32_=>_f64 (func (param i32) (result f64))) (type $none_=>_none (func)) + (type $i32_=>_f64 (func (param i32) (result f64))) (type $i64_i32_=>_f64 (func (param i64 i32) (result f64))) (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) (type $i32_i64_i32_=>_none (func (param i32 i64 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))) + (type $i32_i64_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i64 i32 i64 i32) (result i32))) (type $f64_=>_i32 (func (param f64) (result i32))) (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) (type $none_=>_i64 (func (result i64))) @@ -451,14 +451,6 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) local.get $0 @@ -556,10 +548,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 @@ -576,21 +576,16 @@ local.get $0 if (result i32) local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.eqz else i32.const 1 end ) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -626,14 +621,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -752,9 +739,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -762,7 +755,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -928,12 +921,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -1023,14 +1016,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -1184,10 +1183,13 @@ i32.const 23 i32.lt_u if - i32.const 17920 local.get $1 + i32.const 2 + i32.shl + i32.const 17920 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -1251,6 +1253,7 @@ ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $1 i32.const 256 i32.lt_u @@ -1260,23 +1263,22 @@ i32.shr_u local.set $1 else + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 local.get $1 i32.const 536870904 i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.set $1 - end - local.get $1 + select + local.tee $1 i32.const 31 local.get $1 i32.clz @@ -1312,7 +1314,10 @@ end local.get $0 local.get $2 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const -1 local.get $1 i32.shl @@ -1339,8 +1344,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -1352,7 +1362,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -1428,6 +1438,7 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1458,11 +1469,13 @@ memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 + i32.shl + local.set $5 local.get $3 i32.const 16 - i32.shl + local.get $0 + i32.load offset=1568 + local.get $5 i32.const 16 i32.sub i32.ne @@ -1490,9 +1503,11 @@ i32.const 16 i32.shr_u local.tee $5 + i32.gt_s + local.set $6 local.get $3 local.get $5 - i32.gt_s + local.get $6 select memory.grow i32.const 0 @@ -1563,17 +1578,10 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) (func $~lib/string/String.fromCharCode (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 2 local.get $1 i32.const 0 @@ -1581,7 +1589,9 @@ local.tee $3 i32.shl i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $0 i32.store16 @@ -1631,6 +1641,7 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize i32.const 2 local.get $0 i32.const 65535 @@ -1638,7 +1649,9 @@ local.tee $2 i32.shl i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 local.get $2 if @@ -1672,7 +1685,11 @@ (local $3 i32) (local $4 i32) local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $4 i32.eqz if @@ -1680,7 +1697,11 @@ return end local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $3 i32.eqz if @@ -1933,13 +1954,12 @@ (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.set $5 local.get $2 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.const 1 i32.shl local.set $3 @@ -1947,7 +1967,15 @@ i32.const 1 i32.shl local.tee $4 - local.get $5 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $5 i32.lt_u if (result i32) i32.const 1 @@ -1960,9 +1988,12 @@ call $~lib/rt/pure/__retain return end + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 local.get $4 local.get $5 @@ -2011,26 +2042,33 @@ (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - call $~lib/string/String#get:length + local.get $2 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.const 1 i32.shl local.set $3 - local.get $2 - call $~lib/string/String#get:length + local.get $1 i32.const 1 i32.shl - local.set $4 - local.get $1 + local.tee $4 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.const 1 i32.shl - local.tee $5 - local.get $3 + local.tee $1 i32.lt_u if (result i32) i32.const 1 else - local.get $4 + local.get $3 i32.eqz end if @@ -2038,70 +2076,88 @@ call $~lib/rt/pure/__retain return end - local.get $5 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $5 local.get $0 - local.get $3 + local.get $1 call $~lib/util/memory/memmove - local.get $5 - local.get $3 + local.get $4 + local.get $1 i32.sub local.tee $0 - local.get $4 + local.get $3 i32.gt_u if local.get $1 - local.get $3 + local.get $5 i32.add - local.tee $3 + local.tee $1 local.get $2 - local.get $4 + local.get $3 local.get $0 i32.const 2 i32.sub - local.get $4 + local.get $3 i32.div_u - local.tee $5 + local.tee $4 call $~lib/memory/memory.repeat + local.get $1 local.get $3 local.get $4 - local.get $5 i32.mul - local.tee $3 + local.tee $1 i32.add local.get $2 local.get $0 - local.get $3 + local.get $1 i32.sub call $~lib/util/memory/memmove else local.get $1 - local.get $3 + local.get $5 i32.add local.get $2 local.get $0 call $~lib/util/memory/memmove end - local.get $1 + local.get $5 call $~lib/rt/pure/__retain ) (func $~lib/string/String#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $4 i32.eqz if local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u return end local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $3 + local.set $5 + local.get $3 i32.eqz if i32.const -1 @@ -2114,7 +2170,7 @@ i32.gt_s select local.tee $2 - local.get $3 + local.get $5 local.get $4 i32.sub local.tee $3 @@ -2157,12 +2213,20 @@ i32.const 0 return end - local.get $0 - call $~lib/string/String#get:length - local.tee $3 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $3 i32.ne if i32.const 1 @@ -2254,9 +2318,13 @@ (local $2 i32) (local $3 i32) local.get $0 - call $~lib/string/String#get:length - i32.const 1 - i32.shl + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl local.set $2 loop $while-continue|0 local.get $1 @@ -2295,9 +2363,12 @@ i32.const 1280 return end + call $~lib/rt/tlsf/maybeInitialize local.get $2 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 local.get $0 local.get $1 @@ -2311,7 +2382,11 @@ (local $1 i32) (local $2 i32) local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.const 1 i32.shl local.tee $2 @@ -2351,9 +2426,12 @@ call $~lib/rt/pure/__retain return end + call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $0 local.get $1 @@ -2366,8 +2444,14 @@ (local $2 i32) (local $3 i32) local.get $0 - call $~lib/string/String#get:length - local.tee $3 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $1 + local.set $3 + local.get $1 i32.const 1 i32.shl local.set $1 @@ -2436,9 +2520,12 @@ call $~lib/rt/pure/__retain return end + call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 local.get $0 local.get $2 @@ -2456,7 +2543,11 @@ (local $5 f64) block $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $1 i32.eqz br_if $folding-inner0 @@ -2485,7 +2576,7 @@ local.get $2 i32.const 45 i32.eq - if + if (result i32) local.get $1 i32.const 1 i32.sub @@ -2499,12 +2590,11 @@ i32.add local.tee $0 i32.load16_u - local.set $2 else local.get $2 i32.const 43 i32.eq - if + if (result i32) local.get $1 i32.const 1 i32.sub @@ -2516,9 +2606,11 @@ i32.add local.tee $0 i32.load16_u - local.set $2 + else + local.get $2 end end + local.set $2 local.get $1 i32.const 2 i32.gt_s @@ -2668,8 +2760,10 @@ i32.const 2912 local.set $5 block $folding-inner0 - i32.const 2912 - call $~lib/string/String#get:length + i32.const 2908 + i32.load + i32.const 1 + i32.shr_u local.tee $0 i32.eqz br_if $folding-inner0 @@ -2698,7 +2792,7 @@ local.get $1 i32.const 45 i32.eq - if + if (result i32) local.get $0 i32.const 1 i32.sub @@ -2712,12 +2806,11 @@ i32.add local.tee $5 i32.load16_u - local.set $1 else local.get $1 i32.const 43 i32.eq - if + if (result i32) local.get $0 i32.const 1 i32.sub @@ -2729,9 +2822,11 @@ i32.add local.tee $5 i32.load16_u - local.set $1 + else + local.get $1 end end + local.set $1 local.get $0 i32.const 2 i32.gt_s @@ -2879,8 +2974,10 @@ i32.const 2960 local.set $5 block $folding-inner0 - i32.const 2960 - call $~lib/string/String#get:length + i32.const 2956 + i32.load + i32.const 1 + i32.shr_u local.tee $0 i32.eqz br_if $folding-inner0 @@ -2909,7 +3006,7 @@ local.get $1 i32.const 45 i32.eq - if + if (result i32) local.get $0 i32.const 1 i32.sub @@ -2923,12 +3020,11 @@ i32.add local.tee $5 i32.load16_u - local.set $1 else local.get $1 i32.const 43 i32.eq - if + if (result i32) local.get $0 i32.const 1 i32.sub @@ -2940,9 +3036,11 @@ i32.add local.tee $5 i32.load16_u - local.set $1 + else + local.get $1 end end + local.set $1 local.get $0 i32.const 2 i32.gt_s @@ -3216,14 +3314,6 @@ local.get $4 i32.mul ) - (func $~lib/util/string/pow10 (param $0 i32) (result f64) - local.get $0 - i32.const 3 - i32.shl - i32.const 3000 - i32.add - f64.load - ) (func $~lib/math/ipow32 (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -3519,9 +3609,11 @@ if local.get $2 local.get $1 - i32.const 22 - i32.sub - call $~lib/util/string/pow10 + i32.const 3 + i32.shl + i32.const 2824 + i32.add + f64.load f64.mul local.set $2 i32.const 22 @@ -3551,7 +3643,11 @@ if local.get $2 local.get $1 - call $~lib/util/string/pow10 + i32.const 3 + i32.shl + i32.const 3000 + i32.add + f64.load f64.mul return end @@ -3559,7 +3655,11 @@ i32.const 0 local.get $1 i32.sub - call $~lib/util/string/pow10 + i32.const 3 + i32.shl + i32.const 3000 + i32.add + f64.load f64.div else local.get $1 @@ -3619,7 +3719,11 @@ (local $8 i64) block $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $4 i32.eqz br_if $folding-inner0 @@ -3656,7 +3760,7 @@ local.get $5 i32.const 45 i32.eq - if (result i32) + if local.get $4 i32.const 1 i32.sub @@ -3670,11 +3774,12 @@ i32.add local.tee $0 i32.load16_u + local.set $5 else local.get $5 i32.const 43 i32.eq - if (result i32) + if local.get $4 i32.const 1 i32.sub @@ -3686,11 +3791,10 @@ i32.add local.tee $0 i32.load16_u - else - local.get $5 + local.set $5 end end - local.tee $5 + local.get $5 i32.const 73 i32.eq i32.const 0 @@ -3731,7 +3835,7 @@ select br_if $folding-inner0 local.get $0 - local.set $2 + local.set $1 loop $while-continue|1 local.get $5 i32.const 48 @@ -3761,11 +3865,11 @@ i32.const 46 i32.eq if - local.get $2 + local.get $1 local.get $0 i32.sub i32.eqz - local.set $2 + local.set $1 local.get $0 i32.const 2 i32.add @@ -3777,7 +3881,7 @@ if (result i32) i32.const 0 else - local.get $2 + local.get $1 end br_if $folding-inner0 i32.const 1 @@ -3818,7 +3922,7 @@ i32.ge_u i32.const 0 i32.const 0 - local.get $2 + local.get $1 local.get $3 select select @@ -3827,7 +3931,7 @@ local.get $5 i32.const 48 i32.sub - local.set $2 + local.set $1 loop $for-loop|3 i32.const 1 local.get $7 @@ -3837,39 +3941,39 @@ i32.const 46 i32.eq select - local.get $2 + local.get $1 i32.const 10 i32.lt_u select if block $for-break3 - local.get $2 + local.get $1 i32.const 10 i32.lt_u if - local.get $2 + local.get $1 i64.extend_i32_u local.get $8 i64.const 10 i64.mul i64.add local.get $8 - local.get $2 + local.get $1 i32.eqz i32.eqz i64.extend_i32_u i64.or - local.get $1 + local.get $2 i32.const 19 i32.lt_s select local.set $8 - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 else - local.get $1 + local.get $2 local.set $3 i32.const 1 local.set $7 @@ -3888,7 +3992,7 @@ local.tee $5 i32.const 48 i32.sub - local.set $2 + local.set $1 br $for-loop|3 end end @@ -3898,13 +4002,13 @@ local.get $4 call $~lib/util/string/parseExp local.get $3 - local.get $1 + local.get $2 local.get $7 select i32.const 19 - local.get $1 + local.get $2 i32.const 19 - local.get $1 + local.get $2 i32.lt_s select i32.sub @@ -3916,15 +4020,10 @@ end f64.const nan:0x8000000000000 ) - (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - i32.const 1648 - local.get $0 - select - local.set $2 local.get $1 call $~lib/rt/pure/__retain local.tee $1 @@ -3940,45 +4039,53 @@ i32.const 1648 local.set $1 end - block $__inlined_func$~lib/string/String#concat - local.get $2 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $3 - local.get $1 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $4 - i32.add - local.tee $0 - i32.eqz - if - i32.const 1280 - local.set $0 - local.get $1 - call $~lib/rt/pure/__release - br $__inlined_func$~lib/string/String#concat - end - local.get $0 - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $0 - local.get $2 - local.get $3 - call $~lib/util/memory/memmove - local.get $0 - local.get $3 - i32.add - local.get $1 - local.get $4 - call $~lib/util/memory/memmove + local.get $1 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $4 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $2 + i32.add + local.tee $3 + i32.eqz + if local.get $1 call $~lib/rt/pure/__release + i32.const 1280 + return end + call $~lib/rt/tlsf/maybeInitialize + local.get $3 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $3 local.get $0 + local.get $2 + call $~lib/util/memory/memmove + local.get $2 + local.get $3 + i32.add + local.get $1 + local.get $4 + call $~lib/util/memory/memmove + local.get $1 + call $~lib/rt/pure/__release + local.get $3 ) (func $~lib/string/String.__gt (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -3997,12 +4104,20 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 i32.eqz br_if $folding-inner0 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $3 i32.eqz if @@ -4042,12 +4157,20 @@ select br_if $folding-inner0 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 i32.eqz br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $3 i32.eqz if @@ -4075,7 +4198,11 @@ (local $3 i32) i32.const 1 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 i64.extend_i32_s local.get $1 @@ -4112,13 +4239,16 @@ call $~lib/rt/pure/__retain return end + call $~lib/rt/tlsf/maybeInitialize local.get $1 local.get $2 i32.mul i32.const 1 i32.shl i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 local.get $0 local.get $2 @@ -4136,10 +4266,18 @@ (local $6 i32) (local $7 i32) local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $3 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $4 i32.le_u if @@ -4169,7 +4307,11 @@ i32.xor if local.get $2 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $5 local.get $3 local.get $4 @@ -4178,12 +4320,15 @@ i32.add local.tee $3 if + call $~lib/rt/tlsf/maybeInitialize local.get $3 i32.const 1 i32.shl i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $3 local.get $0 local.get $1 i32.const 1 @@ -4378,15 +4523,6 @@ end local.get $3 ) - (func $~lib/rt/tlsf/__realloc (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - call $~lib/rt/tlsf/checkUsedBlock - local.get $1 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add - ) (func $~lib/string/String#replaceAll (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -4399,11 +4535,19 @@ local.get $2 local.set $4 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $3 local.get $1 local.tee $5 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $10 i32.le_u if @@ -4425,7 +4569,11 @@ return end local.get $4 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.set $2 local.get $10 i32.eqz @@ -4437,6 +4585,7 @@ call $~lib/rt/pure/__retain return end + call $~lib/rt/tlsf/maybeInitialize local.get $3 local.get $2 local.get $3 @@ -4447,7 +4596,9 @@ i32.const 1 i32.shl i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $6 local.get $4 local.get $2 @@ -4505,12 +4656,15 @@ local.get $10 i32.eq if + call $~lib/rt/tlsf/maybeInitialize local.get $3 i32.const 1 i32.shl local.tee $6 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $1 local.get $0 local.get $6 @@ -4559,25 +4713,32 @@ local.get $6 i32.eqz if + call $~lib/rt/tlsf/maybeInitialize local.get $3 i32.const 1 i32.shl i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $6 end local.get $8 local.get $1 i32.gt_u if + call $~lib/rt/tlsf/maybeInitialize local.get $6 + call $~lib/rt/tlsf/checkUsedBlock local.get $1 i32.const 1 i32.shl local.tee $1 i32.const 1 i32.shl - call $~lib/rt/tlsf/__realloc + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add local.set $6 end local.get $6 @@ -4627,14 +4788,18 @@ local.get $1 i32.gt_u if + call $~lib/rt/tlsf/maybeInitialize local.get $6 + call $~lib/rt/tlsf/checkUsedBlock local.get $1 i32.const 1 i32.shl local.tee $1 i32.const 1 i32.shl - call $~lib/rt/tlsf/__realloc + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add local.set $6 end local.get $3 @@ -4664,11 +4829,15 @@ local.tee $0 i32.gt_u if + call $~lib/rt/tlsf/maybeInitialize local.get $6 + call $~lib/rt/tlsf/checkUsedBlock local.get $0 i32.const 1 i32.shl - call $~lib/rt/tlsf/__realloc + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add local.set $6 end local.get $6 @@ -4681,7 +4850,11 @@ (func $~lib/string/String#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.set $3 local.get $1 i32.const 0 @@ -4735,12 +4908,15 @@ i32.const 1280 return end + call $~lib/rt/tlsf/maybeInitialize local.get $2 i32.const 1 i32.shl local.tee $2 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 local.get $0 local.get $1 @@ -4762,7 +4938,11 @@ select local.tee $2 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $3 local.get $1 i32.const 0 @@ -4795,9 +4975,12 @@ i32.const 1280 return end + call $~lib/rt/tlsf/maybeInitialize local.get $2 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 local.get $0 local.get $1 @@ -4820,7 +5003,11 @@ select local.tee $3 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $1 local.get $3 local.get $1 @@ -4876,9 +5063,12 @@ call $~lib/rt/pure/__retain return end + call $~lib/rt/tlsf/maybeInitialize local.get $3 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $1 local.get $0 local.get $2 @@ -4892,16 +5082,22 @@ (local $1 i32) (local $2 i32) (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 3 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $1 + call $~lib/rt/tlsf/maybeInitialize local.get $0 i32.const 2 i32.shl local.tee $2 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 call $~lib/rt/pure/__retain i32.store @@ -5093,7 +5289,7 @@ (local $7 i32) local.get $0 i32.load offset=12 - local.tee $6 + local.tee $7 i32.const 1 i32.add local.tee $3 @@ -5117,23 +5313,28 @@ call $~lib/builtins/abort unreachable end - local.get $4 local.get $0 i32.load - local.tee $7 + local.set $5 + local.get $4 + call $~lib/rt/tlsf/maybeInitialize + local.get $5 + call $~lib/rt/tlsf/checkUsedBlock local.get $2 i32.const 2 i32.shl - local.tee $5 - call $~lib/rt/tlsf/__realloc + local.tee $6 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add local.tee $2 i32.add - local.get $5 + local.get $6 local.get $4 i32.sub call $~lib/util/memory/memset local.get $2 - local.get $7 + local.get $5 i32.ne if local.get $0 @@ -5144,12 +5345,12 @@ i32.store offset=4 end local.get $0 - local.get $5 + local.get $6 i32.store offset=8 end local.get $0 i32.load offset=4 - local.get $6 + local.get $7 i32.const 2 i32.shl i32.add @@ -5188,7 +5389,11 @@ return end local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.set $3 i32.const 2147483647 local.get $2 @@ -5198,8 +5403,14 @@ select local.set $6 local.get $1 - call $~lib/string/String#get:length - local.tee $8 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $2 + local.set $8 + local.get $2 if local.get $3 i32.eqz @@ -5235,9 +5446,12 @@ local.get $2 i32.lt_s if + call $~lib/rt/tlsf/maybeInitialize i32.const 2 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $1 local.get $0 local.get $5 @@ -5286,12 +5500,15 @@ i32.const 0 i32.gt_s if + call $~lib/rt/tlsf/maybeInitialize local.get $7 i32.const 1 i32.shl local.tee $7 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $9 local.get $0 local.get $4 @@ -5341,12 +5558,15 @@ i32.const 0 i32.gt_s if + call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 1 i32.shl local.tee $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 local.get $0 local.get $4 @@ -5487,7 +5707,7 @@ local.get $0 i32.const 31 i32.shr_u - local.tee $1 + local.tee $2 if i32.const 0 local.get $0 @@ -5496,24 +5716,29 @@ end local.get $0 call $~lib/util/number/decimalCount32 - local.get $1 + local.get $2 i32.add local.tee $3 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 local.get $0 local.get $3 call $~lib/util/number/utoa32_core - local.get $1 + local.get $2 if - local.get $2 + local.get $1 i32.const 45 i32.store16 end - local.get $2 + local.get $1 call $~lib/rt/pure/__retain ) (func $~lib/util/number/utoa32 (param $0 i32) (result i32) @@ -5527,16 +5752,21 @@ end local.get $0 call $~lib/util/number/decimalCount32 - local.tee $1 + local.tee $2 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 local.get $0 - local.get $1 - call $~lib/util/number/utoa32_core local.get $2 + call $~lib/util/number/utoa32_core + local.get $1 call $~lib/rt/pure/__retain ) (func $~lib/util/number/decimalCount64High (param $0 i64) (result i32) @@ -5631,31 +5861,41 @@ if local.get $0 i32.wrap_i64 - local.tee $1 + local.tee $2 call $~lib/util/number/decimalCount32 local.tee $3 i32.const 1 i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 + local.set $1 + call $~lib/rt/tlsf/maybeInitialize local.get $1 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $2 local.get $3 call $~lib/util/number/utoa32_core else local.get $0 call $~lib/util/number/decimalCount64High - local.tee $1 + local.tee $2 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 local.get $0 - local.get $1 + local.get $2 call $~lib/util/number/utoa64_core end - local.get $2 + local.get $1 call $~lib/rt/pure/__retain ) (func $~lib/util/number/itoa64 (param $0 i64) (result i32) @@ -5673,7 +5913,7 @@ i64.const 63 i64.shr_u i32.wrap_i64 - local.tee $1 + local.tee $2 if i64.const 0 local.get $0 @@ -5686,41 +5926,51 @@ if local.get $0 i32.wrap_i64 - local.tee $2 + local.tee $3 call $~lib/util/number/decimalCount32 - local.get $1 + local.get $2 i32.add local.tee $4 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $3 - local.get $2 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $3 local.get $4 call $~lib/util/number/utoa32_core else local.get $0 call $~lib/util/number/decimalCount64High - local.get $1 + local.get $2 i32.add - local.tee $2 + local.tee $3 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 local.get $0 - local.get $2 + local.get $3 call $~lib/util/number/utoa64_core end - local.get $1 + local.get $2 if - local.get $3 + local.get $1 i32.const 45 i32.store16 end - local.get $3 + local.get $1 call $~lib/rt/pure/__retain ) (func $~lib/util/number/umul64f (param $0 i64) (param $1 i64) (result i64) @@ -5768,13 +6018,6 @@ i64.shr_u i64.add ) - (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.add - i32.const -64 - i32.sub - ) (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) local.get $0 local.get $1 @@ -5831,21 +6074,22 @@ local.get $1 i32.store16 ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i32) (param $4 i64) (param $5 i32) (result i32) + (local $6 i32) (local $7 i32) (local $8 i32) (local $9 i64) (local $10 i64) (local $11 i64) (local $12 i64) - local.get $3 + local.get $2 local.get $1 i64.sub local.set $9 - local.get $3 + local.get $2 i64.const 1 i32.const 0 - local.get $4 + local.get $3 i32.sub local.tee $8 i64.extend_i32_s @@ -5856,16 +6100,16 @@ local.tee $11 i64.and local.set $1 - local.get $3 + local.get $2 local.get $8 i64.extend_i32_s i64.shr_u i32.wrap_i64 - local.tee $2 + local.tee $6 call $~lib/util/number/decimalCount32 - local.set $7 + local.set $3 loop $while-continue|0 - local.get $7 + local.get $3 i32.const 0 i32.gt_s if @@ -5880,159 +6124,159 @@ block $case3|1 block $case2|1 block $case1|1 - local.get $7 - local.tee $4 + local.get $3 + local.tee $7 i32.const 10 i32.ne if - local.get $4 + local.get $7 i32.const 1 i32.sub br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 end - local.get $2 + local.get $6 i32.const 1000000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 1000000000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 100000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 100000000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 10000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 10000000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 1000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 1000000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 100000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 100000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 10000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 10000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 1000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 1000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 100 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 100 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 10 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 10 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 - local.set $4 + local.get $6 + local.set $3 i32.const 0 - local.set $2 + local.set $6 br $break|1 end i32.const 0 - local.set $4 + local.set $3 end - local.get $4 - local.get $6 + local.get $3 + local.get $5 i32.or if local.get $0 - local.get $6 + local.get $5 i32.const 1 i32.shl i32.add - local.get $4 + local.get $3 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 end local.get $7 i32.const 1 i32.sub - local.set $7 + local.set $3 local.get $1 - local.get $2 + local.get $6 i64.extend_i32_u local.get $8 i64.extend_i32_s i64.shl i64.add - local.tee $3 - local.get $5 + local.tee $2 + local.get $4 i64.le_u if - local.get $7 + local.get $3 global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K local.get $0 - local.get $6 local.get $5 + local.get $4 + local.get $2 local.get $3 - local.get $7 i32.const 2 i32.shl i32.const 16200 @@ -6043,7 +6287,7 @@ i64.shl local.get $9 call $~lib/util/number/grisuRound - local.get $6 + local.get $5 return end br $while-continue|0 @@ -6051,28 +6295,27 @@ end local.get $8 i64.extend_i32_s - local.set $3 - loop $while-continue|2 (result i32) - local.get $5 + local.set $2 + loop $while-continue|2 + local.get $4 i64.const 10 i64.mul - local.set $5 + local.set $4 local.get $1 i64.const 10 i64.mul local.tee $1 - local.get $3 + local.get $2 i64.shr_u local.tee $12 - local.get $6 + local.get $5 i64.extend_i32_s i64.or i64.const 0 i64.ne if local.get $0 - local.get $6 - local.tee $2 + local.get $5 i32.const 1 i32.shl i32.add @@ -6083,44 +6326,44 @@ i32.const 48 i32.add i32.store16 - local.get $2 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 end - local.get $7 + local.get $3 i32.const 1 i32.sub - local.set $7 + local.set $3 local.get $1 local.get $11 i64.and local.tee $1 - local.get $5 + local.get $4 i64.ge_u br_if $while-continue|2 - local.get $7 - global.get $~lib/util/number/_K - i32.add - global.set $~lib/util/number/_K - local.get $0 - local.get $6 - local.get $5 - local.get $1 - local.get $10 - local.get $9 - i32.const 0 - local.get $7 - i32.sub - i32.const 2 - i32.shl - i32.const 16200 - i32.add - i64.load32_u - i64.mul - call $~lib/util/number/grisuRound - local.get $6 end + local.get $3 + global.get $~lib/util/number/_K + i32.add + global.set $~lib/util/number/_K + local.get $0 + local.get $5 + local.get $4 + local.get $1 + local.get $10 + local.get $9 + i32.const 0 + local.get $3 + i32.sub + i32.const 2 + i32.shl + i32.const 16200 + i32.add + i64.load32_u + i64.mul + call $~lib/util/number/grisuRound + local.get $5 ) (func $~lib/util/number/grisu2 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -6239,17 +6482,11 @@ local.get $4 i64.clz i32.wrap_i64 - local.tee $1 i64.extend_i32_s i64.shl global.get $~lib/util/number/_frc_pow local.tee $4 call $~lib/util/number/umul64f - local.get $5 - local.get $1 - i32.sub - local.get $3 - call $~lib/util/number/umul64e global.get $~lib/util/number/_frc_plus local.get $4 call $~lib/util/number/umul64f @@ -6258,7 +6495,9 @@ local.tee $6 global.get $~lib/util/number/_exp local.get $3 - call $~lib/util/number/umul64e + i32.add + i32.const -64 + i32.sub local.get $6 global.get $~lib/util/number/_frc_minus local.get $4 @@ -6527,9 +6766,12 @@ call $~lib/rt/pure/__retain return end + call $~lib/rt/tlsf/maybeInitialize i32.const 56 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 local.set $2 local.get $0 @@ -6839,7 +7081,11 @@ unreachable end global.get $std/string/str - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.const 16 i32.ne if @@ -6855,7 +7101,11 @@ i32.const 0 global.get $std/string/str local.tee $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ge_u br_if $__inlined_func$~lib/string/String#charCodeAt drop @@ -6913,7 +7163,7 @@ global.set $~argumentsLength i32.const 0 call $~lib/string/String.fromCharCode@varargs - local.tee $41 + local.tee $44 i32.const 1296 call $~lib/string/String.__eq i32.eqz @@ -6929,7 +7179,7 @@ global.set $~argumentsLength i32.const 54 call $~lib/string/String.fromCharCode@varargs - local.tee $42 + local.tee $45 i32.const 1472 call $~lib/string/String.__eq i32.eqz @@ -6945,7 +7195,7 @@ global.set $~argumentsLength i32.const 65590 call $~lib/string/String.fromCharCode@varargs - local.tee $43 + local.tee $46 i32.const 1472 call $~lib/string/String.__eq i32.eqz @@ -6960,7 +7210,7 @@ i32.const 55296 i32.const 57088 call $~lib/string/String.fromCharCode - local.tee $44 + local.tee $47 i32.const 1504 call $~lib/string/String.__eq i32.eqz @@ -6974,7 +7224,7 @@ end i32.const 0 call $~lib/string/String.fromCodePoint - local.tee $45 + local.tee $48 i32.const 1296 call $~lib/string/String.__eq i32.eqz @@ -6988,7 +7238,7 @@ end i32.const 54 call $~lib/string/String.fromCodePoint - local.tee $46 + local.tee $49 i32.const 1472 call $~lib/string/String.__eq i32.eqz @@ -7002,7 +7252,7 @@ end i32.const 119558 call $~lib/string/String.fromCodePoint - local.tee $47 + local.tee $50 i32.const 1584 call $~lib/string/String.__eq i32.eqz @@ -7015,7 +7265,7 @@ unreachable end global.get $std/string/str - local.set $12 + local.set $9 i32.const 1616 local.tee $1 i32.eqz @@ -7025,21 +7275,31 @@ i32.const 1648 local.set $1 end + local.get $1 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $0 + local.set $10 block $__inlined_func$~lib/string/String#startsWith + local.get $0 i32.const 0 - local.get $12 - call $~lib/string/String#get:length - local.tee $11 + local.get $9 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $5 i32.const 0 - local.get $11 + local.get $5 i32.lt_s select - local.tee $8 - local.get $1 - call $~lib/string/String#get:length local.tee $0 i32.add - local.get $11 + local.get $5 i32.gt_s if local.get $1 @@ -7048,10 +7308,10 @@ local.set $0 br $__inlined_func$~lib/string/String#startsWith end - local.get $12 - local.get $8 - local.get $1 + local.get $9 local.get $0 + local.get $1 + local.get $10 call $~lib/util/string/compareImpl i32.eqz local.set $0 @@ -7069,29 +7329,37 @@ unreachable end block $__inlined_func$~lib/string/String#endsWith (result i32) + i32.const 1676 + i32.load + i32.const 1 + i32.shr_u + local.tee $5 + local.set $10 i32.const 0 i32.const 536870904 global.get $std/string/str - local.tee $8 - call $~lib/string/String#get:length + local.tee $1 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $0 i32.const 536870904 local.get $0 i32.lt_s select - i32.const 1680 - call $~lib/string/String#get:length - local.tee $1 + local.get $5 i32.sub local.tee $0 i32.const 0 i32.lt_s br_if $__inlined_func$~lib/string/String#endsWith drop - local.get $8 + local.get $1 local.get $0 i32.const 1680 - local.get $1 + local.get $10 call $~lib/util/string/compareImpl i32.eqz end @@ -7122,7 +7390,7 @@ i32.const 0 i32.const 1744 call $~lib/string/String#padStart - local.tee $48 + local.tee $51 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7138,7 +7406,7 @@ i32.const 15 i32.const 1744 call $~lib/string/String#padStart - local.tee $49 + local.tee $52 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7154,7 +7422,7 @@ i32.const 3 i32.const 1744 call $~lib/string/String#padStart - local.tee $50 + local.tee $53 i32.const 1776 call $~lib/string/String.__eq i32.eqz @@ -7170,7 +7438,7 @@ i32.const 10 i32.const 1280 call $~lib/string/String#padStart - local.tee $51 + local.tee $54 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -7186,7 +7454,7 @@ i32.const 100 i32.const 1280 call $~lib/string/String#padStart - local.tee $52 + local.tee $55 i32.const 1328 call $~lib/string/String.__eq i32.eqz @@ -7202,7 +7470,7 @@ i32.const 5 i32.const 1744 call $~lib/string/String#padStart - local.tee $53 + local.tee $56 i32.const 1840 call $~lib/string/String.__eq i32.eqz @@ -7218,7 +7486,7 @@ i32.const 6 i32.const 1872 call $~lib/string/String#padStart - local.tee $54 + local.tee $57 i32.const 1904 call $~lib/string/String.__eq i32.eqz @@ -7234,7 +7502,7 @@ i32.const 8 i32.const 1872 call $~lib/string/String#padStart - local.tee $55 + local.tee $58 i32.const 1936 call $~lib/string/String.__eq i32.eqz @@ -7250,7 +7518,7 @@ i32.const 0 i32.const 1744 call $~lib/string/String#padEnd - local.tee $56 + local.tee $59 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7266,7 +7534,7 @@ i32.const 15 i32.const 1744 call $~lib/string/String#padEnd - local.tee $57 + local.tee $60 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7282,7 +7550,7 @@ i32.const 3 i32.const 1744 call $~lib/string/String#padEnd - local.tee $58 + local.tee $61 i32.const 1776 call $~lib/string/String.__eq i32.eqz @@ -7298,7 +7566,7 @@ i32.const 10 i32.const 1280 call $~lib/string/String#padEnd - local.tee $59 + local.tee $62 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -7314,7 +7582,7 @@ i32.const 100 i32.const 1280 call $~lib/string/String#padEnd - local.tee $60 + local.tee $63 i32.const 1328 call $~lib/string/String.__eq i32.eqz @@ -7330,7 +7598,7 @@ i32.const 5 i32.const 1744 call $~lib/string/String#padEnd - local.tee $61 + local.tee $64 i32.const 1968 call $~lib/string/String.__eq i32.eqz @@ -7346,7 +7614,7 @@ i32.const 6 i32.const 1808 call $~lib/string/String#padEnd - local.tee $62 + local.tee $65 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -7362,7 +7630,7 @@ i32.const 8 i32.const 1808 call $~lib/string/String#padEnd - local.tee $63 + local.tee $66 i32.const 2032 call $~lib/string/String.__eq i32.eqz @@ -7537,7 +7805,11 @@ i32.const 2147483647 call $~lib/string/String#lastIndexOf global.get $std/string/str - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne if i32.const 0 @@ -7785,7 +8057,7 @@ end i32.const 1280 call $~lib/string/String#trimStart - local.tee $64 + local.tee $67 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -7799,7 +8071,7 @@ end i32.const 2288 call $~lib/string/String#trimStart - local.tee $65 + local.tee $68 i32.const 2288 call $~lib/string/String.__eq i32.eqz @@ -7813,7 +8085,7 @@ end i32.const 2320 call $~lib/string/String#trimStart - local.tee $66 + local.tee $69 i32.const 2368 call $~lib/string/String.__eq i32.eqz @@ -7827,7 +8099,7 @@ end i32.const 1280 call $~lib/string/String#trimEnd - local.tee $67 + local.tee $70 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -7841,7 +8113,7 @@ end i32.const 2288 call $~lib/string/String#trimEnd - local.tee $68 + local.tee $71 i32.const 2288 call $~lib/string/String.__eq i32.eqz @@ -7855,7 +8127,7 @@ end i32.const 2320 call $~lib/string/String#trimEnd - local.tee $69 + local.tee $72 i32.const 2400 call $~lib/string/String.__eq i32.eqz @@ -7869,7 +8141,7 @@ end i32.const 1280 call $~lib/string/String#trim - local.tee $70 + local.tee $73 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -7883,7 +8155,7 @@ end i32.const 2288 call $~lib/string/String#trim - local.tee $71 + local.tee $74 i32.const 2288 call $~lib/string/String.__eq i32.eqz @@ -7897,7 +8169,7 @@ end i32.const 2320 call $~lib/string/String#trim - local.tee $72 + local.tee $75 i32.const 1808 call $~lib/string/String.__eq i32.eqz @@ -9573,16 +9845,25 @@ end i32.const 7840 i32.const 8000 - call $~lib/string/String.__concat - local.tee $73 + call $~lib/string/String#concat + local.tee $41 + i32.const 1648 + local.get $41 + select i32.const 8160 - call $~lib/string/String.__concat - local.tee $74 + call $~lib/string/String#concat + local.tee $42 + i32.const 1648 + local.get $42 + select i32.const 8320 - call $~lib/string/String.__concat - local.tee $75 + call $~lib/string/String#concat + local.tee $43 + i32.const 1648 + local.get $43 + select i32.const 8480 - call $~lib/string/String.__concat + call $~lib/string/String#concat local.tee $76 call $~lib/util/string/strtod f64.const 1797693134862315708145274e284 @@ -9910,7 +10191,7 @@ end i32.const 1328 i32.const 11392 - call $~lib/string/String.__concat + call $~lib/string/String#concat local.tee $1 local.get $1 i32.const 11424 @@ -10266,15 +10547,20 @@ end i32.const 65377 call $~lib/string/String.fromCodePoint - local.tee $11 + local.set $9 i32.const 55296 call $~lib/string/String.fromCodePoint - local.tee $8 + local.tee $5 + i32.const 1648 + local.get $5 + select i32.const 56322 call $~lib/string/String.fromCodePoint + local.tee $10 + call $~lib/string/String#concat local.tee $1 - call $~lib/string/String.__concat - local.tee $0 + local.get $9 + local.get $1 call $~lib/string/String.__gt i32.eqz if @@ -10285,16 +10571,17 @@ call $~lib/builtins/abort unreachable end - local.get $11 + local.get $9 call $~lib/rt/pure/__release - local.get $8 + local.get $5 call $~lib/rt/pure/__release - local.get $1 + local.get $10 call $~lib/rt/pure/__release - local.get $0 call $~lib/rt/pure/__release - i32.const 1872 - call $~lib/string/String#get:length + i32.const 1868 + i32.load + i32.const 1 + i32.shr_u i32.const 3 i32.ne if @@ -11435,11 +11722,11 @@ local.tee $0 i32.const 1280 call $~lib/string/String.__eq - local.set $9 + local.set $11 local.get $0 call $~lib/rt/pure/__release end - local.get $9 + local.get $11 i32.eqz if i32.const 0 @@ -11470,15 +11757,15 @@ i32.const 2064 i32.const 2147483647 call $~lib/string/String#split - local.set $9 + local.set $11 local.get $0 call $~lib/rt/pure/__release - local.get $9 + local.get $11 i32.load offset=12 i32.const 1 i32.eq if - local.get $9 + local.get $11 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 @@ -11503,7 +11790,7 @@ i32.const 2147483647 call $~lib/string/String#split local.set $1 - local.get $9 + local.get $11 call $~lib/rt/pure/__release local.get $1 i32.load offset=12 @@ -11516,11 +11803,11 @@ local.tee $0 i32.const 13360 call $~lib/string/String.__eq - local.set $5 + local.set $6 local.get $0 call $~lib/rt/pure/__release end - local.get $5 + local.get $6 i32.eqz if i32.const 0 @@ -11534,15 +11821,15 @@ i32.const 2064 i32.const 2147483647 call $~lib/string/String#split - local.set $5 + local.set $6 local.get $1 call $~lib/rt/pure/__release - local.get $5 + local.get $6 i32.load offset=12 i32.const 3 i32.eq if - local.get $5 + local.get $6 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 @@ -11554,7 +11841,7 @@ end local.get $14 if - local.get $5 + local.get $6 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 @@ -11566,7 +11853,7 @@ end local.get $15 if - local.get $5 + local.get $6 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 @@ -11591,7 +11878,7 @@ i32.const 2147483647 call $~lib/string/String#split local.set $1 - local.get $5 + local.get $6 call $~lib/rt/pure/__release local.get $1 i32.load offset=12 @@ -11888,11 +12175,11 @@ local.tee $0 i32.const 12240 call $~lib/string/String.__eq - local.set $10 + local.set $12 local.get $0 call $~lib/rt/pure/__release end - local.get $10 + local.get $12 i32.eqz if i32.const 0 @@ -11923,15 +12210,15 @@ i32.const 1280 i32.const 1 call $~lib/string/String#split - local.set $10 + local.set $12 local.get $0 call $~lib/rt/pure/__release - local.get $10 + local.get $12 i32.load offset=12 i32.const 1 i32.eq if - local.get $10 + local.get $12 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 @@ -11956,7 +12243,7 @@ i32.const 1 call $~lib/string/String#split local.set $1 - local.get $10 + local.get $12 call $~lib/rt/pure/__release local.get $1 i32.load offset=12 @@ -11969,11 +12256,11 @@ local.tee $0 i32.const 1328 call $~lib/string/String.__eq - local.set $6 + local.set $7 local.get $0 call $~lib/rt/pure/__release end - local.get $6 + local.get $7 i32.eqz if i32.const 0 @@ -11987,15 +12274,15 @@ i32.const 1280 i32.const 4 call $~lib/string/String#split - local.set $6 + local.set $7 local.get $1 call $~lib/rt/pure/__release - local.get $6 + local.get $7 i32.load offset=12 i32.const 3 i32.eq if - local.get $6 + local.get $7 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 @@ -12007,7 +12294,7 @@ end local.get $33 if - local.get $6 + local.get $7 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 @@ -12019,17 +12306,17 @@ end local.get $34 if - local.get $6 + local.get $7 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 i32.const 12240 call $~lib/string/String.__eq - local.set $7 + local.set $8 local.get $0 call $~lib/rt/pure/__release end - local.get $7 + local.get $8 i32.eqz if i32.const 0 @@ -12043,15 +12330,15 @@ i32.const 1280 i32.const -1 call $~lib/string/String#split - local.set $7 - local.get $6 - call $~lib/rt/pure/__release + local.set $8 local.get $7 + call $~lib/rt/pure/__release + local.get $8 i32.load offset=12 i32.const 3 i32.eq if - local.get $7 + local.get $8 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 @@ -12063,7 +12350,7 @@ end local.get $35 if - local.get $7 + local.get $8 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 @@ -12075,7 +12362,7 @@ end local.get $36 if - local.get $7 + local.get $8 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 @@ -12100,7 +12387,7 @@ i32.const -1 call $~lib/string/String#split local.set $1 - local.get $7 + local.get $8 call $~lib/rt/pure/__release local.get $1 i32.load offset=12 @@ -13065,7 +13352,7 @@ end f64.const 2.2250738585072014e-308 call $~lib/util/number/dtoa - local.tee $12 + local.tee $9 i32.const 16448 call $~lib/string/String.__eq i32.eqz @@ -13079,7 +13366,7 @@ end f64.const 4.940656e-318 call $~lib/util/number/dtoa - local.tee $11 + local.tee $5 i32.const 16512 call $~lib/string/String.__eq i32.eqz @@ -13093,7 +13380,7 @@ end f64.const 9060801153433600 call $~lib/util/number/dtoa - local.tee $8 + local.tee $10 i32.const 16560 call $~lib/string/String.__eq i32.eqz @@ -13107,7 +13394,7 @@ end f64.const 4708356024711512064 call $~lib/util/number/dtoa - local.tee $9 + local.tee $11 i32.const 16624 call $~lib/string/String.__eq i32.eqz @@ -13135,7 +13422,7 @@ end f64.const 5e-324 call $~lib/util/number/dtoa - local.tee $5 + local.tee $6 i32.const 6448 call $~lib/string/String.__eq i32.eqz @@ -13429,7 +13716,7 @@ end f64.const 1.2312145673456234e-08 call $~lib/util/number/dtoa - local.tee $10 + local.tee $12 i32.const 17312 call $~lib/string/String.__eq i32.eqz @@ -13457,7 +13744,7 @@ end f64.const 0.9999999999999999 call $~lib/util/number/dtoa - local.tee $6 + local.tee $7 i32.const 17440 call $~lib/string/String.__eq i32.eqz @@ -13499,7 +13786,7 @@ end f64.const 0.3333333333333333 call $~lib/util/number/dtoa - local.tee $7 + local.tee $8 i32.const 17536 call $~lib/string/String.__eq i32.eqz @@ -13625,12 +13912,6 @@ end global.get $std/string/str call $~lib/rt/pure/__release - local.get $41 - call $~lib/rt/pure/__release - local.get $42 - call $~lib/rt/pure/__release - local.get $43 - call $~lib/rt/pure/__release local.get $44 call $~lib/rt/pure/__release local.get $45 @@ -13695,6 +13976,12 @@ call $~lib/rt/pure/__release local.get $75 call $~lib/rt/pure/__release + local.get $41 + call $~lib/rt/pure/__release + local.get $42 + call $~lib/rt/pure/__release + local.get $43 + call $~lib/rt/pure/__release local.get $76 call $~lib/rt/pure/__release local.get $80 @@ -13967,17 +14254,17 @@ call $~lib/rt/pure/__release local.get $211 call $~lib/rt/pure/__release - local.get $12 + local.get $9 call $~lib/rt/pure/__release - local.get $11 + local.get $5 call $~lib/rt/pure/__release - local.get $8 + local.get $10 call $~lib/rt/pure/__release - local.get $9 + local.get $11 call $~lib/rt/pure/__release local.get $13 call $~lib/rt/pure/__release - local.get $5 + local.get $6 call $~lib/rt/pure/__release local.get $14 call $~lib/rt/pure/__release @@ -14019,17 +14306,17 @@ call $~lib/rt/pure/__release local.get $31 call $~lib/rt/pure/__release - local.get $10 + local.get $12 call $~lib/rt/pure/__release local.get $32 call $~lib/rt/pure/__release - local.get $6 + local.get $7 call $~lib/rt/pure/__release local.get $33 call $~lib/rt/pure/__release local.get $34 call $~lib/rt/pure/__release - local.get $7 + local.get $8 call $~lib/rt/pure/__release local.get $35 call $~lib/rt/pure/__release diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index d423b4b429..8de00aba2f 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -1,7 +1,7 @@ (module + (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 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))) @@ -370,15 +370,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) - (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i32) + (func $~lib/util/hash/hashStr (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -387,7 +379,11 @@ local.get $0 if local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.const 1 i32.shl local.set $3 @@ -396,11 +392,11 @@ local.get $3 i32.lt_u if + local.get $1 local.get $0 local.get $2 i32.add i32.load8_u - local.get $1 i32.xor i32.const 16777619 i32.mul @@ -508,10 +504,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 @@ -579,7 +583,7 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $7 + local.set $5 local.get $3 i32.const 3 i32.shl @@ -589,62 +593,62 @@ i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 + local.set $3 local.get $0 i32.load offset=8 - local.tee $8 + local.tee $4 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $5 - local.get $2 - local.set $3 + local.set $7 + local.get $3 + local.set $2 loop $while-continue|0 - local.get $5 - local.get $8 + local.get $4 + local.get $7 i32.ne if - local.get $8 + local.get $4 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 - local.get $8 + local.get $2 + local.get $4 i32.load i32.store - local.get $3 - local.get $8 + local.get $2 + local.get $4 i32.load offset=4 i32.store offset=4 - local.get $3 - local.get $7 - local.get $8 + local.get $2 + local.get $5 + local.get $4 i32.load - call $~lib/util/hash/HASH<~lib/string/String> + call $~lib/util/hash/hashStr local.get $1 i32.and i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $8 i32.load i32.store offset=8 - local.get $4 - local.get $3 + local.get $8 + local.get $2 i32.store - local.get $3 + local.get $2 i32.const 12 i32.add - local.set $3 + local.set $2 end - local.get $8 + local.get $4 i32.const 12 i32.add - local.set $8 + local.set $4 br $while-continue|0 end end @@ -652,7 +656,7 @@ i32.load drop local.get $0 - local.get $7 + local.get $5 i32.store local.get $0 local.get $1 @@ -661,7 +665,7 @@ i32.load offset=8 drop local.get $0 - local.get $2 + local.get $3 i32.store offset=8 local.get $0 local.get $6 @@ -675,10 +679,12 @@ (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 i32.const 1040 - call $~lib/util/hash/HASH<~lib/string/String> - local.tee $3 + call $~lib/util/hash/hashStr + local.tee $2 + local.set $3 + local.get $0 + local.get $2 call $~lib/map/Map<~lib/string/String,usize>#find local.tee $2 if @@ -758,7 +764,7 @@ i32.store end ) - (func $~lib/util/hash/HASH (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -890,7 +896,7 @@ local.get $7 local.get $8 i32.load - call $~lib/util/hash/HASH + call $~lib/util/hash/hash32 local.get $1 i32.and i32.const 2 @@ -944,7 +950,7 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + call $~lib/util/hash/hash32 local.tee $3 call $~lib/map/Map#find local.tee $2 @@ -1037,12 +1043,12 @@ if global.get $~lib/symbol/stringToId i32.const 1040 - call $~lib/util/hash/HASH<~lib/string/String> + call $~lib/util/hash/hashStr call $~lib/map/Map<~lib/string/String,usize>#find if global.get $~lib/symbol/stringToId i32.const 1040 - call $~lib/util/hash/HASH<~lib/string/String> + call $~lib/util/hash/hashStr call $~lib/map/Map<~lib/string/String,usize>#find local.tee $0 i32.eqz @@ -1128,20 +1134,11 @@ call $~lib/map/Map#set local.get $0 ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/HASH - call $~lib/map/Map#find - i32.const 0 - i32.ne - ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $0 i32.eqz @@ -1161,7 +1158,9 @@ if (result i32) global.get $~lib/symbol/idToString local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find else i32.const 0 end @@ -1348,52 +1347,53 @@ end end ) - (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $__inlined_func$~lib/string/String#concat - local.get $0 - i32.const 1840 - local.get $0 - select - local.tee $3 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $2 - local.get $1 - i32.const 1840 - local.get $1 - select - local.tee $1 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $4 - i32.add - local.tee $0 - i32.eqz - if - i32.const 1344 - local.set $0 - br $__inlined_func$~lib/string/String#concat - end - local.get $0 - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $0 - local.get $3 - local.get $2 - call $~lib/util/memory/memmove - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $4 - call $~lib/util/memory/memmove + local.get $1 + i32.const 1840 + local.get $1 + select + local.tee $3 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $4 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $1 + i32.add + local.tee $2 + i32.eqz + if + i32.const 1344 + return end + local.get $2 + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $2 local.get $0 + local.get $1 + call $~lib/util/memory/memmove + local.get $1 + local.get $2 + i32.add + local.get $3 + local.get $4 + call $~lib/util/memory/memmove + local.get $2 ) (func $~lib/symbol/_Symbol#toString (param $0 i32) (result i32) i32.const 1808 @@ -1415,8 +1415,15 @@ if local.get $0 i32.const 2 - i32.sub - br_table $case1|0 $case2|0 $case3|0 $case4|0 $case5|0 $case6|0 $case7|0 $case8|0 $case9|0 $case10|0 $case11|0 + i32.eq + br_if $case1|0 + block $tablify|0 + local.get $0 + i32.const 3 + i32.sub + br_table $case2|0 $case3|0 $case4|0 $case5|0 $case6|0 $case7|0 $case8|0 $case9|0 $case10|0 $tablify|0 + end + br $case11|0 end i32.const 1360 br $break|0 @@ -1455,7 +1462,9 @@ if (result i32) global.get $~lib/symbol/idToString local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find else i32.const 0 end @@ -1467,9 +1476,13 @@ i32.const 1344 end end - call $~lib/string/String.__concat + call $~lib/string/String#concat + local.tee $0 + i32.const 1840 + local.get $0 + select i32.const 1872 - call $~lib/string/String.__concat + call $~lib/string/String#concat ) (func $start:std/symbol (local $0 i32) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 96efd4d8cf..343fd80aec 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -1,13 +1,13 @@ (module + (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 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_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i64_i32_i32_=>_i32 (func (param i64 i32 i32) (result i32))) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) (type $f32_i32_i32_=>_i32 (func (param f32 i32 i32) (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) @@ -20,6 +20,7 @@ (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) + (type $i64_=>_i32 (func (param i64) (result i32))) (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) @@ -30,9 +31,8 @@ (type $none_=>_i32 (func (result i32))) (type $i32_i32_f64_=>_i32 (func (param i32 i32 f64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) - (type $i32_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) + (type $i32_i64_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i64 i32 i64 i32) (result i32))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) - (type $i64_=>_i32 (func (param i64) (result i32))) (type $f64_=>_i32 (func (param f64) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (type $i64_i32_i32_=>_i64 (func (param i64 i32 i32) (result i64))) @@ -209,15 +209,6 @@ (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -253,14 +244,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -379,9 +362,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -389,7 +378,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -555,12 +544,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -650,14 +639,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -811,10 +806,13 @@ i32.const 23 i32.lt_u if - i32.const 8336 local.get $1 + i32.const 2 + i32.shl + i32.const 8336 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -878,6 +876,7 @@ ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $1 i32.const 256 i32.lt_u @@ -887,23 +886,22 @@ i32.shr_u local.set $1 else + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 local.get $1 i32.const 536870904 i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.set $1 - end - local.get $1 + select + local.tee $1 i32.const 31 local.get $1 i32.clz @@ -939,7 +937,10 @@ end local.get $0 local.get $2 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const -1 local.get $1 i32.shl @@ -966,8 +967,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -979,7 +985,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -1055,6 +1061,7 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1085,11 +1092,13 @@ memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 + i32.shl + local.set $5 local.get $3 i32.const 16 - i32.shl + local.get $0 + i32.load offset=1568 + local.get $5 i32.const 16 i32.sub i32.ne @@ -1117,9 +1126,11 @@ i32.const 16 i32.shr_u local.tee $5 + i32.gt_s + local.set $6 local.get $3 local.get $5 - i32.gt_s + local.get $6 select memory.grow i32.const 0 @@ -1190,14 +1201,6 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) @@ -1458,12 +1461,15 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize local.get $1 local.get $2 i32.shl local.tee $3 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $1 i32.const 0 local.get $3 @@ -1471,9 +1477,12 @@ local.get $0 i32.eqz if + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 2 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $0 end @@ -1511,106 +1520,132 @@ local.get $0 ) (func $~lib/typedarray/Int8Array#constructor (param $0 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 3 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.get $0 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - i32.sub - ) (func $~lib/typedarray/Uint8Array#constructor (param $0 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 4 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.get $0 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Uint8ClampedArray#constructor (param $0 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 5 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.get $0 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Int16Array#constructor (param $0 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 6 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.get $0 i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Uint16Array#constructor (param $0 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 7 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.get $0 i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Int32Array#constructor (param $0 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 8 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.get $0 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Uint32Array#constructor (param $0 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 9 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.get $0 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Int64Array#constructor (param $0 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 10 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.get $0 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Uint64Array#constructor (param $0 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 11 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.get $0 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Float32Array#constructor (param $0 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 12 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.get $0 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor ) (func $~lib/typedarray/Float64Array#constructor (param $0 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 13 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.get $0 i32.const 3 @@ -1631,7 +1666,10 @@ local.get $0 call $~lib/typedarray/Int8Array#constructor local.tee $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 i32.const 1312 @@ -1667,7 +1705,10 @@ local.get $0 call $~lib/typedarray/Uint8Array#constructor local.tee $2 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $2 + i32.load + i32.sub if i32.const 0 i32.const 1312 @@ -1703,7 +1744,10 @@ local.get $0 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $3 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $3 + i32.load + i32.sub if i32.const 0 i32.const 1312 @@ -1739,7 +1783,10 @@ local.get $0 call $~lib/typedarray/Int16Array#constructor local.tee $4 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $4 + i32.load + i32.sub if i32.const 0 i32.const 1312 @@ -1779,7 +1826,10 @@ local.get $0 call $~lib/typedarray/Uint16Array#constructor local.tee $5 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $5 + i32.load + i32.sub if i32.const 0 i32.const 1312 @@ -1819,7 +1869,10 @@ local.get $0 call $~lib/typedarray/Int32Array#constructor local.tee $6 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $6 + i32.load + i32.sub if i32.const 0 i32.const 1312 @@ -1859,7 +1912,10 @@ local.get $0 call $~lib/typedarray/Uint32Array#constructor local.tee $7 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $7 + i32.load + i32.sub if i32.const 0 i32.const 1312 @@ -1899,7 +1955,10 @@ local.get $0 call $~lib/typedarray/Int64Array#constructor local.tee $8 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $8 + i32.load + i32.sub if i32.const 0 i32.const 1312 @@ -1939,7 +1998,10 @@ local.get $0 call $~lib/typedarray/Uint64Array#constructor local.tee $9 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $9 + i32.load + i32.sub if i32.const 0 i32.const 1312 @@ -1979,7 +2041,10 @@ local.get $0 call $~lib/typedarray/Float32Array#constructor local.tee $10 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $10 + i32.load + i32.sub if i32.const 0 i32.const 1312 @@ -2019,7 +2084,10 @@ local.get $0 call $~lib/typedarray/Float64Array#constructor local.tee $11 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $11 + i32.load + i32.sub if i32.const 0 i32.const 1312 @@ -2179,9 +2247,12 @@ select end local.set $1 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 8 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $3 i32.load @@ -2287,9 +2358,12 @@ select end local.set $1 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 13 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $3 i32.load @@ -2462,6 +2536,7 @@ (local $5 i32) (local $6 f64) (local $7 i32) + call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 31 i32.add @@ -2471,7 +2546,9 @@ i32.shl local.tee $2 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $5 i32.const 0 local.get $2 @@ -2837,7 +2914,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Int8Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/FILL<~lib/typedarray/Int8Array,i8> (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2858,9 +2935,11 @@ i32.add local.tee $0 i32.const 0 + i32.gt_s + local.set $2 local.get $0 i32.const 0 - i32.gt_s + local.get $2 select else local.get $2 @@ -2870,7 +2949,7 @@ i32.lt_s select end - local.tee $2 + local.tee $0 local.get $3 i32.const 0 i32.lt_s @@ -2878,11 +2957,13 @@ local.get $3 local.get $4 i32.add - local.tee $0 - i32.const 0 - local.get $0 + local.tee $2 i32.const 0 i32.gt_s + local.set $3 + local.get $2 + i32.const 0 + local.get $3 select else local.get $3 @@ -2892,15 +2973,15 @@ i32.lt_s select end - local.tee $0 + local.tee $2 i32.lt_s if - local.get $2 + local.get $0 local.get $6 i32.add local.get $1 - local.get $0 local.get $2 + local.get $0 i32.sub call $~lib/util/memory/memset end @@ -3085,17 +3166,23 @@ (local $4 i32) (local $5 i32) (local $6 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 16 local.get $2 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 + call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 i32.shl local.tee $5 local.tee $6 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 local.get $3 if @@ -3137,13 +3224,6 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__unchecked_get (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $1 - i32.add - i32.load8_s - ) (func $std/typedarray/isInt8ArrayEqual (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -3166,7 +3246,6 @@ local.get $0 local.get $2 call $~lib/typedarray/Int8Array#__get - local.set $4 local.get $2 local.get $1 i32.load offset=12 @@ -3179,10 +3258,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $2 - call $~lib/array/Array#__unchecked_get - local.get $4 + local.get $1 + i32.load offset=4 + i32.add + i32.load8_s i32.ne br_if $folding-inner0 local.get $2 @@ -3213,9 +3293,11 @@ i32.add local.tee $0 i32.const 0 + i32.gt_s + local.set $1 local.get $0 i32.const 0 - i32.gt_s + local.get $1 select else local.get $1 @@ -3235,9 +3317,11 @@ i32.add local.tee $1 i32.const 0 + i32.gt_s + local.set $2 local.get $1 i32.const 0 - i32.gt_s + local.get $2 select else local.get $2 @@ -3248,9 +3332,12 @@ select end local.set $1 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 3 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $3 i32.load @@ -3353,22 +3440,6 @@ end local.get $4 ) - (func $~lib/typedarray/Int32Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/typedarray/FILL<~lib/typedarray/Int32Array,i32> - ) - (func $~lib/array/Array#__unchecked_get (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - ) (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 @@ -3383,8 +3454,12 @@ unreachable end local.get $0 + i32.load offset=4 local.get $1 - call $~lib/array/Array#__unchecked_get + i32.const 2 + i32.shl + i32.add + i32.load ) (func $std/typedarray/isInt32ArrayEqual (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -3615,13 +3690,6 @@ call $~lib/util/memory/memmove local.get $5 ) - (func $~lib/typedarray/Int32Array#copyWithin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/typedarray/COPY_WITHIN<~lib/typedarray/Int32Array,i32> - ) (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 @@ -3647,7 +3715,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/REDUCE<~lib/typedarray/Uint8Array,u8,u8> (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3934,7 +4002,7 @@ local.get $1 f64.add ) - (func $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Uint8Array,u8,u8> (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4070,461 +4138,278 @@ local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8Array#__get (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> + (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 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set local.get $1 - local.get $0 - i32.load offset=8 - i32.ge_u - if - i32.const 1376 - i32.const 1440 - i32.const 152 - i32.const 45 - call $~lib/builtins/abort - unreachable - end + 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 - local.get $0 i32.load offset=4 - i32.add - i32.load8_u - ) - (func $~lib/typedarray/Int16Array#__get (param $0 i32) (param $1 i32) (result i32) + local.set $6 local.get $1 - local.get $0 i32.load offset=8 - i32.const 1 - i32.shr_u - i32.ge_u - if - i32.const 1376 - i32.const 1440 - i32.const 408 - i32.const 64 - call $~lib/builtins/abort - unreachable + local.tee $4 + local.set $7 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $3 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $2 + local.get $6 + i32.add + i32.load8_s + local.set $5 + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $3 + i32.add + local.get $5 + local.get $5 + i32.mul + i32.store8 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end end local.get $0 - i32.load offset=4 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_s - ) - (func $~lib/typedarray/Uint16Array#__get (param $0 i32) (param $1 i32) (result i32) - local.get $1 + local.get $3 + call $~lib/rt/pure/__retain + i32.store local.get $0 - i32.load offset=8 + local.get $3 + i32.store offset=4 + local.get $0 + local.get $7 + i32.store offset=8 + local.get $0 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + call $~lib/typedarray/Int8Array#__get i32.const 1 - i32.shr_u - i32.ge_u + i32.ne if - i32.const 1376 - i32.const 1440 - i32.const 536 - i32.const 64 + i32.const 0 + i32.const 1312 + i32.const 365 + i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 - local.get $1 i32.const 1 - i32.shl - i32.add - i32.load16_u - ) - (func $~lib/typedarray/Uint32Array#__get (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.ge_u + call $~lib/typedarray/Int8Array#__get + i32.const 4 + i32.ne if - i32.const 1376 - i32.const 1440 - i32.const 792 - i32.const 64 + i32.const 0 + i32.const 1312 + i32.const 366 + i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 - local.get $1 i32.const 2 - i32.shl - i32.add - i32.load - ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i64) - local.get $0 - local.get $0 - i64.mul - ) - (func $~lib/typedarray/Int64Array#__get (param $0 i32) (param $1 i32) (result i64) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.ge_u + call $~lib/typedarray/Int8Array#__get + i32.const 9 + i32.ne if - i32.const 1376 - i32.const 1440 - i32.const 920 - i32.const 64 + i32.const 0 + i32.const 1312 + i32.const 367 + i32.const 3 call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 local.get $1 - i32.const 3 - i32.shl - i32.add - i64.load + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#__get (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Uint8Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 - i32.const 3 - i32.shr_u i32.ge_u if i32.const 1376 i32.const 1440 - i32.const 1048 - i32.const 64 + i32.const 152 + i32.const 45 call $~lib/builtins/abort unreachable end + local.get $1 local.get $0 i32.load offset=4 - local.get $1 - i32.const 3 - i32.shl i32.add - i64.load - ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result f32) - local.get $0 - local.get $0 - f32.mul + i32.load8_u ) - (func $~lib/typedarray/Float32Array#__get (param $0 i32) (param $1 i32) (result f32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> + (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 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8Array#__set local.get $1 - local.get $0 - i32.load offset=8 + i32.const 1 i32.const 2 - i32.shr_u - i32.ge_u - if - i32.const 1376 - i32.const 1440 - i32.const 1176 - i32.const 64 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Uint8Array#__set local.get $1 i32.const 2 - i32.shl - i32.add - f32.load - ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result f64) - local.get $0 - local.get $0 - f64.mul - ) - (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 - i32.const 24 - i32.shr_s - i32.const 2 - i32.gt_s - ) - (func $~lib/rt/tlsf/reallocateBlock (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 - call $~lib/rt/tlsf/prepareSize - local.tee $3 - local.get $1 - i32.load - local.tee $5 - i32.const -4 - i32.and - i32.le_u - if - local.get $0 - local.get $1 - local.get $3 - call $~lib/rt/tlsf/prepareBlock - local.get $1 - local.get $2 - i32.store offset=12 - local.get $1 - return - end + i32.const 3 + call $~lib/typedarray/Uint8Array#__set local.get $1 - call $~lib/rt/tlsf/GETRIGHT - local.tee $6 - i32.load - local.tee $4 - i32.const 1 - i32.and - if - local.get $5 - i32.const -4 - i32.and - i32.const 16 - i32.add - local.get $4 - i32.const -4 - i32.and - i32.add - local.tee $4 - local.get $3 - i32.ge_u - if - local.get $0 - local.get $6 - call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $4 - local.get $5 - i32.const 3 - i32.and - i32.or - i32.store - local.get $1 - local.get $2 - i32.store offset=12 - local.get $0 - local.get $1 - local.get $3 - call $~lib/rt/tlsf/prepareBlock - local.get $1 - return - end - end - local.get $0 - local.get $2 + i32.load offset=4 + local.set $6 local.get $1 i32.load offset=8 + local.tee $4 + local.set $7 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 call $~lib/rt/tlsf/allocateBlock - local.tee $3 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $3 - i32.const 16 - i32.add - local.get $1 i32.const 16 i32.add - local.get $2 - call $~lib/util/memory/memmove - local.get $1 - i32.const 8332 - i32.ge_u - if - local.get $1 - local.get $3 - call $~lib/rt/rtrace/onrealloc - local.get $0 - local.get $1 - call $~lib/rt/tlsf/freeBlock - end - local.get $3 - ) - (func $~lib/rt/tlsf/__realloc (param $0 i32) (param $1 i32) (result i32) + local.set $0 call $~lib/rt/tlsf/maybeInitialize - local.get $0 - call $~lib/rt/tlsf/checkUsedBlock - local.get $1 - call $~lib/rt/tlsf/reallocateBlock + local.get $4 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> - (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/typedarray/Int8Array#constructor - 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 - i32.load offset=8 - local.set $5 - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/__alloc - local.set $4 - local.get $5 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $1 - i32.load offset=4 - local.set $0 + local.set $3 loop $for-loop|0 - local.get $3 - local.get $5 + local.get $2 + local.get $4 i32.lt_s if - local.get $0 - local.get $3 + local.get $2 + local.get $6 i32.add - i32.load8_s - local.set $7 + i32.load8_u + local.set $5 i32.const 3 global.set $~argumentsLength - local.get $7 - local.get $3 - local.get $1 - call $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 - if - local.get $2 - local.get $6 - i32.add - local.get $7 - i32.store8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - end + local.get $2 local.get $3 + i32.add + local.get $5 + local.get $5 + i32.mul + i32.store8 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $for-loop|0 end end - local.get $4 - local.get $6 - local.get $2 - call $~lib/rt/tlsf/__realloc - local.tee $0 + local.get $0 + local.get $3 call $~lib/rt/pure/__retain i32.store - local.get $4 - local.get $2 - i32.store offset=8 - local.get $4 local.get $0 + local.get $3 i32.store offset=4 - local.get $4 + local.get $0 + local.get $7 + i32.store offset=8 + local.get $0 call $~lib/rt/pure/__retain local.tee $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 0 + call $~lib/typedarray/Uint8Array#__get + i32.const 1 + i32.ne if i32.const 0 i32.const 1312 - i32.const 390 + i32.const 365 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=8 - i32.const 3 + i32.const 1 + call $~lib/typedarray/Uint8Array#__get + i32.const 4 i32.ne if i32.const 0 i32.const 1312 - i32.const 391 + i32.const 366 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 0 - call $~lib/typedarray/Int8Array#__get - i32.const 3 + i32.const 2 + call $~lib/typedarray/Uint8Array#__get + i32.const 9 i32.ne if i32.const 0 i32.const 1312 - i32.const 392 + i32.const 367 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 1 - call $~lib/typedarray/Int8Array#__get - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 393 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 2 - call $~lib/typedarray/Int8Array#__get - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 394 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - 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 - i32.const 255 - i32.and - i32.const 2 - i32.gt_u - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (local $0 i32) (local $1 i32) (local $2 i32) @@ -4533,148 +4418,114 @@ (local $5 i32) (local $6 i32) (local $7 i32) - i32.const 6 - call $~lib/typedarray/Uint8Array#constructor + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $1 i32.const 0 i32.const 1 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Uint8ClampedArray#__set local.get $1 i32.const 1 i32.const 2 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Uint8ClampedArray#__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 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $1 - i32.const 5 - i32.const 5 - call $~lib/typedarray/Uint8Array#__set + i32.load offset=4 + local.set $6 local.get $1 i32.load offset=8 - local.set $5 + local.tee $4 + local.set $7 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/__alloc - local.set $4 - local.get $5 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $1 - i32.load offset=4 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $3 loop $for-loop|0 - local.get $3 - local.get $5 + local.get $2 + local.get $4 i32.lt_s if - local.get $0 - local.get $3 + local.get $2 + local.get $6 i32.add i32.load8_u - local.set $7 + local.set $5 i32.const 3 global.set $~argumentsLength - local.get $7 - local.get $3 - local.get $1 - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 - if - local.get $2 - local.get $6 - i32.add - local.get $7 - i32.store8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - end + local.get $2 local.get $3 + i32.add + local.get $5 + local.get $5 + i32.mul + i32.store8 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $for-loop|0 end end - local.get $4 - local.get $6 - local.get $2 - call $~lib/rt/tlsf/__realloc - local.tee $0 + local.get $0 + local.get $3 call $~lib/rt/pure/__retain i32.store - local.get $4 - local.get $2 - i32.store offset=8 - local.get $4 local.get $0 + local.get $3 i32.store offset=4 - local.get $4 - call $~lib/rt/pure/__retain - local.tee $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 1312 - i32.const 390 - i32.const 3 - call $~lib/builtins/abort - unreachable - end local.get $0 - i32.load offset=8 - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 391 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + local.get $7 + i32.store offset=8 local.get $0 + call $~lib/rt/pure/__retain + local.tee $0 i32.const 0 - call $~lib/typedarray/Uint8Array#__get - i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 1 i32.ne if i32.const 0 i32.const 1312 - i32.const 392 + i32.const 365 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 4 i32.ne if i32.const 0 i32.const 1312 - i32.const 393 + i32.const 366 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/typedarray/Uint8Array#__get - i32.const 5 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 9 i32.ne if i32.const 0 i32.const 1312 - i32.const 394 + i32.const 367 i32.const 3 call $~lib/builtins/abort unreachable @@ -4684,8 +4535,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> - (local $0 i32) + (func $~lib/typedarray/MAP<~lib/typedarray/Int16Array,i16> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4693,167 +4543,97 @@ (local $5 i32) (local $6 i32) (local $7 i32) - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#constructor - 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.get $0 i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $3 + local.get $0 + i32.load offset=4 local.set $5 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/__alloc - local.set $4 - local.get $5 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $1 - i32.load offset=4 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $3 + i32.const 1 + i32.shl + local.tee $6 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $1 loop $for-loop|0 + local.get $2 local.get $3 - local.get $5 i32.lt_s if - local.get $0 - local.get $3 + local.get $5 + local.get $2 + i32.const 1 + i32.shl + local.tee $7 i32.add - i32.load8_u - local.set $7 + i32.load16_s + local.set $4 i32.const 3 global.set $~argumentsLength - local.get $7 - local.get $3 local.get $1 - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 - if - local.get $2 - local.get $6 - i32.add - local.get $7 - i32.store8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - end - local.get $3 + local.get $7 + i32.add + local.get $4 + local.get $4 + i32.mul + i32.store16 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $for-loop|0 end end - local.get $4 - local.get $6 - local.get $2 - call $~lib/rt/tlsf/__realloc - local.tee $0 + local.get $0 + local.get $1 call $~lib/rt/pure/__retain i32.store - local.get $4 - local.get $2 - i32.store offset=8 - local.get $4 local.get $0 + local.get $1 i32.store offset=4 - local.get $4 - call $~lib/rt/pure/__retain - local.tee $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 1312 - i32.const 390 - i32.const 3 - call $~lib/builtins/abort - unreachable - end local.get $0 - i32.load offset=8 - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 391 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + local.get $6 + i32.store offset=8 local.get $0 - i32.const 0 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 392 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/__retain + ) + (func $~lib/typedarray/Int16Array#__get (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 + i32.load offset=8 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 4 - i32.ne + i32.shr_u + i32.ge_u if - i32.const 0 - i32.const 1312 - i32.const 393 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 408 + i32.const 64 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 394 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.load offset=4 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 - i32.const 16 + i32.const 1 i32.shl - i32.const 16 - i32.shr_s - i32.const 2 - i32.gt_s + i32.add + i32.load16_s ) - (func $~lib/typedarray/FILTER<~lib/typedarray/Int16Array,i16> (param $0 i32) (result i32) + (func $~lib/typedarray/MAP<~lib/typedarray/Uint16Array,u16> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4865,180 +4645,93 @@ i32.load offset=8 i32.const 1 i32.shr_u - local.set $1 + local.set $3 + local.get $0 + i32.load offset=4 + local.set $5 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $1 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $3 i32.const 1 i32.shl + local.tee $6 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $0 - i32.load offset=4 - local.set $7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $1 loop $for-loop|0 + local.get $2 local.get $3 - local.get $1 i32.lt_s if - local.get $7 - local.get $3 + local.get $5 + local.get $2 i32.const 1 i32.shl + local.tee $7 i32.add - i32.load16_s - local.set $6 + i32.load16_u + local.set $4 i32.const 3 global.set $~argumentsLength - local.get $6 - local.get $3 - local.get $0 - call $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 - if - local.get $5 - local.get $4 - i32.const 1 - i32.shl - i32.add - local.get $6 - i32.store16 - local.get $4 - i32.const 1 - i32.add - local.set $4 - end - local.get $3 + local.get $1 + local.get $7 + i32.add + local.get $4 + local.get $4 + i32.mul + i32.store16 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $for-loop|0 end end - local.get $2 - local.get $5 - local.get $4 - i32.const 1 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $1 + local.get $0 + local.get $1 call $~lib/rt/pure/__retain i32.store - local.get $2 local.get $0 - i32.store offset=8 - local.get $2 local.get $1 i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> - (local $0 i32) - (local $1 i32) - i32.const 6 - call $~lib/typedarray/Int16Array#constructor - 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 5 - i32.const 5 - call $~lib/typedarray/Int16Array#__set + local.get $6 + i32.store offset=8 local.get $0 - call $~lib/typedarray/FILTER<~lib/typedarray/Int16Array,i16> - local.tee $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 1312 - i32.const 390 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/__retain + ) + (func $~lib/typedarray/Uint16Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 + local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 391 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - call $~lib/typedarray/Int16Array#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 392 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - call $~lib/typedarray/Int16Array#__get - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 393 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 2 - call $~lib/typedarray/Int16Array#__get - i32.const 5 - i32.ne + i32.ge_u if - i32.const 0 - i32.const 1312 - i32.const 394 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 536 + i32.const 64 call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.load offset=4 local.get $1 - call $~lib/rt/pure/__release + i32.const 1 + i32.shl + i32.add + i32.load16_u ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 65535 - i32.and - i32.const 2 - i32.gt_u - ) - (func $~lib/typedarray/FILTER<~lib/typedarray/Uint16Array,u16> (param $0 i32) (result i32) + (func $~lib/typedarray/MAP<~lib/typedarray/Int32Array,i32> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5048,1013 +4741,769 @@ (local $7 i32) local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u - local.set $1 + local.set $3 + local.get $0 + i32.load offset=4 + local.set $5 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $1 - i32.const 1 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $3 + i32.const 2 i32.shl + local.tee $6 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $0 - i32.load offset=4 - local.set $7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $1 loop $for-loop|0 + local.get $2 local.get $3 - local.get $1 i32.lt_s if - local.get $7 - local.get $3 - i32.const 1 + local.get $5 + local.get $2 + i32.const 2 i32.shl + local.tee $7 i32.add - i32.load16_u - local.set $6 + i32.load + local.set $4 i32.const 3 global.set $~argumentsLength - local.get $6 - local.get $3 - local.get $0 - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 - if - local.get $5 - local.get $4 - i32.const 1 - i32.shl - i32.add - local.get $6 - i32.store16 - local.get $4 - i32.const 1 - i32.add - local.set $4 - end - local.get $3 + local.get $1 + local.get $7 + i32.add + local.get $4 + local.get $4 + i32.mul + i32.store + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $for-loop|0 end end - local.get $2 - local.get $5 - local.get $4 - i32.const 1 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $1 - call $~lib/rt/pure/__retain - i32.store - local.get $2 local.get $0 - i32.store offset=8 - local.get $2 local.get $1 - i32.store offset=4 - local.get $2 call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> - (local $0 i32) - (local $1 i32) - i32.const 6 - call $~lib/typedarray/Uint16Array#constructor - 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 5 - i32.const 5 - call $~lib/typedarray/Uint16Array#__set + i32.store local.get $0 - call $~lib/typedarray/FILTER<~lib/typedarray/Uint16Array,u16> - local.tee $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 1312 - i32.const 390 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 391 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - call $~lib/typedarray/Uint16Array#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 392 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint16Array#__get - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 393 - i32.const 3 - call $~lib/builtins/abort - unreachable - end local.get $1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__get - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 394 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.store offset=4 local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $6 + i32.store offset=8 local.get $0 - i32.const 2 - i32.gt_s + call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/FILTER<~lib/typedarray/Int32Array,i32> (param $0 i32) (result i32) + (func $~lib/typedarray/MAP<~lib/typedarray/Uint32Array,u32> (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 i32.load offset=8 i32.const 2 i32.shr_u - local.set $4 + local.set $3 + local.get $0 + i32.load offset=4 + local.set $5 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $4 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $3 i32.const 2 i32.shl + local.tee $6 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $1 loop $for-loop|0 - local.get $1 - local.get $4 + local.get $2 + local.get $3 i32.lt_s if - local.get $6 - local.get $1 + local.get $5 + local.get $2 i32.const 2 i32.shl + local.tee $7 i32.add i32.load - local.set $0 + local.set $4 i32.const 3 global.set $~argumentsLength - local.get $0 - i32.const 2 - i32.gt_s - if - local.get $5 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.get $0 - i32.store - local.get $3 - i32.const 1 - i32.add - local.set $3 - end local.get $1 + local.get $7 + i32.add + local.get $4 + local.get $4 + i32.mul + i32.store + 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 $5 - local.get $3 - i32.const 2 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $1 + local.get $0 + local.get $1 call $~lib/rt/pure/__retain i32.store - local.get $2 local.get $0 - i32.store offset=8 - local.get $2 local.get $1 i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> - (local $0 i32) - (local $1 i32) - i32.const 6 - call $~lib/typedarray/Int32Array#constructor - 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 5 - i32.const 5 - call $~lib/typedarray/Int32Array#__set + local.get $6 + i32.store offset=8 local.get $0 - call $~lib/typedarray/FILTER<~lib/typedarray/Int32Array,i32> - local.tee $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 1312 - i32.const 390 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/__retain + ) + (func $~lib/typedarray/Uint32Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 + local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 391 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 392 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - call $~lib/typedarray/Int32Array#__get - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 393 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 2 - call $~lib/typedarray/Int32Array#__get - i32.const 5 - i32.ne + i32.ge_u if - i32.const 0 - i32.const 1312 - i32.const 394 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 792 + i32.const 64 call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.load offset=4 local.get $1 - call $~lib/rt/pure/__release + i32.const 2 + i32.shl + i32.add + i32.load ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 - i32.const 2 - i32.gt_u + local.get $0 + i64.mul ) - (func $~lib/typedarray/FILTER<~lib/typedarray/Uint32Array,u32> (param $0 i32) (result i32) + (func $~lib/typedarray/MAP<~lib/typedarray/Int64Array,i64> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) + (local $7 i32) local.get $0 i32.load offset=8 - i32.const 2 + i32.const 3 i32.shr_u - local.set $4 + local.set $3 + local.get $0 + i32.load offset=4 + local.set $5 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $4 - i32.const 2 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $3 + i32.const 3 i32.shl + local.tee $6 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $1 loop $for-loop|0 - local.get $1 - local.get $4 + local.get $2 + local.get $3 i32.lt_s if - local.get $6 - local.get $1 - i32.const 2 + local.get $5 + local.get $2 + i32.const 3 i32.shl + local.tee $7 i32.add - i32.load - local.set $0 + i64.load + local.set $4 i32.const 3 global.set $~argumentsLength - local.get $0 - i32.const 2 - i32.gt_u - if - local.get $5 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.get $0 - i32.store - local.get $3 - i32.const 1 - i32.add - local.set $3 - end local.get $1 + local.get $7 + i32.add + local.get $4 + local.get $4 + i64.mul + i64.store + 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 $5 - local.get $3 - i32.const 2 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $1 + local.get $0 + local.get $1 call $~lib/rt/pure/__retain i32.store - local.get $2 local.get $0 - i32.store offset=8 - local.get $2 local.get $1 i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> - (local $0 i32) - (local $1 i32) - i32.const 6 - call $~lib/typedarray/Uint32Array#constructor - 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 5 - i32.const 5 - call $~lib/typedarray/Uint32Array#__set + local.get $6 + i32.store offset=8 local.get $0 - call $~lib/typedarray/FILTER<~lib/typedarray/Uint32Array,u32> - local.tee $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 1312 - i32.const 390 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/__retain + ) + (func $~lib/typedarray/Int64Array#__get (param $0 i32) (param $1 i32) (result i64) local.get $1 + local.get $0 i32.load offset=8 - i32.const 2 - i32.shr_u i32.const 3 - i32.ne + i32.shr_u + i32.ge_u if - i32.const 0 - i32.const 1312 - i32.const 391 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 920 + i32.const 64 call $~lib/builtins/abort unreachable end + local.get $0 + i32.load offset=4 local.get $1 - i32.const 0 - call $~lib/typedarray/Uint32Array#__get i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 392 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint32Array#__get - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 393 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint32Array#__get - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 394 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i64.const 2 - i64.gt_s + i32.shl + i32.add + i64.load ) - (func $~lib/typedarray/FILTER<~lib/typedarray/Int64Array,i64> (param $0 i32) (result i32) + (func $~lib/typedarray/MAP<~lib/typedarray/Uint64Array,u64> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) - (local $6 i64) + (local $6 i32) + (local $7 i32) local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $4 + local.set $3 + local.get $0 + i32.load offset=4 + local.set $5 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $4 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $3 i32.const 3 i32.shl + local.tee $6 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $0 - i32.load offset=4 - local.set $0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $1 loop $for-loop|0 - local.get $1 - local.get $4 + local.get $2 + local.get $3 i32.lt_s if - local.get $0 - local.get $1 + local.get $5 + local.get $2 i32.const 3 i32.shl + local.tee $7 i32.add i64.load - local.set $6 + local.set $4 i32.const 3 global.set $~argumentsLength - local.get $6 - i64.const 2 - i64.gt_s - if - local.get $5 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.get $6 - i64.store - local.get $3 - i32.const 1 - i32.add - local.set $3 - end local.get $1 + local.get $7 + i32.add + local.get $4 + local.get $4 + i64.mul + i64.store + 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 $5 - local.get $3 - i32.const 3 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $1 + local.get $0 + local.get $1 call $~lib/rt/pure/__retain i32.store - local.get $2 local.get $0 - i32.store offset=8 - local.get $2 local.get $1 i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> - (local $0 i32) - (local $1 i32) - i32.const 6 - call $~lib/typedarray/Int64Array#constructor - 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 5 - i64.const 5 - call $~lib/typedarray/Int64Array#__set + local.get $6 + i32.store offset=8 local.get $0 - call $~lib/typedarray/FILTER<~lib/typedarray/Int64Array,i64> - local.tee $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 1312 - i32.const 390 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/__retain + ) + (func $~lib/typedarray/Uint64Array#__get (param $0 i32) (param $1 i32) (result i64) local.get $1 + local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 391 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - call $~lib/typedarray/Int64Array#__get - i64.const 3 - i64.ne - if - i32.const 0 - i32.const 1312 - i32.const 392 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - call $~lib/typedarray/Int64Array#__get - i64.const 4 - i64.ne - if - i32.const 0 - i32.const 1312 - i32.const 393 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 2 - call $~lib/typedarray/Int64Array#__get - i64.const 5 - i64.ne + i32.ge_u if - i32.const 0 - i32.const 1312 - i32.const 394 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 1048 + i32.const 64 call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.load offset=4 local.get $1 - call $~lib/rt/pure/__release + i32.const 3 + i32.shl + i32.add + i64.load ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 - i64.const 2 - i64.gt_u + local.get $0 + f32.mul ) - (func $~lib/typedarray/FILTER<~lib/typedarray/Uint64Array,u64> (param $0 i32) (result i32) + (func $~lib/typedarray/MAP<~lib/typedarray/Float32Array,f32> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f32) (local $5 i32) - (local $6 i64) + (local $6 i32) + (local $7 i32) local.get $0 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u - local.set $4 - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $4 - i32.const 3 - i32.shl - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $5 + local.set $3 local.get $0 i32.load offset=4 + local.set $5 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $0 - loop $for-loop|0 - local.get $1 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 3 + call $~lib/rt/tlsf/maybeInitialize + local.get $3 + i32.const 2 + i32.shl + local.tee $6 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $1 + loop $for-loop|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $5 + local.get $2 + i32.const 2 i32.shl + local.tee $7 i32.add - i64.load - local.set $6 + f32.load + local.set $4 i32.const 3 global.set $~argumentsLength - local.get $6 - i64.const 2 - i64.gt_u - if - local.get $5 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.get $6 - i64.store - local.get $3 - i32.const 1 - i32.add - local.set $3 - end local.get $1 + local.get $7 + i32.add + local.get $4 + local.get $4 + f32.mul + f32.store + 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 $5 - local.get $3 - i32.const 3 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $1 + local.get $0 + local.get $1 call $~lib/rt/pure/__retain i32.store - local.get $2 local.get $0 - i32.store offset=8 - local.get $2 local.get $1 i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> - (local $0 i32) - (local $1 i32) - i32.const 6 - call $~lib/typedarray/Uint64Array#constructor - 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 5 - i64.const 5 - call $~lib/typedarray/Uint64Array#__set + local.get $6 + i32.store offset=8 local.get $0 - call $~lib/typedarray/FILTER<~lib/typedarray/Uint64Array,u64> - local.tee $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 1312 - i32.const 390 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/__retain + ) + (func $~lib/typedarray/Float32Array#__get (param $0 i32) (param $1 i32) (result f32) local.get $1 + local.get $0 i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 391 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - call $~lib/typedarray/Uint64Array#__get - i64.const 3 - i64.ne - if - i32.const 0 - i32.const 1312 - i32.const 392 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint64Array#__get - i64.const 4 - i64.ne - if - i32.const 0 - i32.const 1312 - i32.const 393 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 i32.const 2 - call $~lib/typedarray/Uint64Array#__get - i64.const 5 - i64.ne + i32.shr_u + i32.ge_u if - i32.const 0 - i32.const 1312 - i32.const 394 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 1176 + i32.const 64 call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.load offset=4 local.get $1 - call $~lib/rt/pure/__release + i32.const 2 + i32.shl + i32.add + f32.load ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 - f32.const 2 - f32.gt + local.get $0 + f64.mul ) - (func $~lib/typedarray/FILTER<~lib/typedarray/Float32Array,f32> (param $0 i32) (result i32) + (func $~lib/typedarray/MAP<~lib/typedarray/Float64Array,f64> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 i32) - (local $6 f32) + (local $6 i32) + (local $7 i32) local.get $0 i32.load offset=8 - i32.const 2 + i32.const 3 i32.shr_u - local.set $4 - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $4 - i32.const 2 - i32.shl - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $5 + local.set $3 local.get $0 i32.load offset=4 + local.set $5 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $3 + i32.const 3 + i32.shl + local.tee $6 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $1 loop $for-loop|0 - local.get $1 - local.get $4 + local.get $2 + local.get $3 i32.lt_s if - local.get $0 - local.get $1 - i32.const 2 + local.get $5 + local.get $2 + i32.const 3 i32.shl + local.tee $7 i32.add - f32.load - local.set $6 + f64.load + local.set $4 i32.const 3 global.set $~argumentsLength - local.get $6 - f32.const 2 - f32.gt - if - local.get $5 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.get $6 - f32.store - local.get $3 - i32.const 1 - i32.add - local.set $3 - end local.get $1 + local.get $7 + i32.add + local.get $4 + local.get $4 + f64.mul + f64.store + 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 $5 - local.get $3 - i32.const 2 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $1 + local.get $0 + local.get $1 call $~lib/rt/pure/__retain i32.store - local.get $2 local.get $0 - i32.store offset=8 - local.get $2 local.get $1 i32.store offset=4 - local.get $2 + local.get $0 + local.get $6 + i32.store offset=8 + local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> + (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 + i32.const 24 + i32.shr_s + i32.const 2 + i32.gt_s + ) + (func $~lib/rt/tlsf/reallocateBlock (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 + call $~lib/rt/tlsf/prepareSize + local.tee $3 + local.get $1 + i32.load + local.tee $5 + i32.const -4 + i32.and + i32.le_u + if + local.get $0 + local.get $1 + local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $1 + local.get $2 + i32.store offset=12 + local.get $1 + return + end + local.get $1 + call $~lib/rt/tlsf/GETRIGHT + local.tee $6 + i32.load + local.tee $4 + i32.const 1 + i32.and + if + local.get $5 + i32.const -4 + i32.and + i32.const 16 + i32.add + local.get $4 + i32.const -4 + i32.and + i32.add + local.tee $4 + local.get $3 + i32.ge_u + if + local.get $0 + local.get $6 + call $~lib/rt/tlsf/removeBlock + local.get $1 + local.get $4 + local.get $5 + i32.const 3 + i32.and + i32.or + i32.store + local.get $1 + local.get $2 + i32.store offset=12 + local.get $0 + local.get $1 + local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $1 + return + end + end + local.get $0 + local.get $2 + local.get $1 + i32.load offset=8 + call $~lib/rt/tlsf/allocateBlock + local.tee $3 + local.get $1 + i32.load offset=4 + i32.store offset=4 + local.get $3 + i32.const 16 + i32.add + local.get $1 + i32.const 16 + i32.add + local.get $2 + call $~lib/util/memory/memmove + local.get $1 + i32.const 8332 + i32.ge_u + if + local.get $1 + local.get $3 + call $~lib/rt/rtrace/onrealloc + local.get $0 + local.get $1 + call $~lib/rt/tlsf/freeBlock + end + local.get $3 + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (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 6 - call $~lib/typedarray/Float32Array#constructor - local.tee $0 + call $~lib/typedarray/Int8Array#constructor + local.tee $8 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 + call $~lib/typedarray/Int8Array#__set + local.get $8 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $8 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 + call $~lib/typedarray/Int8Array#__set + local.get $8 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int8Array#__set + local.get $8 i32.const 5 - f32.const 5 - call $~lib/typedarray/Float32Array#__set + i32.const 5 + call $~lib/typedarray/Int8Array#__set + local.get $8 + i32.load offset=8 + local.set $5 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $7 + call $~lib/rt/tlsf/maybeInitialize + local.get $5 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $4 + local.get $8 + i32.load offset=4 + local.set $2 + loop $for-loop|0 + local.get $6 + local.get $5 + i32.lt_s + if + local.get $2 + local.get $6 + i32.add + i32.load8_s + local.set $3 + i32.const 3 + global.set $~argumentsLength + local.get $3 + i32.const 2 + i32.gt_s + if + local.get $1 + local.tee $0 + i32.const 1 + i32.add + local.set $1 + local.get $0 + local.get $4 + i32.add + local.get $3 + i32.store8 + end + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|0 + end + end + local.get $7 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 + call $~lib/rt/tlsf/checkUsedBlock + local.get $1 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + local.tee $0 + call $~lib/rt/pure/__retain + i32.store + local.get $7 + local.get $1 + i32.store offset=8 + local.get $7 local.get $0 - call $~lib/typedarray/FILTER<~lib/typedarray/Float32Array,f32> + i32.store offset=4 + local.get $7 + call $~lib/rt/pure/__retain local.tee $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 i32.const 1312 @@ -6065,8 +5514,6 @@ end local.get $1 i32.load offset=8 - i32.const 2 - i32.shr_u i32.const 3 i32.ne if @@ -6079,9 +5526,9 @@ end local.get $1 i32.const 0 - call $~lib/typedarray/Float32Array#__get - f32.const 3 - f32.ne + call $~lib/typedarray/Int8Array#__get + i32.const 3 + i32.ne if i32.const 0 i32.const 1312 @@ -6092,9 +5539,9 @@ end local.get $1 i32.const 1 - call $~lib/typedarray/Float32Array#__get - f32.const 4 - f32.ne + call $~lib/typedarray/Int8Array#__get + i32.const 4 + i32.ne if i32.const 0 i32.const 1312 @@ -6105,9 +5552,9 @@ end local.get $1 i32.const 2 - call $~lib/typedarray/Float32Array#__get - f32.const 5 - f32.ne + call $~lib/typedarray/Int8Array#__get + i32.const 5 + i32.ne if i32.const 0 i32.const 1312 @@ -6116,126 +5563,128 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $8 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - f64.const 2 - f64.gt + i32.const 255 + i32.and + i32.const 2 + i32.gt_u ) - (func $~lib/typedarray/FILTER<~lib/typedarray/Float64Array,f64> (param $0 i32) (result i32) - (local $1 i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 f64) - local.get $0 - i32.load offset=8 + (local $6 i32) + (local $7 i32) + (local $8 i32) + i32.const 6 + call $~lib/typedarray/Uint8Array#constructor + local.tee $8 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8Array#__set + local.get $8 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $8 + i32.const 2 i32.const 3 - i32.shr_u - local.set $4 - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $4 + call $~lib/typedarray/Uint8Array#__set + local.get $8 i32.const 3 - i32.shl - i32.const 0 - call $~lib/rt/tlsf/__alloc + i32.const 4 + call $~lib/typedarray/Uint8Array#__set + local.get $8 + i32.const 5 + i32.const 5 + call $~lib/typedarray/Uint8Array#__set + local.get $8 + i32.load offset=8 local.set $5 - local.get $0 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $7 + call $~lib/rt/tlsf/maybeInitialize + local.get $5 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $4 + local.get $8 i32.load offset=4 - local.set $0 + local.set $2 loop $for-loop|0 - local.get $1 - local.get $4 + local.get $6 + local.get $5 i32.lt_s if - local.get $0 - local.get $1 - i32.const 3 - i32.shl + local.get $2 + local.get $6 i32.add - f64.load - local.set $6 + i32.load8_u + local.set $3 i32.const 3 global.set $~argumentsLength - local.get $6 - f64.const 2 - f64.gt + local.get $3 + i32.const 2 + i32.gt_u if - local.get $5 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.get $6 - f64.store - local.get $3 + local.get $1 + local.tee $0 i32.const 1 i32.add - local.set $3 + local.set $1 + local.get $0 + local.get $4 + i32.add + local.get $3 + i32.store8 end - local.get $1 + local.get $6 i32.const 1 i32.add - local.set $1 + local.set $6 br $for-loop|0 end end - local.get $2 - local.get $5 - local.get $3 - i32.const 3 - i32.shl + local.get $7 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 + call $~lib/rt/tlsf/checkUsedBlock + local.get $1 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $1 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $0 - i32.store offset=8 - local.get $2 + local.get $7 local.get $1 + i32.store offset=8 + local.get $7 + local.get $0 i32.store offset=4 - local.get $2 + local.get $7 call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> - (local $0 i32) - (local $1 i32) - i32.const 6 - call $~lib/typedarray/Float64Array#constructor - 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 5 - f64.const 5 - call $~lib/typedarray/Float64Array#__set - local.get $0 - call $~lib/typedarray/FILTER<~lib/typedarray/Float64Array,f64> local.tee $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 i32.const 1312 @@ -6247,8 +5696,6 @@ local.get $1 i32.load offset=8 i32.const 3 - i32.shr_u - i32.const 3 i32.ne if i32.const 0 @@ -6260,9 +5707,9 @@ end local.get $1 i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 3 - f64.ne + call $~lib/typedarray/Uint8Array#__get + i32.const 3 + i32.ne if i32.const 0 i32.const 1312 @@ -6273,9 +5720,9 @@ end local.get $1 i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 4 - f64.ne + call $~lib/typedarray/Uint8Array#__get + i32.const 4 + i32.ne if i32.const 0 i32.const 1312 @@ -6286,9 +5733,9 @@ end local.get $1 i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 5 - f64.ne + call $~lib/typedarray/Uint8Array#__get + i32.const 5 + i32.ne if i32.const 0 i32.const 1312 @@ -6297,1245 +5744,1864 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $8 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 255 - i32.and - i32.const 2 - i32.eq - ) - (func $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8> (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 + (local $6 i32) + (local $7 i32) + (local $8 i32) + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $8 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $8 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $8 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $8 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $8 + i32.const 5 + i32.const 5 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $8 i32.load offset=8 + local.set $5 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $7 + call $~lib/rt/tlsf/maybeInitialize + local.get $5 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $4 + local.get $8 + i32.load offset=4 + local.set $2 loop $for-loop|0 - local.get $2 - local.get $4 + local.get $6 + local.get $5 i32.lt_s if local.get $2 - local.get $3 + local.get $6 i32.add - i32.load8_s + i32.load8_u + local.set $3 i32.const 3 global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) + local.get $3 + i32.const 2 + i32.gt_u if + local.get $1 + local.tee $0 i32.const 1 - return - end - local.get $2 - i32.const 1 - i32.add - local.set $2 + i32.add + local.set $1 + local.get $0 + local.get $4 + i32.add + local.get $3 + i32.store8 + end + local.get $6 + i32.const 1 + i32.add + local.set $6 br $for-loop|0 end end - i32.const 0 - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 255 - i32.and - i32.eqz - ) - (func $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + local.get $7 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 + call $~lib/rt/tlsf/checkUsedBlock + local.get $1 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + local.tee $0 + call $~lib/rt/pure/__retain + i32.store + local.get $7 + local.get $1 + i32.store offset=8 + local.get $7 local.get $0 + i32.store offset=4 + local.get $7 + call $~lib/rt/pure/__retain + local.tee $1 i32.load offset=4 - local.set $3 - local.get $0 + local.get $1 + i32.load + i32.sub + if + i32.const 0 + i32.const 1312 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 i32.load offset=8 - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $2 - local.get $3 - i32.add - i32.load8_u - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - if - i32.const 1 - return - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 391 + i32.const 3 + call $~lib/builtins/abort + unreachable end + local.get $1 i32.const 0 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 392 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 393 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 394 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 65535 - i32.and + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s i32.const 2 - i32.eq + i32.gt_s ) - (func $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Int16Array,i16> (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load offset=4 - local.set $3 + (local $6 i32) local.get $0 i32.load offset=8 i32.const 1 i32.shr_u local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $2 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 + i32.const 1 + i32.shl + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $5 + local.get $0 + i32.load offset=4 + local.set $6 loop $for-loop|0 - local.get $2 + local.get $1 local.get $4 i32.lt_s if - local.get $3 - local.get $2 + local.get $6 + local.get $1 i32.const 1 i32.shl i32.add i32.load16_s + local.set $0 i32.const 3 global.set $~argumentsLength - local.get $2 local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.const 2 + i32.gt_s if + local.get $5 + local.get $3 i32.const 1 - return + i32.shl + i32.add + local.get $0 + i32.store16 + local.get $3 + i32.const 1 + i32.add + local.set $3 end - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $for-loop|0 end end - i32.const 0 - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $2 + call $~lib/rt/tlsf/maybeInitialize + local.get $5 + call $~lib/rt/tlsf/checkUsedBlock + local.get $3 + i32.const 1 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + local.tee $1 + call $~lib/rt/pure/__retain + i32.store + local.get $2 local.get $0 - i32.const 65535 - i32.and - i32.eqz + i32.store offset=8 + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16> (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load offset=4 - local.set $3 + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> + (local $0 i32) + (local $1 i32) + i32.const 6 + call $~lib/typedarray/Int16Array#constructor + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=8 i32.const 1 - i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $3 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_u - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - if - i32.const 1 - return - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const 0 - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + i32.const 2 + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 2 - i32.eq - ) - (func $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + i32.const 3 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 - local.set $3 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int16Array#__set local.get $0 + i32.const 5 + i32.const 5 + call $~lib/typedarray/Int16Array#__set + local.get $0 + call $~lib/typedarray/FILTER<~lib/typedarray/Int16Array,i16> + local.tee $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub + if + i32.const 0 + i32.const 1312 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 i32.load offset=8 - i32.const 2 + i32.const 1 i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $3 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - if - i32.const 1 - return - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 391 + i32.const 3 + call $~lib/builtins/abort + unreachable end + local.get $1 i32.const 0 - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + call $~lib/typedarray/Int16Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 392 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + call $~lib/typedarray/Int16Array#__get + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 393 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + call $~lib/typedarray/Int16Array#__get + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 394 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.eqz + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i64.const 2 - i64.eq + i32.const 65535 + i32.and + i32.const 2 + i32.gt_u ) - (func $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Uint16Array,u16> (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) - local.get $0 - i32.load offset=4 - local.set $3 + (local $5 i32) + (local $6 i32) local.get $0 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $2 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 + i32.const 1 + i32.shl + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $5 + local.get $0 + i32.load offset=4 + local.set $6 loop $for-loop|0 - local.get $2 + local.get $1 local.get $4 i32.lt_s if - local.get $3 - local.get $2 - i32.const 3 + local.get $6 + local.get $1 + i32.const 1 i32.shl i32.add - i64.load + i32.load16_u + local.set $0 i32.const 3 global.set $~argumentsLength - local.get $2 local.get $0 - local.get $1 - call_indirect (type $i64_i32_i32_=>_i32) + i32.const 65535 + i32.and + i32.const 2 + i32.gt_u if + local.get $5 + local.get $3 i32.const 1 - return + i32.shl + i32.add + local.get $0 + i32.store16 + local.get $3 + i32.const 1 + i32.add + local.set $3 end - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $for-loop|0 end end - i32.const 0 - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + local.get $2 + call $~lib/rt/tlsf/maybeInitialize + local.get $5 + call $~lib/rt/tlsf/checkUsedBlock + local.get $3 + i32.const 1 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + local.tee $1 + call $~lib/rt/pure/__retain + i32.store + local.get $2 local.get $0 - i64.eqz + i32.store offset=8 + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> + (local $0 i32) + (local $1 i32) + i32.const 6 + call $~lib/typedarray/Uint16Array#constructor + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set local.get $0 - f32.const 2 - f32.eq - ) - (func $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f32) + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 - local.set $3 + 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 5 + i32.const 5 + call $~lib/typedarray/Uint16Array#__set local.get $0 + call $~lib/typedarray/FILTER<~lib/typedarray/Uint16Array,u16> + local.tee $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub + if + i32.const 0 + i32.const 1312 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 i32.load offset=8 - i32.const 2 + i32.const 1 i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $3 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $f32_i32_i32_=>_i32) - if - i32.const 1 - return - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 391 + i32.const 3 + call $~lib/builtins/abort + unreachable end + local.get $1 i32.const 0 - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + call $~lib/typedarray/Uint16Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 392 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint16Array#__get + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 393 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__get + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 394 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - f32.const 0 - f32.eq + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - f64.const 2 - f64.eq + i32.const 2 + i32.gt_s ) - (func $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Int32Array,i32> (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 f64) - local.get $0 - i32.load offset=4 - local.set $3 + (local $5 i32) + (local $6 i32) local.get $0 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $2 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 + i32.const 2 + i32.shl + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $5 + local.get $0 + i32.load offset=4 + local.set $6 loop $for-loop|0 - local.get $2 + local.get $1 local.get $4 i32.lt_s if - local.get $3 - local.get $2 - i32.const 3 + local.get $6 + local.get $1 + i32.const 2 i32.shl i32.add - f64.load + i32.load + local.set $0 i32.const 3 global.set $~argumentsLength - local.get $2 local.get $0 - local.get $1 - call_indirect (type $f64_i32_i32_=>_i32) + i32.const 2 + i32.gt_s if + local.get $5 + local.get $3 + i32.const 2 + i32.shl + i32.add + local.get $0 + i32.store + local.get $3 i32.const 1 - return + i32.add + local.set $3 end - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $for-loop|0 end end - i32.const 0 - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + local.get $2 + call $~lib/rt/tlsf/maybeInitialize + local.get $5 + call $~lib/rt/tlsf/checkUsedBlock + local.get $3 + i32.const 2 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + local.tee $1 + call $~lib/rt/pure/__retain + i32.store + local.get $2 local.get $0 - f64.const 0 - f64.eq + i32.store offset=8 + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8> (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> + (local $0 i32) + (local $1 i32) + i32.const 6 + call $~lib/typedarray/Int32Array#constructor + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 - local.set $3 + 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 5 + i32.const 5 + call $~lib/typedarray/Int32Array#__set local.get $0 + call $~lib/typedarray/FILTER<~lib/typedarray/Int32Array,i32> + local.tee $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub + if + i32.const 0 + i32.const 1312 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 i32.load offset=8 - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $2 - local.get $3 - i32.add - i32.load8_s - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - if - local.get $2 - return - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end + i32.const 2 + i32.shr_u + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 391 + i32.const 3 + call $~lib/builtins/abort + unreachable end - i32.const -1 - ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 255 - i32.and + local.get $1 + i32.const 0 + call $~lib/typedarray/Int32Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 392 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + call $~lib/typedarray/Int32Array#__get i32.const 4 - i32.eq - ) - (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 393 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + call $~lib/typedarray/Int32Array#__get + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 394 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.load offset=4 - local.set $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.load offset=8 - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $2 - local.get $3 - i32.add - i32.load8_u - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - if - local.get $2 - return - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const -1 + i32.const 2 + i32.gt_u ) - (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Uint32Array,u32> (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load offset=4 - local.set $3 + (local $6 i32) local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $2 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 + i32.const 2 + i32.shl + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $5 + local.get $0 + i32.load offset=4 + local.set $6 loop $for-loop|0 - local.get $2 + local.get $1 local.get $4 i32.lt_s if - local.get $3 - local.get $2 - i32.const 1 + local.get $6 + local.get $1 + i32.const 2 i32.shl i32.add - i32.load16_s + i32.load + local.set $0 i32.const 3 global.set $~argumentsLength - local.get $2 local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) + i32.const 2 + i32.gt_u if - local.get $2 - return + local.get $5 + local.get $3 + i32.const 2 + i32.shl + i32.add + local.get $0 + i32.store + local.get $3 + i32.const 1 + i32.add + local.set $3 end - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $for-loop|0 end end - i32.const -1 + local.get $2 + call $~lib/rt/tlsf/maybeInitialize + local.get $5 + call $~lib/rt/tlsf/checkUsedBlock + local.get $3 + i32.const 2 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + local.tee $1 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $0 + i32.store offset=8 + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> + (local $0 i32) + (local $1 i32) + i32.const 6 + call $~lib/typedarray/Uint32Array#constructor + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 65535 - i32.and + 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 - i32.eq - ) - (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16> (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 - local.set $3 + i32.const 5 + i32.const 5 + call $~lib/typedarray/Uint32Array#__set local.get $0 + call $~lib/typedarray/FILTER<~lib/typedarray/Uint32Array,u32> + local.tee $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub + if + i32.const 0 + i32.const 1312 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $3 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_u - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - if - local.get $2 - return - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 391 + i32.const 3 + call $~lib/builtins/abort + unreachable end - i32.const -1 - ) - (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 + local.get $1 + i32.const 0 + call $~lib/typedarray/Uint32Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 392 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint32Array#__get + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 393 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 i32.const 2 - i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $3 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - if - local.get $2 - return - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end + call $~lib/typedarray/Uint32Array#__get + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 394 + i32.const 3 + call $~lib/builtins/abort + unreachable end - i32.const -1 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 4 - i32.eq + i64.const 2 + i64.gt_s ) - (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Int64Array,i64> (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) - local.get $0 - i32.load offset=4 - local.set $3 + (local $5 i32) + (local $6 i64) local.get $0 i32.load offset=8 i32.const 3 i32.shr_u local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $2 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 + i32.const 3 + i32.shl + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $5 + local.get $0 + i32.load offset=4 + local.set $0 loop $for-loop|0 - local.get $2 + local.get $1 local.get $4 i32.lt_s if - local.get $3 - local.get $2 + local.get $0 + local.get $1 i32.const 3 i32.shl i32.add i64.load + local.set $6 i32.const 3 global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i64_i32_i32_=>_i32) + local.get $6 + i64.const 2 + i64.gt_s if - local.get $2 - return + local.get $5 + local.get $3 + i32.const 3 + i32.shl + i32.add + local.get $6 + i64.store + local.get $3 + i32.const 1 + i32.add + local.set $3 end - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $for-loop|0 end end - i32.const -1 + local.get $2 + call $~lib/rt/tlsf/maybeInitialize + local.get $5 + call $~lib/rt/tlsf/checkUsedBlock + local.get $3 + i32.const 3 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + local.tee $1 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $0 + i32.store offset=8 + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> + (local $0 i32) + (local $1 i32) + i32.const 6 + call $~lib/typedarray/Int64Array#constructor + 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 - i64.eq - ) - (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f32) + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 - local.set $3 + i32.const 5 + i64.const 5 + call $~lib/typedarray/Int64Array#__set local.get $0 + call $~lib/typedarray/FILTER<~lib/typedarray/Int64Array,i64> + local.tee $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub + if + i32.const 0 + i32.const 1312 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 i32.load offset=8 - i32.const 2 + i32.const 3 i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $3 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $f32_i32_i32_=>_i32) - if - local.get $2 - return - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 391 + i32.const 3 + call $~lib/builtins/abort + unreachable end - i32.const -1 + local.get $1 + i32.const 0 + call $~lib/typedarray/Int64Array#__get + i64.const 3 + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 392 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + call $~lib/typedarray/Int64Array#__get + i64.const 4 + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 393 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + call $~lib/typedarray/Int64Array#__get + i64.const 5 + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 394 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - f32.const 4 - f32.eq + i64.const 2 + i64.gt_u ) - (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Uint64Array,u64> (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 f64) - local.get $0 - i32.load offset=4 - local.set $3 + (local $5 i32) + (local $6 i64) local.get $0 i32.load offset=8 i32.const 3 i32.shr_u local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $2 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 + i32.const 3 + i32.shl + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $5 + local.get $0 + i32.load offset=4 + local.set $0 loop $for-loop|0 - local.get $2 + local.get $1 local.get $4 i32.lt_s if - local.get $3 - local.get $2 + local.get $0 + local.get $1 i32.const 3 i32.shl i32.add - f64.load + i64.load + local.set $6 i32.const 3 global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $f64_i32_i32_=>_i32) + local.get $6 + i64.const 2 + i64.gt_u if - local.get $2 - return + local.get $5 + local.get $3 + i32.const 3 + i32.shl + i32.add + local.get $6 + i64.store + local.get $3 + i32.const 1 + i32.add + local.set $3 end - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $for-loop|0 end end - i32.const -1 - ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + local.get $2 + call $~lib/rt/tlsf/maybeInitialize + local.get $5 + call $~lib/rt/tlsf/checkUsedBlock + local.get $3 + i32.const 3 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + local.tee $1 + call $~lib/rt/pure/__retain + i32.store + local.get $2 local.get $0 - f64.const 4 - f64.eq + i32.store offset=8 + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> + (local $0 i32) + (local $1 i32) + i32.const 6 + call $~lib/typedarray/Uint64Array#constructor + local.tee $0 + i32.const 0 + i64.const 1 + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const 2 - i32.rem_s - i32.eqz - ) - (func $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8> (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + i32.const 1 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 - local.set $3 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=8 - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $2 - local.get $3 - i32.add - i32.load8_s - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - i32.eqz - if - i32.const 0 - return - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const 1 - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + i32.const 3 + i64.const 4 + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.const 1 - i32.and - i32.eqz - ) - (func $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + i32.const 5 + i64.const 5 + call $~lib/typedarray/Uint64Array#__set local.get $0 + call $~lib/typedarray/FILTER<~lib/typedarray/Uint64Array,u64> + local.tee $1 i32.load offset=4 - local.set $3 - local.get $0 + local.get $1 + i32.load + i32.sub + if + i32.const 0 + i32.const 1312 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 i32.load offset=8 - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $2 - local.get $3 - i32.add - i32.load8_u - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - i32.eqz - if - i32.const 0 - return - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end + i32.const 3 + i32.shr_u + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 391 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 0 + call $~lib/typedarray/Uint64Array#__get + i64.const 3 + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 392 + i32.const 3 + call $~lib/builtins/abort + unreachable end + local.get $1 i32.const 1 + call $~lib/typedarray/Uint64Array#__get + i64.const 4 + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 393 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint64Array#__get + i64.const 5 + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 394 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + 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) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 2 - i32.rem_s - i32.eqz + f32.const 2 + f32.gt ) - (func $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Float32Array,f32> (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load offset=4 - local.set $3 + (local $6 f32) local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $3 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_s - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - i32.eqz - if - i32.const 0 - return - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const 1 - ) - (func $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16> (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $2 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 + i32.const 2 + i32.shl + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $5 local.get $0 i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $4 + local.set $0 loop $for-loop|0 - local.get $2 + local.get $1 local.get $4 i32.lt_s if - local.get $3 - local.get $2 - i32.const 1 + local.get $0 + local.get $1 + i32.const 2 i32.shl i32.add - i32.load16_u + f32.load + local.set $6 i32.const 3 global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - i32.eqz + local.get $6 + f32.const 2 + f32.gt if - i32.const 0 - return + local.get $5 + local.get $3 + i32.const 2 + i32.shl + i32.add + local.get $6 + f32.store + local.get $3 + i32.const 1 + i32.add + local.set $3 end - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $for-loop|0 end end - i32.const 1 - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + local.get $2 + call $~lib/rt/tlsf/maybeInitialize + local.get $5 + call $~lib/rt/tlsf/checkUsedBlock + local.get $3 i32.const 2 - i32.rem_s - i32.eqz + i32.shl + local.tee $0 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + local.tee $1 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $0 + i32.store offset=8 + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> + (local $0 i32) + (local $1 i32) + i32.const 6 + call $~lib/typedarray/Float32Array#constructor + local.tee $0 + i32.const 0 + f32.const 1 + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 - local.set $3 + i32.const 1 + f32.const 2 + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=8 i32.const 2 - i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $3 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - i32.eqz - if - i32.const 0 - return - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end + 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 5 + f32.const 5 + call $~lib/typedarray/Float32Array#__set + local.get $0 + call $~lib/typedarray/FILTER<~lib/typedarray/Float32Array,f32> + local.tee $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub + if + i32.const 0 + i32.const 1312 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 391 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 0 + call $~lib/typedarray/Float32Array#__get + f32.const 3 + f32.ne + if + i32.const 0 + i32.const 1312 + i32.const 392 + i32.const 3 + call $~lib/builtins/abort + unreachable end + local.get $1 i32.const 1 + call $~lib/typedarray/Float32Array#__get + f32.const 4 + f32.ne + if + i32.const 0 + i32.const 1312 + i32.const 393 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + call $~lib/typedarray/Float32Array#__get + f32.const 5 + f32.ne + if + i32.const 0 + i32.const 1312 + i32.const 394 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + 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) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i64.const 2 - i64.rem_s - i64.eqz + f64.const 2 + f64.gt ) - (func $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Float64Array,f64> (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) - local.get $0 - i32.load offset=4 - local.set $3 + (local $5 i32) + (local $6 f64) local.get $0 i32.load offset=8 i32.const 3 i32.shr_u local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $2 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 + i32.const 3 + i32.shl + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $5 + local.get $0 + i32.load offset=4 + local.set $0 loop $for-loop|0 - local.get $2 + local.get $1 local.get $4 i32.lt_s if - local.get $3 - local.get $2 + local.get $0 + local.get $1 i32.const 3 i32.shl i32.add - i64.load + f64.load + local.set $6 i32.const 3 global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i64_i32_i32_=>_i32) - i32.eqz + local.get $6 + f64.const 2 + f64.gt if - i32.const 0 - return + local.get $5 + local.get $3 + i32.const 3 + i32.shl + i32.add + local.get $6 + f64.store + local.get $3 + i32.const 1 + i32.add + local.set $3 end - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $for-loop|0 end end - i32.const 1 - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + local.get $2 + call $~lib/rt/tlsf/maybeInitialize + local.get $5 + call $~lib/rt/tlsf/checkUsedBlock + local.get $3 + i32.const 3 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + local.tee $1 + call $~lib/rt/pure/__retain + i32.store + local.get $2 local.get $0 - i64.const 2 - i64.rem_u - i64.eqz + i32.store offset=8 + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $~lib/math/NativeMathf.mod (param $0 f32) (result f32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> + (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 1 + i32.const 6 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.reinterpret_f32 + 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 5 + f64.const 5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + call $~lib/typedarray/FILTER<~lib/typedarray/Float64Array,f64> local.tee $1 - i32.const 23 - i32.shr_u - i32.const 255 - i32.and - local.tee $2 - i32.const 255 - i32.eq - select - if - local.get $0 - f32.const 2 - f32.mul - local.tee $0 - local.get $0 - f32.div - return - end + i32.load offset=4 local.get $1 - i32.const -2147483648 - i32.and - local.set $4 - block $folding-inner0 - local.get $1 - i32.const 1 - i32.shl - local.tee $3 - i32.const -2147483648 - i32.le_u - if - local.get $3 - i32.const -2147483648 - i32.eq - br_if $folding-inner0 - local.get $0 - return - end - local.get $2 - if (result i32) - local.get $1 - i32.const 8388607 - i32.and - i32.const 8388608 - i32.or - else - local.get $1 - i32.const 1 - local.get $2 - local.get $1 - i32.const 9 - i32.shl - i32.clz - i32.sub - local.tee $2 - i32.sub - i32.shl - end - local.set $1 - loop $while-continue|0 + i32.load + i32.sub + if + i32.const 0 + i32.const 1312 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 391 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 3 + f64.ne + if + i32.const 0 + i32.const 1312 + i32.const 392 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 4 + f64.ne + if + i32.const 0 + i32.const 1312 + i32.const 393 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 5 + f64.ne + if + i32.const 0 + i32.const 1312 + i32.const 394 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 255 + i32.and + i32.const 2 + i32.eq + ) + (func $~lib/typedarray/Int8Array#some (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $__inlined_func$~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8> (result i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + local.set $4 + loop $for-loop|0 local.get $2 - i32.const 128 - i32.gt_s + local.get $4 + i32.lt_s if - local.get $1 - i32.const 8388608 - i32.ge_u - if - local.get $1 - i32.const 8388608 - i32.eq - br_if $folding-inner0 - local.get $1 - i32.const 8388608 - i32.sub - local.set $1 - end - local.get $1 + local.get $2 + local.get $3 + i32.add + i32.load8_s + local.set $5 + i32.const 3 + global.set $~argumentsLength i32.const 1 - i32.shl - local.set $1 + local.get $5 + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + br_if $__inlined_func$~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8> + drop local.get $2 i32.const 1 - i32.sub + i32.add local.set $2 - br $while-continue|0 + br $for-loop|0 end end - local.get $1 - i32.const 8388608 - i32.ge_u - if - local.get $1 - i32.const 8388608 - i32.eq - br_if $folding-inner0 - local.get $1 - i32.const 8388608 - i32.sub - local.set $1 - end - local.get $1 - local.get $1 - i32.const 8 - i32.shl - i32.clz - local.tee $3 - i32.shl - local.set $1 - local.get $2 - local.get $3 - i32.sub - local.tee $2 i32.const 0 - i32.gt_s - if (result i32) - local.get $1 - i32.const 8388608 - i32.sub - local.get $2 - i32.const 23 - i32.shl - i32.or - else - local.get $1 - i32.const 1 + end + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 255 + i32.and + i32.eqz + ) + (func $~lib/typedarray/Uint8Array#some (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $__inlined_func$~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8> (result i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + local.set $4 + loop $for-loop|0 local.get $2 - i32.sub - i32.shr_u + local.get $4 + i32.lt_s + if + local.get $2 + local.get $3 + i32.add + i32.load8_u + local.set $5 + i32.const 3 + global.set $~argumentsLength + i32.const 1 + local.get $5 + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + br_if $__inlined_func$~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8> + drop + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end end - local.get $4 - i32.or - f32.reinterpret_i32 - return + i32.const 0 end - f32.const 0 - local.get $0 - f32.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - call $~lib/math/NativeMathf.mod - f32.const 0 - f32.eq + i32.const 65535 + i32.and + i32.const 2 + i32.eq ) - (func $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 f32) + (local $5 i32) local.get $0 i32.load offset=4 local.set $3 local.get $0 i32.load offset=8 - i32.const 2 + i32.const 1 i32.shr_u local.set $4 loop $for-loop|0 @@ -7545,19 +7611,18 @@ if local.get $3 local.get $2 - i32.const 2 + i32.const 1 i32.shl i32.add - f32.load + i32.load16_s i32.const 3 global.set $~argumentsLength local.get $2 local.get $0 local.get $1 - call_indirect (type $f32_i32_i32_=>_i32) - i32.eqz + call_indirect (type $i32_i32_i32_=>_i32) if - i32.const 0 + i32.const 1 return end local.get $2 @@ -7567,179 +7632,25 @@ br $for-loop|0 end end - i32.const 1 - ) - (func $~lib/math/NativeMath.mod (param $0 f64) (result f64) - (local $1 i64) - (local $2 i64) - (local $3 i64) - (local $4 i64) - i32.const 1 i32.const 0 - local.get $0 - i64.reinterpret_f64 - local.tee $1 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - local.tee $2 - i64.const 2047 - i64.eq - select - if - local.get $0 - f64.const 2 - f64.mul - local.tee $0 - local.get $0 - f64.div - return - end - local.get $1 - i64.const 63 - i64.shr_u - local.set $4 - block $folding-inner0 - local.get $1 - i64.const 1 - i64.shl - local.tee $3 - i64.const -9223372036854775808 - i64.le_u - if - local.get $3 - i64.const -9223372036854775808 - i64.eq - br_if $folding-inner0 - local.get $0 - return - end - local.get $2 - i64.eqz - if (result i64) - local.get $1 - i64.const 0 - local.get $2 - local.get $1 - i64.const 12 - i64.shl - i64.clz - i64.sub - local.tee $2 - i64.sub - i64.const 1 - i64.add - i64.shl - else - local.get $1 - i64.const 4503599627370495 - i64.and - i64.const 4503599627370496 - i64.or - end - local.set $1 - loop $while-continue|0 - local.get $2 - i64.const 1024 - i64.gt_s - if - local.get $1 - i64.const 4503599627370496 - i64.ge_u - if - local.get $1 - i64.const 4503599627370496 - i64.eq - br_if $folding-inner0 - local.get $1 - i64.const 4503599627370496 - i64.sub - local.set $1 - end - local.get $1 - i64.const 1 - i64.shl - local.set $1 - local.get $2 - i64.const 1 - i64.sub - local.set $2 - br $while-continue|0 - end - end - local.get $1 - i64.const 4503599627370496 - i64.ge_u - if - local.get $1 - i64.const 4503599627370496 - i64.eq - br_if $folding-inner0 - local.get $1 - i64.const 4503599627370496 - i64.sub - local.set $1 - end - local.get $1 - local.get $1 - i64.const 11 - i64.shl - i64.clz - local.tee $3 - i64.shl - local.set $1 - local.get $2 - local.get $3 - i64.sub - local.tee $2 - i64.const 0 - i64.gt_s - if (result i64) - local.get $1 - i64.const 4503599627370496 - i64.sub - local.get $2 - i64.const 52 - i64.shl - i64.or - else - local.get $1 - i64.const 0 - local.get $2 - i64.sub - i64.const 1 - i64.add - i64.shr_u - end - local.get $4 - i64.const 63 - i64.shl - i64.or - f64.reinterpret_i64 - return - end - f64.const 0 - local.get $0 - f64.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - call $~lib/math/NativeMath.mod - f64.const 0 - f64.eq + i32.const 65535 + i32.and + i32.eqz ) - (func $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 f64) + (local $5 i32) local.get $0 i32.load offset=4 local.set $3 local.get $0 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u local.set $4 loop $for-loop|0 @@ -7749,19 +7660,18 @@ if local.get $3 local.get $2 - i32.const 3 + i32.const 1 i32.shl i32.add - f64.load + i32.load16_u i32.const 3 global.set $~argumentsLength local.get $2 local.get $0 local.get $1 - call_indirect (type $f64_i32_i32_=>_i32) - i32.eqz + call_indirect (type $i32_i32_i32_=>_i32) if - i32.const 0 + i32.const 1 return end local.get $2 @@ -7771,54 +7681,14 @@ br $for-loop|0 end end - i32.const 1 + i32.const 0 ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 255 - i32.and - i32.const 2704 - local.get $1 - call $~lib/array/Array#__get - i32.const 255 - i32.and - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 490 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 491 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $2 - global.get $std/typedarray/forEachSelf - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 492 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount + i32.const 2 + i32.eq ) - (func $~lib/typedarray/FOREACH<~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7828,22 +7698,30 @@ local.set $3 local.get $0 i32.load offset=8 + i32.const 2 + i32.shr_u local.set $4 loop $for-loop|0 local.get $2 local.get $4 i32.lt_s if - local.get $2 local.get $3 + local.get $2 + i32.const 2 + i32.shl i32.add - i32.load8_u + i32.load i32.const 3 global.set $~argumentsLength local.get $2 local.get $0 local.get $1 - call_indirect (type $i32_i32_i32_=>_none) + call_indirect (type $i32_i32_i32_=>_i32) + if + i32.const 1 + return + end local.get $2 i32.const 1 i32.add @@ -7851,104 +7729,28 @@ br $for-loop|0 end end + i32.const 0 ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 65535 - i32.and - i32.const 2704 - local.get $1 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 490 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 491 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $2 - global.get $std/typedarray/forEachSelf - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 492 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount + i32.eqz ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) - i32.const 2704 - local.get $1 - call $~lib/array/Array#__get + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 490 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 491 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $2 - global.get $std/typedarray/forEachSelf - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 492 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount + i64.const 2 + i64.eq ) - (func $~lib/typedarray/FOREACH<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) local.get $0 i32.load offset=4 local.set $3 local.get $0 i32.load offset=8 - i32.const 2 + i32.const 3 i32.shr_u local.set $4 loop $for-loop|0 @@ -7958,16 +7760,20 @@ if local.get $3 local.get $2 - i32.const 2 + i32.const 3 i32.shl i32.add - i32.load + i64.load i32.const 3 global.set $~argumentsLength local.get $2 local.get $0 local.get $1 - call_indirect (type $i32_i32_i32_=>_none) + call_indirect (type $i64_i32_i32_=>_i32) + if + i32.const 1 + return + end local.get $2 i32.const 1 i32.add @@ -7975,60 +7781,28 @@ br $for-loop|0 end end + i32.const 0 ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 2704 - local.get $1 - call $~lib/array/Array#__get - i64.extend_i32_s - i64.ne - if - i32.const 0 - i32.const 1312 - i32.const 490 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 491 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $2 - global.get $std/typedarray/forEachSelf - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 492 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount + i64.eqz ) - (func $~lib/typedarray/FOREACH<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + f32.const 2 + f32.eq + ) + (func $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) + (local $5 f32) local.get $0 i32.load offset=4 local.set $3 local.get $0 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u local.set $4 loop $for-loop|0 @@ -8038,16 +7812,20 @@ if local.get $3 local.get $2 - i32.const 3 + i32.const 2 i32.shl i32.add - i64.load + f32.load i32.const 3 global.set $~argumentsLength local.get $2 local.get $0 local.get $1 - call_indirect (type $i64_i32_i32_=>_none) + call_indirect (type $f32_i32_i32_=>_i32) + if + i32.const 1 + return + end local.get $2 i32.const 1 i32.add @@ -8055,2064 +7833,1656 @@ br $for-loop|0 end end + i32.const 0 ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 2704 - local.get $1 - call $~lib/array/Array#__get - f32.convert_i32_s - f32.ne - if - i32.const 0 - i32.const 1312 - i32.const 490 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 491 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $2 - global.get $std/typedarray/forEachSelf - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 492 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount + f32.const 0 + f32.eq ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 2704 - local.get $1 - call $~lib/array/Array#__get - f64.convert_i32_s - f64.ne - if - i32.const 0 - i32.const 1312 - i32.const 490 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 491 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $2 - global.get $std/typedarray/forEachSelf - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 492 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount + f64.const 2 + f64.eq ) - (func $~lib/typedarray/REVERSE<~lib/typedarray/Int8Array,i8> (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 f64) local.get $0 - call $~lib/rt/pure/__retain - local.tee $3 i32.load offset=4 - local.set $4 - local.get $3 + local.set $3 + local.get $0 i32.load offset=8 - i32.const 1 - i32.sub - local.set $0 + i32.const 3 + i32.shr_u + local.set $4 loop $for-loop|0 - local.get $1 - local.get $0 - i32.lt_u + local.get $2 + local.get $4 + i32.lt_s if - local.get $1 - local.get $4 - i32.add - local.tee $2 - i32.load8_s - local.set $5 + local.get $3 local.get $2 - local.get $0 - local.get $4 + i32.const 3 + i32.shl i32.add - local.tee $2 - i32.load8_s - i32.store8 + f64.load + i32.const 3 + global.set $~argumentsLength local.get $2 - local.get $5 - i32.store8 + local.get $0 local.get $1 + call_indirect (type $f64_i32_i32_=>_i32) + if + i32.const 1 + return + end + local.get $2 i32.const 1 i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 + local.set $2 br $for-loop|0 end end - local.get $3 + i32.const 0 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> - (local $0 i32) - (local $1 i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + f64.const 0 + f64.eq + ) + (func $~lib/typedarray/Int8Array#findIndex (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - i32.const 2812 - i32.load - local.tee $1 - call $~lib/typedarray/Int8Array#constructor - local.tee $4 + local.get $0 local.set $2 - local.get $1 - call $~lib/typedarray/Int8Array#constructor - local.tee $5 - local.set $3 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 2800 - local.get $0 - call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/typedarray/Int8Array#__set - local.get $3 - local.get $0 - i32.const 2800 - local.get $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.add - local.set $0 - br $for-loop|0 - end - end - local.get $2 - call $~lib/typedarray/REVERSE<~lib/typedarray/Int8Array,i8> - call $~lib/rt/pure/__release i32.const 0 local.set $0 - loop $for-loop|1 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $2 - local.get $0 - call $~lib/typedarray/Int8Array#__get - i32.const 2800 - local.get $1 - i32.const 1 - i32.sub + local.get $2 + i32.load offset=4 + local.set $3 + local.get $2 + i32.load offset=8 + local.set $4 + block $__inlined_func$~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8> + loop $for-loop|0 local.get $0 - i32.sub - call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.ne + local.get $4 + i32.lt_s if - i32.const 0 - i32.const 1312 - i32.const 524 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $0 + local.get $3 + i32.add + i32.load8_s + i32.const 3 + global.set $~argumentsLength + local.get $0 + local.get $2 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + br_if $__inlined_func$~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8> + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 end - end - local.get $3 - i32.const 4 - i32.const 8 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> - local.tee $0 - local.get $0 - call $~lib/typedarray/REVERSE<~lib/typedarray/Int8Array,i8> - local.tee $0 - i32.const 0 - call $~lib/typedarray/Int8Array#__get - i32.const 8 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 529 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - call $~lib/typedarray/Int8Array#__get - i32.const 7 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 530 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 2 - call $~lib/typedarray/Int8Array#__get - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 531 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.const -1 + local.set $0 end local.get $0 - i32.const 3 - call $~lib/typedarray/Int8Array#__get - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 532 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - call $~lib/rt/pure/__release + i32.const 255 + i32.and + i32.const 4 + i32.eq ) - (func $~lib/typedarray/REVERSE<~lib/typedarray/Uint8Array,u8> (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Uint8Array#findIndex (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 - call $~lib/rt/pure/__retain - local.tee $3 + local.set $2 + i32.const 0 + local.set $0 + local.get $2 i32.load offset=4 - local.set $4 - local.get $3 + local.set $3 + local.get $2 i32.load offset=8 - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|0 - local.get $1 - local.get $0 - i32.lt_u - if - local.get $1 - local.get $4 - i32.add - local.tee $2 - i32.load8_u - local.set $5 - local.get $2 + local.set $4 + block $__inlined_func$~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8> + loop $for-loop|0 local.get $0 local.get $4 - i32.add - local.tee $2 - i32.load8_u - i32.store8 - local.get $2 - local.get $5 - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|0 + i32.lt_s + if + local.get $0 + local.get $3 + i32.add + i32.load8_u + i32.const 3 + global.set $~argumentsLength + local.get $0 + local.get $2 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + br_if $__inlined_func$~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8> + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end end + i32.const -1 + local.set $0 end - local.get $3 + local.get $0 ) - (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 4 + (local $4 i32) + (local $5 i32) local.get $0 - i32.load offset=8 - local.tee $2 - i32.const 4 - local.get $2 - i32.lt_s - select + i32.load offset=4 local.set $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $2 - i32.add - local.tee $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $2 - local.get $1 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 + loop $for-loop|0 local.get $2 + local.get $4 i32.lt_s - select + if + local.get $3 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if + local.get $2 + return + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end end - local.set $1 - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $3 + i32.const -1 + ) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.load offset=4 - i32.add - i32.store offset=4 - local.get $2 - local.get $1 - local.get $3 - local.get $1 - local.get $3 - i32.gt_s - select - local.get $3 - i32.sub - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain + i32.const 65535 + i32.and + i32.const 4 + i32.eq ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> - (local $0 i32) - (local $1 i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - i32.const 2812 - i32.load - local.tee $1 - call $~lib/typedarray/Uint8Array#constructor - local.tee $4 - local.set $2 - local.get $1 - call $~lib/typedarray/Uint8Array#constructor - local.tee $5 + local.get $0 + i32.load offset=4 local.set $3 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 loop $for-loop|0 - local.get $0 - local.get $1 + local.get $2 + local.get $4 i32.lt_s if - local.get $2 - local.get $0 - i32.const 2800 - local.get $0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set local.get $3 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_u + i32.const 3 + global.set $~argumentsLength + local.get $2 local.get $0 - i32.const 2800 - local.get $0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if + local.get $2 + return + end + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end - local.get $2 - call $~lib/typedarray/REVERSE<~lib/typedarray/Uint8Array,u8> - call $~lib/rt/pure/__release - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - local.get $1 + i32.const -1 + ) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 i32.lt_s if + local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + i32.const 3 + global.set $~argumentsLength local.get $2 local.get $0 - call $~lib/typedarray/Uint8Array#__get - i32.const 2800 local.get $1 - i32.const 1 - i32.sub - local.get $0 - i32.sub - call $~lib/array/Array#__get - i32.const 255 - i32.and - i32.ne + call_indirect (type $i32_i32_i32_=>_i32) if - i32.const 0 - i32.const 1312 - i32.const 524 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $2 + return end - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 - br $for-loop|1 + local.set $2 + br $for-loop|0 end end - local.get $3 - i32.const 8 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8Array,u8> - local.tee $0 + i32.const -1 + ) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - call $~lib/typedarray/REVERSE<~lib/typedarray/Uint8Array,u8> - local.tee $0 - i32.const 0 - call $~lib/typedarray/Uint8Array#__get - i32.const 8 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 529 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - call $~lib/typedarray/Uint8Array#__get - i32.const 7 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 530 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 2 - call $~lib/typedarray/Uint8Array#__get - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 531 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 3 - call $~lib/typedarray/Uint8Array#__get - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 532 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + i32.const 4 + i32.eq ) - (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8ClampedArray,u8> (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 4 + (local $4 i32) + (local $5 i64) local.get $0 - i32.load offset=8 - local.tee $2 - i32.const 4 - local.get $2 - i32.lt_s - select + i32.load offset=4 local.set $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $2 - i32.add - local.tee $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $2 - local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + loop $for-loop|0 local.get $2 + local.get $4 i32.lt_s - select + if + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i64_i32_i32_=>_i32) + if + local.get $2 + return + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end end - local.set $1 - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $3 + i32.const -1 + ) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.load offset=4 - i32.add - i32.store offset=4 - local.get $2 - local.get $1 - local.get $3 - local.get $1 - local.get $3 - i32.gt_s - select - local.get $3 - i32.sub - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain + i64.const 4 + i64.eq ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> - (local $0 i32) - (local $1 i32) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - i32.const 2812 - i32.load - local.tee $1 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $4 - local.set $2 - local.get $1 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $5 + (local $5 f32) + local.get $0 + i32.load offset=4 local.set $3 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $4 loop $for-loop|0 - local.get $0 - local.get $1 + local.get $2 + local.get $4 i32.lt_s if - local.get $2 - local.get $0 - i32.const 2800 - local.get $0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + f32.load + i32.const 3 + global.set $~argumentsLength + local.get $2 local.get $0 - i32.const 2800 - local.get $0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 + call_indirect (type $f32_i32_i32_=>_i32) + if + local.get $2 + return + end + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end - local.get $2 - call $~lib/typedarray/REVERSE<~lib/typedarray/Uint8Array,u8> - call $~lib/rt/pure/__release - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - local.get $1 + i32.const -1 + ) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + f32.const 4 + f32.eq + ) + (func $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f64) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 i32.lt_s if + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + f64.load + i32.const 3 + global.set $~argumentsLength local.get $2 local.get $0 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 2800 local.get $1 - i32.const 1 - i32.sub - local.get $0 - i32.sub - call $~lib/array/Array#__get - i32.const 255 - i32.and - i32.ne + call_indirect (type $f64_i32_i32_=>_i32) if - i32.const 0 - i32.const 1312 - i32.const 524 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $2 + return end - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 - br $for-loop|1 + local.set $2 + br $for-loop|0 end end - local.get $3 - i32.const 8 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8ClampedArray,u8> - local.tee $0 - local.get $0 - call $~lib/typedarray/REVERSE<~lib/typedarray/Uint8Array,u8> - local.tee $0 - i32.const 0 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 8 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 529 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.const -1 + ) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 7 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 530 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + f64.const 4 + 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 $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 531 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.rem_s + i32.eqz + ) + (func $~lib/typedarray/Int8Array#every (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $__inlined_func$~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8> (result i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $2 + local.get $3 + i32.add + i32.load8_s + local.set $5 + i32.const 3 + global.set $~argumentsLength + i32.const 0 + local.get $5 + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + i32.eqz + br_if $__inlined_func$~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8> + drop + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1 end + ) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 532 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.const 1 + i32.and + i32.eqz + ) + (func $~lib/typedarray/Uint8Array#every (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $__inlined_func$~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8> (result i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $2 + local.get $3 + i32.add + i32.load8_u + local.set $5 + i32.const 3 + global.set $~argumentsLength + i32.const 0 + local.get $5 + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + i32.eqz + br_if $__inlined_func$~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8> + drop + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1 end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - 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 $0 - call $~lib/rt/pure/__release + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.const 2 + i32.rem_s + i32.eqz ) - (func $~lib/typedarray/REVERSE<~lib/typedarray/Int16Array,i16> (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 - call $~lib/rt/pure/__retain - local.tee $3 i32.load offset=4 - local.set $4 - local.get $3 + local.set $3 + local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - i32.const 1 - i32.sub - local.set $0 + local.set $4 loop $for-loop|0 - local.get $1 - local.get $0 - i32.lt_u + local.get $2 + local.get $4 + i32.lt_s if - local.get $4 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_s - local.set $5 + local.get $3 local.get $2 - local.get $4 - local.get $0 i32.const 1 i32.shl i32.add - local.tee $2 i32.load16_s - i32.store16 + i32.const 3 + global.set $~argumentsLength local.get $2 - local.get $5 - i32.store16 + local.get $0 local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + i32.eqz + if + i32.const 0 + return + end + local.get $2 i32.const 1 i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 + local.set $2 br $for-loop|0 end end - local.get $3 + i32.const 1 ) - (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 4 + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.tee $2 - i32.const 4 - local.get $2 - i32.lt_s - select - local.set $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $2 - i32.add - local.tee $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $2 - local.get $1 + local.set $4 + loop $for-loop|0 local.get $2 - i32.lt_s - select - end - local.set $1 - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $0 - i32.load offset=4 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.get $1 - local.get $3 - local.get $1 - local.get $3 - i32.gt_s - select - local.get $3 - i32.sub - i32.const 1 - i32.shl - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 2812 - i32.load - local.tee $1 - call $~lib/typedarray/Int16Array#constructor - local.tee $4 - local.set $2 - local.get $1 - call $~lib/typedarray/Int16Array#constructor - local.tee $5 - local.set $3 - loop $for-loop|0 - local.get $0 - local.get $1 + local.get $4 i32.lt_s if - local.get $2 - local.get $0 - i32.const 2800 - local.get $0 - call $~lib/array/Array#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/typedarray/Int16Array#__set local.get $3 - local.get $0 - i32.const 2800 - local.get $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 + local.get $2 i32.const 1 + i32.shl i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $2 - call $~lib/typedarray/REVERSE<~lib/typedarray/Int16Array,i16> - call $~lib/rt/pure/__release - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - local.get $1 - i32.lt_s - if + i32.load16_u + i32.const 3 + global.set $~argumentsLength local.get $2 local.get $0 - call $~lib/typedarray/Int16Array#__get - i32.const 2800 local.get $1 - i32.const 1 - i32.sub - local.get $0 - i32.sub - call $~lib/array/Array#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.ne + call_indirect (type $i32_i32_i32_=>_i32) + i32.eqz if i32.const 0 - i32.const 1312 - i32.const 524 - i32.const 5 - call $~lib/builtins/abort - unreachable + return end - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 - br $for-loop|1 + local.set $2 + br $for-loop|0 end end - local.get $3 - i32.const 8 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int16Array,i16> - local.tee $0 - local.get $0 - call $~lib/typedarray/REVERSE<~lib/typedarray/Int16Array,i16> - local.tee $0 - i32.const 0 - call $~lib/typedarray/Int16Array#__get - i32.const 8 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 529 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 i32.const 1 - call $~lib/typedarray/Int16Array#__get - i32.const 7 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 530 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + ) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 - call $~lib/typedarray/Int16Array#__get - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 531 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 3 - call $~lib/typedarray/Int16Array#__get - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 532 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + i32.rem_s + i32.eqz ) - (func $~lib/typedarray/REVERSE<~lib/typedarray/Uint16Array,u16> (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 - call $~lib/rt/pure/__retain - local.tee $3 i32.load offset=4 - local.set $4 - local.get $3 + local.set $3 + local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u - i32.const 1 - i32.sub - local.set $0 + local.set $4 loop $for-loop|0 - local.get $1 - local.get $0 - i32.lt_u + local.get $2 + local.get $4 + i32.lt_s if - local.get $4 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_u - local.set $5 + local.get $3 local.get $2 - local.get $4 - local.get $0 - i32.const 1 + i32.const 2 i32.shl i32.add - local.tee $2 - i32.load16_u - i32.store16 + i32.load + i32.const 3 + global.set $~argumentsLength local.get $2 - local.get $5 - i32.store16 + local.get $0 local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + i32.eqz + if + i32.const 0 + return + end + local.get $2 i32.const 1 i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 + local.set $2 br $for-loop|0 end end - local.get $3 + i32.const 1 ) - (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint16Array,u16> (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i64.const 2 + i64.rem_s + i64.eqz + ) + (func $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 4 + (local $4 i32) + (local $5 i64) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u - local.tee $2 - i32.const 4 - local.get $2 - i32.lt_s - select - local.set $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $2 - i32.add - local.tee $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $2 - local.get $1 - local.get $2 - i32.lt_s - select - end - local.set $1 - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $0 - i32.load offset=4 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.get $1 - local.get $3 - local.get $1 - local.get $3 - i32.gt_s - select - local.get $3 - i32.sub - i32.const 1 - i32.shl - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 2812 - i32.load - local.tee $1 - call $~lib/typedarray/Uint16Array#constructor - local.tee $4 - local.set $2 - local.get $1 - call $~lib/typedarray/Uint16Array#constructor - local.tee $5 - local.set $3 + local.set $4 loop $for-loop|0 - local.get $0 - local.get $1 + local.get $2 + local.get $4 i32.lt_s if - local.get $2 - local.get $0 - i32.const 2800 - local.get $0 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set local.get $3 - local.get $0 - i32.const 2800 - local.get $0 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 1 + local.get $2 + i32.const 3 + i32.shl i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $2 - call $~lib/typedarray/REVERSE<~lib/typedarray/Uint16Array,u16> - call $~lib/rt/pure/__release - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - local.get $1 - i32.lt_s - if + i64.load + i32.const 3 + global.set $~argumentsLength local.get $2 local.get $0 - call $~lib/typedarray/Uint16Array#__get - i32.const 2800 local.get $1 - i32.const 1 - i32.sub - local.get $0 - i32.sub - call $~lib/array/Array#__get - i32.const 65535 - i32.and - i32.ne + call_indirect (type $i64_i32_i32_=>_i32) + i32.eqz if i32.const 0 - i32.const 1312 - i32.const 524 - i32.const 5 - call $~lib/builtins/abort - unreachable + return end - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 - br $for-loop|1 + local.set $2 + br $for-loop|0 end end - local.get $3 - i32.const 8 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint16Array,u16> - local.tee $0 - local.get $0 - call $~lib/typedarray/REVERSE<~lib/typedarray/Uint16Array,u16> - local.tee $0 - i32.const 0 - call $~lib/typedarray/Uint16Array#__get - i32.const 8 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 529 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 i32.const 1 - call $~lib/typedarray/Uint16Array#__get - i32.const 7 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 530 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 2 - call $~lib/typedarray/Uint16Array#__get - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 531 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 3 - call $~lib/typedarray/Uint16Array#__get - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 532 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - 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 - call $~lib/rt/pure/__release + i64.const 2 + i64.rem_u + i64.eqz ) - (func $~lib/typedarray/REVERSE<~lib/typedarray/Int32Array,i32> (param $0 i32) (result i32) + (func $~lib/math/NativeMathf.mod (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) + i32.const 1 + i32.const 0 local.get $0 - call $~lib/rt/pure/__retain - local.tee $3 - i32.load offset=4 - local.set $4 - local.get $3 - i32.load offset=8 - i32.const 2 + i32.reinterpret_f32 + local.tee $1 + i32.const 23 i32.shr_u - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|0 - local.get $1 + i32.const 255 + i32.and + local.tee $2 + i32.const 255 + i32.eq + select + if local.get $0 - i32.lt_u + f32.const 2 + f32.mul + local.tee $0 + local.get $0 + f32.div + return + end + local.get $1 + i32.const -2147483648 + i32.and + local.set $4 + block $folding-inner0 + local.get $1 + i32.const 1 + i32.shl + local.tee $3 + i32.const -2147483648 + i32.le_u if - local.get $4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.tee $2 - i32.load - local.set $5 - local.get $2 - local.get $4 + local.get $3 + i32.const -2147483648 + i32.eq + br_if $folding-inner0 local.get $0 - i32.const 2 + return + end + local.get $2 + if (result i32) + local.get $1 + i32.const 8388607 + i32.and + i32.const 8388608 + i32.or + else + local.get $1 + i32.const 1 + local.get $2 + local.get $1 + i32.const 9 i32.shl - i32.add + i32.clz + i32.sub local.tee $2 - i32.load - i32.store + i32.sub + i32.shl + end + local.set $1 + loop $while-continue|0 local.get $2 - local.get $5 - i32.store + i32.const 128 + i32.gt_s + if + local.get $1 + i32.const 8388608 + i32.ge_u + if + local.get $1 + i32.const 8388608 + i32.eq + br_if $folding-inner0 + local.get $1 + i32.const 8388608 + i32.sub + local.set $1 + end + local.get $1 + i32.const 1 + i32.shl + local.set $1 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 + end + end + local.get $1 + i32.const 8388608 + i32.ge_u + if local.get $1 - i32.const 1 - i32.add + i32.const 8388608 + i32.eq + br_if $folding-inner0 + local.get $1 + i32.const 8388608 + i32.sub local.set $1 - local.get $0 + end + local.get $1 + local.get $1 + i32.const 8 + i32.shl + i32.clz + local.tee $3 + i32.shl + local.set $1 + local.get $2 + local.get $3 + i32.sub + local.tee $2 + i32.const 0 + i32.gt_s + if (result i32) + local.get $1 + i32.const 8388608 + i32.sub + local.get $2 + i32.const 23 + i32.shl + i32.or + else + local.get $1 i32.const 1 + local.get $2 i32.sub - local.set $0 - br $for-loop|0 + i32.shr_u end + local.get $4 + i32.or + f32.reinterpret_i32 + return end - local.get $3 + f32.const 0 + local.get $0 + f32.mul ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> - (local $0 i32) - (local $1 i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.mod + f32.const 0 + f32.eq + ) + (func $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - i32.const 2812 - i32.load - local.tee $1 - call $~lib/typedarray/Int32Array#constructor - local.tee $4 - local.set $2 - local.get $1 - call $~lib/typedarray/Int32Array#constructor - local.tee $5 + (local $5 f32) + local.get $0 + i32.load offset=4 local.set $3 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $4 loop $for-loop|0 - local.get $0 - local.get $1 + local.get $2 + local.get $4 i32.lt_s if - local.get $2 - local.get $0 - i32.const 2800 - local.get $0 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set local.get $3 - local.get $0 - i32.const 2800 - local.get $0 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 + local.get $2 + i32.const 2 + i32.shl i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $2 - call $~lib/typedarray/REVERSE<~lib/typedarray/Int32Array,i32> - call $~lib/rt/pure/__release - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - local.get $1 - i32.lt_s - if + f32.load + i32.const 3 + global.set $~argumentsLength local.get $2 local.get $0 - call $~lib/typedarray/Int32Array#__get - i32.const 2800 local.get $1 - i32.const 1 - i32.sub - local.get $0 - i32.sub - call $~lib/array/Array#__get - i32.ne + call_indirect (type $f32_i32_i32_=>_i32) + i32.eqz if i32.const 0 - i32.const 1312 - i32.const 524 - i32.const 5 - call $~lib/builtins/abort - unreachable + return end - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 - br $for-loop|1 + local.set $2 + br $for-loop|0 end end - local.get $3 - i32.const 4 - i32.const 8 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int32Array,i32> - local.tee $0 - local.get $0 - call $~lib/typedarray/REVERSE<~lib/typedarray/Int32Array,i32> - local.tee $0 + i32.const 1 + ) + (func $~lib/math/NativeMath.mod (param $0 f64) (result f64) + (local $1 i64) + (local $2 i64) + (local $3 i64) + (local $4 i64) + i32.const 1 i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 8 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 529 - i32.const 3 - call $~lib/builtins/abort - unreachable - end local.get $0 - i32.const 1 - call $~lib/typedarray/Int32Array#__get - i32.const 7 - i32.ne + i64.reinterpret_f64 + local.tee $1 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + local.tee $2 + i64.const 2047 + i64.eq + select if - i32.const 0 - i32.const 1312 - i32.const 530 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $0 + f64.const 2 + f64.mul + local.tee $0 + local.get $0 + f64.div + return end - local.get $0 - i32.const 2 - call $~lib/typedarray/Int32Array#__get - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 531 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 3 - call $~lib/typedarray/Int32Array#__get - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 532 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint32Array,u32> (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - i32.const 4 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $2 - i32.const 4 - local.get $2 - i32.lt_s - select - local.set $3 local.get $1 - i32.const 0 - i32.lt_s - if (result i32) + i64.const 63 + i64.shr_u + local.set $4 + block $folding-inner0 local.get $1 + i64.const 1 + i64.shl + local.tee $3 + i64.const -9223372036854775808 + i64.le_u + if + local.get $3 + i64.const -9223372036854775808 + i64.eq + br_if $folding-inner0 + local.get $0 + return + end local.get $2 - i32.add - local.tee $1 - i32.const 0 + i64.eqz + if (result i64) + local.get $1 + i64.const 0 + local.get $2 + local.get $1 + i64.const 12 + i64.shl + i64.clz + i64.sub + local.tee $2 + i64.sub + i64.const 1 + i64.add + i64.shl + else + local.get $1 + i64.const 4503599627370495 + i64.and + i64.const 4503599627370496 + i64.or + end + local.set $1 + loop $while-continue|0 + local.get $2 + i64.const 1024 + i64.gt_s + if + local.get $1 + i64.const 4503599627370496 + i64.ge_u + if + local.get $1 + i64.const 4503599627370496 + i64.eq + br_if $folding-inner0 + local.get $1 + i64.const 4503599627370496 + i64.sub + local.set $1 + end + local.get $1 + i64.const 1 + i64.shl + local.set $1 + local.get $2 + i64.const 1 + i64.sub + local.set $2 + br $while-continue|0 + end + end local.get $1 - i32.const 0 - i32.gt_s - select - else + i64.const 4503599627370496 + i64.ge_u + if + local.get $1 + i64.const 4503599627370496 + i64.eq + br_if $folding-inner0 + local.get $1 + i64.const 4503599627370496 + i64.sub + local.set $1 + end local.get $1 - local.get $2 local.get $1 + i64.const 11 + i64.shl + i64.clz + local.tee $3 + i64.shl + local.set $1 local.get $2 - i32.lt_s - select + local.get $3 + i64.sub + local.tee $2 + i64.const 0 + i64.gt_s + if (result i64) + local.get $1 + i64.const 4503599627370496 + i64.sub + local.get $2 + i64.const 52 + i64.shl + i64.or + else + local.get $1 + i64.const 0 + local.get $2 + i64.sub + i64.const 1 + i64.add + i64.shr_u + end + local.get $4 + i64.const 63 + i64.shl + i64.or + f64.reinterpret_i64 + return end - local.set $1 - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/__alloc - local.tee $2 + f64.const 0 local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 + f64.mul + ) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.load offset=4 - local.get $3 - i32.const 2 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.get $1 - local.get $3 - local.get $1 - local.get $3 - i32.gt_s - select - local.get $3 - i32.sub - i32.const 2 - i32.shl - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain + call $~lib/math/NativeMath.mod + f64.const 0 + f64.eq ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> - (local $0 i32) - (local $1 i32) + (func $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - i32.const 2812 - i32.load - local.tee $1 - call $~lib/typedarray/Uint32Array#constructor - local.tee $4 - local.set $2 - local.get $1 - call $~lib/typedarray/Uint32Array#constructor - local.tee $5 + (local $5 f64) + local.get $0 + i32.load offset=4 local.set $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 loop $for-loop|0 - local.get $0 - local.get $1 + local.get $2 + local.get $4 i32.lt_s if - local.get $2 - local.get $0 - i32.const 2800 - local.get $0 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set local.get $3 - local.get $0 - i32.const 2800 - local.get $0 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 + local.get $2 + i32.const 3 + i32.shl i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $2 - call $~lib/typedarray/REVERSE<~lib/typedarray/Int32Array,i32> - call $~lib/rt/pure/__release - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - local.get $1 - i32.lt_s - if + f64.load + i32.const 3 + global.set $~argumentsLength local.get $2 local.get $0 - call $~lib/typedarray/Uint32Array#__get - i32.const 2800 local.get $1 - i32.const 1 - i32.sub - local.get $0 - i32.sub - call $~lib/array/Array#__get - i32.ne + call_indirect (type $f64_i32_i32_=>_i32) + i32.eqz if i32.const 0 - i32.const 1312 - i32.const 524 - i32.const 5 - call $~lib/builtins/abort - unreachable + return end - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 - br $for-loop|1 + local.set $2 + br $for-loop|0 end end - local.get $3 - i32.const 8 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint32Array,u32> - local.tee $0 + i32.const 1 + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 - call $~lib/typedarray/REVERSE<~lib/typedarray/Int32Array,i32> - local.tee $0 - i32.const 0 - call $~lib/typedarray/Uint32Array#__get - i32.const 8 + i32.const 255 + i32.and + i32.const 2704 + local.get $1 + call $~lib/array/Array#__get + i32.const 255 + i32.and i32.ne if i32.const 0 i32.const 1312 - i32.const 529 - i32.const 3 + i32.const 490 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__get - i32.const 7 + local.get $1 + global.get $std/typedarray/forEachCallCount i32.ne if i32.const 0 i32.const 1312 - i32.const 530 - i32.const 3 + i32.const 491 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 2 - call $~lib/typedarray/Uint32Array#__get - i32.const 6 + local.get $2 + global.get $std/typedarray/forEachSelf i32.ne if i32.const 0 i32.const 1312 - i32.const 531 - i32.const 3 + i32.const 492 + i32.const 5 call $~lib/builtins/abort unreachable end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $2 + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 2704 + 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 2704 + 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 2704 + i32.const 2 + 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.load offset=4 + local.set $3 local.get $0 + i32.load offset=8 + local.set $4 + loop $for-loop|0 + local.get $1 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $3 + i32.add + i32.load8_s + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + global.get $std/typedarray/forEachCallCount i32.const 3 - call $~lib/typedarray/Uint32Array#__get - i32.const 5 i32.ne if i32.const 0 i32.const 1312 - i32.const 532 + i32.const 495 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 + local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/REVERSE<~lib/typedarray/Int64Array,i64> (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) + (local $5 i32) local.get $0 - call $~lib/rt/pure/__retain - local.tee $3 i32.load offset=4 - local.set $4 - local.get $3 + local.set $3 + local.get $0 i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $0 + local.set $4 loop $for-loop|0 - local.get $1 - local.get $0 - i32.lt_u + local.get $2 + local.get $4 + i32.lt_s if - local.get $4 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.tee $2 - i64.load - local.set $5 local.get $2 - local.get $4 - local.get $0 - i32.const 3 - i32.shl + local.get $3 i32.add - local.tee $2 - i64.load - i64.store + i32.load8_u + i32.const 3 + global.set $~argumentsLength local.get $2 - local.get $5 - i64.store + local.get $0 local.get $1 + call_indirect (type $i32_i32_i32_=>_none) + local.get $2 i32.const 1 i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 + local.set $2 br $for-loop|0 end end - local.get $3 ) - (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - i32.const 4 + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $2 - i32.const 4 - local.get $2 - i32.lt_s - select - local.set $3 + i32.const 65535 + i32.and + i32.const 2704 local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $2 - i32.add - local.tee $1 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + i32.ne + if i32.const 0 - local.get $1 + i32.const 1312 + i32.const 490 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne + if i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $2 - local.get $1 - local.get $2 - i32.lt_s - select + i32.const 1312 + i32.const 491 + i32.const 5 + call $~lib/builtins/abort + unreachable end - local.set $1 - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store local.get $2 - local.get $0 - i32.load offset=4 - local.get $3 - i32.const 3 - i32.shl + global.get $std/typedarray/forEachSelf + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 492 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 i32.add - i32.store offset=4 - local.get $2 + global.set $std/typedarray/forEachCallCount + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 2704 local.get $1 - local.get $3 + call $~lib/array/Array#__get + local.get $0 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 490 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $1 - local.get $3 - i32.gt_s - select - local.get $3 - i32.sub - i32.const 3 - i32.shl - i32.store offset=8 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 491 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $2 - call $~lib/rt/pure/__retain + global.get $std/typedarray/forEachSelf + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 492 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> - (local $0 i32) - (local $1 i32) + (func $~lib/typedarray/FOREACH<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - i32.const 2812 - i32.load - local.tee $1 - call $~lib/typedarray/Int64Array#constructor - local.tee $4 - local.set $2 - local.get $1 - call $~lib/typedarray/Int64Array#constructor - local.tee $5 + local.get $0 + i32.load offset=4 local.set $3 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $4 loop $for-loop|0 - local.get $0 - local.get $1 + local.get $2 + local.get $4 i32.lt_s if - local.get $2 - local.get $0 - i32.const 2800 - local.get $0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set local.get $3 - local.get $0 - i32.const 2800 - local.get $0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 1 + local.get $2 + i32.const 2 + i32.shl i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $2 - call $~lib/typedarray/REVERSE<~lib/typedarray/Int64Array,i64> - call $~lib/rt/pure/__release - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - local.get $1 - i32.lt_s - if + i32.load + i32.const 3 + global.set $~argumentsLength local.get $2 local.get $0 - call $~lib/typedarray/Int64Array#__get - i32.const 2800 local.get $1 - i32.const 1 - i32.sub - local.get $0 - i32.sub - call $~lib/array/Array#__get - i64.extend_i32_s - i64.ne - if - i32.const 0 - i32.const 1312 - i32.const 524 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 + call_indirect (type $i32_i32_i32_=>_none) + local.get $2 i32.const 1 i32.add - local.set $0 - br $for-loop|1 + local.set $2 + br $for-loop|0 end end - local.get $3 - i32.const 8 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int64Array,i64> - local.tee $0 - local.get $0 - call $~lib/typedarray/REVERSE<~lib/typedarray/Int64Array,i64> - local.tee $0 - i32.const 0 - call $~lib/typedarray/Int64Array#__get - i64.const 8 - i64.ne - if - i32.const 0 - i32.const 1312 - i32.const 529 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) local.get $0 - i32.const 1 - call $~lib/typedarray/Int64Array#__get - i64.const 7 + i32.const 2704 + local.get $1 + call $~lib/array/Array#__get + i64.extend_i32_s i64.ne if i32.const 0 i32.const 1312 - i32.const 530 - i32.const 3 + i32.const 490 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 2 - call $~lib/typedarray/Int64Array#__get - i64.const 6 - i64.ne + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne if i32.const 0 i32.const 1312 - i32.const 531 - i32.const 3 + i32.const 491 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 3 - call $~lib/typedarray/Int64Array#__get - i64.const 5 - i64.ne + local.get $2 + global.get $std/typedarray/forEachSelf + i32.ne if i32.const 0 i32.const 1312 - i32.const 532 - i32.const 3 + i32.const 492 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint64Array,u64> (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/FOREACH<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - i32.const 4 + (local $4 i32) + (local $5 i64) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.tee $2 - i32.const 4 - local.get $2 - i32.lt_s - select - local.set $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $2 - i32.add - local.tee $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $2 - local.get $1 + local.set $4 + loop $for-loop|0 local.get $2 + local.get $4 i32.lt_s - select + if + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i64_i32_i32_=>_none) + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end end - local.set $1 - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/__alloc - local.tee $2 + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store + i32.const 2704 + local.get $1 + call $~lib/array/Array#__get + f32.convert_i32_s + f32.ne + if + i32.const 0 + i32.const 1312 + i32.const 490 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 491 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $2 - local.get $0 - i32.load offset=4 - local.get $3 - i32.const 3 - i32.shl + global.get $std/typedarray/forEachSelf + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 492 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 i32.add - i32.store offset=4 - local.get $2 + global.set $std/typedarray/forEachCallCount + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) + local.get $0 + i32.const 2704 local.get $1 - local.get $3 + call $~lib/array/Array#__get + f64.convert_i32_s + f64.ne + if + i32.const 0 + i32.const 1312 + i32.const 490 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $1 - local.get $3 - i32.gt_s - select - local.get $3 - i32.sub - i32.const 3 - i32.shl - i32.store offset=8 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 491 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $2 + global.get $std/typedarray/forEachSelf + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 492 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount + ) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Int8Array,i8> (param $0 i32) (result 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.tee $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + local.get $4 + i32.add + local.tee $2 + i32.load8_s + local.set $5 + local.get $2 + local.get $0 + local.get $4 + i32.add + local.tee $2 + i32.load8_s + i32.store8 + local.get $2 + local.get $5 + i32.store8 + local.get $1 + i32.const 1 + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|0 + end + end + local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (local $0 i32) (local $1 i32) (local $2 i32) @@ -10122,11 +9492,11 @@ i32.const 2812 i32.load local.tee $1 - call $~lib/typedarray/Uint64Array#constructor + call $~lib/typedarray/Int8Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Uint64Array#constructor + call $~lib/typedarray/Int8Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -10139,15 +9509,21 @@ i32.const 2800 local.get $0 call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set local.get $3 local.get $0 i32.const 2800 local.get $0 call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 i32.add @@ -10156,7 +9532,7 @@ end end local.get $2 - call $~lib/typedarray/REVERSE<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/REVERSE<~lib/typedarray/Int8Array,i8> call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -10167,7 +9543,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Uint64Array#__get + call $~lib/typedarray/Int8Array#__get i32.const 2800 local.get $1 i32.const 1 @@ -10175,8 +9551,11 @@ local.get $0 i32.sub call $~lib/array/Array#__get - i64.extend_i32_s - i64.ne + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.ne if i32.const 0 i32.const 1312 @@ -10193,16 +9572,17 @@ end end local.get $3 + i32.const 4 i32.const 8 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint64Array,u64> + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> local.tee $0 local.get $0 - call $~lib/typedarray/REVERSE<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/REVERSE<~lib/typedarray/Int8Array,i8> local.tee $0 i32.const 0 - call $~lib/typedarray/Uint64Array#__get - i64.const 8 - i64.ne + call $~lib/typedarray/Int8Array#__get + i32.const 8 + i32.ne if i32.const 0 i32.const 1312 @@ -10213,9 +9593,9 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Uint64Array#__get - i64.const 7 - i64.ne + call $~lib/typedarray/Int8Array#__get + i32.const 7 + i32.ne if i32.const 0 i32.const 1312 @@ -10226,9 +9606,9 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Uint64Array#__get - i64.const 6 - i64.ne + call $~lib/typedarray/Int8Array#__get + i32.const 6 + i32.ne if i32.const 0 i32.const 1312 @@ -10239,9 +9619,9 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Uint64Array#__get - i64.const 5 - i64.ne + call $~lib/typedarray/Int8Array#__get + i32.const 5 + i32.ne if i32.const 0 i32.const 1312 @@ -10258,12 +9638,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/REVERSE<~lib/typedarray/Float32Array,f32> (param $0 i32) (result i32) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Uint8Array,u8> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 f32) + (local $5 i32) local.get $0 call $~lib/rt/pure/__retain local.tee $3 @@ -10271,8 +9651,6 @@ local.set $4 local.get $3 i32.load offset=8 - i32.const 2 - i32.shr_u i32.const 1 i32.sub local.set $0 @@ -10281,26 +9659,22 @@ local.get $0 i32.lt_u if - local.get $4 local.get $1 - i32.const 2 - i32.shl + local.get $4 i32.add local.tee $2 - f32.load + i32.load8_u local.set $5 local.get $2 - local.get $4 local.get $0 - i32.const 2 - i32.shl + local.get $4 i32.add local.tee $2 - f32.load - f32.store + i32.load8_u + i32.store8 local.get $2 local.get $5 - f32.store + i32.store8 local.get $1 i32.const 1 i32.add @@ -10314,14 +9688,12 @@ end local.get $3 ) - (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 local.get $0 i32.load offset=8 - i32.const 2 - i32.shr_u local.tee $2 i32.const 4 local.get $2 @@ -10337,9 +9709,11 @@ i32.add local.tee $1 i32.const 0 + i32.gt_s + local.set $2 local.get $1 i32.const 0 - i32.gt_s + local.get $2 select else local.get $1 @@ -10350,20 +9724,21 @@ select end local.set $1 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/__alloc + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $0 i32.load call $~lib/rt/pure/__retain i32.store local.get $2 + local.get $3 local.get $0 i32.load offset=4 - local.get $3 - i32.const 2 - i32.shl i32.add i32.store offset=4 local.get $2 @@ -10375,13 +9750,11 @@ select local.get $3 i32.sub - i32.const 2 - i32.shl i32.store offset=8 local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (local $0 i32) (local $1 i32) (local $2 i32) @@ -10391,11 +9764,11 @@ i32.const 2812 i32.load local.tee $1 - call $~lib/typedarray/Float32Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Float32Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -10408,15 +9781,17 @@ i32.const 2800 local.get $0 call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set local.get $3 local.get $0 i32.const 2800 local.get $0 call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 1 i32.add @@ -10425,7 +9800,7 @@ end end local.get $2 - call $~lib/typedarray/REVERSE<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/REVERSE<~lib/typedarray/Uint8Array,u8> call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -10436,7 +9811,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Float32Array#__get + call $~lib/typedarray/Uint8Array#__get i32.const 2800 local.get $1 i32.const 1 @@ -10444,8 +9819,9 @@ local.get $0 i32.sub call $~lib/array/Array#__get - f32.convert_i32_s - f32.ne + i32.const 255 + i32.and + i32.ne if i32.const 0 i32.const 1312 @@ -10463,15 +9839,15 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8Array,u8> local.tee $0 local.get $0 - call $~lib/typedarray/REVERSE<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/REVERSE<~lib/typedarray/Uint8Array,u8> local.tee $0 i32.const 0 - call $~lib/typedarray/Float32Array#__get - f32.const 8 - f32.ne + call $~lib/typedarray/Uint8Array#__get + i32.const 8 + i32.ne if i32.const 0 i32.const 1312 @@ -10482,9 +9858,9 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Float32Array#__get - f32.const 7 - f32.ne + call $~lib/typedarray/Uint8Array#__get + i32.const 7 + i32.ne if i32.const 0 i32.const 1312 @@ -10495,9 +9871,9 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Float32Array#__get - f32.const 6 - f32.ne + call $~lib/typedarray/Uint8Array#__get + i32.const 6 + i32.ne if i32.const 0 i32.const 1312 @@ -10508,9 +9884,9 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Float32Array#__get - f32.const 5 - f32.ne + call $~lib/typedarray/Uint8Array#__get + i32.const 5 + i32.ne if i32.const 0 i32.const 1312 @@ -10527,63 +9903,73 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/REVERSE<~lib/typedarray/Float64Array,f64> (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8ClampedArray,u8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 f64) + i32.const 4 local.get $0 - call $~lib/rt/pure/__retain - local.tee $3 - i32.load offset=4 - local.set $4 - local.get $3 i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|0 + local.tee $2 + i32.const 4 + local.get $2 + i32.lt_s + select + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) local.get $1 - local.get $0 - i32.lt_u - if - local.get $4 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.tee $2 - f64.load - local.set $5 - local.get $2 - local.get $4 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.tee $2 - f64.load - f64.store - local.get $2 - local.get $5 - f64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|0 - end + local.get $2 + i32.add + local.tee $1 + i32.const 0 + i32.gt_s + local.set $2 + local.get $1 + i32.const 0 + local.get $2 + select + else + local.get $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select end + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $3 + local.get $0 + i32.load offset=4 + i32.add + i32.store offset=4 + local.get $2 + local.get $1 + local.get $3 + local.get $1 local.get $3 + i32.gt_s + select + local.get $3 + i32.sub + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (local $0 i32) (local $1 i32) (local $2 i32) @@ -10593,11 +9979,11 @@ i32.const 2812 i32.load local.tee $1 - call $~lib/typedarray/Float64Array#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Float64Array#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -10610,15 +9996,17 @@ i32.const 2800 local.get $0 call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set local.get $3 local.get $0 i32.const 2800 local.get $0 call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 i32.const 1 i32.add @@ -10627,7 +10015,7 @@ end end local.get $2 - call $~lib/typedarray/REVERSE<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/REVERSE<~lib/typedarray/Uint8Array,u8> call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -10638,7 +10026,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 2800 local.get $1 i32.const 1 @@ -10646,8 +10034,9 @@ local.get $0 i32.sub call $~lib/array/Array#__get - f64.convert_i32_s - f64.ne + i32.const 255 + i32.and + i32.ne if i32.const 0 i32.const 1312 @@ -10664,17 +10053,16 @@ end end local.get $3 - i32.const 4 i32.const 8 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8ClampedArray,u8> local.tee $0 local.get $0 - call $~lib/typedarray/REVERSE<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/REVERSE<~lib/typedarray/Uint8Array,u8> local.tee $0 i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 8 - f64.ne + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 8 + i32.ne if i32.const 0 i32.const 1312 @@ -10685,9 +10073,9 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 7 - f64.ne + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 7 + i32.ne if i32.const 0 i32.const 1312 @@ -10698,9 +10086,9 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 6 - f64.ne + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 6 + i32.ne if i32.const 0 i32.const 1312 @@ -10711,9 +10099,9 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.const 5 - f64.ne + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 5 + i32.ne if i32.const 0 i32.const 1312 @@ -10730,1520 +10118,2062 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Int16Array,i16> (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 - i32.load offset=8 + call $~lib/rt/pure/__retain local.tee $3 - if (result i32) - local.get $2 - local.get $3 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - return - end - local.get $2 - i32.const 0 - i32.lt_s - if - local.get $2 - local.get $3 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.set $2 - end - local.get $0 i32.load offset=4 + local.set $4 + local.get $3 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 1 + i32.sub local.set $0 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_s + loop $for-loop|0 + local.get $1 + local.get $0 + i32.lt_u if - local.get $0 + local.get $4 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.tee $2 + i32.load16_s + local.set $5 local.get $2 + local.get $4 + local.get $0 + i32.const 1 + i32.shl i32.add - i32.load8_u - local.get $1 - i32.const 255 - i32.and - i32.eq - if - local.get $2 - return - end + local.tee $2 + i32.load16_s + i32.store16 local.get $2 + local.get $5 + i32.store16 + local.get $1 i32.const 1 i32.add - local.set $2 - br $while-continue|0 + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|0 end end - i32.const -1 + local.get $3 ) - (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) (local $3 i32) + i32.const 4 local.get $0 i32.load offset=8 - local.tee $3 - i32.eqz - if - i32.const -1 - return - end - local.get $2 - local.get $3 - i32.add - local.get $3 i32.const 1 - i32.sub - local.get $2 + i32.shr_u + local.tee $2 + i32.const 4 local.get $2 - local.get $3 - i32.ge_s + i32.lt_s select - local.get $2 + local.set $3 + local.get $1 i32.const 0 i32.lt_s - select - local.set $2 - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 + if (result i32) + local.get $1 local.get $2 + i32.add + local.tee $1 i32.const 0 - i32.ge_s - if - local.get $0 - local.get $2 - i32.add - i32.load8_u - local.get $1 - i32.const 255 - i32.and - i32.eq - if - local.get $2 - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - ) - (func $~lib/typedarray/Int8Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - local.get $0 - i32.load offset=8 - local.set $2 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select end + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $2 local.get $0 + i32.load offset=4 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.store offset=4 + local.get $2 + local.get $1 + local.get $3 local.get $1 + local.get $3 + i32.gt_s + select + local.get $3 + i32.sub + i32.const 1 + i32.shl + i32.store offset=8 local.get $2 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 2908 + (local $4 i32) + (local $5 i32) + i32.const 2812 i32.load - local.tee $0 + local.tee $1 + call $~lib/typedarray/Int16Array#constructor + local.tee $4 local.set $2 - local.get $0 - call $~lib/typedarray/Int8Array#constructor - local.tee $3 - local.set $0 + local.get $1 + call $~lib/typedarray/Int16Array#constructor + local.tee $5 + local.set $3 loop $for-loop|0 + local.get $0 local.get $1 - local.get $2 i32.lt_s if + local.get $2 + local.get $0 + i32.const 2800 local.get $0 - local.get $1 - i32.const 2896 - local.get $1 call $~lib/array/Array#__get - i32.const 24 + i32.const 16 i32.shl - i32.const 24 + i32.const 16 i32.shr_s - call $~lib/typedarray/Int8Array#__set - local.get $1 + call $~lib/typedarray/Int16Array#__set + local.get $3 + local.get $0 + i32.const 2800 + local.get $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.add - local.set $1 + local.set $0 br $for-loop|0 end end - local.get $0 - i32.const 0 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - if - i32.const 0 - i32.const 1312 - i32.const 557 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 11 + local.get $2 + call $~lib/typedarray/REVERSE<~lib/typedarray/Int16Array,i16> + call $~lib/rt/pure/__release i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 558 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.set $0 + loop $for-loop|1 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + call $~lib/typedarray/Int16Array#__get + i32.const 2800 + local.get $1 + i32.const 1 + i32.sub + local.get $0 + i32.sub + call $~lib/array/Array#__get + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 524 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|1 + end end + local.get $3 + i32.const 8 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int16Array,i16> + local.tee $0 local.get $0 - i32.const -1 + call $~lib/typedarray/REVERSE<~lib/typedarray/Int16Array,i16> + local.tee $0 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 + call $~lib/typedarray/Int16Array#__get + i32.const 8 i32.ne if i32.const 0 i32.const 1312 - i32.const 559 + i32.const 529 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 3 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 3 + i32.const 1 + call $~lib/typedarray/Int16Array#__get + i32.const 7 i32.ne if i32.const 0 i32.const 1312 - i32.const 560 + i32.const 530 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 3 i32.const 2 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 561 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 3 - i32.const 3 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 3 + call $~lib/typedarray/Int16Array#__get + i32.const 6 i32.ne if i32.const 0 i32.const 1312 - i32.const 562 + i32.const 531 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 i32.const 3 - i32.const 4 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 + call $~lib/typedarray/Int16Array#__get + i32.const 5 i32.ne if i32.const 0 i32.const 1312 - i32.const 563 + i32.const 532 i32.const 3 call $~lib/builtins/abort unreachable end + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $0 - i32.const 1 - i32.const 10 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 564 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Uint16Array,u16> (param $0 i32) (result 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.tee $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load offset=8 i32.const 1 - i32.const -100 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> + i32.shr_u i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 565 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.sub + local.set $0 + loop $for-loop|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $4 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.tee $2 + i32.load16_u + local.set $5 + local.get $2 + local.get $4 + local.get $0 + i32.const 1 + i32.shl + i32.add + local.tee $2 + i32.load16_u + i32.store16 + local.get $2 + local.get $5 + i32.store16 + local.get $1 + i32.const 1 + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|0 + end end - i32.const 1 - global.set $~argumentsLength + local.get $3 + ) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint16Array,u16> (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + i32.const 4 local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.tee $2 + i32.const 4 + local.get $2 + i32.lt_s + select + local.set $3 + local.get $1 i32.const 0 - call $~lib/typedarray/Int8Array#lastIndexOf@varargs - if + i32.lt_s + if (result i32) + local.get $1 + local.get $2 + i32.add + local.tee $1 i32.const 0 - i32.const 1312 - i32.const 567 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $~argumentsLength - local.get $0 - i32.const 11 - call $~lib/typedarray/Int8Array#lastIndexOf@varargs - i32.const -1 - i32.ne - if + local.get $1 i32.const 0 - i32.const 1312 - i32.const 568 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.gt_s + select + else + local.get $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select end - i32.const 1 - global.set $~argumentsLength + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 local.get $0 - i32.const -1 - call $~lib/typedarray/Int8Array#lastIndexOf@varargs - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 569 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $~argumentsLength - local.get $0 - i32.const 3 - call $~lib/typedarray/Int8Array#lastIndexOf@varargs - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 570 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 571 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 3 - i32.const 3 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 572 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 3 - i32.const 2 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 573 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.const 100 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 574 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $2 local.get $0 + i32.load offset=4 + local.get $3 i32.const 1 - i32.const -10 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> + i32.shl + i32.add + i32.store offset=4 + local.get $2 + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.gt_s + select + local.get $3 + i32.sub i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 575 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.shl + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 2812 + i32.load + local.tee $1 + call $~lib/typedarray/Uint16Array#constructor + local.tee $4 + local.set $2 + local.get $1 + call $~lib/typedarray/Uint16Array#constructor + local.tee $5 + local.set $3 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 2800 + local.get $0 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set + local.get $3 + local.get $0 + i32.const 2800 + local.get $0 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end end - local.get $0 - i32.const 1 - i32.const -11 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 576 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $2 + call $~lib/typedarray/REVERSE<~lib/typedarray/Uint16Array,u16> + call $~lib/rt/pure/__release + i32.const 0 + local.set $0 + loop $for-loop|1 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + call $~lib/typedarray/Uint16Array#__get + i32.const 2800 + local.get $1 + i32.const 1 + i32.sub + local.get $0 + i32.sub + call $~lib/array/Array#__get + i32.const 65535 + i32.and + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 524 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|1 + end end + local.get $3 + i32.const 8 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint16Array,u16> + local.tee $0 local.get $0 - i32.const 4 - i32.const 9 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> + call $~lib/typedarray/REVERSE<~lib/typedarray/Uint16Array,u16> local.tee $0 - i32.const 3 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 + call $~lib/typedarray/Uint16Array#__get + i32.const 8 i32.ne if i32.const 0 i32.const 1312 - i32.const 580 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 4 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - if - i32.const 0 - i32.const 1312 - i32.const 581 + i32.const 529 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 5 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> i32.const 1 + call $~lib/typedarray/Uint16Array#__get + i32.const 7 i32.ne if i32.const 0 i32.const 1312 - i32.const 582 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 9 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 583 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 10 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 584 + i32.const 530 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 11 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__get + i32.const 6 i32.ne if i32.const 0 i32.const 1312 - i32.const 585 + i32.const 531 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 + i32.const 3 + call $~lib/typedarray/Uint16Array#__get i32.const 5 - i32.const 1 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 1 i32.ne if i32.const 0 i32.const 1312 - i32.const 586 + i32.const 532 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 5 - i32.const 2 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 587 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $3 - call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> - (local $0 i32) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Int32Array,i32> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 2908 - i32.load - local.tee $0 - local.set $2 + (local $4 i32) + (local $5 i32) local.get $0 - call $~lib/typedarray/Uint8Array#constructor + call $~lib/rt/pure/__retain local.tee $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.sub local.set $0 loop $for-loop|0 local.get $1 - local.get $2 - i32.lt_s + local.get $0 + i32.lt_u if - local.get $0 - local.get $1 - i32.const 2896 + local.get $4 local.get $1 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set + i32.const 2 + i32.shl + i32.add + local.tee $2 + i32.load + local.set $5 + local.get $2 + local.get $4 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.tee $2 + i32.load + i32.store + local.get $2 + local.get $5 + i32.store local.get $1 i32.const 1 i32.add local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 br $for-loop|0 end end - local.get $0 - i32.const 0 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - if - i32.const 0 - i32.const 1312 - i32.const 557 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $3 + ) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 2812 + i32.load + local.tee $1 + call $~lib/typedarray/Int32Array#constructor + local.tee $4 + local.set $2 + local.get $1 + call $~lib/typedarray/Int32Array#constructor + local.tee $5 + local.set $3 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 2800 + local.get $0 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $3 + local.get $0 + i32.const 2800 + local.get $0 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end end - local.get $0 - i32.const 11 + local.get $2 + call $~lib/typedarray/REVERSE<~lib/typedarray/Int32Array,i32> + call $~lib/rt/pure/__release i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 558 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.set $0 + loop $for-loop|1 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + call $~lib/typedarray/Int32Array#__get + i32.const 2800 + local.get $1 + i32.const 1 + i32.sub + local.get $0 + i32.sub + call $~lib/array/Array#__get + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 524 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|1 + end end + local.get $3 + i32.const 4 + i32.const 8 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int32Array,i32> + local.tee $0 local.get $0 - i32.const -1 + call $~lib/typedarray/REVERSE<~lib/typedarray/Int32Array,i32> + local.tee $0 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 + call $~lib/typedarray/Int32Array#__get + i32.const 8 i32.ne if i32.const 0 i32.const 1312 - i32.const 559 + i32.const 529 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 3 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 3 + i32.const 1 + call $~lib/typedarray/Int32Array#__get + i32.const 7 i32.ne if i32.const 0 i32.const 1312 - i32.const 560 + i32.const 530 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 3 i32.const 2 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 3 + call $~lib/typedarray/Int32Array#__get + i32.const 6 i32.ne if i32.const 0 i32.const 1312 - i32.const 561 + i32.const 531 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 i32.const 3 - i32.const 3 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 3 + call $~lib/typedarray/Int32Array#__get + i32.const 5 i32.ne if i32.const 0 i32.const 1312 - i32.const 562 + i32.const 532 i32.const 3 call $~lib/builtins/abort unreachable end + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $0 - i32.const 3 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint32Array,u32> (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) i32.const 4 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 563 - i32.const 3 - call $~lib/builtins/abort - unreachable - end local.get $0 - i32.const 1 - i32.const 10 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - if + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $2 + i32.const 4 + local.get $2 + i32.lt_s + select + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $2 + i32.add + local.tee $1 i32.const 0 - i32.const 1312 - i32.const 564 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.const -100 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 1 - i32.ne - if + local.get $1 i32.const 0 - i32.const 1312 - i32.const 565 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $~argumentsLength - local.get $0 - i32.const 0 - call $~lib/typedarray/Int8Array#lastIndexOf@varargs - if - i32.const 0 - i32.const 1312 - i32.const 567 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.gt_s + select + else + local.get $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select end - i32.const 1 - global.set $~argumentsLength + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 local.get $0 - i32.const 11 - call $~lib/typedarray/Int8Array#lastIndexOf@varargs - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 568 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $~argumentsLength + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $2 local.get $0 - i32.const -1 - call $~lib/typedarray/Int8Array#lastIndexOf@varargs - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 569 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.store offset=4 + local.get $2 + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.gt_s + select + local.get $3 + i32.sub + i32.const 2 + i32.shl + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 2812 + i32.load + local.tee $1 + call $~lib/typedarray/Uint32Array#constructor + local.tee $4 + local.set $2 + local.get $1 + call $~lib/typedarray/Uint32Array#constructor + local.tee $5 + local.set $3 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 2800 + local.get $0 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $3 + local.get $0 + i32.const 2800 + local.get $0 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end end - i32.const 1 - global.set $~argumentsLength - local.get $0 - i32.const 3 - call $~lib/typedarray/Int8Array#lastIndexOf@varargs - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 570 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $2 + call $~lib/typedarray/REVERSE<~lib/typedarray/Int32Array,i32> + call $~lib/rt/pure/__release + i32.const 0 + local.set $0 + loop $for-loop|1 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + call $~lib/typedarray/Uint32Array#__get + i32.const 2800 + local.get $1 + i32.const 1 + i32.sub + local.get $0 + i32.sub + call $~lib/array/Array#__get + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 524 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|1 + end end + local.get $3 + i32.const 8 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint32Array,u32> + local.tee $0 local.get $0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 3 + call $~lib/typedarray/REVERSE<~lib/typedarray/Int32Array,i32> + local.tee $0 + i32.const 0 + call $~lib/typedarray/Uint32Array#__get + i32.const 8 i32.ne if i32.const 0 i32.const 1312 - i32.const 571 + i32.const 529 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 3 - i32.const 3 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 3 + i32.const 1 + call $~lib/typedarray/Uint32Array#__get + i32.const 7 i32.ne if i32.const 0 i32.const 1312 - i32.const 572 + i32.const 530 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 3 i32.const 2 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 573 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.const 100 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 1 + call $~lib/typedarray/Uint32Array#__get + i32.const 6 i32.ne if i32.const 0 i32.const 1312 - i32.const 574 + i32.const 531 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 1 - i32.const -10 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 1 + i32.const 3 + call $~lib/typedarray/Uint32Array#__get + i32.const 5 i32.ne if i32.const 0 i32.const 1312 - i32.const 575 + i32.const 532 i32.const 3 call $~lib/builtins/abort unreachable end + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $0 - i32.const 1 - i32.const -11 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 576 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Int64Array,i64> (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i64) local.get $0 - i32.const 9 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8Array,u8> - local.tee $0 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load offset=8 i32.const 3 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 580 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.shr_u + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.tee $2 + i64.load + local.set $5 + local.get $2 + local.get $4 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.tee $2 + i64.load + i64.store + local.get $2 + local.get $5 + i64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|0 + end end + local.get $3 + ) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + i32.const 4 local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $2 i32.const 4 + local.get $2 + i32.lt_s + select + local.set $3 + local.get $1 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - if + i32.lt_s + if (result i32) + local.get $1 + local.get $2 + i32.add + local.tee $1 i32.const 0 - i32.const 1312 - i32.const 581 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select end + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 local.get $0 - i32.const 5 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $0 + i32.load offset=4 + local.get $3 + i32.const 3 + i32.shl + i32.add + i32.store offset=4 + local.get $2 + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.gt_s + select + local.get $3 + i32.sub + i32.const 3 + i32.shl + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 2812 + i32.load + local.tee $1 + call $~lib/typedarray/Int64Array#constructor + local.tee $4 + local.set $2 + local.get $1 + call $~lib/typedarray/Int64Array#constructor + local.tee $5 + local.set $3 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 2800 + local.get $0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $3 + local.get $0 + i32.const 2800 + local.get $0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $2 + call $~lib/typedarray/REVERSE<~lib/typedarray/Int64Array,i64> + call $~lib/rt/pure/__release i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 582 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.set $0 + loop $for-loop|1 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + call $~lib/typedarray/Int64Array#__get + i32.const 2800 + local.get $1 + i32.const 1 + i32.sub + local.get $0 + i32.sub + call $~lib/array/Array#__get + i64.extend_i32_s + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 524 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|1 + end end + local.get $3 + i32.const 8 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int64Array,i64> + local.tee $0 local.get $0 - i32.const 9 + call $~lib/typedarray/REVERSE<~lib/typedarray/Int64Array,i64> + local.tee $0 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 8 + i64.ne if i32.const 0 i32.const 1312 - i32.const 583 + i32.const 529 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 10 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne + i32.const 1 + call $~lib/typedarray/Int64Array#__get + i64.const 7 + i64.ne if i32.const 0 i32.const 1312 - i32.const 584 + i32.const 530 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 11 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne + i32.const 2 + call $~lib/typedarray/Int64Array#__get + i64.const 6 + i64.ne if i32.const 0 i32.const 1312 - i32.const 585 + i32.const 531 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 5 - i32.const 1 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 1 - i32.ne + i32.const 3 + call $~lib/typedarray/Int64Array#__get + i64.const 5 + i64.ne if i32.const 0 i32.const 1312 - i32.const 586 + i32.const 532 i32.const 3 call $~lib/builtins/abort unreachable end + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $0 - i32.const 5 - i32.const 2 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - if + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint64Array,u64> (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + i32.const 4 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $2 + i32.const 4 + local.get $2 + i32.lt_s + select + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $2 + i32.add + local.tee $1 i32.const 0 - i32.const 1312 - i32.const 587 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select end - local.get $3 - call $~lib/rt/pure/__release + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 local.get $0 - call $~lib/rt/pure/__release + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $0 + i32.load offset=4 + local.get $3 + i32.const 3 + i32.shl + i32.add + i32.store offset=4 + local.get $2 + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.gt_s + select + local.get $3 + i32.sub + i32.const 3 + i32.shl + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 2908 + (local $4 i32) + (local $5 i32) + i32.const 2812 i32.load - local.tee $0 + local.tee $1 + call $~lib/typedarray/Uint64Array#constructor + local.tee $4 local.set $2 - local.get $0 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $3 - local.set $0 + local.get $1 + call $~lib/typedarray/Uint64Array#constructor + local.tee $5 + local.set $3 loop $for-loop|0 + local.get $0 local.get $1 - local.get $2 i32.lt_s if + local.get $2 + local.get $0 + i32.const 2800 local.get $0 - local.get $1 - i32.const 2896 - local.get $1 call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $3 + local.get $0 + i32.const 2800 + local.get $0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end - local.get $0 - i32.const 0 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - if - i32.const 0 - i32.const 1312 - i32.const 557 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 11 + local.get $2 + call $~lib/typedarray/REVERSE<~lib/typedarray/Int64Array,i64> + call $~lib/rt/pure/__release i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 558 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.set $0 + loop $for-loop|1 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + call $~lib/typedarray/Uint64Array#__get + i32.const 2800 + local.get $1 + i32.const 1 + i32.sub + local.get $0 + i32.sub + call $~lib/array/Array#__get + i64.extend_i32_s + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 524 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|1 + end end + local.get $3 + i32.const 8 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint64Array,u64> + local.tee $0 local.get $0 - i32.const -1 + call $~lib/typedarray/REVERSE<~lib/typedarray/Int64Array,i64> + local.tee $0 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 8 + i64.ne if i32.const 0 i32.const 1312 - i32.const 559 + i32.const 529 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 3 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 3 - i32.ne + i32.const 1 + call $~lib/typedarray/Uint64Array#__get + i64.const 7 + i64.ne if i32.const 0 i32.const 1312 - i32.const 560 + i32.const 530 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 3 i32.const 2 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 3 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 6 + i64.ne if i32.const 0 i32.const 1312 - i32.const 561 + i32.const 531 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 i32.const 3 - i32.const 3 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 3 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 5 + i64.ne if i32.const 0 i32.const 1312 - i32.const 562 + i32.const 532 i32.const 3 call $~lib/builtins/abort unreachable end + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 563 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Float32Array,f32> (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f32) local.get $0 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 1 - i32.const 10 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 564 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.sub + local.set $0 + loop $for-loop|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.tee $2 + f32.load + local.set $5 + local.get $2 + local.get $4 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.tee $2 + f32.load + f32.store + local.get $2 + local.get $5 + f32.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|0 + end end + local.get $3 + ) + (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + i32.const 4 local.get $0 - i32.const 1 - i32.const -100 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 1 - i32.ne - if + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $2 + i32.const 4 + local.get $2 + i32.lt_s + select + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $2 + i32.add + local.tee $1 i32.const 0 - i32.const 1312 - i32.const 565 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select end - i32.const 1 - global.set $~argumentsLength + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $0 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.store offset=4 + local.get $2 + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.gt_s + select + local.get $3 + i32.sub + i32.const 2 + i32.shl + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 2812 + i32.load + local.tee $1 + call $~lib/typedarray/Float32Array#constructor + local.tee $4 + local.set $2 + local.get $1 + call $~lib/typedarray/Float32Array#constructor + local.tee $5 + local.set $3 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 2800 + local.get $0 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $3 + local.get $0 + i32.const 2800 + local.get $0 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $2 + call $~lib/typedarray/REVERSE<~lib/typedarray/Float32Array,f32> + call $~lib/rt/pure/__release + i32.const 0 + local.set $0 + loop $for-loop|1 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + call $~lib/typedarray/Float32Array#__get + i32.const 2800 + local.get $1 + i32.const 1 + i32.sub + local.get $0 + i32.sub + call $~lib/array/Array#__get + f32.convert_i32_s + f32.ne + if + i32.const 0 + i32.const 1312 + i32.const 524 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|1 + end + end + local.get $3 + i32.const 8 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Float32Array,f32> + local.tee $0 local.get $0 + call $~lib/typedarray/REVERSE<~lib/typedarray/Float32Array,f32> + local.tee $0 i32.const 0 - call $~lib/typedarray/Int8Array#lastIndexOf@varargs + call $~lib/typedarray/Float32Array#__get + f32.const 8 + f32.ne if i32.const 0 i32.const 1312 - i32.const 567 + i32.const 529 i32.const 3 call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~argumentsLength local.get $0 - i32.const 11 - call $~lib/typedarray/Int8Array#lastIndexOf@varargs - i32.const -1 - i32.ne + i32.const 1 + call $~lib/typedarray/Float32Array#__get + f32.const 7 + f32.ne if i32.const 0 i32.const 1312 - i32.const 568 + i32.const 530 i32.const 3 call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~argumentsLength local.get $0 - i32.const -1 - call $~lib/typedarray/Int8Array#lastIndexOf@varargs - i32.const -1 - i32.ne + i32.const 2 + call $~lib/typedarray/Float32Array#__get + f32.const 6 + f32.ne if i32.const 0 i32.const 1312 - i32.const 569 + i32.const 531 i32.const 3 call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~argumentsLength local.get $0 i32.const 3 - call $~lib/typedarray/Int8Array#lastIndexOf@varargs - i32.const 3 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 5 + f32.ne if i32.const 0 i32.const 1312 - i32.const 570 + i32.const 532 i32.const 3 call $~lib/builtins/abort unreachable end + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 571 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 3 - i32.const 3 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 572 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/REVERSE<~lib/typedarray/Float64Array,f64> (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f64) local.get $0 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load offset=8 i32.const 3 - i32.const 2 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 573 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.const 100 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> + i32.shr_u i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 574 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.sub + local.set $0 + loop $for-loop|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.tee $2 + f64.load + local.set $5 + local.get $2 + local.get $4 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.tee $2 + f64.load + f64.store + local.get $2 + local.get $5 + f64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|0 + end end - local.get $0 - i32.const 1 - i32.const -10 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 575 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $3 + ) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 2812 + i32.load + local.tee $1 + call $~lib/typedarray/Float64Array#constructor + local.tee $4 + local.set $2 + local.get $1 + call $~lib/typedarray/Float64Array#constructor + local.tee $5 + local.set $3 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 2800 + local.get $0 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + local.get $3 + local.get $0 + i32.const 2800 + local.get $0 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end end - local.get $0 - i32.const 1 - i32.const -11 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 576 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $2 + call $~lib/typedarray/REVERSE<~lib/typedarray/Float64Array,f64> + call $~lib/rt/pure/__release + i32.const 0 + local.set $0 + loop $for-loop|1 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + call $~lib/typedarray/Float64Array#__get + i32.const 2800 + local.get $1 + i32.const 1 + i32.sub + local.get $0 + i32.sub + call $~lib/array/Array#__get + f64.convert_i32_s + f64.ne + if + i32.const 0 + i32.const 1312 + i32.const 524 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|1 + end end + local.get $3 + i32.const 4 + i32.const 8 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Float64Array,f64> + local.tee $0 local.get $0 - i32.const 9 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8ClampedArray,u8> + call $~lib/typedarray/REVERSE<~lib/typedarray/Float64Array,f64> local.tee $0 - i32.const 3 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne + call $~lib/typedarray/Float64Array#__get + f64.const 8 + f64.ne if i32.const 0 i32.const 1312 - i32.const 580 + i32.const 529 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 4 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 7 + f64.ne if i32.const 0 i32.const 1312 - i32.const 581 + i32.const 530 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 5 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 1 - i32.ne + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 6 + f64.ne if i32.const 0 i32.const 1312 - i32.const 582 + i32.const 531 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 9 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.const 5 + f64.ne if i32.const 0 i32.const 1312 - i32.const 583 + i32.const 532 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 10 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 584 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 11 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 585 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 5 - i32.const 1 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 586 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 5 - i32.const 2 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 587 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $3 - call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.tee $3 - if (result i32) - local.get $2 - local.get $3 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - return - end - local.get $2 - i32.const 0 - i32.lt_s - if - local.get $2 - local.get $3 - i32.add - local.tee $2 - i32.const 0 + (local $4 i32) + block $__inlined_func$~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> + local.get $0 + i32.load offset=8 + local.tee $3 + if (result i32) + local.get $2 + local.get $3 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + local.set $2 + br $__inlined_func$~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> + end local.get $2 i32.const 0 - i32.gt_s - select - local.set $2 - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - local.get $3 i32.lt_s if - local.get $0 local.get $2 - i32.const 1 - i32.shl + local.get $3 i32.add - i32.load16_u - local.get $1 - i32.const 65535 - i32.and - i32.eq + local.tee $2 + i32.const 0 + i32.gt_s + local.set $4 + local.get $2 + i32.const 0 + local.get $4 + select + local.set $2 + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_s if + local.get $0 local.get $2 - return + i32.add + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq + br_if $__inlined_func$~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 end - end - i32.const -1 - ) - (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.tee $3 - i32.eqz - if i32.const -1 - return + local.set $2 end local.get $2 - local.get $3 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 - i32.const 0 - i32.lt_s - select - local.set $2 - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 + ) + (func $~lib/typedarray/Int8Array#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + block $__inlined_func$~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> + local.get $0 + local.tee $3 + i32.load offset=8 + local.tee $0 + i32.eqz + if + i32.const -1 + local.set $0 + br $__inlined_func$~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> + end + local.get $0 local.get $2 - i32.const 0 + i32.add + local.get $0 + i32.const 1 + i32.sub + local.get $2 + local.get $2 + local.get $0 i32.ge_s - if + select + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $0 + local.get $3 + i32.load offset=4 + local.set $2 + loop $while-continue|0 local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.get $1 - i32.const 65535 - i32.and - i32.eq + i32.const 0 + i32.ge_s if + local.get $0 local.get $2 - return + i32.add + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq + br_if $__inlined_func$~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8> + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $while-continue|0 end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 end + i32.const -1 + local.set $0 end - i32.const -1 + local.get $0 ) - (func $~lib/typedarray/Int16Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -12257,26 +12187,22 @@ end local.get $0 i32.load offset=8 - i32.const 1 - i32.shr_u local.set $2 end local.get $0 local.get $1 local.get $2 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 2908 i32.load - local.tee $0 - local.set $2 - local.get $0 - call $~lib/typedarray/Int16Array#constructor + local.tee $2 + call $~lib/typedarray/Int8Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -12289,11 +12215,11 @@ i32.const 2896 local.get $1 call $~lib/array/Array#__get - i32.const 16 + i32.const 24 i32.shl - i32.const 16 + i32.const 24 i32.shr_s - call $~lib/typedarray/Int16Array#__set + call $~lib/typedarray/Int8Array#__set local.get $1 i32.const 1 i32.add @@ -12304,7 +12230,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf if i32.const 0 i32.const 1312 @@ -12316,7 +12242,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -12330,7 +12256,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -12344,7 +12270,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const 3 i32.ne if @@ -12358,7 +12284,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const 3 i32.ne if @@ -12372,7 +12298,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const 3 i32.ne if @@ -12386,7 +12312,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -12400,7 +12326,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -12414,7 +12340,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const 1 i32.ne if @@ -12429,7 +12355,7 @@ global.set $~argumentsLength local.get $0 i32.const 0 - call $~lib/typedarray/Int16Array#lastIndexOf@varargs + call $~lib/typedarray/Int8Array#lastIndexOf@varargs if i32.const 0 i32.const 1312 @@ -12442,7 +12368,7 @@ global.set $~argumentsLength local.get $0 i32.const 11 - call $~lib/typedarray/Int16Array#lastIndexOf@varargs + call $~lib/typedarray/Int8Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -12457,7 +12383,7 @@ global.set $~argumentsLength local.get $0 i32.const -1 - call $~lib/typedarray/Int16Array#lastIndexOf@varargs + call $~lib/typedarray/Int8Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -12472,7 +12398,7 @@ global.set $~argumentsLength local.get $0 i32.const 3 - call $~lib/typedarray/Int16Array#lastIndexOf@varargs + call $~lib/typedarray/Int8Array#lastIndexOf@varargs i32.const 3 i32.ne if @@ -12486,7 +12412,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 3 i32.ne if @@ -12500,7 +12426,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 3 i32.ne if @@ -12514,7 +12440,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#lastIndexOf i32.const -1 i32.ne if @@ -12528,7 +12454,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 1 i32.ne if @@ -12542,7 +12468,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 1 i32.ne if @@ -12556,7 +12482,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#lastIndexOf i32.const -1 i32.ne if @@ -12568,12 +12494,13 @@ unreachable end local.get $0 + i32.const 4 i32.const 9 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> local.tee $0 i32.const 3 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -12587,7 +12514,7 @@ local.get $0 i32.const 4 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf if i32.const 0 i32.const 1312 @@ -12599,7 +12526,7 @@ local.get $0 i32.const 5 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const 1 i32.ne if @@ -12613,7 +12540,7 @@ local.get $0 i32.const 9 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -12627,7 +12554,7 @@ local.get $0 i32.const 10 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -12641,7 +12568,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -12655,7 +12582,7 @@ local.get $0 i32.const 5 i32.const 1 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const 1 i32.ne if @@ -12669,7 +12596,7 @@ local.get $0 i32.const 5 i32.const 2 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -12685,17 +12612,15 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 2908 i32.load - local.tee $0 - local.set $2 - local.get $0 - call $~lib/typedarray/Uint16Array#constructor + local.tee $2 + call $~lib/typedarray/Uint8Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -12708,9 +12633,9 @@ i32.const 2896 local.get $1 call $~lib/array/Array#__get - i32.const 65535 + i32.const 255 i32.and - call $~lib/typedarray/Uint16Array#__set + call $~lib/typedarray/Uint8Array#__set local.get $1 i32.const 1 i32.add @@ -12721,7 +12646,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf if i32.const 0 i32.const 1312 @@ -12733,7 +12658,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -12747,7 +12672,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -12761,7 +12686,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const 3 i32.ne if @@ -12775,7 +12700,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const 3 i32.ne if @@ -12789,7 +12714,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const 3 i32.ne if @@ -12803,7 +12728,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -12817,7 +12742,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -12831,7 +12756,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const 1 i32.ne if @@ -12846,7 +12771,7 @@ global.set $~argumentsLength local.get $0 i32.const 0 - call $~lib/typedarray/Int16Array#lastIndexOf@varargs + call $~lib/typedarray/Int8Array#lastIndexOf@varargs if i32.const 0 i32.const 1312 @@ -12859,7 +12784,7 @@ global.set $~argumentsLength local.get $0 i32.const 11 - call $~lib/typedarray/Int16Array#lastIndexOf@varargs + call $~lib/typedarray/Int8Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -12874,7 +12799,7 @@ global.set $~argumentsLength local.get $0 i32.const -1 - call $~lib/typedarray/Int16Array#lastIndexOf@varargs + call $~lib/typedarray/Int8Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -12889,7 +12814,7 @@ global.set $~argumentsLength local.get $0 i32.const 3 - call $~lib/typedarray/Int16Array#lastIndexOf@varargs + call $~lib/typedarray/Int8Array#lastIndexOf@varargs i32.const 3 i32.ne if @@ -12903,7 +12828,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 3 i32.ne if @@ -12917,7 +12842,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 3 i32.ne if @@ -12931,7 +12856,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#lastIndexOf i32.const -1 i32.ne if @@ -12945,7 +12870,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 1 i32.ne if @@ -12959,7 +12884,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 1 i32.ne if @@ -12973,7 +12898,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#lastIndexOf i32.const -1 i32.ne if @@ -12986,11 +12911,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint16Array,u16> + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8Array,u8> local.tee $0 i32.const 3 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -13004,7 +12929,7 @@ local.get $0 i32.const 4 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf if i32.const 0 i32.const 1312 @@ -13016,7 +12941,7 @@ local.get $0 i32.const 5 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const 1 i32.ne if @@ -13030,7 +12955,7 @@ local.get $0 i32.const 9 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -13044,7 +12969,7 @@ local.get $0 i32.const 10 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -13058,7 +12983,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -13072,7 +12997,7 @@ local.get $0 i32.const 5 i32.const 1 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const 1 i32.ne if @@ -13086,7 +13011,7 @@ local.get $0 i32.const 5 i32.const 2 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -13102,159 +13027,15 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $3 - if (result i32) - local.get $2 - local.get $3 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - return - end - local.get $2 - i32.const 0 - i32.lt_s - if - local.get $2 - local.get $3 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.set $2 - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - i32.eq - if - local.get $2 - return - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - ) - (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $3 - i32.eqz - if - i32.const -1 - return - end - local.get $2 - local.get $3 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 - i32.const 0 - i32.lt_s - select - local.set $2 - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - i32.const 0 - i32.ge_s - if - local.get $1 - local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - i32.eq - if - local.get $2 - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - ) - (func $~lib/typedarray/Int32Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> - ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 2908 i32.load - local.tee $0 - local.set $2 - local.get $0 - call $~lib/typedarray/Int32Array#constructor + local.tee $2 + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -13267,7 +13048,9 @@ i32.const 2896 local.get $1 call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set local.get $1 i32.const 1 i32.add @@ -13278,7 +13061,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#indexOf if i32.const 0 i32.const 1312 @@ -13290,7 +13073,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -13304,7 +13087,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -13318,7 +13101,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#indexOf i32.const 3 i32.ne if @@ -13332,7 +13115,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#indexOf i32.const 3 i32.ne if @@ -13346,7 +13129,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#indexOf i32.const 3 i32.ne if @@ -13360,7 +13143,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -13374,7 +13157,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -13388,7 +13171,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#indexOf i32.const 1 i32.ne if @@ -13403,7 +13186,7 @@ global.set $~argumentsLength local.get $0 i32.const 0 - call $~lib/typedarray/Int32Array#lastIndexOf@varargs + call $~lib/typedarray/Int8Array#lastIndexOf@varargs if i32.const 0 i32.const 1312 @@ -13416,7 +13199,7 @@ global.set $~argumentsLength local.get $0 i32.const 11 - call $~lib/typedarray/Int32Array#lastIndexOf@varargs + call $~lib/typedarray/Int8Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -13431,7 +13214,7 @@ global.set $~argumentsLength local.get $0 i32.const -1 - call $~lib/typedarray/Int32Array#lastIndexOf@varargs + call $~lib/typedarray/Int8Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -13446,7 +13229,7 @@ global.set $~argumentsLength local.get $0 i32.const 3 - call $~lib/typedarray/Int32Array#lastIndexOf@varargs + call $~lib/typedarray/Int8Array#lastIndexOf@varargs i32.const 3 i32.ne if @@ -13460,7 +13243,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 3 i32.ne if @@ -13474,7 +13257,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 3 i32.ne if @@ -13488,7 +13271,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#lastIndexOf i32.const -1 i32.ne if @@ -13502,7 +13285,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 1 i32.ne if @@ -13516,7 +13299,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 1 i32.ne if @@ -13530,7 +13313,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#lastIndexOf i32.const -1 i32.ne if @@ -13542,13 +13325,12 @@ unreachable end local.get $0 - i32.const 4 i32.const 9 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8ClampedArray,u8> local.tee $0 i32.const 3 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -13562,7 +13344,7 @@ local.get $0 i32.const 4 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#indexOf if i32.const 0 i32.const 1312 @@ -13574,7 +13356,7 @@ local.get $0 i32.const 5 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#indexOf i32.const 1 i32.ne if @@ -13588,7 +13370,7 @@ local.get $0 i32.const 9 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -13602,7 +13384,7 @@ local.get $0 i32.const 10 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -13616,7 +13398,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -13630,7 +13412,7 @@ local.get $0 i32.const 5 i32.const 1 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#indexOf i32.const 1 i32.ne if @@ -13644,7 +13426,7 @@ local.get $0 i32.const 5 i32.const 2 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -13660,17 +13442,161 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> + (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.tee $3 + if (result i32) + local.get $2 + local.get $3 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + return + end + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.set $2 + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $1 + i32.const 65535 + i32.and + i32.eq + if + local.get $2 + return + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + ) + (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.tee $3 + i32.eqz + if + i32.const -1 + return + end + local.get $2 + local.get $3 + i32.add + local.get $3 + i32.const 1 + i32.sub + local.get $2 + local.get $2 + local.get $3 + i32.ge_s + select + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $2 + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + i32.const 0 + i32.ge_s + if + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $1 + i32.const 65535 + i32.and + i32.eq + if + local.get $2 + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + ) + (func $~lib/typedarray/Int16Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> + ) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 2908 i32.load - local.tee $0 - local.set $2 - local.get $0 - call $~lib/typedarray/Uint32Array#constructor + local.tee $2 + call $~lib/typedarray/Int16Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -13683,7 +13609,11 @@ i32.const 2896 local.get $1 call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/typedarray/Int16Array#__set local.get $1 i32.const 1 i32.add @@ -13694,7 +13624,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> if i32.const 0 i32.const 1312 @@ -13706,7 +13636,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -13720,7 +13650,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -13734,7 +13664,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 3 i32.ne if @@ -13748,7 +13678,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 3 i32.ne if @@ -13762,7 +13692,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 3 i32.ne if @@ -13776,7 +13706,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -13790,7 +13720,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -13804,7 +13734,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 1 i32.ne if @@ -13819,7 +13749,7 @@ global.set $~argumentsLength local.get $0 i32.const 0 - call $~lib/typedarray/Int32Array#lastIndexOf@varargs + call $~lib/typedarray/Int16Array#lastIndexOf@varargs if i32.const 0 i32.const 1312 @@ -13832,7 +13762,7 @@ global.set $~argumentsLength local.get $0 i32.const 11 - call $~lib/typedarray/Int32Array#lastIndexOf@varargs + call $~lib/typedarray/Int16Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -13847,7 +13777,7 @@ global.set $~argumentsLength local.get $0 i32.const -1 - call $~lib/typedarray/Int32Array#lastIndexOf@varargs + call $~lib/typedarray/Int16Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -13862,7 +13792,7 @@ global.set $~argumentsLength local.get $0 i32.const 3 - call $~lib/typedarray/Int32Array#lastIndexOf@varargs + call $~lib/typedarray/Int16Array#lastIndexOf@varargs i32.const 3 i32.ne if @@ -13876,7 +13806,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 3 i32.ne if @@ -13890,7 +13820,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 3 i32.ne if @@ -13904,7 +13834,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -13918,7 +13848,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 1 i32.ne if @@ -13932,7 +13862,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 1 i32.ne if @@ -13946,7 +13876,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -13959,11 +13889,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint32Array,u32> + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int16Array,i16> local.tee $0 i32.const 3 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -13977,7 +13907,7 @@ local.get $0 i32.const 4 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> if i32.const 0 i32.const 1312 @@ -13989,7 +13919,7 @@ local.get $0 i32.const 5 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 1 i32.ne if @@ -14003,7 +13933,7 @@ local.get $0 i32.const 9 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -14017,7 +13947,7 @@ local.get $0 i32.const 10 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -14031,7 +13961,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -14045,7 +13975,7 @@ local.get $0 i32.const 5 i32.const 1 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 1 i32.ne if @@ -14059,7 +13989,7 @@ local.get $0 i32.const 5 i32.const 2 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -14075,163 +14005,19 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> + (local $0 i32) + (local $1 i32) + (local $2 i32) (local $3 i32) - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u + i32.const 2908 + i32.load + local.tee $2 + call $~lib/typedarray/Uint16Array#constructor local.tee $3 - if (result i32) - local.get $2 - local.get $3 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - return - end - local.get $2 - i32.const 0 - i32.lt_s - if - local.get $2 - local.get $3 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.set $2 - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - i64.eq - if - local.get $2 - return - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - ) - (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - i32.eqz - if - i32.const -1 - return - end - local.get $2 - local.get $3 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 - i32.const 0 - i32.lt_s - select - local.set $2 - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - i32.const 0 - i32.ge_s - if - local.get $1 - local.get $0 - local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - i64.eq - if - local.get $2 - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - ) - (func $~lib/typedarray/Int64Array#lastIndexOf@varargs (param $0 i32) (param $1 i64) (result i32) - (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> - ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 2908 - i32.load - local.tee $0 - local.set $2 - local.get $0 - call $~lib/typedarray/Int64Array#constructor - local.tee $3 - local.set $0 - loop $for-loop|0 - local.get $1 + local.set $0 + loop $for-loop|0 + local.get $1 local.get $2 i32.lt_s if @@ -14240,8 +14026,9 @@ i32.const 2896 local.get $1 call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set local.get $1 i32.const 1 i32.add @@ -14250,9 +14037,9 @@ end end local.get $0 - i64.const 0 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> if i32.const 0 i32.const 1312 @@ -14262,9 +14049,9 @@ unreachable end local.get $0 - i64.const 11 + i32.const 11 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -14276,9 +14063,9 @@ unreachable end local.get $0 - i64.const -1 + i32.const -1 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -14290,9 +14077,9 @@ unreachable end local.get $0 - i64.const 3 + i32.const 3 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 3 i32.ne if @@ -14304,9 +14091,9 @@ unreachable end local.get $0 - i64.const 3 + i32.const 3 i32.const 2 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 3 i32.ne if @@ -14318,9 +14105,9 @@ unreachable end local.get $0 - i64.const 3 i32.const 3 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const 3 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 3 i32.ne if @@ -14332,9 +14119,9 @@ unreachable end local.get $0 - i64.const 3 + i32.const 3 i32.const 4 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -14346,9 +14133,9 @@ unreachable end local.get $0 - i64.const 1 + i32.const 1 i32.const 10 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -14360,9 +14147,9 @@ unreachable end local.get $0 - i64.const 1 + i32.const 1 i32.const -100 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 1 i32.ne if @@ -14376,8 +14163,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const 0 - call $~lib/typedarray/Int64Array#lastIndexOf@varargs + i32.const 0 + call $~lib/typedarray/Int16Array#lastIndexOf@varargs if i32.const 0 i32.const 1312 @@ -14389,8 +14176,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const 11 - call $~lib/typedarray/Int64Array#lastIndexOf@varargs + i32.const 11 + call $~lib/typedarray/Int16Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -14404,8 +14191,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const -1 - call $~lib/typedarray/Int64Array#lastIndexOf@varargs + i32.const -1 + call $~lib/typedarray/Int16Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -14419,8 +14206,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const 3 - call $~lib/typedarray/Int64Array#lastIndexOf@varargs + i32.const 3 + call $~lib/typedarray/Int16Array#lastIndexOf@varargs i32.const 3 i32.ne if @@ -14432,9 +14219,9 @@ unreachable end local.get $0 - i64.const 3 + i32.const 3 i32.const 4 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 3 i32.ne if @@ -14446,9 +14233,9 @@ unreachable end local.get $0 - i64.const 3 i32.const 3 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const 3 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 3 i32.ne if @@ -14460,9 +14247,9 @@ unreachable end local.get $0 - i64.const 3 + i32.const 3 i32.const 2 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -14474,9 +14261,9 @@ unreachable end local.get $0 - i64.const 1 + i32.const 1 i32.const 100 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 1 i32.ne if @@ -14488,9 +14275,9 @@ unreachable end local.get $0 - i64.const 1 + i32.const 1 i32.const -10 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 1 i32.ne if @@ -14502,9 +14289,9 @@ unreachable end local.get $0 - i64.const 1 + i32.const 1 i32.const -11 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -14517,11 +14304,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint16Array,u16> local.tee $0 - i64.const 3 + i32.const 3 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -14533,9 +14320,9 @@ unreachable end local.get $0 - i64.const 4 + i32.const 4 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> if i32.const 0 i32.const 1312 @@ -14545,9 +14332,9 @@ unreachable end local.get $0 - i64.const 5 + i32.const 5 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 1 i32.ne if @@ -14559,9 +14346,9 @@ unreachable end local.get $0 - i64.const 9 + i32.const 9 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -14573,9 +14360,9 @@ unreachable end local.get $0 - i64.const 10 + i32.const 10 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -14587,9 +14374,9 @@ unreachable end local.get $0 - i64.const 11 + i32.const 11 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -14601,9 +14388,9 @@ unreachable end local.get $0 - i64.const 5 + i32.const 5 i32.const 1 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const 1 i32.ne if @@ -14615,9 +14402,9 @@ unreachable end local.get $0 - i64.const 5 + i32.const 5 i32.const 2 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> i32.const -1 i32.ne if @@ -14633,17 +14420,157 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> - (local $0 i32) + (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $3 + if (result i32) + local.get $2 + local.get $3 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + return + end + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.set $2 + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $1 + local.get $0 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + i32.eq + if + local.get $2 + return + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + ) + (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $3 + i32.eqz + if + i32.const -1 + return + end + local.get $2 + local.get $3 + i32.add + local.get $3 + i32.const 1 + i32.sub + local.get $2 + local.get $2 + local.get $3 + i32.ge_s + select + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $2 + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + i32.const 0 + i32.ge_s + if + local.get $1 + local.get $0 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + i32.eq + if + local.get $2 + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + ) + (func $~lib/typedarray/Int32Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> + ) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 2908 i32.load - local.tee $0 - local.set $2 - local.get $0 - call $~lib/typedarray/Uint64Array#constructor + local.tee $2 + call $~lib/typedarray/Int32Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -14656,8 +14583,7 @@ i32.const 2896 local.get $1 call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set + call $~lib/typedarray/Int32Array#__set local.get $1 i32.const 1 i32.add @@ -14666,9 +14592,9 @@ end end local.get $0 - i64.const 0 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> if i32.const 0 i32.const 1312 @@ -14678,9 +14604,9 @@ unreachable end local.get $0 - i64.const 11 + i32.const 11 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -14692,9 +14618,9 @@ unreachable end local.get $0 - i64.const -1 + i32.const -1 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -14706,9 +14632,9 @@ unreachable end local.get $0 - i64.const 3 + i32.const 3 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 3 i32.ne if @@ -14720,9 +14646,9 @@ unreachable end local.get $0 - i64.const 3 + i32.const 3 i32.const 2 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 3 i32.ne if @@ -14734,9 +14660,9 @@ unreachable end local.get $0 - i64.const 3 i32.const 3 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const 3 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 3 i32.ne if @@ -14748,9 +14674,9 @@ unreachable end local.get $0 - i64.const 3 + i32.const 3 i32.const 4 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -14762,9 +14688,9 @@ unreachable end local.get $0 - i64.const 1 + i32.const 1 i32.const 10 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -14776,9 +14702,9 @@ unreachable end local.get $0 - i64.const 1 + i32.const 1 i32.const -100 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 1 i32.ne if @@ -14792,8 +14718,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const 0 - call $~lib/typedarray/Int64Array#lastIndexOf@varargs + i32.const 0 + call $~lib/typedarray/Int32Array#lastIndexOf@varargs if i32.const 0 i32.const 1312 @@ -14805,8 +14731,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const 11 - call $~lib/typedarray/Int64Array#lastIndexOf@varargs + i32.const 11 + call $~lib/typedarray/Int32Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -14820,8 +14746,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const -1 - call $~lib/typedarray/Int64Array#lastIndexOf@varargs + i32.const -1 + call $~lib/typedarray/Int32Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -14835,8 +14761,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const 3 - call $~lib/typedarray/Int64Array#lastIndexOf@varargs + i32.const 3 + call $~lib/typedarray/Int32Array#lastIndexOf@varargs i32.const 3 i32.ne if @@ -14848,9 +14774,9 @@ unreachable end local.get $0 - i64.const 3 + i32.const 3 i32.const 4 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 3 i32.ne if @@ -14862,9 +14788,9 @@ unreachable end local.get $0 - i64.const 3 i32.const 3 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const 3 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 3 i32.ne if @@ -14876,9 +14802,9 @@ unreachable end local.get $0 - i64.const 3 + i32.const 3 i32.const 2 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -14890,9 +14816,9 @@ unreachable end local.get $0 - i64.const 1 + i32.const 1 i32.const 100 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 1 i32.ne if @@ -14904,9 +14830,9 @@ unreachable end local.get $0 - i64.const 1 + i32.const 1 i32.const -10 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 1 i32.ne if @@ -14918,9 +14844,9 @@ unreachable end local.get $0 - i64.const 1 + i32.const 1 i32.const -11 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -14932,12 +14858,13 @@ unreachable end local.get $0 + i32.const 4 i32.const 9 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint64Array,u64> + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int32Array,i32> local.tee $0 - i64.const 3 + i32.const 3 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -14949,9 +14876,9 @@ unreachable end local.get $0 - i64.const 4 + i32.const 4 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> if i32.const 0 i32.const 1312 @@ -14961,9 +14888,9 @@ unreachable end local.get $0 - i64.const 5 + i32.const 5 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 1 i32.ne if @@ -14975,9 +14902,9 @@ unreachable end local.get $0 - i64.const 9 + i32.const 9 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -14989,9 +14916,9 @@ unreachable end local.get $0 - i64.const 10 + i32.const 10 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -15003,9 +14930,9 @@ unreachable end local.get $0 - i64.const 11 + i32.const 11 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -15017,9 +14944,9 @@ unreachable end local.get $0 - i64.const 5 + i32.const 5 i32.const 1 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 1 i32.ne if @@ -15031,9 +14958,9 @@ unreachable end local.get $0 - i64.const 5 + i32.const 5 i32.const 2 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -15049,159 +14976,15 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 f32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $3 - if (result i32) - local.get $2 - local.get $3 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - return - end - local.get $2 - i32.const 0 - i32.lt_s - if - local.get $2 - local.get $3 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.set $2 - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - local.get $1 - f32.eq - if - local.get $2 - return - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - ) - (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 f32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $3 - i32.eqz - if - i32.const -1 - return - end - local.get $2 - local.get $3 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 - i32.const 0 - i32.lt_s - select - local.set $2 - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - i32.const 0 - i32.ge_s - if - local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - local.get $1 - f32.eq - if - local.get $2 - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - ) - (func $~lib/typedarray/Float32Array#lastIndexOf@varargs (param $0 i32) (param $1 f32) (result i32) - (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> - ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 2908 i32.load - local.tee $0 - local.set $2 - local.get $0 - call $~lib/typedarray/Float32Array#constructor + local.tee $2 + call $~lib/typedarray/Uint32Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -15214,8 +14997,7 @@ i32.const 2896 local.get $1 call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $1 i32.const 1 i32.add @@ -15224,9 +15006,9 @@ end end local.get $0 - f32.const 0 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> if i32.const 0 i32.const 1312 @@ -15236,9 +15018,9 @@ unreachable end local.get $0 - f32.const 11 + i32.const 11 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -15250,9 +15032,9 @@ unreachable end local.get $0 - f32.const -1 + i32.const -1 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -15264,9 +15046,9 @@ unreachable end local.get $0 - f32.const 3 + i32.const 3 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 3 i32.ne if @@ -15278,9 +15060,9 @@ unreachable end local.get $0 - f32.const 3 + i32.const 3 i32.const 2 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 3 i32.ne if @@ -15292,9 +15074,9 @@ unreachable end local.get $0 - f32.const 3 i32.const 3 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const 3 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 3 i32.ne if @@ -15306,9 +15088,9 @@ unreachable end local.get $0 - f32.const 3 + i32.const 3 i32.const 4 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -15320,9 +15102,9 @@ unreachable end local.get $0 - f32.const 1 + i32.const 1 i32.const 10 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -15334,9 +15116,9 @@ unreachable end local.get $0 - f32.const 1 + i32.const 1 i32.const -100 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 1 i32.ne if @@ -15350,8 +15132,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - f32.const 0 - call $~lib/typedarray/Float32Array#lastIndexOf@varargs + i32.const 0 + call $~lib/typedarray/Int32Array#lastIndexOf@varargs if i32.const 0 i32.const 1312 @@ -15363,8 +15145,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - f32.const 11 - call $~lib/typedarray/Float32Array#lastIndexOf@varargs + i32.const 11 + call $~lib/typedarray/Int32Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -15378,8 +15160,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - f32.const -1 - call $~lib/typedarray/Float32Array#lastIndexOf@varargs + i32.const -1 + call $~lib/typedarray/Int32Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -15393,8 +15175,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - f32.const 3 - call $~lib/typedarray/Float32Array#lastIndexOf@varargs + i32.const 3 + call $~lib/typedarray/Int32Array#lastIndexOf@varargs i32.const 3 i32.ne if @@ -15406,9 +15188,9 @@ unreachable end local.get $0 - f32.const 3 + i32.const 3 i32.const 4 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 3 i32.ne if @@ -15420,9 +15202,9 @@ unreachable end local.get $0 - f32.const 3 i32.const 3 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const 3 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 3 i32.ne if @@ -15434,9 +15216,9 @@ unreachable end local.get $0 - f32.const 3 + i32.const 3 i32.const 2 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -15448,9 +15230,9 @@ unreachable end local.get $0 - f32.const 1 + i32.const 1 i32.const 100 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 1 i32.ne if @@ -15462,9 +15244,9 @@ unreachable end local.get $0 - f32.const 1 + i32.const 1 i32.const -10 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 1 i32.ne if @@ -15476,9 +15258,9 @@ unreachable end local.get $0 - f32.const 1 + i32.const 1 i32.const -11 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -15491,11 +15273,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint32Array,u32> local.tee $0 - f32.const 3 + i32.const 3 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -15507,9 +15289,9 @@ unreachable end local.get $0 - f32.const 4 + i32.const 4 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> if i32.const 0 i32.const 1312 @@ -15519,9 +15301,9 @@ unreachable end local.get $0 - f32.const 5 + i32.const 5 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 1 i32.ne if @@ -15533,9 +15315,9 @@ unreachable end local.get $0 - f32.const 9 + i32.const 9 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -15547,9 +15329,9 @@ unreachable end local.get $0 - f32.const 10 + i32.const 10 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -15561,9 +15343,9 @@ unreachable end local.get $0 - f32.const 11 + i32.const 11 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -15575,9 +15357,9 @@ unreachable end local.get $0 - f32.const 5 + i32.const 5 i32.const 1 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const 1 i32.ne if @@ -15589,9 +15371,9 @@ unreachable end local.get $0 - f32.const 5 + i32.const 5 i32.const 2 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> i32.const -1 i32.ne if @@ -15607,7 +15389,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.load offset=8 @@ -15648,14 +15430,14 @@ local.get $3 i32.lt_s if + local.get $1 local.get $0 local.get $2 i32.const 3 i32.shl i32.add - f64.load - local.get $1 - f64.eq + i64.load + i64.eq if local.get $2 return @@ -15669,7 +15451,7 @@ end i32.const -1 ) - (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.load offset=8 @@ -15705,14 +15487,14 @@ i32.const 0 i32.ge_s if + local.get $1 local.get $0 local.get $2 i32.const 3 i32.shl i32.add - f64.load - local.get $1 - f64.eq + i64.load + i64.eq if local.get $2 return @@ -15726,7 +15508,7 @@ end i32.const -1 ) - (func $~lib/typedarray/Float64Array#lastIndexOf@varargs (param $0 i32) (param $1 f64) (result i32) + (func $~lib/typedarray/Int64Array#lastIndexOf@varargs (param $0 i32) (param $1 i64) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -15747,19 +15529,17 @@ local.get $0 local.get $1 local.get $2 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 2908 i32.load - local.tee $0 - local.set $2 - local.get $0 - call $~lib/typedarray/Float64Array#constructor + local.tee $2 + call $~lib/typedarray/Int64Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -15772,8 +15552,8 @@ i32.const 2896 local.get $1 call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set local.get $1 i32.const 1 i32.add @@ -15782,9 +15562,9 @@ end end local.get $0 - f64.const 0 + i64.const 0 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> if i32.const 0 i32.const 1312 @@ -15794,9 +15574,9 @@ unreachable end local.get $0 - f64.const 11 + i64.const 11 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -15808,9 +15588,9 @@ unreachable end local.get $0 - f64.const -1 + i64.const -1 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -15822,9 +15602,9 @@ unreachable end local.get $0 - f64.const 3 + i64.const 3 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 3 i32.ne if @@ -15836,9 +15616,9 @@ unreachable end local.get $0 - f64.const 3 + i64.const 3 i32.const 2 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 3 i32.ne if @@ -15850,9 +15630,9 @@ unreachable end local.get $0 - f64.const 3 + i64.const 3 i32.const 3 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 3 i32.ne if @@ -15864,9 +15644,9 @@ unreachable end local.get $0 - f64.const 3 + i64.const 3 i32.const 4 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -15878,9 +15658,9 @@ unreachable end local.get $0 - f64.const 1 + i64.const 1 i32.const 10 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -15892,9 +15672,9 @@ unreachable end local.get $0 - f64.const 1 + i64.const 1 i32.const -100 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 1 i32.ne if @@ -15908,8 +15688,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - f64.const 0 - call $~lib/typedarray/Float64Array#lastIndexOf@varargs + i64.const 0 + call $~lib/typedarray/Int64Array#lastIndexOf@varargs if i32.const 0 i32.const 1312 @@ -15921,8 +15701,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - f64.const 11 - call $~lib/typedarray/Float64Array#lastIndexOf@varargs + i64.const 11 + call $~lib/typedarray/Int64Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -15936,8 +15716,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - f64.const -1 - call $~lib/typedarray/Float64Array#lastIndexOf@varargs + i64.const -1 + call $~lib/typedarray/Int64Array#lastIndexOf@varargs i32.const -1 i32.ne if @@ -15951,8 +15731,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - f64.const 3 - call $~lib/typedarray/Float64Array#lastIndexOf@varargs + i64.const 3 + call $~lib/typedarray/Int64Array#lastIndexOf@varargs i32.const 3 i32.ne if @@ -15964,9 +15744,9 @@ unreachable end local.get $0 - f64.const 3 + i64.const 3 i32.const 4 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 3 i32.ne if @@ -15978,9 +15758,9 @@ unreachable end local.get $0 - f64.const 3 + i64.const 3 i32.const 3 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 3 i32.ne if @@ -15992,9 +15772,9 @@ unreachable end local.get $0 - f64.const 3 + i64.const 3 i32.const 2 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -16006,9 +15786,9 @@ unreachable end local.get $0 - f64.const 1 + i64.const 1 i32.const 100 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 1 i32.ne if @@ -16020,9 +15800,9 @@ unreachable end local.get $0 - f64.const 1 + i64.const 1 i32.const -10 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 1 i32.ne if @@ -16034,9 +15814,9 @@ unreachable end local.get $0 - f64.const 1 + i64.const 1 i32.const -11 - call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -16048,13 +15828,12 @@ unreachable end local.get $0 - i32.const 4 i32.const 9 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int64Array,i64> local.tee $0 - f64.const 3 + i64.const 3 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -16066,9 +15845,9 @@ unreachable end local.get $0 - f64.const 4 + i64.const 4 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> if i32.const 0 i32.const 1312 @@ -16078,9 +15857,9 @@ unreachable end local.get $0 - f64.const 5 + i64.const 5 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 1 i32.ne if @@ -16092,9 +15871,9 @@ unreachable end local.get $0 - f64.const 9 + i64.const 9 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -16106,9 +15885,9 @@ unreachable end local.get $0 - f64.const 10 + i64.const 10 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -16120,9 +15899,9 @@ unreachable end local.get $0 - f64.const 11 + i64.const 11 i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -16134,9 +15913,9 @@ unreachable end local.get $0 - f64.const 5 + i64.const 5 i32.const 1 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 1 i32.ne if @@ -16148,9 +15927,9 @@ unreachable end local.get $0 - f64.const 5 + i64.const 5 i32.const 2 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const -1 i32.ne if @@ -16166,2647 +15945,1650 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) - local.get $0 - i32.const 10 - i32.ge_u - i32.const 1 - i32.add - local.get $0 - i32.const 10000 - i32.ge_u - i32.const 3 - i32.add - local.get $0 - i32.const 1000 - i32.ge_u - i32.add - local.get $0 - i32.const 100 - i32.lt_u - select - local.get $0 - i32.const 1000000 - i32.ge_u - i32.const 6 - i32.add - local.get $0 - i32.const 1000000000 - i32.ge_u - i32.const 8 - i32.add - local.get $0 - i32.const 100000000 - i32.ge_u - i32.add - local.get $0 - i32.const 10000000 - i32.lt_u - select - local.get $0 - i32.const 100000 - i32.lt_u - select - ) - (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> + (local $0 i32) + (local $1 i32) + (local $2 i32) (local $3 i32) - loop $do-continue|0 - local.get $1 - i32.const 10 - i32.rem_u - local.set $3 + i32.const 2908 + i32.load + local.tee $2 + call $~lib/typedarray/Uint64Array#constructor + local.tee $3 + local.set $0 + loop $for-loop|0 local.get $1 - i32.const 10 - i32.div_u - local.set $1 - local.get $0 local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - i32.add - local.get $3 - i32.const 48 - i32.add - i32.store16 - local.get $1 - br_if $do-continue|0 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 2896 + local.get $1 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end end - ) - (func $~lib/util/number/itoa32 (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) local.get $0 - i32.eqz - if - i32.const 2944 - return + i64.const 0 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + if + i32.const 0 + i32.const 1312 + i32.const 557 + i32.const 3 + call $~lib/builtins/abort + unreachable end local.get $0 - i32.const 31 - i32.shr_u - local.tee $1 + i64.const 11 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const -1 + i32.ne if i32.const 0 - local.get $0 - i32.sub - local.set $0 + i32.const 1312 + i32.const 558 + i32.const 3 + call $~lib/builtins/abort + unreachable end local.get $0 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 + i64.const -1 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 559 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - local.get $3 - call $~lib/util/number/utoa32_core - local.get $1 + i64.const 3 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const 3 + i32.ne if - local.get $2 - i32.const 45 - i32.store16 + i32.const 0 + i32.const 1312 + i32.const 560 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) - (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + i64.const 3 + i32.const 2 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 561 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const 0 - i32.lt_s - local.tee $1 + i64.const 3 + i32.const 3 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const 3 + i32.ne if - local.get $0 - i32.const 45 - i32.store16 i32.const 0 - local.get $2 - i32.sub - local.set $2 + i32.const 1312 + i32.const 562 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const 10 - i32.lt_u + local.get $0 + i64.const 3 + i32.const 4 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const -1 + i32.ne if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const 48 - i32.or - i32.store16 - local.get $1 - i32.const 1 - i32.add - return + i32.const 0 + i32.const 1312 + i32.const 563 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - local.tee $2 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.set $1 local.get $0 - local.get $2 - local.get $1 - call $~lib/util/number/utoa32_core - local.get $1 - ) - (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 0 + i64.const 1 + i32.const 10 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 564 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - call $~lib/string/String#get:length - local.tee $2 - i32.const 0 - local.get $2 - i32.lt_s - select - local.tee $3 - local.get $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - local.tee $1 - local.get $2 - local.get $1 - local.get $2 - i32.lt_s - select - local.tee $1 - local.get $3 - local.get $1 - i32.gt_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 - select + i64.const 1 + i32.const -100 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 1 - i32.shl - local.tee $1 - i32.sub - local.tee $3 - i32.eqz + i32.ne if - i32.const 2928 - return + i32.const 0 + i32.const 1312 + i32.const 565 + i32.const 3 + call $~lib/builtins/abort + unreachable end - i32.const 0 - local.get $4 - local.get $2 i32.const 1 - i32.shl - i32.eq - local.get $1 - select + global.set $~argumentsLength + local.get $0 + i64.const 0 + call $~lib/typedarray/Int64Array#lastIndexOf@varargs if - local.get $0 - call $~lib/rt/pure/__retain - return + i32.const 0 + i32.const 1312 + i32.const 567 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $3 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 + global.set $~argumentsLength local.get $0 - local.get $1 - i32.add - local.get $3 - call $~lib/util/memory/memmove - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/string/joinIntegerArray (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 1 - i32.sub - local.tee $3 - i32.const 0 - i32.lt_s + i64.const 11 + call $~lib/typedarray/Int64Array#lastIndexOf@varargs + i32.const -1 + i32.ne if - i32.const 2928 - return + i32.const 0 + i32.const 1312 + i32.const 568 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $3 - i32.eqz + i32.const 1 + global.set $~argumentsLength + local.get $0 + i64.const -1 + call $~lib/typedarray/Int64Array#lastIndexOf@varargs + i32.const -1 + i32.ne if - local.get $0 - i32.load8_s - call $~lib/util/number/itoa32 - return + i32.const 0 + i32.const 1312 + i32.const 569 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $3 - i32.const 2976 - call $~lib/string/String#get:length - local.tee $4 - i32.const 11 - i32.add - i32.mul - i32.const 11 - i32.add - local.tee $6 i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - local.get $0 - local.get $5 - i32.add - i32.load8_s - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.set $2 - local.get $4 - if - local.get $1 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 2976 - local.get $4 - i32.const 1 - i32.shl - call $~lib/util/memory/memmove - local.get $2 - local.get $4 - i32.add - local.set $2 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $6 - local.get $1 - local.get $2 + global.set $~argumentsLength local.get $0 - local.get $3 - i32.add - i32.load8_s - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.tee $0 - i32.gt_s + i64.const 3 + call $~lib/typedarray/Int64Array#lastIndexOf@varargs + i32.const 3 + i32.ne if - local.get $1 - local.get $0 - call $~lib/string/String#substring - local.get $1 - call $~lib/rt/pure/__release - return + i32.const 0 + i32.const 1312 + i32.const 570 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $1 - ) - (func $~lib/typedarray/Int8Array#join (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - call $~lib/util/string/joinIntegerArray - ) - (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 + i64.const 3 i32.const 4 - i32.ge_u - select + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const 3 + i32.ne 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 + i32.const 0 + i32.const 1312 + i32.const 571 + i32.const 3 + call $~lib/builtins/abort + unreachable 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 + local.get $0 + i64.const 3 + i32.const 3 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 572 + i32.const 3 + call $~lib/builtins/abort + unreachable end - i32.const 0 - ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 - local.get $1 - i32.eq + i64.const 3 + i32.const 2 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const -1 + i32.ne if - i32.const 1 - return + i32.const 0 + i32.const 1312 + i32.const 573 + i32.const 3 + call $~lib/builtins/abort + unreachable end - block $folding-inner0 - local.get $1 - i32.eqz - i32.const 1 - local.get $0 - select - br_if $folding-inner0 - local.get $0 - call $~lib/string/String#get:length - local.tee $2 - local.get $1 - call $~lib/string/String#get:length - i32.ne - br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz - return - end - i32.const 0 - ) - (func $~lib/util/number/utoa32 (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) local.get $0 - i32.eqz + i64.const 1 + i32.const 100 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const 1 + i32.ne if - i32.const 2944 - return + i32.const 0 + i32.const 1312 + i32.const 574 + i32.const 3 + call $~lib/builtins/abort + unreachable end local.get $0 - call $~lib/util/number/decimalCount32 - local.tee $1 - i32.const 1 - i32.shl + i64.const 1 + i32.const -10 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - local.get $1 - call $~lib/util/number/utoa32_core - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 575 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 - i32.const 255 - i32.and - i32.const 10 - i32.lt_u + i64.const 1 + i32.const -11 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const -1 + i32.ne if - local.get $0 - local.get $2 - i32.const 255 - i32.and - i32.const 48 - i32.or - i32.store16 - i32.const 1 - return + i32.const 0 + i32.const 1312 + i32.const 576 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $2 - i32.const 255 - i32.and - local.tee $2 - call $~lib/util/number/decimalCount32 - local.set $1 local.get $0 - local.get $2 - local.get $1 - call $~lib/util/number/utoa32_core - local.get $1 - ) - (func $~lib/util/string/joinIntegerArray (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 1 - i32.sub - local.tee $3 + i32.const 9 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint64Array,u64> + local.tee $0 + i64.const 3 i32.const 0 - i32.lt_s + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const -1 + i32.ne if - i32.const 2928 - return + i32.const 0 + i32.const 1312 + i32.const 580 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $3 - i32.eqz + local.get $0 + i64.const 4 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> if - local.get $0 - i32.load8_u - call $~lib/util/number/utoa32 - return - end - local.get $3 - i32.const 2976 - call $~lib/string/String#get:length - local.tee $4 - i32.const 10 - i32.add - i32.mul - i32.const 10 - i32.add - local.tee $6 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - local.get $0 - local.get $5 - i32.add - i32.load8_u - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.set $2 - local.get $4 - if - local.get $1 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 2976 - local.get $4 - i32.const 1 - i32.shl - call $~lib/util/memory/memmove - local.get $2 - local.get $4 - i32.add - local.set $2 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end + i32.const 0 + i32.const 1312 + i32.const 581 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $6 - local.get $1 - local.get $2 local.get $0 - local.get $3 - i32.add - i32.load8_u - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.tee $0 - i32.gt_s + i64.const 5 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const 1 + i32.ne if - local.get $1 - local.get $0 - call $~lib/string/String#substring - local.get $1 - call $~lib/rt/pure/__release - return + i32.const 0 + i32.const 1312 + i32.const 582 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $1 - ) - (func $~lib/typedarray/Uint8Array#join (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - call $~lib/util/string/joinIntegerArray - ) - (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s + i64.const 9 i32.const 0 - i32.lt_s - local.tee $1 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const -1 + i32.ne if - local.get $0 - i32.const 45 - i32.store16 i32.const 0 - local.get $2 - i32.sub - local.set $2 + i32.const 1312 + i32.const 583 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 10 - i32.lt_u + local.get $0 + i64.const 10 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const -1 + i32.ne if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 48 - i32.or - i32.store16 - local.get $1 - i32.const 1 - i32.add - return + i32.const 0 + i32.const 1312 + i32.const 584 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - local.tee $2 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.set $1 local.get $0 - local.get $2 - local.get $1 - call $~lib/util/number/utoa32_core - local.get $1 + i64.const 11 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 585 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i64.const 5 + i32.const 1 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 586 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i64.const 5 + i32.const 2 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 587 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $3 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 1 - i32.sub + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u local.tee $3 - i32.const 0 - i32.lt_s + if (result i32) + local.get $2 + local.get $3 + i32.ge_s + else + i32.const 1 + end if - i32.const 2928 + i32.const -1 return end - local.get $3 - i32.eqz + local.get $2 + i32.const 0 + i32.lt_s if - local.get $0 - i32.load16_s - call $~lib/util/number/itoa32 - return + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.set $2 end - local.get $3 - i32.const 2976 - call $~lib/string/String#get:length - local.tee $4 - i32.const 11 - i32.add - i32.mul - i32.const 11 - i32.add - local.tee $6 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $1 - loop $for-loop|0 - local.get $5 + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 local.get $3 i32.lt_s if - local.get $1 - local.get $2 local.get $0 - local.get $5 - i32.const 1 - i32.shl - i32.add - i32.load16_s - call $~lib/util/number/itoa_stream local.get $2 + i32.const 2 + i32.shl i32.add - local.set $2 - local.get $4 + f32.load + local.get $1 + f32.eq if - local.get $1 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 2976 - local.get $4 - i32.const 1 - i32.shl - call $~lib/util/memory/memmove local.get $2 - local.get $4 - i32.add - local.set $2 + return end - local.get $5 + local.get $2 i32.const 1 i32.add - local.set $5 - br $for-loop|0 + local.set $2 + br $while-continue|0 end end - local.get $6 - local.get $1 - local.get $2 - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.load16_s - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.tee $0 - i32.gt_s - if - local.get $1 - local.get $0 - call $~lib/string/String#substring - local.get $1 - call $~lib/rt/pure/__release - return - end - local.get $1 + i32.const -1 ) - (func $~lib/typedarray/Int16Array#join (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 + (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (local $3 i32) local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u - call $~lib/util/string/joinIntegerArray - ) - (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 - i32.const 65535 - i32.and - i32.const 10 - i32.lt_u + local.tee $3 + i32.eqz if - local.get $0 - local.get $2 - i32.const 65535 - i32.and - i32.const 48 - i32.or - i32.store16 - i32.const 1 + i32.const -1 return end local.get $2 - i32.const 65535 - i32.and - local.tee $2 - call $~lib/util/number/decimalCount32 - local.set $1 - local.get $0 - local.get $2 - local.get $1 - call $~lib/util/number/utoa32_core - local.get $1 - ) - (func $~lib/util/string/joinIntegerArray (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 + local.get $3 + i32.add + local.get $3 i32.const 1 i32.sub - local.tee $3 + local.get $2 + local.get $2 + local.get $3 + i32.ge_s + select + local.get $2 i32.const 0 i32.lt_s - if - i32.const 2928 - return - end - local.get $3 - i32.eqz - if - local.get $0 - i32.load16_u - call $~lib/util/number/utoa32 - return - end - local.get $3 - i32.const 2976 - call $~lib/string/String#get:length - local.tee $4 - i32.const 10 - i32.add - i32.mul - i32.const 10 - i32.add - local.tee $6 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s + select + local.set $2 + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + i32.const 0 + i32.ge_s if - local.get $1 - local.get $2 local.get $0 - local.get $5 - i32.const 1 - i32.shl - i32.add - i32.load16_u - call $~lib/util/number/itoa_stream local.get $2 + i32.const 2 + i32.shl i32.add - local.set $2 - local.get $4 + f32.load + local.get $1 + f32.eq if - local.get $1 local.get $2 + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + ) + (func $~lib/typedarray/Float32Array#lastIndexOf@varargs (param $0 i32) (param $1 f32) (result i32) + (local $2 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength i32.const 1 - i32.shl - i32.add - i32.const 2976 - local.get $4 - i32.const 1 - i32.shl - call $~lib/util/memory/memmove - local.get $2 - local.get $4 - i32.add - local.set $2 + i32.sub + br_table $0of1 $1of1 $outOfRange end - local.get $5 + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> + ) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 2908 + i32.load + local.tee $2 + call $~lib/typedarray/Float32Array#constructor + local.tee $3 + local.set $0 + loop $for-loop|0 + local.get $1 + local.get $2 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 2896 + local.get $1 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $1 i32.const 1 i32.add - local.set $5 + local.set $1 br $for-loop|0 end end - local.get $6 - local.get $1 - local.get $2 local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.load16_u - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.tee $0 - i32.gt_s + f32.const 0 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> if - local.get $1 - local.get $0 - call $~lib/string/String#substring - local.get $1 - call $~lib/rt/pure/__release - return + i32.const 0 + i32.const 1312 + i32.const 557 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $1 - ) - (func $~lib/typedarray/Uint16Array#join (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - call $~lib/util/string/joinIntegerArray - ) - (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 + f32.const 11 i32.const 0 - i32.lt_s - local.tee $1 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const -1 + i32.ne if - local.get $0 - i32.const 45 - i32.store16 i32.const 0 - local.get $2 - i32.sub - local.set $2 + i32.const 1312 + i32.const 558 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $2 - i32.const 10 - i32.lt_u + local.get $0 + f32.const -1 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const -1 + i32.ne if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.get $2 - i32.const 48 - i32.or - i32.store16 - local.get $1 - i32.const 1 - i32.add - return + i32.const 0 + i32.const 1312 + i32.const 559 + i32.const 3 + call $~lib/builtins/abort + unreachable end local.get $0 - local.get $2 - local.get $2 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.tee $0 - call $~lib/util/number/utoa32_core - local.get $0 - ) - (func $~lib/util/string/joinIntegerArray (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 1 - i32.sub - local.tee $3 + f32.const 3 i32.const 0 - i32.lt_s + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const 3 + i32.ne if - i32.const 2928 - return - end - local.get $3 - i32.eqz - if - local.get $0 - i32.load - call $~lib/util/number/itoa32 - return - end - local.get $3 - i32.const 2976 - call $~lib/string/String#get:length - local.tee $4 - i32.const 11 - i32.add - i32.mul - i32.const 11 - i32.add - local.tee $6 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - local.get $0 - local.get $5 - i32.const 2 - i32.shl - i32.add - i32.load - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.set $2 - local.get $4 - if - local.get $1 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 2976 - local.get $4 - i32.const 1 - i32.shl - call $~lib/util/memory/memmove - local.get $2 - local.get $4 - i32.add - local.set $2 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end + i32.const 0 + i32.const 1312 + i32.const 560 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $6 - local.get $1 - local.get $2 local.get $0 - local.get $3 + f32.const 3 i32.const 2 - i32.shl - i32.add - i32.load - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.tee $0 - i32.gt_s + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const 3 + i32.ne if - local.get $1 - local.get $0 - call $~lib/string/String#substring - local.get $1 - call $~lib/rt/pure/__release - return + i32.const 0 + i32.const 1312 + i32.const 561 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $1 - ) - (func $~lib/typedarray/Int32Array#join (param $0 i32) (result i32) local.get $0 - i32.load offset=4 + f32.const 3 + i32.const 3 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 562 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - call $~lib/util/string/joinIntegerArray - ) - (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + f32.const 3 + i32.const 4 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 563 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 + f32.const 1 i32.const 10 - i32.lt_u + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const -1 + i32.ne if - local.get $0 - local.get $2 - i32.const 48 - i32.or - i32.store16 - i32.const 1 - return + i32.const 0 + i32.const 1312 + i32.const 564 + i32.const 3 + call $~lib/builtins/abort + unreachable end local.get $0 - local.get $2 - local.get $2 - call $~lib/util/number/decimalCount32 - local.tee $0 - call $~lib/util/number/utoa32_core - local.get $0 - ) - (func $~lib/util/string/joinIntegerArray (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 + f32.const 1 + i32.const -100 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> i32.const 1 - i32.sub - local.tee $3 - i32.const 0 - i32.lt_s + i32.ne if - i32.const 2928 - return + i32.const 0 + i32.const 1312 + i32.const 565 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $3 - i32.eqz + i32.const 1 + global.set $~argumentsLength + local.get $0 + f32.const 0 + call $~lib/typedarray/Float32Array#lastIndexOf@varargs if - local.get $0 - i32.load - call $~lib/util/number/utoa32 - return + i32.const 0 + i32.const 1312 + i32.const 567 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $3 - i32.const 2976 - call $~lib/string/String#get:length - local.tee $4 - i32.const 10 - i32.add - i32.mul - i32.const 10 - i32.add - local.tee $6 i32.const 1 - i32.shl + global.set $~argumentsLength + local.get $0 + f32.const 11 + call $~lib/typedarray/Float32Array#lastIndexOf@varargs + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 568 + i32.const 3 + call $~lib/builtins/abort + unreachable + end i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - local.get $0 - local.get $5 - i32.const 2 - i32.shl - i32.add - i32.load - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.set $2 - local.get $4 - if - local.get $1 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 2976 - local.get $4 - i32.const 1 - i32.shl - call $~lib/util/memory/memmove - local.get $2 - local.get $4 - i32.add - local.set $2 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end + global.set $~argumentsLength + local.get $0 + f32.const -1 + call $~lib/typedarray/Float32Array#lastIndexOf@varargs + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 569 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $6 - local.get $1 - local.get $2 + i32.const 1 + global.set $~argumentsLength local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add - i32.load - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.tee $0 - i32.gt_s + f32.const 3 + call $~lib/typedarray/Float32Array#lastIndexOf@varargs + i32.const 3 + i32.ne if - local.get $1 - local.get $0 - call $~lib/string/String#substring - local.get $1 - call $~lib/rt/pure/__release - return + i32.const 0 + i32.const 1312 + i32.const 570 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $1 - ) - (func $~lib/typedarray/Uint32Array#join (param $0 i32) (result i32) local.get $0 - i32.load offset=4 + f32.const 3 + i32.const 4 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 571 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.load offset=8 + f32.const 3 + i32.const 3 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 572 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + f32.const 3 i32.const 2 - i32.shr_u - call $~lib/util/string/joinIntegerArray - ) - (func $~lib/util/number/decimalCount64High (param $0 i64) (result i32) + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 573 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - i64.const 100000000000 - i64.ge_u - i32.const 10 - i32.add + f32.const 1 + i32.const 100 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 574 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - i64.const 10000000000 - i64.ge_u - i32.add + f32.const 1 + i32.const -10 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 575 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - i64.const 100000000000000 - i64.ge_u - i32.const 13 - i32.add + f32.const 1 + i32.const -11 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 576 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - i64.const 10000000000000 - i64.ge_u - i32.add + i32.const 9 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Float32Array,f32> + local.tee $0 + f32.const 3 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 580 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - i64.const 1000000000000 - i64.lt_u - select + f32.const 4 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + if + i32.const 0 + i32.const 1312 + i32.const 581 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - i64.const 10000000000000000 - i64.ge_u - i32.const 16 - i32.add + f32.const 5 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 582 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - i64.const -8446744073709551616 - i64.ge_u - i32.const 18 - i32.add + f32.const 9 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 583 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - i64.const 1000000000000000000 - i64.ge_u - i32.add + f32.const 10 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 584 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - i64.const 100000000000000000 - i64.lt_u - select + f32.const 11 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 585 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - i64.const 1000000000000000 - i64.lt_u - select - ) - (func $~lib/util/number/utoa64_core (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 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - i32.add - local.get $3 - i32.const 48 - i32.add - i32.store16 - local.get $1 - i64.const 0 - i64.ne - br_if $do-continue|0 + f32.const 5 + i32.const 1 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 586 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + f32.const 5 + i32.const 2 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 587 + i32.const 3 + call $~lib/builtins/abort + unreachable end + local.get $3 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) - local.get $1 - i32.const 1 - i32.shl local.get $0 - i32.add - local.set $1 - local.get $2 - i64.const 0 - i64.lt_s - local.tee $0 - if - local.get $1 - i32.const 45 - i32.store16 - i64.const 0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $3 + if (result i32) local.get $2 - i64.sub - local.set $2 + local.get $3 + i32.ge_s + else + i32.const 1 end - local.get $2 - i64.const 10 - i64.lt_u if - local.get $0 - i32.const 1 - i32.shl - local.get $1 - i32.add - local.get $2 - i64.const 48 - i64.or - i64.store16 - local.get $0 - i32.const 1 - i32.add + i32.const -1 return end local.get $2 - i64.const 4294967295 - i64.le_u + i32.const 0 + i32.lt_s if local.get $2 - i32.wrap_i64 - local.tee $3 - call $~lib/util/number/decimalCount32 - local.get $0 - i32.add - local.set $0 - local.get $1 local.get $3 - local.get $0 - call $~lib/util/number/utoa32_core - else - local.get $1 - local.get $2 - local.get $2 - call $~lib/util/number/decimalCount64High - local.get $0 i32.add - local.tee $0 - call $~lib/util/number/utoa64_core + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.set $2 end local.get $0 - ) - (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $1 - i32.const 1 - i32.sub - local.tee $4 - i32.const 0 - i32.lt_s - if - i32.const 2928 - return - end - local.get $4 - i32.eqz - if - block $__inlined_func$~lib/util/number/itoa64 (result i32) - i32.const 2944 - local.get $0 - i64.load - local.tee $3 - i64.eqz - br_if $__inlined_func$~lib/util/number/itoa64 - drop - 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 - i64.const 4294967295 - i64.le_u - if - local.get $3 - i32.wrap_i64 - local.tee $2 - call $~lib/util/number/decimalCount32 - local.get $0 - i32.add - local.tee $4 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $2 - local.get $4 - call $~lib/util/number/utoa32_core - else - local.get $3 - call $~lib/util/number/decimalCount64High - local.get $0 - i32.add - local.tee $2 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $3 - local.get $2 - call $~lib/util/number/utoa64_core - end - local.get $0 - if - local.get $1 - i32.const 45 - i32.store16 - end - local.get $1 - call $~lib/rt/pure/__retain - end - return - end - local.get $4 - i32.const 2976 - call $~lib/string/String#get:length - local.tee $5 - i32.const 21 - i32.add - i32.mul - i32.const 21 - i32.add - local.tee $7 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $1 - loop $for-loop|0 - local.get $6 - local.get $4 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $3 i32.lt_s if - local.get $1 - local.get $2 local.get $0 - local.get $6 + local.get $2 i32.const 3 i32.shl i32.add - i64.load - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.set $2 - local.get $5 + f64.load + local.get $1 + f64.eq if - local.get $1 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 2976 - local.get $5 - i32.const 1 - i32.shl - call $~lib/util/memory/memmove local.get $2 - local.get $5 - i32.add - local.set $2 + return end - local.get $6 + local.get $2 i32.const 1 i32.add - local.set $6 - br $for-loop|0 + local.set $2 + br $while-continue|0 end end - local.get $7 - local.get $1 - local.get $2 - local.get $0 - local.get $4 - i32.const 3 - i32.shl - i32.add - i64.load - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.tee $0 - i32.gt_s - if - local.get $1 - local.get $0 - call $~lib/string/String#substring - local.get $1 - call $~lib/rt/pure/__release - return - end - local.get $1 + i32.const -1 ) - (func $~lib/typedarray/Int64Array#join (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 + (func $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (local $3 i32) local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - call $~lib/util/string/joinIntegerArray - ) - (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - local.get $1 - i32.const 1 - i32.shl - local.get $0 - i32.add - local.set $0 - local.get $2 - i64.const 10 - i64.lt_u + local.tee $3 + i32.eqz if - local.get $0 - local.get $2 - i64.const 48 - i64.or - i64.store16 - i32.const 1 + i32.const -1 return end local.get $2 - i64.const 4294967295 - i64.le_u - if - local.get $2 - i32.wrap_i64 - local.tee $3 - call $~lib/util/number/decimalCount32 - local.set $1 - local.get $0 - local.get $3 - local.get $1 - call $~lib/util/number/utoa32_core - else - local.get $0 - local.get $2 - local.get $2 - call $~lib/util/number/decimalCount64High - local.tee $1 - call $~lib/util/number/utoa64_core - end - local.get $1 - ) - (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $1 + local.get $3 + i32.add + local.get $3 i32.const 1 i32.sub - local.tee $3 + local.get $2 + local.get $2 + local.get $3 + i32.ge_s + select + local.get $2 i32.const 0 i32.lt_s - if - i32.const 2928 - return - end - local.get $3 - i32.eqz - if - block $__inlined_func$~lib/util/number/utoa64 (result i32) - i32.const 2944 + select + local.set $2 + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + i32.const 0 + i32.ge_s + if local.get $0 - i64.load - local.tee $4 - i64.eqz - br_if $__inlined_func$~lib/util/number/utoa64 - drop - local.get $4 - i64.const 4294967295 - i64.le_u + local.get $2 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $1 + f64.eq if - local.get $4 - i32.wrap_i64 - local.tee $1 - call $~lib/util/number/decimalCount32 - local.tee $2 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $1 local.get $2 - call $~lib/util/number/utoa32_core - else - local.get $4 - call $~lib/util/number/decimalCount64High - local.tee $1 - i32.const 1 - i32.shl + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + ) + (func $~lib/typedarray/Float64Array#lastIndexOf@varargs (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $4 - local.get $1 - call $~lib/util/number/utoa64_core + i32.sub + br_table $0of1 $1of1 $outOfRange end - local.get $0 - call $~lib/rt/pure/__retain + unreachable end - return + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $2 end - local.get $3 - i32.const 2976 - call $~lib/string/String#get:length - local.tee $5 - i32.const 20 - i32.add - i32.mul - i32.const 20 - i32.add - local.tee $7 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $1 + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> + ) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 2908 + i32.load + local.tee $2 + call $~lib/typedarray/Float64Array#constructor + local.tee $3 + local.set $0 loop $for-loop|0 - local.get $6 - local.get $3 + local.get $1 + local.get $2 i32.lt_s if - local.get $1 - local.get $2 local.get $0 - local.get $6 - i32.const 3 - i32.shl - i32.add - i64.load - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.set $2 - local.get $5 - if - local.get $1 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 2976 - local.get $5 - i32.const 1 - i32.shl - call $~lib/util/memory/memmove - local.get $2 - local.get $5 - i32.add - local.set $2 - end - local.get $6 + local.get $1 + i32.const 2896 + local.get $1 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + local.get $1 i32.const 1 i32.add - local.set $6 + local.set $1 br $for-loop|0 end end - local.get $7 - local.get $1 - local.get $2 local.get $0 - local.get $3 - i32.const 3 - i32.shl - i32.add - i64.load - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.tee $0 - i32.gt_s + f64.const 0 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> if - local.get $1 - local.get $0 - call $~lib/string/String#substring - local.get $1 - call $~lib/rt/pure/__release - return + i32.const 0 + i32.const 1312 + i32.const 557 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $1 - ) - (func $~lib/typedarray/Uint64Array#join (param $0 i32) (result i32) local.get $0 - i32.load offset=4 + f64.const 11 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 558 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - call $~lib/util/string/joinIntegerArray - ) - (func $~lib/util/number/umul64f (param $0 i64) (param $1 i64) (result i64) - (local $2 i64) - (local $3 i64) - local.get $1 - i64.const 4294967295 - i64.and - local.tee $2 + f64.const -1 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 559 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - i64.const 32 - i64.shr_u - local.tee $3 - i64.mul - local.get $2 + f64.const 3 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 560 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - i64.const 4294967295 - i64.and - local.tee $2 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.set $0 - local.get $3 - local.get $1 - i64.const 32 - i64.shr_u - local.tee $1 - i64.mul + f64.const 3 + i32.const 2 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 561 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - i64.const 32 - i64.shr_u - i64.add - local.get $1 - local.get $2 - i64.mul + f64.const 3 + i32.const 3 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 562 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - ) - (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) + f64.const 3 + i32.const 4 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 563 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - local.get $1 - i32.add - i32.const -64 - i32.sub - ) - (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) + f64.const 1 + i32.const 10 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 564 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - local.get $1 + f64.const 1 + i32.const -100 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const 1 - i32.sub + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 565 + i32.const 3 + call $~lib/builtins/abort + unreachable + end i32.const 1 - i32.shl - i32.add - local.tee $0 - i32.load16_u - local.set $1 - loop $while-continue|1 - i32.const 1 - local.get $5 - local.get $3 - i64.sub - local.get $3 - local.get $4 - i64.add - local.get $5 - i64.sub - i64.gt_u - local.get $3 - local.get $4 - i64.add - local.get $5 - i64.lt_u - select + global.set $~argumentsLength + local.get $0 + f64.const 0 + call $~lib/typedarray/Float64Array#lastIndexOf@varargs + if i32.const 0 - local.get $2 - local.get $3 - i64.sub - local.get $4 - i64.ge_u + i32.const 1312 + i32.const 567 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $~argumentsLength + local.get $0 + f64.const 11 + call $~lib/typedarray/Float64Array#lastIndexOf@varargs + i32.const -1 + i32.ne + if i32.const 0 - local.get $3 - local.get $5 - i64.lt_u - select - select - if - local.get $1 - i32.const 1 - i32.sub - local.set $1 - local.get $3 - local.get $4 - i64.add - local.set $3 - br $while-continue|1 - end + i32.const 1312 + i32.const 568 + i32.const 3 + call $~lib/builtins/abort + unreachable end + i32.const 1 + global.set $~argumentsLength local.get $0 - local.get $1 - i32.store16 - ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i64) - (local $11 i64) - (local $12 i64) - local.get $3 - local.get $1 - i64.sub - local.set $9 - local.get $3 - i64.const 1 - i32.const 0 - local.get $4 - i32.sub - local.tee $8 - i64.extend_i32_s - i64.shl - local.tee $10 - i64.const 1 - i64.sub - local.tee $11 - i64.and - local.set $1 - local.get $3 - local.get $8 - i64.extend_i32_s - i64.shr_u - i32.wrap_i64 - local.tee $2 - call $~lib/util/number/decimalCount32 - local.set $7 - loop $while-continue|0 - local.get $7 + f64.const -1 + call $~lib/typedarray/Float64Array#lastIndexOf@varargs + i32.const -1 + i32.ne + if i32.const 0 - i32.gt_s - if - block $break|1 - block $case10|1 - block $case9|1 - block $case8|1 - block $case7|1 - block $case6|1 - block $case5|1 - block $case4|1 - block $case3|1 - block $case2|1 - block $case1|1 - local.get $7 - local.tee $4 - i32.const 10 - i32.ne - if - local.get $4 - i32.const 1 - i32.sub - br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 - end - local.get $2 - i32.const 1000000000 - i32.div_u - local.set $4 - local.get $2 - i32.const 1000000000 - i32.rem_u - local.set $2 - br $break|1 - end - local.get $2 - i32.const 100000000 - i32.div_u - local.set $4 - local.get $2 - i32.const 100000000 - i32.rem_u - local.set $2 - br $break|1 - end - local.get $2 - i32.const 10000000 - i32.div_u - local.set $4 - local.get $2 - i32.const 10000000 - i32.rem_u - local.set $2 - br $break|1 - end - local.get $2 - i32.const 1000000 - i32.div_u - local.set $4 - local.get $2 - i32.const 1000000 - i32.rem_u - local.set $2 - br $break|1 - end - local.get $2 - i32.const 100000 - i32.div_u - local.set $4 - local.get $2 - i32.const 100000 - i32.rem_u - local.set $2 - br $break|1 - end - local.get $2 - i32.const 10000 - i32.div_u - local.set $4 - local.get $2 - i32.const 10000 - i32.rem_u - local.set $2 - br $break|1 - end - local.get $2 - i32.const 1000 - i32.div_u - local.set $4 - local.get $2 - i32.const 1000 - i32.rem_u - local.set $2 - br $break|1 - end - local.get $2 - i32.const 100 - i32.div_u - local.set $4 - local.get $2 - i32.const 100 - i32.rem_u - local.set $2 - br $break|1 - end - local.get $2 - i32.const 10 - i32.div_u - local.set $4 - local.get $2 - i32.const 10 - i32.rem_u - local.set $2 - br $break|1 - end - local.get $2 - local.set $4 - i32.const 0 - local.set $2 - br $break|1 - end - i32.const 0 - local.set $4 - end - local.get $4 - local.get $6 - i32.or - if - local.get $0 - local.get $6 - i32.const 1 - i32.shl - i32.add - local.get $4 - i32.const 65535 - i32.and - i32.const 48 - i32.add - i32.store16 - local.get $6 - i32.const 1 - i32.add - local.set $6 - end - local.get $7 - i32.const 1 - i32.sub - local.set $7 - local.get $1 - local.get $2 - i64.extend_i32_u - local.get $8 - i64.extend_i32_s - i64.shl - i64.add - local.tee $3 - local.get $5 - i64.le_u - if - local.get $7 - global.get $~lib/util/number/_K - i32.add - global.set $~lib/util/number/_K - local.get $0 - local.get $6 - local.get $5 - local.get $3 - local.get $7 - i32.const 2 - i32.shl - i32.const 4056 - i32.add - i64.load32_u - local.get $8 - i64.extend_i32_s - i64.shl - local.get $9 - call $~lib/util/number/grisuRound - local.get $6 - return - end - br $while-continue|0 - end + i32.const 1312 + i32.const 569 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $8 - i64.extend_i32_s - local.set $3 - loop $while-continue|2 (result i32) - local.get $5 - i64.const 10 - i64.mul - local.set $5 - local.get $1 - i64.const 10 - i64.mul - local.tee $1 - local.get $3 - i64.shr_u - local.tee $12 - local.get $6 - i64.extend_i32_s - i64.or - i64.const 0 - i64.ne - if - local.get $0 - local.get $6 - local.tee $2 - i32.const 1 - i32.shl - i32.add - local.get $12 - i32.wrap_i64 - i32.const 65535 - i32.and - i32.const 48 - i32.add - i32.store16 - local.get $2 - i32.const 1 - i32.add - local.set $6 - end - local.get $7 - i32.const 1 - i32.sub - local.set $7 - local.get $1 - local.get $11 - i64.and - local.tee $1 - local.get $5 - i64.ge_u - br_if $while-continue|2 - local.get $7 - global.get $~lib/util/number/_K - i32.add - global.set $~lib/util/number/_K - local.get $0 - local.get $6 - local.get $5 - local.get $1 - local.get $10 - local.get $9 + i32.const 1 + global.set $~argumentsLength + local.get $0 + f64.const 3 + call $~lib/typedarray/Float64Array#lastIndexOf@varargs + i32.const 3 + i32.ne + if i32.const 0 - local.get $7 - i32.sub - i32.const 2 - i32.shl - i32.const 4056 - i32.add - i64.load32_u - i64.mul - call $~lib/util/number/grisuRound - local.get $6 - end - ) - (func $~lib/util/number/grisu2 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i64) - (local $7 i32) + i32.const 1312 + i32.const 570 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - i64.reinterpret_f64 - local.tee $4 - i64.const 9218868437227405312 - i64.and - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.tee $5 - i32.const 0 + f64.const 3 + i32.const 4 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> + i32.const 3 i32.ne - i64.extend_i32_u - i64.const 52 - i64.shl - local.get $4 - i64.const 4503599627370495 - i64.and - i64.add - local.tee $4 - i64.const 1 - i64.shl - i64.const 1 - i64.add - local.tee $6 - i64.clz - i32.wrap_i64 - local.set $3 - local.get $6 - local.get $3 - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_plus - local.get $5 - i32.const 1 - local.get $5 - select - i32.const 1075 - i32.sub - local.tee $5 - i32.const 1 - i32.sub - local.get $3 - i32.sub - local.set $3 - local.get $4 - local.get $4 - i64.const 4503599627370496 - i64.eq - i32.const 1 - i32.add - local.tee $7 - i64.extend_i32_s - i64.shl - i64.const 1 - i64.sub - local.get $5 - local.get $7 - i32.sub - local.get $3 - i32.sub - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_minus - local.get $3 - global.set $~lib/util/number/_exp - i32.const 348 - i32.const -61 - global.get $~lib/util/number/_exp - i32.sub - f64.convert_i32_s - f64.const 0.30102999566398114 - f64.mul - f64.const 347 - f64.add - local.tee $0 - i32.trunc_f64_s - local.tee $3 - local.get $3 - f64.convert_i32_s + if + i32.const 0 + i32.const 1312 + i32.const 571 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - f64.ne - i32.add + f64.const 3 i32.const 3 - i32.shr_s - i32.const 1 - i32.add - local.tee $3 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const 3 - i32.shl - local.tee $7 - i32.sub - global.set $~lib/util/number/_K - local.get $7 - i32.const 3184 - i32.add - i64.load - global.set $~lib/util/number/_frc_pow - local.get $3 - i32.const 1 - i32.shl - i32.const 3880 - i32.add - i32.load16_s - global.set $~lib/util/number/_exp_pow - global.get $~lib/util/number/_exp_pow - local.set $3 - local.get $1 - local.get $4 - local.get $4 - i64.clz - i32.wrap_i64 - local.tee $1 - i64.extend_i32_s - i64.shl - global.get $~lib/util/number/_frc_pow - local.tee $4 - call $~lib/util/number/umul64f - local.get $5 - local.get $1 - i32.sub - local.get $3 - call $~lib/util/number/umul64e - global.get $~lib/util/number/_frc_plus - local.get $4 - call $~lib/util/number/umul64f - i64.const 1 - i64.sub - local.tee $6 - global.get $~lib/util/number/_exp - local.get $3 - call $~lib/util/number/umul64e - local.get $6 - global.get $~lib/util/number/_frc_minus - local.get $4 - call $~lib/util/number/umul64f - i64.const 1 - i64.add - i64.sub - local.get $2 - call $~lib/util/number/genDigits - ) - (func $~lib/util/number/genExponent (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 572 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - local.get $1 - i32.const 0 - i32.lt_s - local.tee $2 + f64.const 3 + i32.const 2 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> + i32.const -1 + i32.ne if i32.const 0 - local.get $1 - i32.sub - local.set $1 + i32.const 1312 + i32.const 573 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $1 - local.get $1 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $1 - call $~lib/util/number/utoa32_core local.get $0 - i32.const 45 - i32.const 43 - local.get $2 - select - i32.store16 - local.get $1 - ) - (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $2 - i32.eqz + f64.const 1 + i32.const 100 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> + i32.const 1 + i32.ne if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 3145774 - i32.store - local.get $1 - i32.const 2 - i32.add - return + i32.const 0 + i32.const 1312 + i32.const 574 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $1 - local.get $1 - local.get $2 - i32.add - local.tee $3 - i32.le_s - if (result i32) - local.get $3 - i32.const 21 - i32.le_s - else + local.get $0 + f64.const 1 + i32.const -10 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> + i32.const 1 + i32.ne + if i32.const 0 + i32.const 1312 + i32.const 575 + i32.const 3 + call $~lib/builtins/abort + unreachable end - if (result i32) - loop $for-loop|0 - local.get $1 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 48 - i32.store16 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.const 3145774 - i32.store - local.get $3 - i32.const 2 - i32.add - else - local.get $3 - i32.const 21 - i32.le_s + local.get $0 + f64.const 1 + i32.const -11 + call $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64> + i32.const -1 + i32.ne + if i32.const 0 - local.get $3 + i32.const 1312 + i32.const 576 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 4 + i32.const 9 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Float64Array,f64> + local.tee $0 + f64.const 3 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + i32.const -1 + i32.ne + if i32.const 0 - i32.gt_s - select - if (result i32) - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.tee $0 - i32.const 2 - i32.add - local.get $0 - i32.const 0 - local.get $2 - i32.sub - i32.const 1 - i32.shl - call $~lib/util/memory/memmove - local.get $0 - i32.const 46 - i32.store16 - local.get $1 - i32.const 1 - i32.add - else - local.get $3 - i32.const 0 - i32.le_s - i32.const 0 - i32.const -6 - local.get $3 - i32.lt_s - select - if (result i32) - local.get $0 - i32.const 2 - local.get $3 - i32.sub - local.tee $3 - i32.const 1 - i32.shl - i32.add - local.get $0 - local.get $1 - i32.const 1 - i32.shl - call $~lib/util/memory/memmove - local.get $0 - i32.const 3014704 - i32.store - i32.const 2 - local.set $2 - loop $for-loop|1 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 48 - i32.store16 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 - end - end - local.get $1 - local.get $3 - i32.add - else - local.get $1 - i32.const 1 - i32.eq - if (result i32) - local.get $0 - i32.const 101 - i32.store16 offset=2 - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 1 - i32.sub - call $~lib/util/number/genExponent - i32.const 2 - i32.add - else - local.get $0 - i32.const 4 - i32.add - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.const 1 - i32.shl - local.tee $2 - i32.const 2 - i32.sub - call $~lib/util/memory/memmove - local.get $0 - i32.const 46 - i32.store16 offset=2 - local.get $0 - local.get $2 - i32.add - local.tee $0 - i32.const 101 - i32.store16 offset=2 - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 1 - i32.sub - call $~lib/util/number/genExponent - local.get $1 - i32.add - i32.const 2 - i32.add - end - end - end + i32.const 1312 + i32.const 580 + i32.const 3 + call $~lib/builtins/abort + unreachable end - ) - (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - local.get $1 - f64.const 0 - f64.lt - local.tee $2 + local.get $0 + f64.const 4 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> if - local.get $0 - i32.const 45 - i32.store16 - local.get $1 - f64.neg - local.set $1 + i32.const 0 + i32.const 1312 + i32.const 581 + i32.const 3 + call $~lib/builtins/abort + unreachable end local.get $0 - local.get $2 + f64.const 5 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> i32.const 1 - i32.shl - i32.add - local.get $1 - local.get $0 - local.get $2 - call $~lib/util/number/grisu2 - local.get $2 - i32.sub - global.get $~lib/util/number/_K - call $~lib/util/number/prettify - local.get $2 - i32.add - ) - (func $~lib/util/number/dtoa (param $0 f64) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - f64.const 0 - f64.eq + i32.ne if - i32.const 3056 - return + i32.const 0 + i32.const 1312 + i32.const 582 + i32.const 3 + call $~lib/builtins/abort + unreachable end local.get $0 - local.get $0 - f64.sub - f64.const 0 - f64.ne + f64.const 9 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + i32.const -1 + i32.ne if - local.get $0 - local.get $0 - f64.ne - if - i32.const 3088 - return - end - i32.const 3120 - i32.const 3168 - local.get $0 - f64.const 0 - f64.lt - select - call $~lib/rt/pure/__retain - return + i32.const 0 + i32.const 1312 + i32.const 583 + i32.const 3 + call $~lib/builtins/abort + unreachable end - i32.const 56 + local.get $0 + f64.const 10 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 584 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + f64.const 11 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 585 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + f64.const 5 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $1 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 586 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - call $~lib/util/number/dtoa_core - local.tee $2 - i32.const 28 - i32.eq + f64.const 5 + i32.const 2 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + i32.const -1 + i32.ne if + i32.const 0 + i32.const 1312 + i32.const 587 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $3 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + ) + (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) + local.get $0 + i32.const 10 + i32.ge_u + i32.const 1 + i32.add + local.get $0 + i32.const 10000 + i32.ge_u + i32.const 3 + i32.add + local.get $0 + i32.const 1000 + i32.ge_u + i32.add + local.get $0 + i32.const 100 + i32.lt_u + select + local.get $0 + i32.const 1000000 + i32.ge_u + i32.const 6 + i32.add + local.get $0 + i32.const 1000000000 + i32.ge_u + i32.const 8 + i32.add + local.get $0 + i32.const 100000000 + i32.ge_u + i32.add + local.get $0 + i32.const 10000000 + i32.lt_u + select + local.get $0 + i32.const 100000 + i32.lt_u + select + ) + (func $~lib/util/number/utoa32_core (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + loop $do-continue|0 local.get $1 - call $~lib/rt/pure/__retain + 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 + i32.sub + local.tee $2 + i32.const 1 + i32.shl + i32.add + local.get $3 + i32.const 48 + i32.add + i32.store16 + local.get $1 + br_if $do-continue|0 + end + ) + (func $~lib/util/number/itoa32 (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.eqz + if + i32.const 2944 return end - local.get $1 + 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 + local.get $0 + call $~lib/util/number/decimalCount32 local.get $2 - call $~lib/string/String#substring + i32.add + local.tee $3 + i32.const 1 + i32.shl + local.set $1 call $~lib/rt/tlsf/maybeInitialize local.get $1 - call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $0 + local.get $3 + call $~lib/util/number/utoa32_core + local.get $2 + if + local.get $1 + i32.const 45 + i32.store16 + end + local.get $1 + call $~lib/rt/pure/__retain ) - (func $~lib/util/number/dtoa_stream (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -18814,191 +17596,146 @@ i32.add local.set $0 local.get $2 - f64.const 0 - f64.eq + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const 0 + i32.lt_s + local.tee $1 if local.get $0 - i32.const 48 + i32.const 45 i32.store16 + i32.const 0 + local.get $2 + i32.sub + local.set $2 + end + local.get $2 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const 10 + i32.lt_u + if local.get $0 - i32.const 46 - i32.store16 offset=2 - local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.get $2 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s i32.const 48 - i32.store16 offset=4 - i32.const 3 + i32.or + i32.store16 + local.get $1 + i32.const 1 + i32.add return end local.get $2 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + local.tee $2 + call $~lib/util/number/decimalCount32 + local.get $1 + i32.add + local.set $1 + local.get $0 local.get $2 - f64.sub - f64.const 0 - f64.ne - if - local.get $2 - local.get $2 - f64.ne - if - local.get $0 - i32.const 78 - i32.store16 - local.get $0 - i32.const 97 - i32.store16 offset=2 - local.get $0 - i32.const 78 - i32.store16 offset=4 - i32.const 3 - return - else - local.get $2 - f64.const 0 - f64.lt - local.tee $1 - if - local.get $0 - i32.const 45 - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $0 - i64.const 29555310648492105 - i64.store - local.get $0 - i64.const 34058970405077102 - i64.store offset=8 - local.get $1 - i32.const 8 - i32.add - return - end - unreachable - end - local.get $0 - local.get $2 - call $~lib/util/number/dtoa_core + local.get $1 + call $~lib/util/number/utoa32_core + local.get $1 ) - (func $~lib/util/string/joinFloatArray (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (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 1 + i32.const 0 + local.get $0 + i32.const 16 i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $2 + i32.const 0 + local.get $2 + i32.lt_s + select local.tee $3 + local.get $1 + i32.const 0 + local.get $1 i32.const 0 + i32.gt_s + select + local.tee $1 + local.get $2 + local.get $1 + local.get $2 i32.lt_s - if - i32.const 2928 - return - end + select + local.tee $1 + local.get $3 + local.get $1 + i32.gt_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 + select + i32.const 1 + i32.shl + local.tee $1 + i32.sub + local.tee $3 i32.eqz if - local.get $0 - f32.load - f64.promote_f32 - call $~lib/util/number/dtoa + i32.const 2928 return end - local.get $3 - i32.const 2976 - call $~lib/string/String#get:length - local.tee $4 - i32.const 28 - i32.add - i32.mul - i32.const 28 - i32.add - local.tee $6 + i32.const 0 + local.get $4 + local.get $2 i32.const 1 i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - local.get $0 - local.get $5 - i32.const 2 - i32.shl - i32.add - f32.load - f64.promote_f32 - call $~lib/util/number/dtoa_stream - local.get $2 - i32.add - local.set $2 - local.get $4 - if - local.get $1 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 2976 - local.get $4 - i32.const 1 - i32.shl - call $~lib/util/memory/memmove - local.get $2 - local.get $4 - i32.add - local.set $2 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $6 + i32.eq local.get $1 - local.get $2 - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add - f32.load - f64.promote_f32 - call $~lib/util/number/dtoa_stream - local.get $2 - i32.add - local.tee $0 - i32.gt_s + select if - local.get $1 local.get $0 - call $~lib/string/String#substring - local.get $1 - call $~lib/rt/pure/__release + call $~lib/rt/pure/__retain return end - local.get $1 - ) - (func $~lib/typedarray/Float32Array#join (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 + call $~lib/rt/tlsf/maybeInitialize + local.get $3 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - call $~lib/util/string/joinFloatArray + local.get $1 + i32.add + local.get $3 + call $~lib/util/memory/memmove + local.get $2 + call $~lib/rt/pure/__retain ) - (func $~lib/util/string/joinFloatArray (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -19018,24 +17755,31 @@ i32.eqz if local.get $0 - f64.load - call $~lib/util/number/dtoa + i32.load8_s + call $~lib/util/number/itoa32 return end local.get $3 - i32.const 2976 - call $~lib/string/String#get:length + i32.const 2972 + i32.load + i32.const 1 + i32.shr_u local.tee $4 - i32.const 28 + i32.const 11 i32.add i32.mul - i32.const 28 + i32.const 11 i32.add local.tee $6 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -19047,11 +17791,9 @@ local.get $2 local.get $0 local.get $5 - i32.const 3 - i32.shl i32.add - f64.load - call $~lib/util/number/dtoa_stream + i32.load8_s + call $~lib/util/number/itoa_stream local.get $2 i32.add local.set $2 @@ -19084,11 +17826,9 @@ local.get $2 local.get $0 local.get $3 - i32.const 3 - i32.shl i32.add - f64.load - call $~lib/util/number/dtoa_stream + i32.load8_s + call $~lib/util/number/itoa_stream local.get $2 i32.add local.tee $0 @@ -19103,2557 +17843,3005 @@ end local.get $1 ) - (func $~lib/typedarray/Float64Array#join (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - call $~lib/util/string/joinFloatArray - ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (param $0 i32) (result i32) - (local $1 i32) + (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 1073741808 - i32.gt_u + 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 - i32.const 1040 - i32.const 1088 - i32.const 49 - i32.const 43 - call $~lib/builtins/abort - unreachable + 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 - local.get $0 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $1 i32.const 0 + ) + (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - call $~lib/util/memory/memset local.get $1 - call $~lib/rt/pure/__retain + i32.eq + if + i32.const 1 + return + end + block $folding-inner0 + local.get $1 + i32.eqz + i32.const 1 + local.get $0 + select + br_if $folding-inner0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $2 + local.get $1 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + i32.ne + br_if $folding-inner0 + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/string/compareImpl + i32.eqz + return + end + i32.const 0 ) - (func $~lib/typedarray/Uint8Array.wrap@varargs (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 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 + i32.const 5 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 + 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 + i32.load offset=4 + local.get $0 + i32.load offset=8 + call $~lib/util/string/joinIntegerArray local.tee $2 - i32.gt_u + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz if - i32.const 1376 - i32.const 1440 - i32.const 1705 + i32.const 0 + i32.const 1312 + i32.const 629 i32.const 5 call $~lib/builtins/abort unreachable end - local.get $3 - i32.const 0 - i32.lt_s + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=8 + call $~lib/util/string/joinIntegerArray + local.tee $0 + local.get $0 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz if - local.get $3 - i32.const -1 - i32.eq - if (result i32) - local.get $2 - local.get $1 - i32.sub - else - i32.const 1040 - i32.const 1440 - i32.const 1714 - i32.const 7 - call $~lib/builtins/abort - unreachable - end - local.set $3 - else - local.get $1 - local.get $3 - i32.add - local.get $2 - i32.gt_s - if - i32.const 1040 - i32.const 1440 - i32.const 1719 - i32.const 7 - call $~lib/builtins/abort - unreachable - end + i32.const 0 + i32.const 1312 + i32.const 630 + i32.const 5 + call $~lib/builtins/abort + unreachable end - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $3 - i32.store offset=8 local.get $2 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/util/number/utoa32 (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) local.get $0 + i32.eqz + if + i32.const 2944 + return + end + local.get $0 + call $~lib/util/number/decimalCount32 + local.tee $2 + i32.const 1 + i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize local.get $1 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 i32.add - i32.store offset=4 + local.tee $1 + local.get $0 local.get $2 + call $~lib/util/number/utoa32_core + local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/arraybuffer/ArrayBuffer#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) + (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 16 - i32.sub - 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 + i32.const 1 + i32.shl + i32.add + local.set $0 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 + i32.const 255 + i32.and + i32.const 10 + i32.lt_u + if + local.get $0 local.get $2 - local.get $3 - i32.lt_s - select + i32.const 255 + i32.and + i32.const 48 + i32.or + i32.store16 + i32.const 1 + return end - local.get $1 - i32.sub - local.tee $2 - i32.const 0 local.get $2 - i32.const 0 - i32.gt_s - select + i32.const 255 + i32.and local.tee $2 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $3 + call $~lib/util/number/decimalCount32 + local.set $1 local.get $0 - local.get $1 - i32.add local.get $2 - call $~lib/util/memory/memmove - local.get $3 - call $~lib/rt/pure/__retain + local.get $1 + call $~lib/util/number/utoa32_core + local.get $1 ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> - (local $0 i32) - (local $1 i32) + (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 4252 - i32.load - local.tee $5 - call $~lib/typedarray/Int8Array#constructor - local.tee $6 - local.set $3 - loop $for-loop|0 - local.get $2 - local.get $5 - i32.lt_s - if - local.get $3 - local.get $2 - i32.const 4240 - local.get $2 - call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/typedarray/Int8Array#__set - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end + local.get $1 + i32.const 1 + i32.sub + local.tee $3 + i32.const 0 + i32.lt_s + if + i32.const 2928 + return end local.get $3 - i32.load - local.get $3 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $3 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.eqz + if + local.get $0 + i32.load8_u + call $~lib/util/number/utoa32 + return + end local.get $3 - i32.load offset=8 + i32.const 2972 + i32.load + i32.const 1 + i32.shr_u + local.tee $4 + i32.const 10 i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $2 + i32.mul + i32.const 10 + i32.add + local.tee $6 i32.const 1 - global.set $~argumentsLength - i32.const 0 - local.get $2 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $1 - i32.gt_u - if - i32.const 1376 - i32.const 1440 - i32.const 1705 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.set $0 - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $2 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $0 - i32.store offset=8 - local.get $1 - local.get $2 - i32.store offset=4 + i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize local.get $1 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.set $0 - loop $for-loop|1 - local.get $4 + local.set $1 + loop $for-loop|0 local.get $5 + local.get $3 i32.lt_s if - local.get $3 - local.get $4 - call $~lib/typedarray/Int8Array#__get + local.get $1 + local.get $2 local.get $0 + local.get $5 + i32.add + i32.load8_u + call $~lib/util/number/itoa_stream + local.get $2 + i32.add + local.set $2 local.get $4 - call $~lib/typedarray/Int8Array#__get - i32.ne if - i32.const 0 - i32.const 1312 - i32.const 684 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $1 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.const 2976 + local.get $4 + i32.const 1 + i32.shl + call $~lib/util/memory/memmove + local.get $2 + local.get $4 + i32.add + local.set $2 end - local.get $4 + local.get $5 i32.const 1 i32.add - local.set $4 - br $for-loop|1 + local.set $5 + br $for-loop|0 end end local.get $6 - call $~lib/rt/pure/__release + local.get $1 local.get $2 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + local.get $3 + i32.add + i32.load8_u + call $~lib/util/number/itoa_stream + local.get $2 + i32.add + local.tee $0 + i32.gt_s + if + local.get $1 + local.get $0 + call $~lib/string/String#substring + local.get $1 + call $~lib/rt/pure/__release + return + end + local.get $1 ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 4252 - i32.load - local.tee $3 + i32.const 5 call $~lib/typedarray/Uint8Array#constructor - local.tee $5 + local.tee $0 local.set $1 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 4240 - local.get $0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end + local.get $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 + i32.load offset=4 + local.get $0 + i32.load offset=8 + call $~lib/util/string/joinIntegerArray + local.tee $2 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 629 + i32.const 5 + call $~lib/builtins/abort + unreachable end local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 local.get $1 i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength - local.get $0 - i32.const 0 - call $~lib/typedarray/Uint8Array.wrap@varargs - local.set $4 - loop $for-loop|1 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - call $~lib/typedarray/Uint8Array#__get - local.get $4 - local.get $2 - call $~lib/typedarray/Uint8Array#__get - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 684 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 - end + call $~lib/util/string/joinIntegerArray + local.tee $1 + local.get $1 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 630 + i32.const 5 + call $~lib/builtins/abort + unreachable end - local.get $5 + local.get $2 call $~lib/rt/pure/__release - local.get $0 call $~lib/rt/pure/__release - local.get $4 + local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 4252 - i32.load - local.tee $5 + i32.const 5 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $6 - local.set $3 - loop $for-loop|0 - local.get $2 - local.get $5 - i32.lt_s - if - local.get $3 - local.get $2 - i32.const 4240 - local.get $2 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $3 - i32.load - local.get $3 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $3 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $3 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $2 - i32.const 1 - global.set $~argumentsLength + local.tee $0 + local.set $1 + local.get $0 i32.const 0 - local.get $2 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $1 - i32.gt_u + 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 + i32.load offset=4 + local.get $0 + i32.load offset=8 + call $~lib/util/string/joinIntegerArray + local.tee $2 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz if - i32.const 1376 - i32.const 1440 - i32.const 1705 + i32.const 0 + i32.const 1312 + i32.const 629 i32.const 5 call $~lib/builtins/abort unreachable end local.get $1 - local.set $0 - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $2 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $0 - i32.store offset=8 + i32.load offset=4 local.get $1 - local.get $2 - i32.store offset=4 + i32.load offset=8 + call $~lib/util/string/joinIntegerArray + local.tee $1 local.get $1 - call $~lib/rt/pure/__retain - local.set $0 - loop $for-loop|1 - local.get $4 - local.get $5 - i32.lt_s - if - local.get $3 - local.get $4 - call $~lib/typedarray/Uint8ClampedArray#__get - local.get $0 - local.get $4 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 684 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|1 - end + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 630 + i32.const 5 + call $~lib/builtins/abort + unreachable end - local.get $6 - call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 4252 - i32.load - local.tee $4 - call $~lib/typedarray/Int16Array#constructor - local.tee $6 - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 4240 - local.get $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.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 local.get $1 - i32.load offset=8 + i32.const 1 + i32.shl i32.add - call $~lib/arraybuffer/ArrayBuffer#slice local.set $0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 - local.get $0 + local.get $2 i32.const 16 - i32.sub - i32.load offset=12 - local.tee $5 - i32.gt_u + i32.shl + i32.const 16 + i32.shr_s + i32.const 0 + i32.lt_s + local.tee $1 if - i32.const 1376 - i32.const 1440 - i32.const 1705 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 45 + i32.store16 + i32.const 0 + local.get $2 + i32.sub + local.set $2 end - local.get $5 - i32.const 1 - i32.and + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.const 10 + i32.lt_u if - i32.const 1040 - i32.const 1440 - i32.const 1710 - i32.const 9 - call $~lib/builtins/abort - unreachable + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.const 48 + i32.or + i32.store16 + local.get $1 + i32.const 1 + i32.add + return end - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $5 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=4 local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - loop $for-loop|1 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $3 - call $~lib/typedarray/Int16Array#__get - local.get $2 - local.get $3 - call $~lib/typedarray/Int16Array#__get - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 684 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|1 - end - end - local.get $6 - call $~lib/rt/pure/__release + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + local.tee $2 + call $~lib/util/number/decimalCount32 + local.get $1 + i32.add + local.set $1 local.get $0 - call $~lib/rt/pure/__release local.get $2 - call $~lib/rt/pure/__release + local.get $1 + call $~lib/util/number/utoa32_core + local.get $1 ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> - (local $0 i32) - (local $1 i32) + (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 4252 + local.get $1 + i32.const 1 + i32.sub + local.tee $3 + i32.const 0 + i32.lt_s + if + i32.const 2928 + return + end + local.get $3 + i32.eqz + if + local.get $0 + i32.load16_s + call $~lib/util/number/itoa32 + return + end + local.get $3 + i32.const 2972 i32.load + i32.const 1 + i32.shr_u local.tee $4 - call $~lib/typedarray/Uint16Array#constructor + i32.const 11 + i32.add + i32.mul + i32.const 11 + i32.add local.tee $6 + i32.const 1 + i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $5 + local.get $3 i32.lt_s if local.get $1 + local.get $2 local.get $0 - i32.const 4240 - local.get $0 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set - local.get $0 + local.get $5 i32.const 1 + i32.shl i32.add - local.set $0 + i32.load16_s + call $~lib/util/number/itoa_stream + local.get $2 + i32.add + local.set $2 + local.get $4 + if + local.get $1 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.const 2976 + local.get $4 + i32.const 1 + i32.shl + call $~lib/util/memory/memmove + local.get $2 + local.get $4 + i32.add + local.set $2 + end + local.get $5 + i32.const 1 + i32.add + local.set $5 br $for-loop|0 end end + local.get $6 local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $2 + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_s + call $~lib/util/number/itoa_stream + local.get $2 + i32.add + local.tee $0 + i32.gt_s + if + local.get $1 + local.get $0 + call $~lib/string/String#substring + local.get $1 + call $~lib/rt/pure/__release + return + end local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + ) + (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 local.get $1 - i32.load offset=8 + i32.const 1 + i32.shl i32.add - call $~lib/arraybuffer/ArrayBuffer#slice local.set $0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $5 - i32.gt_u - if - i32.const 1376 - i32.const 1440 - i32.const 1705 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 1 + local.get $2 + i32.const 65535 i32.and + i32.const 10 + i32.lt_u if - i32.const 1040 - i32.const 1440 - i32.const 1710 - i32.const 9 - call $~lib/builtins/abort - unreachable + local.get $0 + local.get $2 + i32.const 65535 + i32.and + i32.const 48 + i32.or + i32.store16 + i32.const 1 + return end - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $5 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=4 local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - loop $for-loop|1 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $3 - call $~lib/typedarray/Uint16Array#__get - local.get $2 - local.get $3 - call $~lib/typedarray/Uint16Array#__get - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 684 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|1 - end - end - local.get $6 - call $~lib/rt/pure/__release + i32.const 65535 + i32.and + local.tee $2 + call $~lib/util/number/decimalCount32 + local.set $1 local.get $0 - call $~lib/rt/pure/__release local.get $2 - call $~lib/rt/pure/__release + local.get $1 + call $~lib/util/number/utoa32_core + local.get $1 ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> - (local $0 i32) - (local $1 i32) + (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 4252 + local.get $1 + i32.const 1 + i32.sub + local.tee $3 + i32.const 0 + i32.lt_s + if + i32.const 2928 + return + end + local.get $3 + i32.eqz + if + local.get $0 + i32.load16_u + call $~lib/util/number/utoa32 + return + end + local.get $3 + i32.const 2972 i32.load + i32.const 1 + i32.shr_u local.tee $4 - call $~lib/typedarray/Int32Array#constructor + i32.const 10 + i32.add + i32.mul + i32.const 10 + i32.add local.tee $6 + i32.const 1 + i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $5 + local.get $3 i32.lt_s if local.get $1 + local.get $2 local.get $0 - i32.const 4240 - local.get $0 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $5 i32.const 1 + i32.shl i32.add - local.set $0 + i32.load16_u + call $~lib/util/number/itoa_stream + local.get $2 + i32.add + local.set $2 + local.get $4 + if + local.get $1 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.const 2976 + local.get $4 + i32.const 1 + i32.shl + call $~lib/util/memory/memmove + local.get $2 + local.get $4 + i32.add + local.set $2 + end + local.get $5 + i32.const 1 + i32.add + local.set $5 br $for-loop|0 end end + local.get $6 local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $2 + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_u + call $~lib/util/number/itoa_stream + local.get $2 + i32.add + local.tee $0 + i32.gt_s + if + local.get $1 + local.get $0 + call $~lib/string/String#substring + local.get $1 + call $~lib/rt/pure/__release + return + end local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + ) + (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 local.get $1 - i32.load offset=8 + i32.const 1 + i32.shl i32.add - call $~lib/arraybuffer/ArrayBuffer#slice local.set $0 - i32.const 1 - global.set $~argumentsLength + local.get $2 i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $5 - i32.gt_u + i32.lt_s + local.tee $1 if - i32.const 1376 - i32.const 1440 - i32.const 1705 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 45 + i32.store16 + i32.const 0 + local.get $2 + i32.sub + local.set $2 end - local.get $5 - i32.const 3 - i32.and + local.get $2 + i32.const 10 + i32.lt_u if - i32.const 1040 - i32.const 1440 - i32.const 1710 - i32.const 9 - call $~lib/builtins/abort - unreachable + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.get $2 + i32.const 48 + i32.or + i32.store16 + local.get $1 + i32.const 1 + i32.add + return end - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/__alloc - local.tee $2 local.get $0 - call $~lib/rt/pure/__retain - i32.store local.get $2 - local.get $5 - i32.store offset=8 local.get $2 + call $~lib/util/number/decimalCount32 + local.get $1 + i32.add + local.tee $0 + call $~lib/util/number/utoa32_core local.get $0 - i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - loop $for-loop|1 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $3 - call $~lib/typedarray/Int32Array#__get - local.get $2 - local.get $3 - call $~lib/typedarray/Int32Array#__get - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 684 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|1 - end - end - local.get $6 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> - (local $0 i32) - (local $1 i32) + (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 4252 + local.get $1 + i32.const 1 + i32.sub + local.tee $3 + i32.const 0 + i32.lt_s + if + i32.const 2928 + return + end + local.get $3 + i32.eqz + if + local.get $0 + i32.load + call $~lib/util/number/itoa32 + return + end + local.get $3 + i32.const 2972 i32.load + i32.const 1 + i32.shr_u local.tee $4 - call $~lib/typedarray/Uint32Array#constructor + i32.const 11 + i32.add + i32.mul + i32.const 11 + i32.add local.tee $6 + i32.const 1 + i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $5 + local.get $3 i32.lt_s if local.get $1 + local.get $2 local.get $0 - i32.const 4240 - local.get $0 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + call $~lib/util/number/itoa_stream + local.get $2 + i32.add + local.set $2 + local.get $4 + if + local.get $1 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.const 2976 + local.get $4 + i32.const 1 + i32.shl + call $~lib/util/memory/memmove + local.get $2 + local.get $4 + i32.add + local.set $2 + end + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|0 end end + local.get $6 local.get $1 + local.get $2 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add i32.load + call $~lib/util/number/itoa_stream + local.get $2 + i32.add + local.tee $0 + i32.gt_s + if + local.get $1 + local.get $0 + call $~lib/string/String#substring + local.get $1 + call $~lib/rt/pure/__release + return + end local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + ) + (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 local.get $1 - i32.load offset=8 + i32.const 1 + i32.shl i32.add - call $~lib/arraybuffer/ArrayBuffer#slice local.set $0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $5 - i32.gt_u - if - i32.const 1376 - i32.const 1440 - i32.const 1705 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 3 - i32.and + local.get $2 + i32.const 10 + i32.lt_u if - i32.const 1040 - i32.const 1440 - i32.const 1710 - i32.const 9 - call $~lib/builtins/abort - unreachable + local.get $0 + local.get $2 + i32.const 48 + i32.or + i32.store16 + i32.const 1 + return end - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/__alloc - local.tee $2 local.get $0 - call $~lib/rt/pure/__retain - i32.store local.get $2 - local.get $5 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=4 local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - loop $for-loop|1 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $3 - call $~lib/typedarray/Uint32Array#__get - local.get $2 - local.get $3 - call $~lib/typedarray/Uint32Array#__get - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 684 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|1 - end - end - local.get $6 - call $~lib/rt/pure/__release + call $~lib/util/number/decimalCount32 + local.tee $0 + call $~lib/util/number/utoa32_core local.get $0 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> - (local $0 i32) - (local $1 i32) + (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 4252 - i32.load - local.tee $4 - call $~lib/typedarray/Int64Array#constructor - local.tee $6 - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 4240 - local.get $0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 i32.const 1 - global.set $~argumentsLength - i32.const 0 - local.get $0 - i32.const 16 i32.sub - i32.load offset=12 - local.tee $5 - i32.gt_u + local.tee $3 + i32.const 0 + i32.lt_s if - i32.const 1376 - i32.const 1440 - i32.const 1705 - i32.const 5 - call $~lib/builtins/abort - unreachable + i32.const 2928 + return end - local.get $5 - i32.const 7 - i32.and + local.get $3 + i32.eqz if - i32.const 1040 - i32.const 1440 - i32.const 1710 - i32.const 9 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.load + call $~lib/util/number/utoa32 + return end - i32.const 12 + local.get $3 + i32.const 2972 + i32.load + i32.const 1 + i32.shr_u + local.tee $4 i32.const 10 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $5 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=4 - local.get $2 + i32.add + i32.mul + i32.const 10 + i32.add + local.tee $6 + i32.const 1 + i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.set $2 - loop $for-loop|1 + local.set $1 + loop $for-loop|0 + local.get $5 local.get $3 - local.get $4 i32.lt_s if local.get $1 - local.get $3 - call $~lib/typedarray/Int64Array#__get local.get $2 - local.get $3 - call $~lib/typedarray/Int64Array#__get - i64.ne + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + call $~lib/util/number/itoa_stream + local.get $2 + i32.add + local.set $2 + local.get $4 if - i32.const 0 - i32.const 1312 - i32.const 684 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $1 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.const 2976 + local.get $4 + i32.const 1 + i32.shl + call $~lib/util/memory/memmove + local.get $2 + local.get $4 + i32.add + local.set $2 end - local.get $3 + local.get $5 i32.const 1 i32.add - local.set $3 - br $for-loop|1 + local.set $5 + br $for-loop|0 end end local.get $6 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + local.get $1 local.get $2 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 4252 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add i32.load - local.tee $4 - call $~lib/typedarray/Uint64Array#constructor - local.tee $6 - local.set $1 - loop $for-loop|0 + call $~lib/util/number/itoa_stream + local.get $2 + i32.add + local.tee $0 + i32.gt_s + if + local.get $1 local.get $0 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 4240 - local.get $0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end + call $~lib/string/String#substring + local.get $1 + call $~lib/rt/pure/__release + return end local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 + ) + (func $~lib/util/number/decimalCount64High (param $0 i64) (result i32) + local.get $0 + i64.const 100000000000 + i64.ge_u + i32.const 10 + i32.add + local.get $0 + i64.const 10000000000 + i64.ge_u + i32.add + local.get $0 + i64.const 100000000000000 + i64.ge_u + i32.const 13 + i32.add + local.get $0 + i64.const 10000000000000 + i64.ge_u i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 local.get $0 + i64.const 1000000000000 + i64.lt_u + select + local.get $0 + i64.const 10000000000000000 + i64.ge_u i32.const 16 - i32.sub - i32.load offset=12 - local.tee $5 - i32.gt_u - if - i32.const 1376 - i32.const 1440 - i32.const 1705 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 7 - i32.and - if - i32.const 1040 - i32.const 1440 - i32.const 1710 - i32.const 9 - call $~lib/builtins/abort - unreachable - end - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/__alloc - local.tee $2 + i32.add local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $5 - i32.store offset=8 - local.get $2 + i64.const -8446744073709551616 + i64.ge_u + i32.const 18 + i32.add local.get $0 - i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - loop $for-loop|1 + i64.const 1000000000000000000 + i64.ge_u + i32.add + local.get $0 + i64.const 100000000000000000 + i64.lt_u + select + local.get $0 + i64.const 1000000000000000 + i64.lt_u + select + ) + (func $~lib/util/number/utoa64_core (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 + i32.sub + local.tee $2 + i32.const 1 + i32.shl + i32.add + local.get $3 + i32.const 48 + i32.add + i32.store16 + local.get $1 + i64.const 0 + i64.ne + br_if $do-continue|0 + end + ) + (func $~lib/util/number/itoa64 (param $0 i64) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i64.eqz + if + i32.const 2944 + return + end + 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 + local.get $0 + i64.const 4294967295 + i64.le_u + if + local.get $0 + i32.wrap_i64 + local.tee $3 + call $~lib/util/number/decimalCount32 + local.get $2 + i32.add + local.tee $4 + i32.const 1 + i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 local.get $3 local.get $4 - i32.lt_s - if - local.get $1 - local.get $3 - call $~lib/typedarray/Uint64Array#__get - local.get $2 - local.get $3 - call $~lib/typedarray/Uint64Array#__get - i64.ne - if - i32.const 0 - i32.const 1312 - i32.const 684 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|1 - end + call $~lib/util/number/utoa32_core + else + local.get $0 + call $~lib/util/number/decimalCount64High + local.get $2 + i32.add + local.tee $3 + i32.const 1 + i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $0 + local.get $3 + call $~lib/util/number/utoa64_core end - local.get $6 - call $~lib/rt/pure/__release + local.get $2 + if + local.get $1 + i32.const 45 + i32.store16 + end + local.get $1 + call $~lib/rt/pure/__retain + ) + (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) + local.get $1 + i32.const 1 + i32.shl local.get $0 - call $~lib/rt/pure/__release + i32.add + local.set $1 local.get $2 - call $~lib/rt/pure/__release + i64.const 0 + i64.lt_s + local.tee $0 + if + local.get $1 + i32.const 45 + i32.store16 + i64.const 0 + local.get $2 + i64.sub + local.set $2 + end + local.get $2 + i64.const 10 + i64.lt_u + if + local.get $0 + i32.const 1 + i32.shl + local.get $1 + i32.add + local.get $2 + i64.const 48 + i64.or + i64.store16 + local.get $0 + i32.const 1 + i32.add + return + end + local.get $2 + i64.const 4294967295 + i64.le_u + if + local.get $2 + i32.wrap_i64 + local.tee $3 + call $~lib/util/number/decimalCount32 + local.get $0 + i32.add + local.set $0 + local.get $1 + local.get $3 + local.get $0 + call $~lib/util/number/utoa32_core + else + local.get $1 + local.get $2 + local.get $2 + call $~lib/util/number/decimalCount64High + local.get $0 + i32.add + local.tee $0 + call $~lib/util/number/utoa64_core + end + local.get $0 ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> - (local $0 i32) - (local $1 i32) + (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 4252 + local.get $1 + i32.const 1 + i32.sub + local.tee $3 + i32.const 0 + i32.lt_s + if + i32.const 2928 + return + end + local.get $3 + i32.eqz + if + local.get $0 + i64.load + call $~lib/util/number/itoa64 + return + end + local.get $3 + i32.const 2972 i32.load + i32.const 1 + i32.shr_u local.tee $4 - call $~lib/typedarray/Float32Array#constructor + i32.const 21 + i32.add + i32.mul + i32.const 21 + i32.add local.tee $6 + i32.const 1 + i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $5 + local.get $3 i32.lt_s if local.get $1 + local.get $2 local.get $0 - i32.const 4240 - local.get $0 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 1 + local.get $5 + i32.const 3 + i32.shl i32.add - local.set $0 - br $for-loop|0 + i64.load + call $~lib/util/number/itoa_stream + local.get $2 + i32.add + local.set $2 + local.get $4 + if + local.get $1 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.const 2976 + local.get $4 + i32.const 1 + i32.shl + call $~lib/util/memory/memmove + local.get $2 + local.get $4 + i32.add + local.set $2 + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 end end + local.get $6 local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 + local.get $2 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $5 - i32.gt_u - if - i32.const 1376 - i32.const 1440 - i32.const 1705 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 + local.get $3 i32.const 3 - i32.and + i32.shl + i32.add + i64.load + call $~lib/util/number/itoa_stream + local.get $2 + i32.add + local.tee $0 + i32.gt_s if - i32.const 1040 - i32.const 1440 - i32.const 1710 - i32.const 9 - call $~lib/builtins/abort - unreachable + local.get $1 + local.get $0 + call $~lib/string/String#substring + local.get $1 + call $~lib/rt/pure/__release + return end - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/__alloc - local.tee $2 + local.get $1 + ) + (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) + local.get $1 + i32.const 1 + i32.shl local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $5 - i32.store offset=8 + i32.add + local.set $0 local.get $2 - local.get $0 - i32.store offset=4 + i64.const 10 + i64.lt_u + if + local.get $0 + local.get $2 + i64.const 48 + i64.or + i64.store16 + i32.const 1 + return + end local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - loop $for-loop|1 + i64.const 4294967295 + i64.le_u + if + local.get $2 + i32.wrap_i64 + local.tee $3 + call $~lib/util/number/decimalCount32 + local.set $1 + local.get $0 local.get $3 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $3 - call $~lib/typedarray/Float32Array#__get - local.get $2 - local.get $3 - call $~lib/typedarray/Float32Array#__get - f32.ne - if - i32.const 0 - i32.const 1312 - i32.const 684 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|1 - end + local.get $1 + call $~lib/util/number/utoa32_core + else + local.get $0 + local.get $2 + local.get $2 + call $~lib/util/number/decimalCount64High + local.tee $1 + call $~lib/util/number/utoa64_core end - local.get $6 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release + local.get $1 ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> - (local $0 i32) - (local $1 i32) + (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - i32.const 4252 + (local $7 i32) + local.get $1 + i32.const 1 + i32.sub + local.tee $3 + i32.const 0 + i32.lt_s + if + i32.const 2928 + return + end + local.get $3 + i32.eqz + if + block $__inlined_func$~lib/util/number/utoa64 (result i32) + i32.const 2944 + local.get $0 + i64.load + local.tee $4 + i64.eqz + br_if $__inlined_func$~lib/util/number/utoa64 + drop + local.get $4 + i64.const 4294967295 + i64.le_u + if + local.get $4 + i32.wrap_i64 + local.tee $1 + call $~lib/util/number/decimalCount32 + local.tee $2 + i32.const 1 + i32.shl + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa32_core + else + local.get $4 + call $~lib/util/number/decimalCount64High + local.tee $1 + i32.const 1 + i32.shl + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $0 + local.get $4 + local.get $1 + call $~lib/util/number/utoa64_core + end + local.get $0 + call $~lib/rt/pure/__retain + end + return + end + local.get $3 + i32.const 2972 i32.load - local.tee $4 - call $~lib/typedarray/Float64Array#constructor - local.tee $6 + i32.const 1 + i32.shr_u + local.tee $5 + i32.const 20 + i32.add + i32.mul + i32.const 20 + i32.add + local.tee $7 + i32.const 1 + i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $6 + local.get $3 i32.lt_s if local.get $1 + local.get $2 local.get $0 - i32.const 4240 - local.get $0 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $6 + i32.const 3 + i32.shl + i32.add + i64.load + call $~lib/util/number/itoa_stream + local.get $2 + i32.add + local.set $2 + local.get $5 + if + local.get $1 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.const 2976 + local.get $5 + i32.const 1 + i32.shl + call $~lib/util/memory/memmove + local.get $2 + local.get $5 + i32.add + local.set $2 + end + local.get $6 i32.const 1 i32.add - local.set $0 + local.set $6 br $for-loop|0 end end + local.get $7 local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 + local.get $2 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $5 - i32.gt_u - if - i32.const 1376 - i32.const 1440 - i32.const 1705 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 7 - i32.and + local.get $3 + i32.const 3 + i32.shl + i32.add + i64.load + call $~lib/util/number/itoa_stream + local.get $2 + i32.add + local.tee $0 + i32.gt_s if - i32.const 1040 - i32.const 1440 - i32.const 1710 - i32.const 9 - call $~lib/builtins/abort - unreachable + local.get $1 + local.get $0 + call $~lib/string/String#substring + local.get $1 + call $~lib/rt/pure/__release + return end - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/__alloc + local.get $1 + ) + (func $~lib/util/number/umul64f (param $0 i64) (param $1 i64) (result i64) + (local $2 i64) + (local $3 i64) + local.get $1 + i64.const 4294967295 + i64.and local.tee $2 local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $5 - i32.store offset=8 + i64.const 32 + i64.shr_u + local.tee $3 + i64.mul local.get $2 local.get $0 - i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - loop $for-loop|1 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $3 - call $~lib/typedarray/Float64Array#__get - local.get $2 - local.get $3 - call $~lib/typedarray/Float64Array#__get - f64.ne - if - i32.const 0 - i32.const 1312 - i32.const 684 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|1 - end - end - local.get $6 - call $~lib/rt/pure/__release + i64.const 4294967295 + i64.and + local.tee $2 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.set $0 + local.get $3 + local.get $1 + i64.const 32 + i64.shr_u + local.tee $1 + i64.mul local.get $0 - call $~lib/rt/pure/__release + i64.const 32 + i64.shr_u + i64.add + local.get $1 local.get $2 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,i32> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 4316 - i32.load + i64.mul local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 - call $~lib/builtins/abort - unreachable - end + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + i64.add + ) + (func $~lib/util/number/grisuRound (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i64) local.get $0 - i32.load offset=4 - local.set $0 - i32.const 4308 - i32.load - local.set $2 - i32.const 4316 - i32.load - local.set $3 - loop $for-loop|0 - local.get $1 + local.get $1 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.tee $0 + i32.load16_u + local.set $1 + loop $while-continue|1 + i32.const 1 + local.get $5 local.get $3 - i32.lt_s + i64.sub + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.sub + i64.gt_u + local.get $3 + local.get $4 + i64.add + local.get $5 + i64.lt_u + select + i32.const 0 + local.get $2 + local.get $3 + i64.sub + local.get $4 + i64.ge_u + i32.const 0 + local.get $3 + local.get $5 + i64.lt_u + select + select if - local.get $0 - local.get $1 - i32.add - local.get $2 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - i32.store8 local.get $1 i32.const 1 - i32.add + i32.sub local.set $1 - br $for-loop|0 + local.get $3 + local.get $4 + i64.add + local.set $3 + br $while-continue|1 end end - ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 - i32.load offset=8 - local.tee $3 local.get $1 - i32.load offset=12 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 712 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - loop $for-loop|0 - local.get $2 + i32.store16 + ) + (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i32) (param $4 i64) (param $5 i32) (result i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i64) + (local $10 i64) + (local $11 i64) + (local $12 i64) + local.get $2 + local.get $1 + i64.sub + local.set $9 + local.get $2 + i64.const 1 + i32.const 0 + local.get $3 + i32.sub + local.tee $8 + i64.extend_i32_s + i64.shl + local.tee $10 + i64.const 1 + i64.sub + local.tee $11 + i64.and + local.set $1 + local.get $2 + local.get $8 + i64.extend_i32_s + i64.shr_u + i32.wrap_i64 + local.tee $6 + call $~lib/util/number/decimalCount32 + local.set $3 + loop $while-continue|0 local.get $3 - i32.lt_s + i32.const 0 + i32.gt_s if - local.get $0 - local.get $2 - call $~lib/typedarray/Int8Array#__get - local.tee $4 + block $break|1 + block $case10|1 + block $case9|1 + block $case8|1 + block $case7|1 + block $case6|1 + block $case5|1 + block $case4|1 + block $case3|1 + block $case2|1 + block $case1|1 + local.get $3 + local.tee $7 + i32.const 10 + i32.ne + if + local.get $7 + i32.const 1 + i32.sub + br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 + end + local.get $6 + i32.const 1000000000 + i32.div_u + local.set $3 + local.get $6 + i32.const 1000000000 + i32.rem_u + local.set $6 + br $break|1 + end + local.get $6 + i32.const 100000000 + i32.div_u + local.set $3 + local.get $6 + i32.const 100000000 + i32.rem_u + local.set $6 + br $break|1 + end + local.get $6 + i32.const 10000000 + i32.div_u + local.set $3 + local.get $6 + i32.const 10000000 + i32.rem_u + local.set $6 + br $break|1 + end + local.get $6 + i32.const 1000000 + i32.div_u + local.set $3 + local.get $6 + i32.const 1000000 + i32.rem_u + local.set $6 + br $break|1 + end + local.get $6 + i32.const 100000 + i32.div_u + local.set $3 + local.get $6 + i32.const 100000 + i32.rem_u + local.set $6 + br $break|1 + end + local.get $6 + i32.const 10000 + i32.div_u + local.set $3 + local.get $6 + i32.const 10000 + i32.rem_u + local.set $6 + br $break|1 + end + local.get $6 + i32.const 1000 + i32.div_u + local.set $3 + local.get $6 + i32.const 1000 + i32.rem_u + local.set $6 + br $break|1 + end + local.get $6 + i32.const 100 + i32.div_u + local.set $3 + local.get $6 + i32.const 100 + i32.rem_u + local.set $6 + br $break|1 + end + local.get $6 + i32.const 10 + i32.div_u + local.set $3 + local.get $6 + i32.const 10 + i32.rem_u + local.set $6 + br $break|1 + end + local.get $6 + local.set $3 + i32.const 0 + local.set $6 + br $break|1 + end + i32.const 0 + local.set $3 + end + local.get $3 + local.get $5 + i32.or + if + local.get $0 + local.get $5 + i32.const 1 + i32.shl + i32.add + local.get $3 + i32.const 65535 + i32.and + i32.const 48 + i32.add + i32.store16 + local.get $5 + i32.const 1 + i32.add + local.set $5 + end + local.get $7 + i32.const 1 + i32.sub + local.set $3 local.get $1 - local.get $2 - call $~lib/array/Array#__unchecked_get - local.tee $5 - i32.ne + local.get $6 + i64.extend_i32_u + local.get $8 + i64.extend_i32_s + i64.shl + i64.add + local.tee $2 + local.get $4 + i64.le_u if - i32.const 4576 - i32.const 3 - local.get $2 - f64.convert_i32_s + local.get $3 + global.get $~lib/util/number/_K + i32.add + global.set $~lib/util/number/_K + local.get $0 + local.get $5 local.get $4 - f64.convert_i32_s + local.get $2 + local.get $3 + i32.const 2 + i32.shl + i32.const 4056 + i32.add + i64.load32_u + local.get $8 + i64.extend_i32_s + i64.shl + local.get $9 + call $~lib/util/number/grisuRound local.get $5 - f64.convert_i32_s - f64.const 0 - f64.const 0 - call $~lib/builtins/trace - i32.const 0 - i32.const 1312 - i32.const 718 - i32.const 7 - call $~lib/builtins/abort - unreachable + return end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + br $while-continue|0 end end - ) - (func $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 6 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 6 - i32.add - local.set $0 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $1 - loop $for-loop|0 - local.get $2 + local.get $8 + i64.extend_i32_s + local.set $2 + loop $while-continue|2 + local.get $4 + i64.const 10 + i64.mul + local.set $4 local.get $1 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - local.get $3 - local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - i64.store8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) - local.get $1 - i32.load offset=8 - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - call $~lib/util/memory/memmove - ) - (func $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 4 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $1 - loop $for-loop|0 + i64.const 10 + i64.mul + local.tee $1 local.get $2 - local.get $1 - i32.lt_s + i64.shr_u + local.tee $12 + local.get $5 + i64.extend_i32_s + i64.or + i64.const 0 + i64.ne if local.get $0 - local.get $2 - i32.add - local.get $3 - local.get $2 + local.get $5 i32.const 1 i32.shl i32.add - i32.load16_s - i32.store8 - local.get $2 + local.get $12 + i32.wrap_i64 + i32.const 65535 + i32.and + i32.const 48 + i32.add + i32.store16 + local.get $5 i32.const 1 i32.add - local.set $2 - br $for-loop|0 + local.set $5 end + local.get $3 + i32.const 1 + i32.sub + local.set $3 + local.get $1 + local.get $11 + i64.and + local.tee $1 + local.get $4 + i64.ge_u + br_if $while-continue|2 end - ) - (func $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,i8> (param $0 i32) - i32.const 4524 - i32.load - i32.const 7 + local.get $3 + global.get $~lib/util/number/_K i32.add + global.set $~lib/util/number/_K local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 7 + local.get $5 + local.get $4 + local.get $1 + local.get $10 + local.get $9 + i32.const 0 + local.get $3 + i32.sub + i32.const 2 + i32.shl + i32.const 4056 i32.add - i32.const 4516 - i32.load - i32.const 4520 - i32.load - call $~lib/util/memory/memmove + i64.load32_u + i64.mul + call $~lib/util/number/grisuRound + local.get $5 ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> - (local $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/util/number/grisu2 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) - (local $6 i32) + (local $6 i64) (local $7 i32) - (local $8 f32) - (local $9 f64) - (local $10 i32) - (local $11 i32) - (local $12 i32) - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $3 + local.get $0 + i64.reinterpret_f64 + local.tee $4 + i64.const 9218868437227405312 + i64.and + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.tee $5 i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set + i32.ne + i64.extend_i32_u + i64.const 52 + i64.shl + local.get $4 + i64.const 4503599627370495 + i64.and + i64.add + local.tee $4 + i64.const 1 + i64.shl + i64.const 1 + i64.add + local.tee $6 + i64.clz + i32.wrap_i64 + local.set $3 + local.get $6 local.get $3 + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_plus + local.get $5 i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set - local.get $3 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - i32.const 4 - call $~lib/typedarray/Uint8Array#constructor - local.tee $2 - i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set - local.get $2 + local.get $5 + select + i32.const 1075 + i32.sub + local.tee $5 i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set - local.get $2 - i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set - local.get $2 - i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $4 - i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set + i32.sub + local.get $3 + i32.sub + local.set $3 local.get $4 - i32.const 1 - i32.const 1001 - call $~lib/typedarray/Int16Array#__set local.get $4 - i32.const 2 - i32.const 1002 - call $~lib/typedarray/Int16Array#__set - i32.const 10 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,i32> - local.get $1 - i32.const 10 - i32.const 0 - i32.const 14 - i32.const 4544 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - block $folding-inner0 - i32.const 4380 - i32.load - i32.const 3 - i32.add + i64.const 4503599627370496 + i64.eq + i32.const 1 + i32.add + local.tee $7 + i64.extend_i32_s + i64.shl + i64.const 1 + i64.sub + local.get $5 + local.get $7 + i32.sub + local.get $3 + i32.sub + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_minus + local.get $3 + global.set $~lib/util/number/_exp + i32.const 348 + i32.const -61 + global.get $~lib/util/number/_exp + i32.sub + f64.convert_i32_s + f64.const 0.30102999566398114 + f64.mul + f64.const 347 + f64.add + local.tee $0 + i32.trunc_f64_s + local.tee $3 + local.get $3 + f64.convert_i32_s + local.get $0 + f64.ne + i32.add + i32.const 3 + i32.shr_s + i32.const 1 + i32.add + local.tee $3 + i32.const 3 + i32.shl + local.tee $7 + i32.sub + global.set $~lib/util/number/_K + local.get $7 + i32.const 3184 + i32.add + i64.load + global.set $~lib/util/number/_frc_pow + local.get $3 + i32.const 1 + i32.shl + i32.const 3880 + i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow + global.get $~lib/util/number/_exp_pow + local.set $3 + local.get $1 + local.get $4 + local.get $4 + i64.clz + i32.wrap_i64 + i64.extend_i32_s + i64.shl + global.get $~lib/util/number/_frc_pow + local.tee $4 + call $~lib/util/number/umul64f + global.get $~lib/util/number/_frc_plus + local.get $4 + call $~lib/util/number/umul64f + i64.const 1 + i64.sub + local.tee $6 + global.get $~lib/util/number/_exp + local.get $3 + i32.add + i32.const -64 + i32.sub + local.get $6 + global.get $~lib/util/number/_frc_minus + local.get $4 + call $~lib/util/number/umul64f + i64.const 1 + i64.add + i64.sub + local.get $2 + call $~lib/util/number/genDigits + ) + (func $~lib/util/number/genExponent (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.const 0 + i32.lt_s + local.tee $2 + if + i32.const 0 local.get $1 - i32.load offset=8 - i32.gt_s - br_if $folding-inner0 + i32.sub + local.set $1 + end + local.get $1 + local.get $1 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.tee $1 + call $~lib/util/number/utoa32_core + local.get $0 + i32.const 45 + i32.const 43 + local.get $2 + select + i32.store16 + local.get $1 + ) + (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $2 + i32.eqz + if + local.get $0 local.get $1 - i32.load offset=4 - i32.const 3 + i32.const 1 + i32.shl i32.add - local.set $5 - i32.const 4372 - i32.load - local.set $6 - i32.const 4380 - i32.load - local.set $7 + i32.const 3145774 + i32.store + local.get $1 + i32.const 2 + i32.add + return + end + local.get $1 + local.get $1 + local.get $2 + i32.add + local.tee $3 + i32.le_s + if (result i32) + local.get $3 + i32.const 21 + i32.le_s + else + i32.const 0 + end + if (result i32) loop $for-loop|0 - local.get $0 - local.get $7 + local.get $1 + local.get $3 i32.lt_s if local.get $0 - local.get $5 - i32.add - local.get $6 - local.get $0 - i32.const 2 + local.get $1 + i32.const 1 i32.shl i32.add - f32.load - local.tee $8 - local.get $8 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $8 - i32.trunc_f32_s - else - i32.const 0 - end - i32.store8 - local.get $0 + i32.const 48 + i32.store16 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - local.get $1 - i32.const 10 - i32.const 0 - i32.const 14 - i32.const 4624 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $1 + local.get $0 local.get $3 - call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Int64Array,i64> - local.get $1 - i32.const 10 - i32.const 0 - i32.const 14 - i32.const 4656 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - i32.const 0 - local.set $0 - i32.const 4460 - i32.load - i32.const 2 + i32.const 1 + i32.shl 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 3145774 + i32.store + local.get $3 i32.const 2 i32.add - local.set $7 - i32.const 4452 - i32.load - local.set $11 - i32.const 4460 - i32.load - local.set $12 - loop $for-loop|00 + else + local.get $3 + i32.const 21 + i32.le_s + i32.const 0 + local.get $3 + i32.const 0 + i32.gt_s + select + if (result i32) local.get $0 - local.get $12 - i32.lt_s - if - local.get $0 - local.get $7 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.tee $0 + i32.const 2 + i32.add + local.get $0 + i32.const 0 + local.get $2 + i32.sub + i32.const 1 + i32.shl + call $~lib/util/memory/memmove + local.get $0 + i32.const 46 + i32.store16 + local.get $1 + i32.const 1 + i32.add + else + local.get $3 + i32.const 0 + i32.le_s + i32.const 0 + i32.const -6 + local.get $3 + i32.lt_s + select + if (result i32) + local.get $0 + i32.const 2 + local.get $3 + i32.sub + local.tee $3 + i32.const 1 + i32.shl i32.add - local.get $11 local.get $0 - i32.const 3 + local.get $1 + i32.const 1 i32.shl + call $~lib/util/memory/memmove + local.get $0 + i32.const 3014704 + i32.store + i32.const 2 + local.set $2 + loop $for-loop|1 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|1 + end + end + local.get $1 + local.get $3 i32.add - f64.load - local.tee $9 - local.get $9 - f64.sub - f64.const 0 - f64.eq + else + local.get $1 + i32.const 1 + i32.eq if (result i32) - local.get $9 - i32.trunc_f64_s + local.get $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + i32.const 4 + i32.add + local.get $3 + i32.const 1 + i32.sub + call $~lib/util/number/genExponent + i32.const 2 + i32.add else - i32.const 0 + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.const 1 + i32.shl + local.tee $2 + i32.const 2 + i32.sub + call $~lib/util/memory/memmove + local.get $0 + i32.const 46 + i32.store16 offset=2 + local.get $0 + local.get $2 + i32.add + local.tee $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + i32.const 4 + i32.add + local.get $3 + i32.const 1 + i32.sub + call $~lib/util/number/genExponent + local.get $1 + i32.add + i32.const 2 + i32.add end - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|00 end end - local.get $1 - i32.const 10 - i32.const 0 - i32.const 14 - i32.const 4688 - call $~lib/rt/__allocArray - 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 $2 - call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Uint8Array,u8> - local.get $1 - local.get $4 - call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Int16Array,i16> - local.get $1 - call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,i8> - local.get $1 - i32.const 10 - i32.const 0 - i32.const 14 - i32.const 4720 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> + end + ) + (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + local.get $1 + f64.const 0 + f64.lt + local.tee $2 + if local.get $0 - 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 + i32.const 45 + i32.store16 local.get $1 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - return + f64.neg + local.set $1 end - i32.const 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 - call $~lib/builtins/abort - unreachable - ) - (func $~lib/array/Array#__unchecked_get (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.load offset=4 + local.get $2 + i32.const 1 + i32.shl + i32.add local.get $1 + local.get $0 + local.get $2 + call $~lib/util/number/grisu2 + local.get $2 + i32.sub + global.get $~lib/util/number/_K + call $~lib/util/number/prettify + local.get $2 i32.add - i32.load8_u ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) + (func $~lib/util/number/dtoa (param $0 f64) (result i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 - i32.load offset=8 - local.tee $3 - local.get $1 - i32.load offset=12 - i32.ne + f64.const 0 + f64.eq if - i32.const 0 - i32.const 1312 - i32.const 712 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.const 3056 + return end - loop $for-loop|0 - local.get $2 - local.get $3 - i32.lt_s + local.get $0 + local.get $0 + f64.sub + f64.const 0 + f64.ne + if + local.get $0 + local.get $0 + f64.ne if - local.get $0 - local.get $2 - call $~lib/typedarray/Uint8Array#__get - local.tee $4 - local.get $1 - local.get $2 - call $~lib/array/Array#__unchecked_get - local.tee $5 - i32.ne - if - i32.const 4784 - i32.const 3 - local.get $2 - f64.convert_i32_s - local.get $4 - f64.convert_i32_u - local.get $5 - f64.convert_i32_u - f64.const 0 - f64.const 0 - call $~lib/builtins/trace - i32.const 0 - i32.const 1312 - i32.const 718 - i32.const 7 - call $~lib/builtins/abort - unreachable - end + i32.const 3088 + return + end + i32.const 3120 + i32.const 3168 + local.get $0 + f64.const 0 + f64.lt + select + call $~lib/rt/pure/__retain + return + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 56 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $0 + call $~lib/util/number/dtoa_core + local.tee $2 + i32.const 28 + i32.eq + if + local.get $1 + call $~lib/rt/pure/__retain + return + end + local.get $1 + local.get $2 + call $~lib/string/String#substring + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock + ) + (func $~lib/util/number/dtoa_stream (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.set $0 + local.get $2 + f64.const 0 + f64.eq + if + local.get $0 + i32.const 48 + i32.store16 + local.get $0 + i32.const 46 + i32.store16 offset=2 + local.get $0 + i32.const 48 + i32.store16 offset=4 + i32.const 3 + return + end + local.get $2 + local.get $2 + f64.sub + f64.const 0 + f64.ne + if + local.get $2 + local.get $2 + f64.ne + if + local.get $0 + i32.const 78 + i32.store16 + local.get $0 + i32.const 97 + i32.store16 offset=2 + local.get $0 + i32.const 78 + i32.store16 offset=4 + i32.const 3 + return + else local.get $2 - i32.const 1 + f64.const 0 + f64.lt + local.tee $1 + if + local.get $0 + i32.const 45 + i32.store16 + local.get $0 + i32.const 2 + i32.add + local.set $0 + end + local.get $0 + i64.const 29555310648492105 + i64.store + local.get $0 + i64.const 34058970405077102 + i64.store offset=8 + local.get $1 + i32.const 8 i32.add - local.set $2 - br $for-loop|0 + return end + unreachable end + local.get $0 + local.get $2 + call $~lib/util/number/dtoa_core ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> - (local $0 i32) - (local $1 i32) + (func $~lib/util/string/joinFloatArray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 f32) - (local $9 f64) - (local $10 i32) - (local $11 i32) - (local $12 i32) - i32.const 3 - call $~lib/typedarray/Int64Array#constructor + local.get $1 + i32.const 1 + i32.sub local.tee $3 i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set + i32.lt_s + if + i32.const 2928 + return + end local.get $3 - i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set + i32.eqz + if + local.get $0 + f32.load + f64.promote_f32 + call $~lib/util/number/dtoa + return + end local.get $3 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - i32.const 4 - call $~lib/typedarray/Uint8Array#constructor - local.tee $2 - i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set - local.get $2 + i32.const 2972 + i32.load i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set - local.get $2 - i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set - local.get $2 - i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set - i32.const 3 - call $~lib/typedarray/Int16Array#constructor + i32.shr_u local.tee $4 - i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set - local.get $4 + i32.const 28 + i32.add + i32.mul + i32.const 28 + i32.add + local.tee $6 i32.const 1 - i32.const 1001 - call $~lib/typedarray/Int16Array#__set - local.get $4 - i32.const 2 - i32.const 1002 - call $~lib/typedarray/Int16Array#__set - i32.const 10 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,i32> + i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize local.get $1 - i32.const 10 - i32.const 0 - i32.const 18 - i32.const 4752 - call $~lib/rt/__allocArray + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - block $folding-inner0 - i32.const 4380 - i32.load - 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 - i32.const 4372 - i32.load - local.set $6 - i32.const 4380 - i32.load - local.set $7 - loop $for-loop|0 + local.set $1 + loop $for-loop|0 + local.get $5 + local.get $3 + i32.lt_s + if + local.get $1 + local.get $2 local.get $0 - local.get $7 - i32.lt_s + local.get $5 + i32.const 2 + i32.shl + i32.add + f32.load + f64.promote_f32 + call $~lib/util/number/dtoa_stream + local.get $2 + i32.add + local.set $2 + local.get $4 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 $8 - local.get $8 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $8 - i32.trunc_f32_u - else - i32.const 0 - end - i32.store8 - local.get $0 + local.get $1 + local.get $2 i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.const 10 - i32.const 0 - i32.const 18 - i32.const 4832 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $1 - local.get $3 - call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Int64Array,i64> - local.get $1 - i32.const 10 - i32.const 0 - i32.const 18 - i32.const 4864 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - i32.const 0 - local.set $0 - i32.const 4460 - i32.load - 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 $7 - i32.const 4452 - i32.load - local.set $11 - i32.const 4460 - i32.load - local.set $12 - loop $for-loop|00 - local.get $0 - local.get $12 - i32.lt_s - if - local.get $0 - local.get $7 - i32.add - local.get $11 - local.get $0 - i32.const 3 i32.shl i32.add - f64.load - local.tee $9 - local.get $9 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $9 - i32.trunc_f64_u - else - i32.const 0 - end - i32.store8 - local.get $0 + i32.const 2976 + local.get $4 i32.const 1 + i32.shl + call $~lib/util/memory/memmove + local.get $2 + local.get $4 i32.add - local.set $0 - br $for-loop|00 + local.set $2 end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 end + end + local.get $6 + local.get $1 + local.get $2 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + f32.load + f64.promote_f32 + call $~lib/util/number/dtoa_stream + local.get $2 + i32.add + local.tee $0 + i32.gt_s + if local.get $1 - i32.const 10 - i32.const 0 - i32.const 18 - i32.const 4896 - call $~lib/rt/__allocArray - 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 $2 - call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Uint8Array,u8> - local.get $1 - local.get $4 - call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Int16Array,i16> - local.get $1 - call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,i8> - local.get $1 - i32.const 10 - i32.const 0 - i32.const 18 - i32.const 4928 - call $~lib/rt/__allocArray - 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 $3 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release + call $~lib/string/String#substring local.get $1 call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release return end - i32.const 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 - call $~lib/builtins/abort - unreachable + local.get $1 ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (param $0 i32) (param $1 i32) + (func $~lib/util/string/joinFloatArray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load offset=8 - local.tee $3 + (local $6 i32) local.get $1 - i32.load offset=12 - i32.ne + i32.const 1 + i32.sub + local.tee $3 + i32.const 0 + i32.lt_s if - i32.const 0 - i32.const 1312 - i32.const 712 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.const 2928 + return + end + local.get $3 + i32.eqz + if + local.get $0 + f64.load + call $~lib/util/number/dtoa + return end + local.get $3 + i32.const 2972 + i32.load + i32.const 1 + i32.shr_u + local.tee $4 + i32.const 28 + i32.add + i32.mul + i32.const 28 + i32.add + local.tee $6 + i32.const 1 + i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.set $1 loop $for-loop|0 - local.get $2 + local.get $5 local.get $3 i32.lt_s if - local.get $0 - local.get $2 - call $~lib/typedarray/Uint8ClampedArray#__get - local.tee $4 local.get $1 local.get $2 - call $~lib/array/Array#__unchecked_get - local.tee $5 - i32.ne - if - i32.const 4992 - i32.const 3 - local.get $2 - f64.convert_i32_s - local.get $4 - f64.convert_i32_u - local.get $5 - f64.convert_i32_u - f64.const 0 - f64.const 0 - call $~lib/builtins/trace - i32.const 0 - i32.const 1312 - i32.const 718 - i32.const 7 - call $~lib/builtins/abort - unreachable - end + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + call $~lib/util/number/dtoa_stream local.get $2 - i32.const 1 i32.add local.set $2 - br $for-loop|0 - end + local.get $4 + if + local.get $1 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.const 2976 + local.get $4 + i32.const 1 + i32.shl + call $~lib/util/memory/memmove + local.get $2 + local.get $4 + i32.add + local.set $2 + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 + end end - ) - (func $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i64) + local.get $6 + local.get $1 local.get $2 - i32.const 0 - i32.lt_s + local.get $0 + local.get $3 + i32.const 3 + i32.shl + i32.add + f64.load + call $~lib/util/number/dtoa_stream + local.get $2 + i32.add + local.tee $0 + i32.gt_s if - i32.const 1376 - i32.const 1440 - i32.const 1736 - i32.const 19 - call $~lib/builtins/abort - unreachable + local.get $1 + local.get $0 + call $~lib/string/String#substring + local.get $1 + call $~lib/rt/pure/__release + return end - local.get $2 local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.add + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (param $0 i32) (result i32) + (local $1 i32) local.get $0 - i32.load offset=8 - i32.gt_s + i32.const 1073741808 + i32.gt_u if - i32.const 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 + i32.const 1040 + i32.const 1088 + i32.const 49 + i32.const 43 call $~lib/builtins/abort unreachable end - local.get $2 + call $~lib/rt/tlsf/maybeInitialize local.get $0 - i32.load offset=4 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 i32.add - local.set $0 - local.get $1 - i32.load offset=4 - local.set $2 + local.tee $1 + i32.const 0 + local.get $0 + call $~lib/util/memory/memset local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $1 - loop $for-loop|0 - local.get $3 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $3 - i32.add - local.get $2 - local.get $3 - i32.const 3 - i32.shl - i32.add - i64.load - local.tee $4 - i32.wrap_i64 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i64.extend_i32_s - local.get $4 - i32.const 255 - local.get $4 - i32.wrap_i64 - i32.sub - i32.const 31 - i32.shr_s - i64.extend_i32_s - i64.or - i64.and - i64.store8 - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end + call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/WRAP<~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) - local.get $2 - i32.const 0 - i32.lt_s + local.get $1 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $3 + i32.gt_u if i32.const 1376 i32.const 1440 - i32.const 1736 - i32.const 19 + i32.const 1705 + i32.const 5 call $~lib/builtins/abort unreachable end local.get $2 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s + i32.const 0 + i32.lt_s if - i32.const 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 - call $~lib/builtins/abort - unreachable + local.get $2 + i32.const -1 + i32.eq + if (result i32) + local.get $3 + local.get $1 + i32.sub + else + i32.const 1040 + i32.const 1440 + i32.const 1714 + i32.const 7 + call $~lib/builtins/abort + unreachable + end + local.set $2 + else + local.get $1 + local.get $2 + i32.add + local.get $3 + i32.gt_s + if + i32.const 1040 + i32.const 1440 + i32.const 1719 + i32.const 7 + call $~lib/builtins/abort + unreachable + end end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $3 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $3 local.get $2 + i32.store offset=8 + local.get $3 local.get $0 - i32.load offset=4 + local.get $1 i32.add - local.set $2 + i32.store offset=4 + local.get $3 + call $~lib/rt/pure/__retain + ) + (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 - i32.load offset=4 - local.set $4 + local.get $2 + call $~lib/typedarray/WRAP<~lib/typedarray/Uint8Array,u8> + ) + (func $~lib/arraybuffer/ArrayBuffer#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.set $3 local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $1 - loop $for-loop|0 - local.get $3 + i32.const 0 + i32.lt_s + if (result i32) local.get $1 - i32.lt_s - if - local.get $2 - local.get $3 - i32.add - local.get $4 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.tee $0 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $0 - i32.const 255 - local.get $0 - i32.sub - i32.const 31 - i32.shr_s - i32.or - i32.and - i32.store8 - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end + 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 + call $~lib/rt/tlsf/maybeInitialize + 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 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $3 + local.get $0 + local.get $1 + i32.add + local.get $2 + call $~lib/util/memory/memmove + local.get $3 + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> (local $0 i32) (local $1 i32) (local $2 i32) @@ -21661,692 +20849,733 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 f32) - (local $13 f64) - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $7 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set - local.get $7 + i32.const 4252 + i32.load + local.tee $5 + call $~lib/typedarray/Int8Array#constructor + local.tee $6 + local.set $3 + loop $for-loop|0 + local.get $2 + local.get $5 + i32.lt_s + if + local.get $3 + local.get $2 + i32.const 4240 + local.get $2 + call $~lib/array/Array#__get + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + local.get $3 + i32.load + local.get $3 + i32.load offset=4 + local.get $3 + i32.load + i32.sub + local.get $3 + i32.load offset=8 + local.get $3 + i32.load offset=4 + local.get $3 + i32.load + i32.sub + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $2 i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set - local.get $7 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - i32.const 4 - call $~lib/typedarray/Uint8Array#constructor - local.tee $2 + global.set $~argumentsLength i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set - local.get $2 - i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set - local.get $2 - i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set local.get $2 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $1 + i32.gt_u + if + i32.const 1376 + i32.const 1440 + i32.const 1705 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $8 - i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set - local.get $8 - i32.const 1 - i32.const 1001 - call $~lib/typedarray/Int16Array#__set - local.get $8 - i32.const 2 - i32.const 1002 - call $~lib/typedarray/Int16Array#__set - i32.const 10 - call $~lib/typedarray/Uint8ClampedArray#constructor + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $1 - local.set $3 - block $folding-inner0 - i32.const 4316 - i32.load - local.get $1 - i32.load offset=8 - i32.gt_s - br_if $folding-inner0 - local.get $3 - i32.load offset=4 - local.set $9 - i32.const 4308 - i32.load - local.set $4 - i32.const 4316 - i32.load - local.set $5 - loop $for-loop|0 + local.get $2 + call $~lib/rt/pure/__retain + i32.store + local.get $1 + local.get $0 + i32.store offset=8 + local.get $1 + local.get $2 + i32.store offset=4 + local.get $1 + call $~lib/rt/pure/__retain + local.set $0 + loop $for-loop|1 + local.get $4 + local.get $5 + i32.lt_s + if + local.get $3 + local.get $4 + call $~lib/typedarray/Int8Array#__get local.get $0 - local.get $5 - i32.lt_s + local.get $4 + call $~lib/typedarray/Int8Array#__get + i32.ne if - local.get $0 - local.get $9 - i32.add - local.get $4 - local.get $0 - 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 $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 + i32.const 0 + i32.const 1312 + i32.const 684 + i32.const 5 + call $~lib/builtins/abort + unreachable end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|1 end + end + local.get $6 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 4252 + i32.load + local.tee $3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $5 + local.set $0 + loop $for-loop|0 local.get $1 - i32.const 10 - i32.const 0 - i32.const 18 - i32.const 4960 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $9 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - i32.const 0 - local.set $0 - i32.const 4380 - i32.load - 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 $4 - i32.const 4372 - i32.load - local.set $5 - i32.const 4380 - i32.load - local.set $6 - loop $for-loop|00 + local.get $3 + i32.lt_s + if local.get $0 - local.get $6 - i32.lt_s - if - local.get $0 - local.get $4 - i32.add - local.get $5 - local.get $0 - 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 - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|00 - end + local.get $1 + i32.const 4240 + local.get $1 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 end - local.get $1 - i32.const 10 - i32.const 0 - i32.const 18 - i32.const 5056 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $1 - local.get $7 - i32.const 6 - call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int64Array,i64> - local.get $1 - i32.const 10 - i32.const 0 - i32.const 18 - i32.const 5088 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - i32.const 0 - local.set $0 - i32.const 4460 - i32.load - 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 $6 - i32.const 4452 - i32.load - local.set $10 - i32.const 4460 - i32.load - local.set $11 - loop $for-loop|01 + end + local.get $0 + i32.load + local.get $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + local.get $0 + i32.load offset=8 + local.get $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $1 + i32.const 1 + global.set $~argumentsLength + local.get $1 + i32.const 0 + call $~lib/typedarray/Uint8Array.wrap@varargs + local.set $4 + loop $for-loop|1 + local.get $2 + local.get $3 + i32.lt_s + if local.get $0 - local.get $11 - i32.lt_s + local.get $2 + call $~lib/typedarray/Uint8Array#__get + local.get $4 + local.get $2 + call $~lib/typedarray/Uint8Array#__get + i32.ne if - local.get $0 - local.get $6 - i32.add - local.get $10 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $13 - local.get $13 - f64.sub - f64.const 0 - f64.eq - if (result i32) - f64.const 0 - f64.const 255 - local.get $13 - 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 + i32.const 0 + i32.const 1312 + i32.const 684 + i32.const 5 + call $~lib/builtins/abort + unreachable end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|1 end - local.get $1 - i32.const 10 - i32.const 0 - i32.const 18 - i32.const 5120 - call $~lib/rt/__allocArray - 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 $2 - i32.load offset=8 - local.get $1 - i32.load offset=8 - i32.gt_s - br_if $folding-inner0 - local.get $1 - i32.load offset=4 - local.get $2 - i32.load offset=4 - local.get $2 - i32.load offset=8 - call $~lib/util/memory/memmove - local.get $1 - local.get $8 - i32.const 4 - call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int16Array,i16> - i32.const 0 - local.set $0 - i32.const 4524 - i32.load - 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 $6 - i32.const 4516 - i32.load - local.set $10 - i32.const 4524 - i32.load - local.set $11 - loop $for-loop|02 - local.get $0 - local.get $11 - i32.lt_s - if - local.get $0 - local.get $6 - i32.add - local.get $0 - local.get $10 - 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 $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|02 - end - end - local.get $1 - i32.const 10 - i32.const 0 - i32.const 18 - i32.const 5152 - call $~lib/rt/__allocArray - 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 $7 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $9 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - return end - i32.const 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 - call $~lib/builtins/abort - unreachable + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,i32> (param $0 i32) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 4316 + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 4252 i32.load - local.get $0 + local.tee $5 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $6 + local.set $3 + loop $for-loop|0 + local.get $2 + local.get $5 + i32.lt_s + if + local.get $3 + local.get $2 + i32.const 4240 + local.get $2 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + local.get $3 + i32.load + local.get $3 + i32.load offset=4 + local.get $3 + i32.load + i32.sub + local.get $3 i32.load offset=8 + local.get $3 + i32.load offset=4 + local.get $3 + i32.load + i32.sub + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $2 i32.const 1 - i32.shr_u - i32.gt_s + global.set $~argumentsLength + i32.const 0 + local.get $2 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $1 + i32.gt_u if i32.const 1376 i32.const 1440 - i32.const 1737 - i32.const 47 + i32.const 1705 + i32.const 5 call $~lib/builtins/abort unreachable end + local.get $1 + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $2 + call $~lib/rt/pure/__retain + i32.store + local.get $1 local.get $0 - i32.load offset=4 + i32.store offset=8 + local.get $1 + local.get $2 + i32.store offset=4 + local.get $1 + call $~lib/rt/pure/__retain local.set $0 - i32.const 4308 - i32.load - local.set $2 - i32.const 4316 - i32.load - local.set $3 - loop $for-loop|0 - local.get $1 - local.get $3 + loop $for-loop|1 + local.get $4 + local.get $5 i32.lt_s if + local.get $3 + local.get $4 + call $~lib/typedarray/Uint8ClampedArray#__get local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.get $2 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - i32.store16 - local.get $1 + local.get $4 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 684 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $4 i32.const 1 i32.add - local.set $1 - br $for-loop|0 + local.set $4 + br $for-loop|1 end end + local.get $6 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.tee $3 - local.get $1 - i32.load offset=12 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 712 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + (local $6 i32) + i32.const 4252 + i32.load + local.tee $4 + call $~lib/typedarray/Int16Array#constructor + local.tee $6 + local.set $1 loop $for-loop|0 - local.get $2 - local.get $3 + local.get $0 + local.get $4 i32.lt_s if - local.get $0 - local.get $2 - call $~lib/typedarray/Int16Array#__get - local.tee $4 local.get $1 - i32.load offset=4 - local.get $2 - i32.const 1 + local.get $0 + i32.const 4240 + local.get $0 + call $~lib/array/Array#__get + i32.const 16 i32.shl - i32.add - i32.load16_s - local.tee $5 - i32.ne - if - i32.const 5232 - i32.const 3 - local.get $2 - f64.convert_i32_s - local.get $4 - f64.convert_i32_s - local.get $5 - f64.convert_i32_s - f64.const 0 - f64.const 0 - call $~lib/builtins/trace - i32.const 0 - i32.const 1312 - i32.const 718 - i32.const 7 - call $~lib/builtins/abort - unreachable - end - local.get $2 + i32.const 16 + i32.shr_s + call $~lib/typedarray/Int16Array#__set + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|0 end end - ) - (func $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) + local.get $1 + i32.load + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub local.get $1 i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 6 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub i32.add - local.get $0 - i32.load offset=8 + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 i32.const 1 - i32.shr_u - i32.gt_s + global.set $~argumentsLength + i32.const 0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $5 + i32.gt_u if i32.const 1376 i32.const 1440 - i32.const 1737 - i32.const 47 + i32.const 1705 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 + local.get $5 + i32.const 1 + i32.and + if + i32.const 1040 + i32.const 1440 + i32.const 1710 + i32.const 9 + call $~lib/builtins/abort + unreachable + end + call $~lib/rt/tlsf/maybeInitialize i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 i32.add - local.set $0 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $1 - loop $for-loop|0 - local.get $2 - local.get $1 + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $5 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + loop $for-loop|1 + local.get $3 + local.get $4 i32.lt_s if - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add + local.get $1 local.get $3 + call $~lib/typedarray/Int16Array#__get local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - i64.store16 - local.get $2 + local.get $3 + call $~lib/typedarray/Int16Array#__get + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 684 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $3 i32.const 1 i32.add - local.set $2 - br $for-loop|0 + local.set $3 + br $for-loop|1 end end + local.get $6 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - local.get $1 - i32.load offset=8 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - if - i32.const 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $0 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 4252 + i32.load + local.tee $4 + call $~lib/typedarray/Uint16Array#constructor + local.tee $6 local.set $1 loop $for-loop|0 - local.get $2 - local.get $1 + local.get $0 + local.get $4 i32.lt_s if + local.get $1 + local.get $0 + i32.const 4240 + local.get $0 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - local.get $2 - local.get $3 - i32.add - i32.load8_u - i32.store16 - local.get $2 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|0 end end - ) - (func $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) + local.get $1 + i32.load + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 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 + global.set $~argumentsLength + i32.const 0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $5 + i32.gt_u if i32.const 1376 i32.const 1440 - i32.const 1737 - i32.const 47 + i32.const 1705 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 - i32.const 8 + local.get $5 + i32.const 1 + i32.and + if + i32.const 1040 + i32.const 1440 + i32.const 1710 + i32.const 9 + call $~lib/builtins/abort + unreachable + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 i32.add - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - call $~lib/util/memory/memmove + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $5 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + loop $for-loop|1 + local.get $3 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $3 + call $~lib/typedarray/Uint16Array#__get + local.get $2 + local.get $3 + call $~lib/typedarray/Uint16Array#__get + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 684 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 + end + end + local.get $6 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,i8> (param $0 i32) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 4524 + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 4252 i32.load - i32.const 7 - i32.add - local.get $0 + local.tee $4 + call $~lib/typedarray/Int32Array#constructor + local.tee $6 + local.set $1 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $0 + i32.const 4240 + local.get $0 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $1 + i32.load + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub + local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 i32.const 1 - i32.shr_u - i32.gt_s + global.set $~argumentsLength + i32.const 0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $5 + i32.gt_u if i32.const 1376 i32.const 1440 - i32.const 1737 - i32.const 47 + i32.const 1705 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 - i32.const 14 + local.get $5 + i32.const 3 + i32.and + if + i32.const 1040 + i32.const 1440 + i32.const 1710 + i32.const 9 + call $~lib/builtins/abort + unreachable + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 i32.add - local.set $0 - i32.const 4516 - i32.load + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $5 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain local.set $2 - i32.const 4524 - i32.load - local.set $3 - loop $for-loop|0 - local.get $1 + loop $for-loop|1 local.get $3 + local.get $4 i32.lt_s if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add local.get $1 + local.get $3 + call $~lib/typedarray/Int32Array#__get local.get $2 - i32.add - i32.load8_s - i32.store16 - local.get $1 + local.get $3 + call $~lib/typedarray/Int32Array#__get + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 684 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $3 i32.const 1 i32.add - local.set $1 - br $for-loop|0 + local.set $3 + br $for-loop|1 end end + local.get $6 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (local $0 i32) (local $1 i32) (local $2 i32) @@ -22354,327 +21583,260 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 f32) - (local $9 f64) - (local $10 i32) - (local $11 i32) - (local $12 i32) - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $3 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set - local.get $3 - i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set - local.get $3 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - i32.const 4 - call $~lib/typedarray/Uint8Array#constructor - local.tee $2 - i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set - local.get $2 - i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set - local.get $2 - i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set - local.get $2 - i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set - i32.const 3 - call $~lib/typedarray/Int16Array#constructor + i32.const 4252 + i32.load local.tee $4 - i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set - local.get $4 - i32.const 1 - i32.const 1001 - call $~lib/typedarray/Int16Array#__set - local.get $4 - i32.const 2 - i32.const 1002 - call $~lib/typedarray/Int16Array#__set - i32.const 10 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,i32> + call $~lib/typedarray/Uint32Array#constructor + local.tee $6 + local.set $1 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $0 + i32.const 4240 + local.get $0 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end local.get $1 - i32.const 10 + i32.load + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub + local.get $1 + i32.load offset=8 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 i32.const 1 - i32.const 19 - i32.const 5184 - call $~lib/rt/__allocArray + global.set $~argumentsLength + i32.const 0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $5 + i32.gt_u + if + i32.const 1376 + i32.const 1440 + i32.const 1705 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.const 3 + i32.and + if + i32.const 1040 + i32.const 1440 + i32.const 1710 + i32.const 9 + call $~lib/builtins/abort + unreachable + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 + local.get $0 call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> - block $folding-inner0 - i32.const 4380 - i32.load - i32.const 3 - i32.add - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - br_if $folding-inner0 - local.get $1 - i32.load offset=4 - i32.const 6 - i32.add - local.set $5 - i32.const 4372 - i32.load - local.set $6 - i32.const 4380 - i32.load - local.set $7 - loop $for-loop|0 - local.get $0 - local.get $7 - i32.lt_s + i32.store + local.get $2 + local.get $5 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + loop $for-loop|1 + local.get $3 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $3 + call $~lib/typedarray/Uint32Array#__get + local.get $2 + local.get $3 + call $~lib/typedarray/Uint32Array#__get + i32.ne if - local.get $5 - local.get $0 - i32.const 1 - i32.shl - i32.add - local.get $6 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $8 - local.get $8 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $8 - 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 + i32.const 0 + i32.const 1312 + i32.const 684 + i32.const 5 + call $~lib/builtins/abort + unreachable end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 end - local.get $1 - i32.const 10 - i32.const 1 - i32.const 19 - i32.const 5280 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> - local.get $1 - local.get $3 - call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int64Array,i64> - local.get $1 - i32.const 10 - i32.const 1 - i32.const 19 - i32.const 5328 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> - i32.const 0 - local.set $0 - i32.const 4460 - i32.load - i32.const 2 - i32.add - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - br_if $folding-inner0 - local.get $1 - i32.load offset=4 - i32.const 4 - i32.add - local.set $7 - i32.const 4452 - i32.load - local.set $11 - i32.const 4460 - i32.load - local.set $12 - loop $for-loop|00 - local.get $0 - local.get $12 - i32.lt_s - if - local.get $7 - local.get $0 - i32.const 1 - i32.shl - i32.add - local.get $11 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $9 - local.get $9 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $9 - 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 $1 - i32.const 10 - i32.const 1 - i32.const 19 - i32.const 5376 - call $~lib/rt/__allocArray - 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 $2 - call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Uint8Array,u8> - local.get $1 - local.get $4 - call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int16Array,i16> - local.get $1 - call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,i8> - local.get $1 - i32.const 10 - i32.const 1 - i32.const 19 - i32.const 5424 - call $~lib/rt/__allocArray - 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 $3 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - return end - i32.const 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 - call $~lib/builtins/abort - unreachable + local.get $6 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> (param $0 i32) (param $1 i32) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 + (local $6 i32) + i32.const 4252 + i32.load + local.tee $4 + call $~lib/typedarray/Int64Array#constructor + local.tee $6 + local.set $1 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $0 + i32.const 4240 + local.get $0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $1 + i32.load + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub + local.get $1 i32.load offset=8 - i32.const 1 - i32.shr_u - local.tee $3 local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 + i32.const 1 + global.set $~argumentsLength + i32.const 0 + local.get $0 + i32.const 16 + i32.sub i32.load offset=12 - i32.ne + local.tee $5 + i32.gt_u if - i32.const 0 - i32.const 1312 - i32.const 712 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 1705 + i32.const 5 call $~lib/builtins/abort unreachable end - loop $for-loop|0 - local.get $2 + local.get $5 + i32.const 7 + i32.and + if + i32.const 1040 + i32.const 1440 + i32.const 1710 + i32.const 9 + call $~lib/builtins/abort + unreachable + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $5 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + loop $for-loop|1 local.get $3 + local.get $4 i32.lt_s if - local.get $0 - local.get $2 - call $~lib/typedarray/Uint16Array#__get - local.tee $4 local.get $1 - i32.load offset=4 + local.get $3 + call $~lib/typedarray/Int64Array#__get local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.tee $5 - i32.ne + local.get $3 + call $~lib/typedarray/Int64Array#__get + i64.ne if - i32.const 5520 - i32.const 3 - local.get $2 - f64.convert_i32_s - local.get $4 - f64.convert_i32_u - local.get $5 - f64.convert_i32_u - f64.const 0 - f64.const 0 - call $~lib/builtins/trace i32.const 0 i32.const 1312 - i32.const 718 - i32.const 7 + i32.const 684 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 - br $for-loop|0 + local.set $3 + br $for-loop|1 end end + local.get $6 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> (local $0 i32) (local $1 i32) (local $2 i32) @@ -22682,528 +21844,399 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 f32) - (local $9 f64) - (local $10 i32) - (local $11 i32) - (local $12 i32) - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $3 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set - local.get $3 - i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set - local.get $3 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - i32.const 4 - call $~lib/typedarray/Uint8Array#constructor - local.tee $2 - i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set - local.get $2 - i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set - local.get $2 - i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set - local.get $2 - i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set - i32.const 3 - call $~lib/typedarray/Int16Array#constructor + i32.const 4252 + i32.load local.tee $4 - i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set - local.get $4 - i32.const 1 - i32.const 1001 - call $~lib/typedarray/Int16Array#__set - local.get $4 - i32.const 2 - i32.const 1002 - call $~lib/typedarray/Int16Array#__set - i32.const 10 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,i32> - local.get $1 - i32.const 10 - i32.const 1 - i32.const 20 - i32.const 5472 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> - block $folding-inner0 - i32.const 4380 - i32.load - i32.const 3 - i32.add - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - br_if $folding-inner0 - local.get $1 - i32.load offset=4 - i32.const 6 - i32.add - local.set $5 - i32.const 4372 - i32.load - local.set $6 - i32.const 4380 - i32.load - local.set $7 - loop $for-loop|0 + call $~lib/typedarray/Uint64Array#constructor + local.tee $6 + local.set $1 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $1 local.get $0 - local.get $7 - i32.lt_s - if - local.get $5 - local.get $0 - i32.const 1 - i32.shl - i32.add - local.get $6 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $8 - local.get $8 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $8 - 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 $1 - i32.const 10 - i32.const 1 - i32.const 20 - i32.const 5568 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> - local.get $1 - local.get $3 - call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int64Array,i64> - local.get $1 - i32.const 10 - i32.const 1 - i32.const 20 - i32.const 5616 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> - i32.const 0 - local.set $0 - i32.const 4460 - i32.load - i32.const 2 - i32.add - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - br_if $folding-inner0 - local.get $1 - i32.load offset=4 - i32.const 4 - i32.add - local.set $7 - i32.const 4452 - i32.load - local.set $11 - i32.const 4460 - i32.load - local.set $12 - loop $for-loop|00 + i32.const 4240 local.get $0 - local.get $12 - i32.lt_s - if - local.get $7 - local.get $0 - i32.const 1 - i32.shl - i32.add - local.get $11 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $9 - local.get $9 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $9 - 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 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 end - local.get $1 - i32.const 10 - i32.const 1 - i32.const 20 - i32.const 5664 - call $~lib/rt/__allocArray - 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 $2 - call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Uint8Array,u8> - local.get $1 - local.get $4 - call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int16Array,i16> - local.get $1 - call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,i8> - local.get $1 - i32.const 10 - i32.const 1 - i32.const 20 - i32.const 5712 - call $~lib/rt/__allocArray - 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 $3 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - return end - i32.const 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 - call $~lib/builtins/abort - unreachable - ) - (func $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,i32> (param $0 i32) - i32.const 4316 + local.get $1 i32.load - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 + local.get $1 i32.load offset=4 - i32.const 4308 + local.get $1 i32.load - i32.const 4312 + i32.sub + local.get $1 + i32.load offset=8 + local.get $1 + i32.load offset=4 + local.get $1 i32.load - call $~lib/util/memory/memmove - ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + i32.sub + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 + i32.const 1 + global.set $~argumentsLength + i32.const 0 local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $3 - local.get $1 + i32.const 16 + i32.sub i32.load offset=12 - i32.ne + local.tee $5 + i32.gt_u if - i32.const 0 - i32.const 1312 - i32.const 712 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 1705 + i32.const 5 call $~lib/builtins/abort unreachable end - loop $for-loop|0 - local.get $2 + local.get $5 + i32.const 7 + i32.and + if + i32.const 1040 + i32.const 1440 + i32.const 1710 + i32.const 9 + call $~lib/builtins/abort + unreachable + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $5 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + loop $for-loop|1 local.get $3 + local.get $4 i32.lt_s if - local.get $0 - local.get $2 - call $~lib/typedarray/Int32Array#__get - local.tee $4 local.get $1 + local.get $3 + call $~lib/typedarray/Uint64Array#__get local.get $2 - call $~lib/array/Array#__unchecked_get - local.tee $5 - i32.ne + local.get $3 + call $~lib/typedarray/Uint64Array#__get + i64.ne if - i32.const 5824 - i32.const 3 - local.get $2 - f64.convert_i32_s - local.get $4 - f64.convert_i32_s - local.get $5 - f64.convert_i32_s - f64.const 0 - f64.const 0 - call $~lib/builtins/trace i32.const 0 i32.const 1312 - i32.const 718 - i32.const 7 + i32.const 684 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 - br $for-loop|0 + local.set $3 + br $for-loop|1 end end + local.get $6 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - local.get $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 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 24 - i32.add - local.set $0 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 4252 + i32.load + local.tee $4 + call $~lib/typedarray/Float32Array#constructor + local.tee $6 local.set $1 loop $for-loop|0 - local.get $2 - local.get $1 + local.get $0 + local.get $4 i32.lt_s if + local.get $1 + local.get $0 + i32.const 4240 + local.get $0 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $3 - local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - i64.store32 - local.get $2 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|0 end end - ) - (func $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) local.get $1 - i32.load offset=8 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $0 + i32.load local.get $1 i32.load offset=4 - local.set $3 local.get $1 - i32.load offset=8 - local.set $1 - loop $for-loop|0 - local.get $2 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $2 - local.get $3 - i32.add - i32.load8_u - i32.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) + i32.load + i32.sub local.get $1 i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 4 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 + i32.const 1 + global.set $~argumentsLength + i32.const 0 local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $5 + i32.gt_u if i32.const 1376 i32.const 1440 - i32.const 1737 - i32.const 47 + i32.const 1705 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 - i32.const 16 - i32.add - local.set $0 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u + local.get $5 + i32.const 3 + i32.and + if + i32.const 1040 + i32.const 1440 + i32.const 1710 + i32.const 9 + call $~lib/builtins/abort + unreachable + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $5 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + loop $for-loop|1 + local.get $3 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $3 + call $~lib/typedarray/Float32Array#__get + local.get $2 + local.get $3 + call $~lib/typedarray/Float32Array#__get + f32.ne + if + i32.const 0 + i32.const 1312 + i32.const 684 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 + end + end + local.get $6 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 4252 + i32.load + local.tee $4 + call $~lib/typedarray/Float64Array#constructor + local.tee $6 local.set $1 loop $for-loop|0 - local.get $2 - local.get $1 + local.get $0 + local.get $4 i32.lt_s if + local.get $1 + local.get $0 + i32.const 4240 + local.get $0 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $3 - local.get $2 i32.const 1 - i32.shl i32.add - i32.load16_s - i32.store + local.set $0 + br $for-loop|0 + end + end + local.get $1 + i32.load + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub + local.get $1 + i32.load offset=8 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 + i32.const 1 + global.set $~argumentsLength + i32.const 0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $5 + i32.gt_u + if + i32.const 1376 + i32.const 1440 + i32.const 1705 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.const 7 + i32.and + if + i32.const 1040 + i32.const 1440 + i32.const 1710 + i32.const 9 + call $~lib/builtins/abort + unreachable + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $5 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + loop $for-loop|1 + local.get $3 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $3 + call $~lib/typedarray/Float64Array#__get local.get $2 + local.get $3 + call $~lib/typedarray/Float64Array#__get + f64.ne + if + i32.const 0 + i32.const 1312 + i32.const 684 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $3 i32.const 1 i32.add - local.set $2 - br $for-loop|0 + local.set $3 + br $for-loop|1 end end + local.get $6 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,i8> (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 4524 + i32.const 4316 i32.load - i32.const 7 - i32.add local.get $0 i32.load offset=8 - i32.const 2 - i32.shr_u i32.gt_s if i32.const 1376 @@ -23215,13 +22248,11 @@ end local.get $0 i32.load offset=4 - i32.const 28 - i32.add local.set $0 - i32.const 4516 + i32.const 4308 i32.load local.set $2 - i32.const 4524 + i32.const 4316 i32.load local.set $3 loop $for-loop|0 @@ -23231,14 +22262,14 @@ if local.get $0 local.get $1 - i32.const 2 - i32.shl i32.add - local.get $1 local.get $2 + local.get $1 + i32.const 2 + i32.shl i32.add - i32.load8_s - i32.store + i32.load + i32.store8 local.get $1 i32.const 1 i32.add @@ -23247,277 +22278,15 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> - (local $0 i32) - (local $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> (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 $8 i32) - (local $9 f32) - (local $10 f64) - (local $11 i32) - (local $12 i32) - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $3 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set - local.get $3 - i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set - local.get $3 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - i32.const 4 - call $~lib/typedarray/Uint8Array#constructor - local.tee $2 - i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set - local.get $2 - i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set - local.get $2 - i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set - local.get $2 - i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $4 - i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set - local.get $4 - i32.const 1 - i32.const 1001 - call $~lib/typedarray/Int16Array#__set - local.get $4 - i32.const 2 - i32.const 1002 - call $~lib/typedarray/Int16Array#__set - i32.const 10 - call $~lib/typedarray/Int32Array#constructor - local.tee $0 - call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,i32> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 15 - i32.const 5760 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $11 - call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - block $folding-inner0 - i32.const 4380 - i32.load - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - br_if $folding-inner0 - local.get $0 - i32.load offset=4 - i32.const 12 - i32.add - local.set $5 - i32.const 4372 - i32.load - local.set $6 - i32.const 4380 - i32.load - local.set $7 - loop $for-loop|0 - local.get $1 - local.get $7 - i32.lt_s - if - local.get $5 - local.get $1 - i32.const 2 - i32.shl - local.tee $8 - i32.add - local.get $6 - local.get $8 - i32.add - f32.load - local.tee $9 - local.get $9 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $9 - i32.trunc_f32_s - else - i32.const 0 - end - i32.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $0 - i32.const 10 - i32.const 2 - i32.const 15 - i32.const 5872 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - local.get $0 - local.get $3 - call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int64Array,i64> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 15 - i32.const 5936 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - i32.const 0 - local.set $1 - i32.const 4460 - i32.load - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - br_if $folding-inner0 - local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - local.set $7 - i32.const 4452 - i32.load - local.set $8 - i32.const 4460 - i32.load - local.set $12 - loop $for-loop|00 - local.get $1 - local.get $12 - i32.lt_s - if - local.get $7 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $8 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $10 - local.get $10 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $10 - i32.trunc_f64_s - else - i32.const 0 - end - i32.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|00 - end - end - local.get $0 - i32.const 10 - i32.const 2 - i32.const 15 - i32.const 6000 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $1 - call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - local.get $2 - call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Uint8Array,u8> - local.get $0 - local.get $4 - call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int16Array,i16> - local.get $0 - call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,i8> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 15 - i32.const 6064 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $1 - call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - 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 $0 - 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 - i32.const 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 - call $~lib/builtins/abort - unreachable - ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $3 + local.tee $4 local.get $1 i32.load offset=12 i32.ne @@ -23531,27 +22300,32 @@ end loop $for-loop|0 local.get $2 - local.get $3 + local.get $4 i32.lt_s if local.get $0 local.get $2 - call $~lib/typedarray/Uint32Array#__get - local.tee $4 - local.get $1 + call $~lib/typedarray/Int8Array#__get + local.set $3 local.get $2 - call $~lib/array/Array#__unchecked_get + local.get $1 + i32.load offset=4 + i32.add + i32.load8_s local.tee $5 + local.set $6 + local.get $3 + local.get $5 i32.ne if - i32.const 6192 + i32.const 4576 i32.const 3 local.get $2 f64.convert_i32_s - local.get $4 - f64.convert_i32_u - local.get $5 - f64.convert_i32_u + local.get $3 + f64.convert_i32_s + local.get $6 + f64.convert_i32_s f64.const 0 f64.const 0 call $~lib/builtins/trace @@ -23570,8 +22344,168 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> - (local $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 6 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 6 + i32.add + local.set $0 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $1 + loop $for-loop|0 + local.get $2 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $2 + i32.add + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + i64.store8 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) + local.get $1 + i32.load offset=8 + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + call $~lib/util/memory/memmove + ) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 4 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 4 + i32.add + local.set $0 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $1 + loop $for-loop|0 + local.get $2 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $2 + i32.add + local.get $3 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.store8 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) + i32.const 4524 + i32.load + i32.const 7 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 7 + i32.add + i32.const 4516 + i32.load + i32.const 4520 + i32.load + call $~lib/util/memory/memmove + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -23579,9 +22513,9 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 f32) - (local $10 f64) + (local $8 f32) + (local $9 f64) + (local $10 i32) (local $11 i32) (local $12 i32) i32.const 3 @@ -23631,32 +22565,30 @@ i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 - call $~lib/typedarray/Uint32Array#constructor - local.tee $0 - call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,i32> - local.get $0 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + call $~lib/typedarray/Int8Array#set<~lib/array/Array> + local.get $1 i32.const 10 - i32.const 2 - i32.const 21 - i32.const 6128 + i32.const 0 + i32.const 14 + i32.const 4544 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $11 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> block $folding-inner0 i32.const 4380 i32.load i32.const 3 i32.add - local.get $0 + local.get $1 i32.load offset=8 - i32.const 2 - i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 - i32.const 12 + i32.const 3 i32.add local.set $5 i32.const 4372 @@ -23666,147 +22598,142 @@ i32.load local.set $7 loop $for-loop|0 - local.get $1 + local.get $0 local.get $7 i32.lt_s if + local.get $0 local.get $5 - local.get $1 - i32.const 2 - i32.shl - local.tee $8 i32.add local.get $6 - local.get $8 + local.get $0 + i32.const 2 + i32.shl i32.add f32.load - local.tee $9 - local.get $9 + local.tee $8 + local.get $8 f32.sub f32.const 0 f32.eq if (result i32) - local.get $9 - i32.trunc_f32_u + local.get $8 + i32.trunc_f32_s else i32.const 0 end - i32.store - local.get $1 + i32.store8 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end - local.get $0 + local.get $1 i32.const 10 - i32.const 2 - i32.const 21 - i32.const 6240 + i32.const 0 + i32.const 14 + i32.const 4624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> - local.get $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> + local.get $1 local.get $3 - call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int64Array,i64> - local.get $0 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> + local.get $1 i32.const 10 - i32.const 2 - i32.const 21 - i32.const 6304 + i32.const 0 + i32.const 14 + i32.const 4656 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> i32.const 0 - local.set $1 + local.set $0 i32.const 4460 i32.load i32.const 2 i32.add - local.get $0 + local.get $1 i32.load offset=8 - i32.const 2 - i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 - i32.const 8 + i32.const 2 i32.add local.set $7 i32.const 4452 i32.load - local.set $8 + local.set $11 i32.const 4460 i32.load local.set $12 loop $for-loop|00 - local.get $1 + local.get $0 local.get $12 i32.lt_s if + local.get $0 local.get $7 - local.get $1 - i32.const 2 - i32.shl i32.add - local.get $8 - local.get $1 + local.get $11 + local.get $0 i32.const 3 i32.shl i32.add f64.load - local.tee $10 - local.get $10 + local.tee $9 + local.get $9 f64.sub f64.const 0 f64.eq if (result i32) - local.get $10 - i32.trunc_f64_u + local.get $9 + i32.trunc_f64_s else i32.const 0 end - i32.store - local.get $1 + i32.store8 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|00 end end - local.get $0 + local.get $1 i32.const 10 - i32.const 2 - i32.const 21 - i32.const 6368 + i32.const 0 + i32.const 14 + i32.const 4688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> - local.get $1 - call $~lib/rt/pure/__release + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> local.get $0 + call $~lib/rt/pure/__release + local.get $1 local.get $2 - call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Uint8Array,u8> - local.get $0 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> + local.get $1 local.get $4 - call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int16Array,i16> - local.get $0 - call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,i8> - local.get $0 + 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 2 - i32.const 21 - i32.const 6432 + i32.const 0 + i32.const 14 + i32.const 4720 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> - local.get $1 + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> + local.get $0 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release @@ -23814,9 +22741,9 @@ call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.get $11 + local.get $10 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release @@ -23831,78 +22758,15 @@ call $~lib/builtins/abort unreachable ) - (func $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,i32> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 4316 - i32.load - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - if - i32.const 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $0 - i32.const 4308 - i32.load - local.set $2 - i32.const 4316 - i32.load - local.set $3 - loop $for-loop|0 - local.get $1 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.get $2 - local.get $1 - i32.const 2 - i32.shl - i32.add - i64.load32_s - i64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - ) - (func $~lib/array/Array#__unchecked_get (param $0 i32) (param $1 i32) (result i64) - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 3 - i32.shl - i32.add - i64.load - ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i64) - (local $5 i64) + (local $4 i32) + (local $5 i32) + (local $6 i32) local.get $0 i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 + local.tee $4 local.get $1 i32.load offset=12 i32.ne @@ -23916,27 +22780,32 @@ end loop $for-loop|0 local.get $2 - local.get $3 + local.get $4 i32.lt_s if local.get $0 local.get $2 - call $~lib/typedarray/Int64Array#__get - local.tee $4 - local.get $1 + call $~lib/typedarray/Uint8Array#__get + local.set $3 local.get $2 - call $~lib/array/Array#__unchecked_get + local.get $1 + i32.load offset=4 + i32.add + i32.load8_u local.tee $5 - i64.ne + local.set $6 + local.get $3 + local.get $5 + i32.ne if - i32.const 6592 + i32.const 4784 i32.const 3 local.get $2 f64.convert_i32_s - local.get $4 - f64.convert_i64_s - local.get $5 - f64.convert_i64_s + local.get $3 + f64.convert_i32_u + local.get $6 + f64.convert_i32_u f64.const 0 f64.const 0 call $~lib/builtins/trace @@ -23955,223 +22824,27 @@ end end ) - (func $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) - local.get $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 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 48 - i32.add - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - call $~lib/util/memory/memmove - ) - (func $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - local.get $1 - i32.load offset=8 - local.get $0 - i32.load offset=8 + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 f32) + (local $9 f64) + (local $10 i32) + (local $11 i32) + (local $12 i32) i32.const 3 - i32.shr_u - i32.gt_s - if - i32.const 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $0 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - local.set $1 - loop $for-loop|0 - local.get $2 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $2 - i32.const 3 - i32.shl - i32.add - local.get $2 - local.get $3 - i32.add - i64.load8_u - i64.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $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 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 32 - i32.add - local.set $0 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $1 - loop $for-loop|0 - local.get $2 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $2 - i32.const 3 - i32.shl - i32.add - local.get $3 - local.get $2 - i32.const 1 - i32.shl - i32.add - i64.load16_s - i64.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,i8> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 4524 - i32.load - i32.const 7 - i32.add - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - if - i32.const 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 56 - i32.add - local.set $0 - i32.const 4516 - i32.load - local.set $2 - i32.const 4524 - i32.load - local.set $3 - loop $for-loop|0 - local.get $1 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.get $1 - local.get $2 - i32.add - i64.load8_s - i64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> - (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 f32) - (local $9 f64) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $3 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set - local.get $3 + call $~lib/typedarray/Int64Array#constructor + local.tee $3 + i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $3 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set @@ -24212,32 +22885,30 @@ i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 - call $~lib/typedarray/Int64Array#constructor - local.tee $0 - call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,i32> - local.get $0 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + call $~lib/typedarray/Int8Array#set<~lib/array/Array> + local.get $1 i32.const 10 - i32.const 3 - i32.const 22 - i32.const 6496 + i32.const 0 + i32.const 18 + i32.const 4752 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $10 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> block $folding-inner0 i32.const 4380 i32.load i32.const 3 i32.add - local.get $0 + local.get $1 i32.load offset=8 - i32.const 3 - i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 - i32.const 24 + i32.const 3 i32.add local.set $5 i32.const 4372 @@ -24247,17 +22918,15 @@ i32.load local.set $7 loop $for-loop|0 - local.get $1 + local.get $0 local.get $7 i32.lt_s if + local.get $0 local.get $5 - local.get $1 - i32.const 3 - i32.shl i32.add local.get $6 - local.get $1 + local.get $0 i32.const 2 i32.shl i32.add @@ -24267,56 +22936,54 @@ f32.sub f32.const 0 f32.eq - if (result i64) + if (result i32) local.get $8 - i64.trunc_f32_s + i32.trunc_f32_u else - i64.const 0 + i32.const 0 end - i64.store - local.get $1 + i32.store8 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end - local.get $0 + local.get $1 i32.const 10 - i32.const 3 - i32.const 22 - i32.const 6640 + i32.const 0 + i32.const 18 + i32.const 4832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> - local.get $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> + local.get $1 local.get $3 - call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int64Array,i64> - local.get $0 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> + local.get $1 i32.const 10 - i32.const 3 - i32.const 22 - i32.const 6736 + i32.const 0 + i32.const 18 + i32.const 4864 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> i32.const 0 - local.set $1 + local.set $0 i32.const 4460 i32.load i32.const 2 i32.add - local.get $0 + local.get $1 i32.load offset=8 - i32.const 3 - i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 - i32.const 16 + i32.const 2 i32.add local.set $7 i32.const 4452 @@ -24326,18 +22993,17 @@ i32.load local.set $12 loop $for-loop|00 - local.get $1 + local.get $0 local.get $12 i32.lt_s if + local.get $0 local.get $7 - local.get $1 - i32.const 3 - i32.shl - local.tee $13 i32.add local.get $11 - local.get $13 + local.get $0 + i32.const 3 + i32.shl i32.add f64.load local.tee $9 @@ -24345,49 +23011,49 @@ f64.sub f64.const 0 f64.eq - if (result i64) + if (result i32) local.get $9 - i64.trunc_f64_s + i32.trunc_f64_u else - i64.const 0 + i32.const 0 end - i64.store - local.get $1 + i32.store8 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|00 end end - local.get $0 + local.get $1 i32.const 10 - i32.const 3 - i32.const 22 - i32.const 6832 + i32.const 0 + i32.const 18 + i32.const 4896 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> - local.get $1 - call $~lib/rt/pure/__release + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> local.get $0 + call $~lib/rt/pure/__release + local.get $1 local.get $2 - call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Uint8Array,u8> - local.get $0 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> + local.get $1 local.get $4 - call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int16Array,i16> - local.get $0 - call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,i8> - local.get $0 + 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 3 - i32.const 22 - i32.const 6928 + i32.const 0 + i32.const 18 + i32.const 4928 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> - local.get $1 + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> + local.get $0 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release @@ -24395,7 +23061,7 @@ call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release @@ -24412,16 +23078,15 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i64) - (local $5 i64) + (local $4 i32) + (local $5 i32) + (local $6 i32) local.get $0 i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 + local.tee $4 local.get $1 i32.load offset=12 i32.ne @@ -24435,27 +23100,32 @@ end loop $for-loop|0 local.get $2 - local.get $3 + local.get $4 i32.lt_s if local.get $0 local.get $2 - call $~lib/typedarray/Uint64Array#__get - local.tee $4 - local.get $1 + call $~lib/typedarray/Uint8ClampedArray#__get + local.set $3 local.get $2 - call $~lib/array/Array#__unchecked_get + local.get $1 + i32.load offset=4 + i32.add + i32.load8_u local.tee $5 - i64.ne + local.set $6 + local.get $3 + local.get $5 + i32.ne if - i32.const 7120 + i32.const 4992 i32.const 3 local.get $2 f64.convert_i32_s - local.get $4 - f64.convert_i64_u - local.get $5 - f64.convert_i64_u + local.get $3 + f64.convert_i32_u + local.get $6 + f64.convert_i32_u f64.const 0 f64.const 0 call $~lib/builtins/trace @@ -24474,7 +23144,171 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> + (func $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i64) + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1736 + i32.const 19 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $0 + i32.load offset=4 + i32.add + local.set $0 + local.get $1 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $1 + loop $for-loop|0 + local.get $3 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $3 + i32.add + local.get $2 + local.get $3 + i32.const 3 + i32.shl + i32.add + i64.load + local.tee $4 + i32.wrap_i64 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i64.extend_i32_s + local.get $4 + i32.const 255 + local.get $4 + i32.wrap_i64 + i32.sub + i32.const 31 + i32.shr_s + i64.extend_i32_s + i64.or + i64.and + i64.store8 + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1736 + i32.const 19 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $0 + i32.load offset=4 + i32.add + local.set $2 + local.get $1 + i32.load offset=4 + local.set $4 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $1 + loop $for-loop|0 + local.get $3 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $3 + i32.add + local.get $4 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.tee $0 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $0 + i32.const 255 + local.get $0 + i32.sub + i32.const 31 + i32.shr_s + i32.or + i32.and + i32.store8 + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> (local $0 i32) (local $1 i32) (local $2 i32) @@ -24483,23 +23317,24 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 f32) - (local $9 f64) + (local $8 i32) + (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) + (local $12 f32) + (local $13 f64) + (local $14 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $3 + local.tee $7 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $3 + local.get $7 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $3 + local.get $7 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set @@ -24523,229 +23358,403 @@ call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $4 + local.tee $8 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $4 + local.get $8 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $4 + local.get $8 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 - call $~lib/typedarray/Uint64Array#constructor - local.tee $0 - call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,i32> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 23 - i32.const 7024 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $14 + local.tee $1 + local.set $3 block $folding-inner0 - i32.const 4380 + i32.const 4316 i32.load - i32.const 3 - i32.add - local.get $0 + local.get $1 i32.load offset=8 - i32.const 3 - i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $3 i32.load offset=4 - i32.const 24 - i32.add + local.set $9 + i32.const 4308 + i32.load + local.set $4 + i32.const 4316 + i32.load local.set $5 + loop $for-loop|0 + local.get $0 + local.get $5 + i32.lt_s + if + local.get $0 + local.get $9 + i32.add + local.get $4 + local.get $0 + 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 $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $1 + i32.const 10 + i32.const 0 + i32.const 18 + i32.const 4960 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $9 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + i32.const 0 + local.set $0 + i32.const 4380 + i32.load + 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 $4 i32.const 4372 i32.load - local.set $6 + local.set $5 i32.const 4380 i32.load - local.set $7 - loop $for-loop|0 - local.get $1 - local.get $7 + local.set $6 + loop $for-loop|00 + local.get $0 + local.get $6 i32.lt_s if - local.get $5 - local.get $1 - i32.const 3 - i32.shl + local.get $0 + local.get $4 i32.add - local.get $6 - local.get $1 + local.get $5 + local.get $0 i32.const 2 i32.shl i32.add f32.load - local.tee $8 - local.get $8 + local.tee $12 + local.get $12 f32.sub f32.const 0 f32.eq - if (result i64) - local.get $8 - i64.trunc_f32_u + if (result i32) + f32.const 0 + f32.const 255 + local.get $12 + f32.min + f32.max + i32.trunc_f32_u else - i64.const 0 + i32.const 0 end - i64.store - local.get $1 + i32.store8 + local.get $0 i32.const 1 i32.add - local.set $1 - br $for-loop|0 + local.set $0 + br $for-loop|00 end end - local.get $0 + local.get $1 i32.const 10 - i32.const 3 - i32.const 23 - i32.const 7168 + i32.const 0 + i32.const 18 + i32.const 5056 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> - local.get $0 - local.get $3 - call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int64Array,i64> - local.get $0 + local.tee $4 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + local.get $1 + local.get $7 + i32.const 6 + call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int64Array,i64> + local.get $1 i32.const 10 - i32.const 3 - i32.const 23 - i32.const 7264 + i32.const 0 + i32.const 18 + i32.const 5088 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> i32.const 0 - local.set $1 + local.set $0 i32.const 4460 i32.load i32.const 2 i32.add - local.get $0 + local.get $1 i32.load offset=8 - i32.const 3 - i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 - i32.const 16 + i32.const 2 i32.add - local.set $7 + local.set $6 i32.const 4452 i32.load - local.set $11 + local.set $10 i32.const 4460 i32.load - local.set $12 - loop $for-loop|00 - local.get $1 - local.get $12 + local.set $11 + loop $for-loop|01 + local.get $0 + local.get $11 i32.lt_s if - local.get $7 - local.get $1 + local.get $0 + local.get $6 + i32.add + local.get $10 + local.get $0 i32.const 3 i32.shl - local.tee $13 - i32.add - local.get $11 - local.get $13 i32.add f64.load - local.tee $9 - local.get $9 + local.tee $13 + local.get $13 f64.sub f64.const 0 f64.eq - if (result i64) - local.get $9 - i64.trunc_f64_u + if (result i32) + f64.const 0 + f64.const 255 + local.get $13 + f64.min + f64.max + i32.trunc_f64_u else - i64.const 0 + i32.const 0 end - i64.store - local.get $1 + i32.store8 + local.get $0 i32.const 1 i32.add - local.set $1 - br $for-loop|00 + local.set $0 + br $for-loop|01 end end - local.get $0 + local.get $1 i32.const 10 - i32.const 3 - i32.const 23 - i32.const 7360 + i32.const 0 + i32.const 18 + i32.const 5120 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> - local.get $1 - call $~lib/rt/pure/__release + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> local.get $0 + call $~lib/rt/pure/__release local.get $2 - call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Uint8Array,u8> - local.get $0 - local.get $4 - call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int16Array,i16> - local.get $0 - call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,i8> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 23 - i32.const 7456 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $1 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + i32.load offset=8 local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $1 + i32.load offset=4 local.get $2 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - return - end - i32.const 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 - call $~lib/builtins/abort - unreachable - ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (param $0 i32) (param $1 i32) - (local $2 i32) + i32.load offset=4 + local.get $2 + i32.load offset=8 + call $~lib/util/memory/memmove + local.get $1 + local.get $8 + i32.const 4 + call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int16Array,i16> + i32.const 0 + local.set $0 + i32.const 4524 + i32.load + 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 $6 + i32.const 4516 + i32.load + local.set $10 + i32.const 4524 + i32.load + local.set $11 + loop $for-loop|02 + local.get $0 + local.get $11 + i32.lt_s + if + local.get $0 + local.get $6 + i32.add + local.get $0 + local.get $10 + 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 $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|02 + end + end + local.get $1 + i32.const 10 + i32.const 0 + i32.const 18 + i32.const 5152 + call $~lib/rt/__allocArray + 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 $7 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + local.get $14 + call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + return + end + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) + (local $1 i32) + (local $2 i32) (local $3 i32) - (local $4 f32) - (local $5 f32) + i32.const 4316 + i32.load local.get $0 i32.load offset=8 - i32.const 2 + i32.const 1 + i32.shr_u + i32.gt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $0 + i32.const 4308 + i32.load + local.set $2 + i32.const 4316 + i32.load + local.set $3 + loop $for-loop|0 + local.get $1 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.get $2 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + i32.store16 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + ) + (func $std/typedarray/valuesEqual<~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 $0 + i32.load offset=8 + i32.const 1 i32.shr_u local.tee $3 + local.set $4 + local.get $3 local.get $1 i32.load offset=12 i32.ne @@ -24759,31 +23768,34 @@ end loop $for-loop|0 local.get $2 - local.get $3 + local.get $4 i32.lt_s if local.get $0 local.get $2 - call $~lib/typedarray/Float32Array#__get - local.tee $4 + call $~lib/typedarray/Int16Array#__get + local.set $3 local.get $1 i32.load offset=4 local.get $2 - i32.const 2 + i32.const 1 i32.shl i32.add - f32.load + i32.load16_s local.tee $5 - f32.ne + local.set $6 + local.get $3 + local.get $5 + i32.ne if - i32.const 7616 + i32.const 5232 i32.const 3 local.get $2 f64.convert_i32_s - local.get $4 - f64.promote_f32 - local.get $5 - f64.promote_f32 + local.get $3 + f64.convert_i32_s + local.get $6 + f64.convert_i32_s f64.const 0 f64.const 0 call $~lib/builtins/trace @@ -24802,103 +23814,324 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> - (local $0 i32) - (local $1 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int64Array,i64> (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 $8 i32) - (local $9 i32) - (local $10 i32) + local.get $1 + i32.load offset=8 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 $3 - i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set - local.get $3 + i32.shr_u + i32.const 6 + i32.add + local.get $0 + i32.load offset=8 i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set - local.get $3 - i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set - local.get $3 - i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set + i32.shr_u + i32.gt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 12 + i32.add + local.set $0 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 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.shr_u + local.set $1 + loop $for-loop|0 + local.get $2 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + i64.store16 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.load offset=8 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $0 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + local.set $1 + loop $for-loop|0 + local.get $2 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + local.get $2 + local.get $3 + i32.add + i32.load8_u + i32.store16 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) + local.get $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 1376 + i32.const 1440 + i32.const 1737 + 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/util/memory/memmove + ) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 4524 + i32.load + i32.const 7 + i32.add + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 14 + i32.add + local.set $0 + i32.const 4516 + i32.load + local.set $2 + i32.const 4524 + i32.load + local.set $3 + loop $for-loop|0 + local.get $1 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_s + i32.store16 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> + (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 f32) + (local $9 f64) + (local $10 i32) + (local $11 i32) + (local $12 i32) + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $3 + i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $3 + i32.const 1 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $3 + i32.const 2 + i64.const 9 + call $~lib/typedarray/Int64Array#__set + i32.const 4 + call $~lib/typedarray/Uint8Array#constructor + local.tee $2 + i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $2 + i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $2 + i32.const 2 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $2 + i32.const 3 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $4 + i32.const 0 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $4 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $6 + local.get $4 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 - call $~lib/typedarray/Float32Array#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $1 - local.set $7 + call $~lib/typedarray/Int16Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 1 + i32.const 19 + i32.const 5184 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> block $folding-inner0 - i32.const 4316 + i32.const 4380 i32.load + i32.const 3 + i32.add local.get $1 i32.load offset=8 - i32.const 2 + i32.const 1 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $7 + local.get $1 i32.load offset=4 - local.set $7 - i32.const 4308 + i32.const 6 + i32.add + local.set $5 + i32.const 4372 i32.load - local.set $10 - i32.const 4316 + local.set $6 + i32.const 4380 i32.load - local.set $8 + local.set $7 loop $for-loop|0 local.get $0 - local.get $8 + local.get $7 i32.lt_s if - local.get $7 + local.get $5 local.get $0 - i32.const 2 + i32.const 1 i32.shl - local.tee $2 i32.add - local.get $2 - local.get $10 + local.get $6 + local.get $0 + i32.const 2 + i32.shl i32.add - i32.load - f32.convert_i32_s - f32.store + f32.load + local.tee $8 + local.get $8 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $8 + i32.trunc_f32_s + else + i32.const 0 + end + i32.store16 local.get $0 i32.const 1 i32.add @@ -24908,86 +24141,76 @@ end local.get $1 i32.const 10 - i32.const 2 - i32.const 16 - i32.const 7552 + i32.const 1 + i32.const 19 + i32.const 5280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - i32.const 4380 - i32.load - i32.const 3 - i32.add - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - br_if $folding-inner0 + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> local.get $1 - i32.load offset=4 - i32.const 12 - i32.add - i32.const 4372 - i32.load - i32.const 4376 - i32.load - call $~lib/util/memory/memmove + local.get $3 + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int64Array,i64> local.get $1 i32.const 10 - i32.const 2 - i32.const 16 - i32.const 7664 + i32.const 1 + i32.const 19 + i32.const 5328 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> i32.const 0 local.set $0 - local.get $5 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 6 + i32.const 4460 + i32.load + i32.const 2 i32.add local.get $1 i32.load offset=8 - i32.const 2 + i32.const 1 i32.shr_u i32.gt_s br_if $folding-inner0 local.get $1 i32.load offset=4 - i32.const 24 + i32.const 4 i32.add - local.set $8 - local.get $5 - i32.load offset=4 - local.set $2 - local.get $5 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $4 + local.set $7 + i32.const 4452 + i32.load + local.set $11 + i32.const 4460 + i32.load + local.set $12 loop $for-loop|00 local.get $0 - local.get $4 + local.get $12 i32.lt_s if - local.get $8 + local.get $7 local.get $0 - i32.const 2 + i32.const 1 i32.shl i32.add - local.get $2 + local.get $11 local.get $0 i32.const 3 i32.shl i32.add - i64.load - f32.convert_i64_s - f32.store + f64.load + local.tee $9 + local.get $9 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $9 + i32.trunc_f64_s + else + i32.const 0 + end + i32.store16 local.get $0 i32.const 1 i32.add @@ -24997,177 +24220,381 @@ end local.get $1 i32.const 10 - i32.const 2 - i32.const 16 - i32.const 7728 + i32.const 1 + i32.const 19 + i32.const 5376 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - i32.const 0 - local.set $0 - local.get $3 - i32.load offset=8 + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> + local.get $0 + call $~lib/rt/pure/__release local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - br_if $folding-inner0 + local.get $2 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> local.get $1 - i32.load offset=4 - local.set $2 - local.get $3 - i32.load offset=4 - local.set $4 + local.get $4 + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int16Array,i16> + local.get $1 + call $~lib/typedarray/Int16Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 1 + i32.const 19 + i32.const 5424 + call $~lib/rt/__allocArray + 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 $3 - i32.load offset=8 - local.set $9 - loop $for-loop|01 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + return + end + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 + call $~lib/builtins/abort + unreachable + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.tee $3 + local.set $4 + local.get $3 + local.get $1 + i32.load offset=12 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 712 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if local.get $0 - local.get $9 - i32.lt_s + local.get $2 + call $~lib/typedarray/Uint16Array#__get + local.set $3 + local.get $1 + i32.load offset=4 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.tee $5 + local.set $6 + local.get $3 + local.get $5 + i32.ne if + i32.const 5520 + i32.const 3 local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - local.get $0 - local.get $4 - 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 + f64.convert_i32_s + local.get $3 + f64.convert_i32_u + local.get $6 + f64.convert_i32_u + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + i32.const 1312 + i32.const 718 + i32.const 7 + call $~lib/builtins/abort + unreachable end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - i32.const 0 - local.set $0 - local.get $6 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 4 + end + ) + (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 f32) + (local $9 f64) + (local $10 i32) + (local $11 i32) + (local $12 i32) + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $3 + i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $3 + i32.const 1 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $3 + i32.const 2 + i64.const 9 + call $~lib/typedarray/Int64Array#__set + i32.const 4 + call $~lib/typedarray/Uint8Array#constructor + local.tee $2 + i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $2 + i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $2 + i32.const 2 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $2 + i32.const 3 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $4 + i32.const 0 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $4 + i32.const 1 + i32.const 1001 + call $~lib/typedarray/Int16Array#__set + local.get $4 + i32.const 2 + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + call $~lib/typedarray/Int16Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 1 + i32.const 20 + i32.const 5472 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> + block $folding-inner0 + i32.const 4380 + i32.load + i32.const 3 i32.add local.get $1 i32.load offset=8 - i32.const 2 + i32.const 1 i32.shr_u i32.gt_s br_if $folding-inner0 local.get $1 i32.load offset=4 - i32.const 16 + i32.const 6 i32.add - local.set $2 - local.get $6 - i32.load offset=4 - local.set $4 - local.get $6 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $9 - loop $for-loop|02 + local.set $5 + i32.const 4372 + i32.load + local.set $6 + i32.const 4380 + i32.load + local.set $7 + loop $for-loop|0 local.get $0 - local.get $9 + local.get $7 i32.lt_s if - local.get $2 + local.get $5 local.get $0 - i32.const 2 + i32.const 1 i32.shl i32.add - local.get $4 + local.get $6 local.get $0 - i32.const 1 + i32.const 2 i32.shl i32.add - i32.load16_s - f32.convert_i32_s - f32.store + f32.load + local.tee $8 + local.get $8 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $8 + 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|02 + br $for-loop|0 end end + local.get $1 + i32.const 10 + i32.const 1 + i32.const 20 + i32.const 5568 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> + local.get $1 + local.get $3 + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int64Array,i64> + local.get $1 + i32.const 10 + i32.const 1 + i32.const 20 + i32.const 5616 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> i32.const 0 local.set $0 - i32.const 4524 + i32.const 4460 i32.load - i32.const 7 + i32.const 2 i32.add local.get $1 i32.load offset=8 - i32.const 2 + i32.const 1 i32.shr_u i32.gt_s br_if $folding-inner0 local.get $1 i32.load offset=4 - i32.const 28 + i32.const 4 i32.add - local.set $2 - i32.const 4516 + local.set $7 + i32.const 4452 i32.load - local.set $4 - i32.const 4524 + local.set $11 + i32.const 4460 i32.load - local.set $9 - loop $for-loop|03 + local.set $12 + loop $for-loop|00 local.get $0 - local.get $9 + local.get $12 i32.lt_s if - local.get $2 + local.get $7 local.get $0 - i32.const 2 + i32.const 1 i32.shl i32.add + local.get $11 local.get $0 - local.get $4 + i32.const 3 + i32.shl i32.add - i32.load8_s - f32.convert_i32_s - f32.store + f64.load + local.tee $9 + local.get $9 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $9 + 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|03 + br $for-loop|00 end end local.get $1 i32.const 10 - i32.const 2 - i32.const 16 - i32.const 7792 + i32.const 1 + i32.const 20 + i32.const 5664 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $1 + local.get $2 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> + local.get $1 + local.get $4 + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int16Array,i16> + local.get $1 + call $~lib/typedarray/Int16Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 1 + i32.const 20 + i32.const 5712 + call $~lib/rt/__allocArray + 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 $3 call $~lib/rt/pure/__release - local.get $6 + local.get $2 call $~lib/rt/pure/__release - local.get $1 + local.get $4 call $~lib/rt/pure/__release - local.get $7 + local.get $1 call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release - local.get $8 + local.get $5 + call $~lib/rt/pure/__release + local.get $6 call $~lib/rt/pure/__release return end @@ -25178,18 +24605,45 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 f64) - (local $5 f64) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) + i32.const 4316 + i32.load local.get $0 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u - local.tee $3 - local.get $1 - i32.load offset=12 + i32.gt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 4308 + i32.load + i32.const 4312 + i32.load + call $~lib/util/memory/memmove + ) + (func $std/typedarray/valuesEqual<~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.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $3 + local.set $4 + local.get $3 + local.get $1 + i32.load offset=12 i32.ne if i32.const 0 @@ -25201,29 +24655,34 @@ end loop $for-loop|0 local.get $2 - local.get $3 + local.get $4 i32.lt_s if local.get $0 local.get $2 - call $~lib/typedarray/Float64Array#__get - local.tee $4 + call $~lib/typedarray/Int32Array#__get + local.set $3 local.get $1 i32.load offset=4 local.get $2 - i32.const 3 + i32.const 2 i32.shl i32.add - f64.load + i32.load local.tee $5 - f64.ne + local.set $6 + local.get $3 + local.get $5 + i32.ne if - i32.const 7952 + i32.const 5824 i32.const 3 local.get $2 f64.convert_i32_s - local.get $4 - local.get $5 + local.get $3 + f64.convert_i32_s + local.get $6 + f64.convert_i32_s f64.const 0 f64.const 0 call $~lib/builtins/trace @@ -25242,402 +24701,483 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> - (local $0 i32) - (local $1 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int64Array,i64> (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 $8 i32) - (local $9 i32) - (local $10 i32) + local.get $1 + i32.load offset=8 i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $7 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set - local.get $7 - i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set - local.get $7 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - i32.const 4 - call $~lib/typedarray/Uint8Array#constructor - local.tee $3 - i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set - local.get $3 - i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set - local.get $3 + i32.shr_u + i32.const 6 + i32.add + local.get $0 + i32.load offset=8 i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set - local.get $3 - i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set + i32.shr_u + i32.gt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 24 + i32.add + local.set $0 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $8 - i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set - local.get $8 - i32.const 1 - i32.const 1001 - call $~lib/typedarray/Int16Array#__set - local.get $8 - i32.const 2 - i32.const 1002 - call $~lib/typedarray/Int16Array#__set - i32.const 10 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - local.set $9 - block $folding-inner0 - i32.const 4316 - i32.load + i32.shr_u + local.set $1 + loop $for-loop|0 + 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 $9 - i32.load offset=4 - local.set $9 - i32.const 4308 - i32.load - local.set $10 - i32.const 4316 - i32.load - local.set $4 - loop $for-loop|0 + i32.lt_s + if local.get $0 - local.get $4 - i32.lt_s - if - local.get $9 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $10 - local.get $0 - i32.const 2 - i32.shl - i32.add - i32.load - f64.convert_i32_s - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end + local.get $2 + i32.const 2 + i32.shl + i32.add + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + i64.store32 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end + end + ) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.load offset=8 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $0 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + local.set $1 + loop $for-loop|0 + local.get $2 local.get $1 - i32.const 10 - i32.const 3 - i32.const 17 - i32.const 7856 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $9 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - i32.const 0 - local.set $0 - i32.const 4380 - i32.load - i32.const 3 - 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 24 - i32.add - local.set $10 - i32.const 4372 - i32.load - local.set $4 - i32.const 4380 - i32.load - local.set $2 - loop $for-loop|00 + i32.lt_s + if local.get $0 local.get $2 - i32.lt_s - if - local.get $10 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $4 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - f64.promote_f32 - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|00 - end + i32.const 2 + i32.shl + i32.add + local.get $2 + local.get $3 + i32.add + i32.load8_u + i32.store + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end + end + ) + (func $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $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 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 16 + i32.add + local.set $0 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $1 + loop $for-loop|0 + local.get $2 local.get $1 - i32.const 10 - i32.const 3 - i32.const 17 - i32.const 8000 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - i32.const 0 - local.set $0 - local.get $7 - i32.load offset=8 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.get $3 + 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 + ) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 4524 + i32.load + i32.const 7 + i32.add + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 28 + i32.add + local.set $0 + i32.const 4516 + i32.load + local.set $2 + i32.const 4524 + i32.load + local.set $3 + loop $for-loop|0 + local.get $1 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_s + i32.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> + (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) + (local $9 f32) + (local $10 f64) + (local $11 i32) + (local $12 i32) + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $3 + i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $3 + i32.const 1 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $3 + i32.const 2 + i64.const 9 + call $~lib/typedarray/Int64Array#__set + i32.const 4 + call $~lib/typedarray/Uint8Array#constructor + local.tee $2 + i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $2 + i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $2 + i32.const 2 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $2 + i32.const 3 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $4 + i32.const 0 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $4 + i32.const 1 + i32.const 1001 + call $~lib/typedarray/Int16Array#__set + local.get $4 + i32.const 2 + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Int32Array#constructor + local.tee $0 + call $~lib/typedarray/Int32Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 2 + i32.const 15 + i32.const 5760 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $11 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> + block $folding-inner0 + i32.const 4380 + i32.load i32.const 3 - i32.shr_u - i32.const 6 i32.add - local.get $1 + local.get $0 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $1 + local.get $0 i32.load offset=4 - i32.const 48 + i32.const 12 i32.add - local.set $4 - local.get $7 - i32.load offset=4 - local.set $2 - local.get $7 - i32.load offset=8 - i32.const 3 - i32.shr_u local.set $5 - loop $for-loop|01 - local.get $0 - local.get $5 + i32.const 4372 + i32.load + local.set $6 + i32.const 4380 + i32.load + local.set $7 + loop $for-loop|0 + local.get $1 + local.get $7 i32.lt_s if - local.get $4 - local.get $0 - i32.const 3 + local.get $5 + local.get $1 + i32.const 2 i32.shl - local.tee $6 + local.tee $8 i32.add - local.get $2 local.get $6 + local.get $8 i32.add - i64.load - f64.convert_i64_s - f64.store - local.get $0 + f32.load + local.tee $9 + local.get $9 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $9 + i32.trunc_f32_s + else + i32.const 0 + end + i32.store + local.get $1 i32.const 1 i32.add - local.set $0 - br $for-loop|01 + local.set $1 + br $for-loop|0 end end - local.get $1 + local.get $0 i32.const 10 - i32.const 3 - i32.const 17 - i32.const 8096 + i32.const 2 + i32.const 15 + i32.const 5872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - i32.const 0 - local.set $0 - local.get $3 - 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 $1 - i32.load offset=4 - local.set $2 - local.get $3 - i32.load offset=4 - local.set $5 + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> + local.get $0 local.get $3 - i32.load offset=8 - local.set $6 - loop $for-loop|02 - local.get $0 - local.get $6 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $0 - local.get $5 - 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 - i32.const 0 - local.set $0 - local.get $8 - 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 $2 - local.get $8 - i32.load offset=4 - local.set $5 - local.get $8 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $6 - loop $for-loop|03 - local.get $0 - local.get $6 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $5 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_s - f64.convert_i32_s - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|03 - end - end + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int64Array,i64> + local.get $0 + i32.const 10 + i32.const 2 + i32.const 15 + i32.const 5936 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> i32.const 0 - local.set $0 - i32.const 4524 + local.set $1 + i32.const 4460 i32.load - i32.const 7 + i32.const 2 i32.add - local.get $1 + local.get $0 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $1 + local.get $0 i32.load offset=4 - i32.const 56 + i32.const 8 i32.add - local.set $2 - i32.const 4516 + local.set $7 + i32.const 4452 i32.load - local.set $5 - i32.const 4524 + local.set $8 + i32.const 4460 i32.load - local.set $6 - loop $for-loop|04 - local.get $0 - local.get $6 + local.set $12 + loop $for-loop|00 + local.get $1 + local.get $12 i32.lt_s if - local.get $2 - local.get $0 - i32.const 3 + local.get $7 + local.get $1 + i32.const 2 i32.shl i32.add - local.get $0 - local.get $5 + local.get $8 + local.get $1 + i32.const 3 + i32.shl i32.add - i32.load8_s - f64.convert_i32_s - f64.store - local.get $0 + f64.load + local.tee $10 + local.get $10 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $10 + i32.trunc_f64_s + else + i32.const 0 + end + i32.store + local.get $1 i32.const 1 i32.add - local.set $0 - br $for-loop|04 + local.set $1 + br $for-loop|00 end end - local.get $1 + local.get $0 i32.const 10 - i32.const 3 - i32.const 17 - i32.const 8192 + i32.const 2 + i32.const 15 + i32.const 6000 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - local.get $0 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> local.get $1 call $~lib/rt/pure/__release - local.get $9 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release + local.get $0 + local.get $2 + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> + local.get $0 + local.get $4 + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int16Array,i16> + local.get $0 + call $~lib/typedarray/Int32Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 2 + i32.const 15 + i32.const 6064 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> + 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 $0 + 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 i32.const 1376 @@ -25647,6253 +25187,7620 @@ call $~lib/builtins/abort unreachable ) - (func $start:std/typedarray - (local $0 i32) - (local $1 i32) + (func $std/typedarray/valuesEqual<~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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i64) - (local $21 f64) - (local $22 f32) - (local $23 f64) - (local $24 i32) - (local $25 i32) - (local $26 i32) - (local $27 i32) - (local $28 i32) - (local $29 i32) - (local $30 i32) - i32.const 0 - call $std/typedarray/testInstantiate - i32.const 5 - call $std/typedarray/testInstantiate - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - 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 - local.get $1 + local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 95 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 1312 - i32.const 96 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + local.tee $3 + local.set $4 + local.get $3 local.get $1 - i32.load offset=8 - i32.const 12 + i32.load offset=12 i32.ne if i32.const 0 i32.const 1312 - i32.const 97 + i32.const 712 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 98 - i32.const 3 - call $~lib/builtins/abort - unreachable + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/typedarray/Uint32Array#__get + local.set $3 + local.get $1 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $5 + local.set $6 + local.get $3 + local.get $5 + i32.ne + if + i32.const 6192 + i32.const 3 + local.get $2 + f64.convert_i32_s + local.get $3 + f64.convert_i32_u + local.get $6 + f64.convert_i32_u + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + i32.const 1312 + i32.const 718 + i32.const 7 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end end - local.get $1 + ) + (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) + (local $9 f32) + (local $10 f64) + (local $11 i32) + (local $12 i32) + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $3 + i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $3 i32.const 1 - call $~lib/typedarray/Int32Array#__get + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $3 i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 99 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 + i64.const 9 + call $~lib/typedarray/Int64Array#__set + i32.const 4 + call $~lib/typedarray/Uint8Array#constructor + local.tee $2 + i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $2 + i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $2 i32.const 2 - call $~lib/typedarray/Int32Array#__get + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $2 i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 100 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $4 + i32.const 0 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $4 i32.const 1 + i32.const 1001 + call $~lib/typedarray/Int16Array#__set + local.get $4 i32.const 2 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int32Array,i32> - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Uint32Array#constructor + local.tee $0 + call $~lib/typedarray/Int32Array#set<~lib/array/Array> local.get $0 - i32.load offset=8 + i32.const 10 i32.const 2 - i32.shr_u - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 103 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 104 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 105 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 106 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/pure/__release - i32.const 8 - call $~lib/typedarray/Float64Array#constructor - 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 7 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 3 - f64.const 6 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 4 - f64.const 5 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 5 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 6 - f64.const 3 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 7 - f64.const 8 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Float64Array,f64> - local.set $0 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 122 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 16 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 123 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 32 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 124 + i32.const 21 + i32.const 6128 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $11 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + block $folding-inner0 + i32.const 4380 + i32.load i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - global.set $~argumentsLength - block $__inlined_func$~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64> + i32.add local.get $0 - call $~lib/rt/pure/__retain - local.tee $29 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u - local.tee $30 - i32.const 1 - i32.le_s - br_if $__inlined_func$~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64> - local.get $29 + i32.gt_s + br_if $folding-inner0 + local.get $0 i32.load offset=4 - local.set $1 - local.get $30 - i32.const 2 - i32.eq - if - local.get $1 - f64.load offset=8 - local.set $23 + i32.const 12 + i32.add + local.set $5 + i32.const 4372 + i32.load + local.set $6 + i32.const 4380 + i32.load + local.set $7 + loop $for-loop|0 local.get $1 - f64.load - local.set $21 - i32.const 2 - global.set $~argumentsLength - local.get $23 - local.get $21 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 + local.get $7 i32.lt_s if + local.get $5 local.get $1 - local.get $21 - f64.store offset=8 + i32.const 2 + i32.shl + local.tee $8 + i32.add + local.get $6 + local.get $8 + i32.add + f32.load + local.tee $9 + local.get $9 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $9 + i32.trunc_f32_u + else + i32.const 0 + end + i32.store local.get $1 - local.get $23 - f64.store + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 end - br $__inlined_func$~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64> - end - local.get $30 - i32.const 256 - i32.lt_s - if - local.get $1 - local.get $30 - call $~lib/util/sort/insertionSort - else - local.get $1 - local.get $30 - call $~lib/util/sort/weakHeapSort end - end - local.get $29 - call $~lib/rt/pure/__release - local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 4 - f64.eq - if (result i32) local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 5 - f64.eq - else - i32.const 0 - end - if (result i32) + i32.const 10 + i32.const 2 + i32.const 21 + i32.const 6240 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + local.get $0 + local.get $3 + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int64Array,i64> local.get $0 + i32.const 10 i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 6 - f64.eq - else + i32.const 21 + i32.const 6304 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> i32.const 0 - end - if (result i32) + local.set $1 + i32.const 4460 + i32.load + i32.const 2 + i32.add local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.const 7 - f64.eq - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 126 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 8 + i32.add + local.set $7 + i32.const 4452 + i32.load + local.set $8 + i32.const 4460 + i32.load + local.set $12 + loop $for-loop|00 + local.get $1 + local.get $12 + i32.lt_s + if + local.get $7 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $8 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $10 + local.get $10 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $10 + i32.trunc_f64_u + else + i32.const 0 + end + i32.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|00 + end + end + local.get $0 + i32.const 10 + i32.const 2 + i32.const 21 + i32.const 6368 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + local.get $2 + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> + local.get $0 + local.get $4 + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int16Array,i16> + local.get $0 + call $~lib/typedarray/Int32Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 2 + i32.const 21 + i32.const 6432 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + 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 $0 + 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 + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 4316 + i32.load local.get $0 - call $~lib/rt/pure/__release + i32.load offset=8 i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - i32.const 0 - i32.const -32 - 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 256 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 0 - call $~lib/typedarray/Uint8ClampedArray#__get + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 1312 - i32.const 135 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 call $~lib/builtins/abort unreachable end - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 136 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.load offset=4 + local.set $0 + i32.const 4308 + i32.load + local.set $2 + i32.const 4316 + i32.load + local.set $3 + loop $for-loop|0 + local.get $1 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + local.get $1 + i32.const 2 + i32.shl + i32.add + i64.load32_s + i64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end end + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i64) + (local $4 i32) + (local $5 i32) + (local $6 i64) + (local $7 i64) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $4 + local.set $5 + local.get $4 local.get $1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 255 + i32.load offset=12 i32.ne if i32.const 0 i32.const 1312 - i32.const 137 + i32.const 712 i32.const 3 call $~lib/builtins/abort unreachable end + loop $for-loop|0 + local.get $2 + local.get $5 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/typedarray/Int64Array#__get + local.set $3 + local.get $1 + i32.load offset=4 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + local.tee $6 + local.set $7 + local.get $3 + local.get $6 + i64.ne + if + i32.const 6592 + i32.const 3 + local.get $2 + f64.convert_i32_s + local.get $3 + f64.convert_i64_s + local.get $7 + f64.convert_i64_s + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + i32.const 1312 + i32.const 718 + i32.const 7 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int8Array#constructor - 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.load offset=8 i32.const 3 - i32.const 4 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 1 - i32.const 1 + i32.shr_u + i32.const 6 + i32.add + local.get $0 + i32.load offset=8 i32.const 3 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release - local.get $1 - i32.const 5 - i32.const 0 - i32.const 14 - i32.const 1504 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $30 - call $std/typedarray/isInt8ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 149 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release - local.get $1 - i32.const 5 - i32.const 0 - i32.const 14 - i32.const 1584 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $29 - call $std/typedarray/isInt8ArrayEqual - i32.eqz + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 1312 - i32.const 152 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 call $~lib/builtins/abort unreachable end + local.get $0 + i32.load offset=4 + i32.const 48 + i32.add local.get $1 - i32.const 1 - i32.const 0 - i32.const -3 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release - local.get $1 - i32.const 5 - i32.const 0 - i32.const 14 - i32.const 1616 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $28 - call $std/typedarray/isInt8ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 155 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.load offset=4 local.get $1 - i32.const 2 - i32.const -2 - i32.const 2147483647 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release + i32.load offset=8 + call $~lib/util/memory/memmove + ) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) local.get $1 - i32.const 5 - i32.const 0 - i32.const 14 - i32.const 1648 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $27 - call $std/typedarray/isInt8ArrayEqual - i32.eqz + i32.load offset=8 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 1312 - i32.const 158 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 call $~lib/builtins/abort unreachable end + local.get $0 + i32.load offset=4 + local.set $0 local.get $1 - i32.const 0 - i32.const 1 - i32.const 0 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release + i32.load offset=4 + local.set $3 local.get $1 - i32.const 5 - i32.const 0 - i32.const 14 - i32.const 1680 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $26 - call $std/typedarray/isInt8ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 161 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.load offset=8 + local.set $1 + loop $for-loop|0 + local.get $2 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 3 + i32.shl + i32.add + local.get $2 + local.get $3 + i32.add + i64.load8_u + i64.store + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end end + ) + (func $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) local.get $1 + i32.load offset=8 i32.const 1 + i32.shr_u i32.const 4 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> - local.tee $0 - i32.const 0 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release + i32.add local.get $0 i32.load offset=8 i32.const 3 - i32.ne + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 1312 - i32.const 165 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + i32.const 32 + i32.add + local.set $0 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 166 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.shr_u + local.set $1 + loop $for-loop|0 + local.get $2 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 3 + i32.shl + i32.add + local.get $3 + local.get $2 + i32.const 1 + i32.shl + i32.add + i64.load16_s + i64.store + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end end + ) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 4524 + i32.load + i32.const 7 + i32.add local.get $0 i32.load offset=8 i32.const 3 - i32.ne + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 1312 - i32.const 167 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 3 - i32.const 0 - i32.const 14 - i32.const 1712 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $25 - call $std/typedarray/isInt8ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 168 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 5 - i32.const 0 - i32.const 14 - i32.const 1744 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $24 - call $std/typedarray/isInt8ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 169 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $28 - call $~lib/rt/pure/__release - local.get $27 - call $~lib/rt/pure/__release - local.get $26 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release - local.get $25 - call $~lib/rt/pure/__release - local.get $24 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 + i32.load offset=4 + i32.const 56 + i32.add + local.set $0 + i32.const 4516 + i32.load + local.set $2 + i32.const 4524 + i32.load + local.set $3 + loop $for-loop|0 + local.get $1 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $1 + local.get $2 + i32.add + i64.load8_s + i64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> + (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 f32) + (local $9 f64) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $3 i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $3 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 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $3 i32.const 2 - i32.const 3 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $1 + i64.const 9 + call $~lib/typedarray/Int64Array#__set i32.const 4 - i32.const 5 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 1 + call $~lib/typedarray/Uint8Array#constructor + local.tee $2 + i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $2 i32.const 1 - i32.const 3 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release - local.get $1 - i32.const 5 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $2 i32.const 2 - i32.const 15 - i32.const 1776 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $30 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 181 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $2 + i32.const 3 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $4 i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release - local.get $1 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1824 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $29 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 184 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $4 i32.const 1 - i32.const 0 - i32.const -3 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release - local.get $1 - i32.const 5 + i32.const 1001 + call $~lib/typedarray/Int16Array#__set + local.get $4 i32.const 2 - i32.const 15 - i32.const 1872 + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Int64Array#constructor + local.tee $0 + call $~lib/typedarray/Int64Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 3 + i32.const 22 + i32.const 6496 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $28 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 187 + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + block $folding-inner0 + i32.const 4380 + i32.load i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 2 - i32.const -2 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release - local.get $1 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1920 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $27 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 190 + i32.add + local.get $0 + i32.load offset=8 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - i32.const 1 - i32.const 0 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release - local.get $1 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1968 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $26 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 193 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 24 + i32.add + local.set $5 + i32.const 4372 + i32.load + local.set $6 + i32.const 4380 + i32.load + local.set $7 + loop $for-loop|0 + local.get $1 + local.get $7 + i32.lt_s + if + local.get $5 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $6 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $8 + local.get $8 + f32.sub + f32.const 0 + f32.eq + if (result i64) + local.get $8 + 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 $0 + i32.const 10 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int32Array,i32> - local.tee $0 - i32.const 0 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 197 + i32.const 22 + i32.const 6640 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + local.get $0 + local.get $3 + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int64Array,i64> + local.get $0 + i32.const 10 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 4 - i32.ne - if + i32.const 22 + i32.const 6736 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> i32.const 0 - i32.const 1312 - i32.const 198 + local.set $1 + i32.const 4460 + i32.load + i32.const 2 + i32.add + local.get $0 + i32.load offset=8 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 12 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 199 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 16 + i32.add + local.set $7 + i32.const 4452 + i32.load + local.set $11 + i32.const 4460 + i32.load + local.set $12 + loop $for-loop|00 + local.get $1 + local.get $12 + i32.lt_s + if + local.get $7 + local.get $1 + i32.const 3 + i32.shl + local.tee $13 + i32.add + local.get $11 + local.get $13 + i32.add + f64.load + local.tee $9 + local.get $9 + f64.sub + f64.const 0 + f64.eq + if (result i64) + local.get $9 + i64.trunc_f64_s + else + i64.const 0 + end + i64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|00 + end + end + local.get $0 + i32.const 10 i32.const 3 - call $~lib/builtins/abort - unreachable + i32.const 22 + i32.const 6832 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + local.get $2 + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> + local.get $0 + local.get $4 + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int16Array,i16> + local.get $0 + call $~lib/typedarray/Int64Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 3 + i32.const 22 + i32.const 6928 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + 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 $0 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + return end + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 + call $~lib/builtins/abort + unreachable + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i64) + (local $4 i32) + (local $5 i32) + (local $6 i64) + (local $7 i64) local.get $0 + i32.load offset=8 i32.const 3 - i32.const 2 - i32.const 15 - i32.const 2016 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $25 - call $std/typedarray/isInt32ArrayEqual - i32.eqz + i32.shr_u + local.tee $4 + local.set $5 + local.get $4 + local.get $1 + i32.load offset=12 + i32.ne if i32.const 0 i32.const 1312 - i32.const 200 + i32.const 712 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 2048 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $24 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 201 - i32.const 3 - call $~lib/builtins/abort - unreachable + loop $for-loop|0 + local.get $2 + local.get $5 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/typedarray/Uint64Array#__get + local.set $3 + local.get $1 + i32.load offset=4 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + local.tee $6 + local.set $7 + local.get $3 + local.get $6 + i64.ne + if + i32.const 7120 + i32.const 3 + local.get $2 + f64.convert_i32_s + local.get $3 + f64.convert_i64_u + local.get $7 + f64.convert_i64_u + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + i32.const 1312 + i32.const 718 + i32.const 7 + call $~lib/builtins/abort + unreachable + end + 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 $30 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $28 - call $~lib/rt/pure/__release - local.get $27 - call $~lib/rt/pure/__release - local.get $26 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $25 - call $~lib/rt/pure/__release - local.get $24 - call $~lib/rt/pure/__release - i32.const 6 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> + (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 f32) + (local $9 f64) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $3 i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $3 i32.const 1 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 1 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $3 i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $1 + i64.const 9 + call $~lib/typedarray/Int64Array#__set + i32.const 4 + call $~lib/typedarray/Uint8Array#constructor + local.tee $2 + i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $2 + i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $2 i32.const 2 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $2 i32.const 3 - call $~lib/typedarray/Int8Array#__set - local.get $1 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set i32.const 3 - i32.const 4 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 5 - i32.const 6 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 1 - i32.const 6 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> - local.tee $0 + call $~lib/typedarray/Int16Array#constructor + local.tee $4 i32.const 0 - call $~lib/typedarray/Int8Array#__get - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 222 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 223 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $4 i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 224 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 225 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.const 1001 + call $~lib/typedarray/Int16Array#__set + local.get $4 + i32.const 2 + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Uint64Array#constructor + local.tee $0 + call $~lib/typedarray/Int64Array#set<~lib/array/Array> local.get $0 - i32.const 1 - i32.const 5 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> - local.tee $30 - i32.const 0 - call $~lib/typedarray/Int8Array#__get + i32.const 10 i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 228 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $30 - i32.load offset=8 - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 229 + i32.const 23 + i32.const 7024 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + block $folding-inner0 + i32.const 4380 + i32.load i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $30 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 230 + i32.add + local.get $0 + i32.load offset=8 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $30 - i32.load offset=8 - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 231 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 24 + i32.add + local.set $5 + i32.const 4372 + i32.load + local.set $6 + i32.const 4380 + i32.load + local.set $7 + loop $for-loop|0 + local.get $1 + local.get $7 + i32.lt_s + if + local.get $5 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $6 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $8 + local.get $8 + f32.sub + f32.const 0 + f32.eq + if (result i64) + local.get $8 + 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 $0 + i32.const 10 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $30 - i32.const 1 - i32.const 4 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> - local.tee $29 - i32.const 0 - call $~lib/typedarray/Int8Array#__get - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 234 + i32.const 23 + i32.const 7168 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + local.get $0 + local.get $3 + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int64Array,i64> + local.get $0 + i32.const 10 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $29 - i32.load offset=8 - i32.const 3 - i32.ne - if + i32.const 23 + i32.const 7264 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> i32.const 0 - i32.const 1312 - i32.const 235 + local.set $1 + i32.const 4460 + i32.load + i32.const 2 + i32.add + local.get $0 + i32.load offset=8 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $29 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 236 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 16 + i32.add + local.set $7 + i32.const 4452 + i32.load + local.set $11 + i32.const 4460 + i32.load + local.set $12 + loop $for-loop|00 + local.get $1 + local.get $12 + i32.lt_s + if + local.get $7 + local.get $1 + i32.const 3 + i32.shl + local.tee $13 + i32.add + local.get $11 + local.get $13 + i32.add + f64.load + local.tee $9 + local.get $9 + f64.sub + f64.const 0 + f64.eq + if (result i64) + local.get $9 + i64.trunc_f64_u + else + i64.const 0 + end + i64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|00 + end + end + local.get $0 + i32.const 10 i32.const 3 - call $~lib/builtins/abort - unreachable + i32.const 23 + i32.const 7360 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + local.get $2 + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> + local.get $0 + local.get $4 + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int16Array,i16> + local.get $0 + call $~lib/typedarray/Int64Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 3 + i32.const 23 + i32.const 7456 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + 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 $0 + call $~lib/rt/pure/__release + local.get $10 + 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 $29 + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 + call $~lib/builtins/abort + unreachable + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 f32) + (local $4 i32) + (local $5 i32) + (local $6 f32) + (local $7 f32) + local.get $0 i32.load offset=8 - i32.const 3 + i32.const 2 + i32.shr_u + local.tee $4 + local.set $5 + local.get $4 + local.get $1 + i32.load offset=12 i32.ne if i32.const 0 i32.const 1312 - i32.const 237 + i32.const 712 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 - local.get $30 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int32Array#constructor - 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 - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.set $30 - local.get $1 - i32.const 0 - i32.const 3 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $28 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 2096 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $27 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 248 - i32.const 3 - call $~lib/builtins/abort - unreachable + loop $for-loop|0 + local.get $2 + local.get $5 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/typedarray/Float32Array#__get + local.set $3 + local.get $1 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $6 + local.set $7 + local.get $3 + local.get $6 + f32.ne + if + i32.const 7616 + i32.const 3 + local.get $2 + f64.convert_i32_s + local.get $3 + f64.promote_f32 + local.get $7 + f64.promote_f32 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + i32.const 1312 + i32.const 718 + i32.const 7 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end end - local.get $30 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.set $0 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - i32.const 1 + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> + (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) + (local $9 i32) + (local $10 i32) + (local $11 i32) i32.const 3 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $26 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 2144 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $25 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 250 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $30 + call $~lib/typedarray/Int64Array#constructor + local.tee $5 i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.set $29 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 + 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 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $24 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 2192 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $19 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 252 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $30 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.get $29 - call $~lib/rt/pure/__release - local.tee $0 - i32.const 2 - i32.const 2 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $29 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 2240 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $18 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 254 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $30 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.get $0 - call $~lib/rt/pure/__release - local.tee $0 - i32.const 0 - i32.const 3 + i64.const 9 + call $~lib/typedarray/Int64Array#__set i32.const 4 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $17 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 2288 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $15 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 256 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $30 + call $~lib/typedarray/Uint8Array#constructor + local.tee $4 i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.get $0 - call $~lib/rt/pure/__release - local.tee $0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $4 i32.const 1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $14 - i32.const 5 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $4 i32.const 2 - i32.const 15 - i32.const 2336 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $13 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 258 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $30 + 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 2147483647 - call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.get $0 - call $~lib/rt/pure/__release - local.tee $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 4 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $12 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 2384 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Float32Array#constructor local.tee $11 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 260 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $30 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.get $0 - call $~lib/rt/pure/__release - local.tee $0 - i32.const 0 - i32.const -2 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $10 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 2432 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $9 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 262 + local.tee $1 + local.set $7 + block $folding-inner1 + i32.const 4316 + i32.load + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner1 + local.get $7 + i32.load offset=4 + local.set $7 + i32.const 4308 + i32.load + local.set $10 + i32.const 4316 + i32.load + local.set $8 + loop $for-loop|0 + local.get $0 + local.get $8 + i32.lt_s + if + local.get $10 + local.get $0 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.load + local.set $3 + local.get $2 + local.get $7 + i32.add + local.get $3 + f32.convert_i32_s + f32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $1 + i32.const 10 + i32.const 2 + i32.const 16 + i32.const 7552 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + i32.const 4380 + i32.load i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $30 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.get $0 - call $~lib/rt/pure/__release - local.tee $0 - i32.const 0 - i32.const -2 - i32.const -1 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $8 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 2480 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if + i32.add + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner1 + local.get $1 + i32.load offset=4 + i32.const 12 + i32.add + i32.const 4372 + i32.load + i32.const 4376 + i32.load + call $~lib/util/memory/memmove + local.get $1 + i32.const 10 + i32.const 2 + i32.const 16 + i32.const 7664 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> i32.const 0 - i32.const 1312 - i32.const 264 + local.set $0 + local.get $5 + i32.load offset=8 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $30 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.get $0 - call $~lib/rt/pure/__release - local.tee $0 - i32.const -4 - i32.const -3 - i32.const -2 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $6 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 2528 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 266 + i32.shr_u + i32.const 6 + i32.add + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner1 + local.get $1 + i32.load offset=4 + i32.const 24 + i32.add + local.set $8 + local.get $5 + i32.load offset=4 + local.set $2 + local.get $5 + i32.load offset=8 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $30 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.get $0 - call $~lib/rt/pure/__release - local.tee $0 - i32.const -4 - i32.const -3 - i32.const -1 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $4 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 2576 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $3 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if + i32.shr_u + local.set $3 + loop $for-loop|00 + local.get $0 + local.get $3 + i32.lt_s + if + local.get $8 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + i64.load + f32.convert_i64_s + f32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $1 + i32.const 10 + i32.const 2 + i32.const 16 + i32.const 7728 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $8 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> i32.const 0 - i32.const 1312 - i32.const 268 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $30 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.set $1 + local.set $0 + local.get $4 + i32.load offset=8 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner1 + local.get $1 + i32.load offset=4 + local.set $2 + local.get $4 + i32.load offset=4 + local.set $3 + local.get $4 + i32.load offset=8 + local.set $9 + loop $for-loop|001 + local.get $0 + local.get $9 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $0 + local.get $3 + 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|001 + end + end + i32.const 0 + local.set $0 + local.get $6 + 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-inner1 + local.get $1 + i32.load offset=4 + i32.const 16 + i32.add + local.set $2 + local.get $6 + i32.load offset=4 + local.set $3 + local.get $6 + 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 $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $3 + 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 + i32.const 0 + local.set $0 + i32.const 4524 + i32.load + i32.const 7 + i32.add + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner1 + local.get $1 + i32.load offset=4 + i32.const 28 + i32.add + local.set $2 + i32.const 4516 + i32.load + local.set $3 + i32.const 4524 + i32.load + local.set $9 + loop $for-loop|01 + local.get $0 + local.get $9 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $0 + local.get $3 + i32.add + i32.load8_s + f32.convert_i32_s + f32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|01 + end + end + local.get $1 + i32.const 10 + i32.const 2 + i32.const 16 + i32.const 7792 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.get $1 + 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 $11 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + return + end + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 + call $~lib/builtins/abort + unreachable + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 f64) + (local $4 i32) + (local $5 i32) + (local $6 f64) + (local $7 f64) local.get $0 - call $~lib/rt/pure/__release + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $4 + local.set $5 + local.get $4 local.get $1 - i32.const -4 - i32.const -3 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $0 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 2624 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $2 - call $std/typedarray/isInt32ArrayEqual - i32.eqz + i32.load offset=12 + i32.ne if i32.const 0 i32.const 1312 - i32.const 270 + i32.const 712 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release - local.get $28 - call $~lib/rt/pure/__release - local.get $27 - call $~lib/rt/pure/__release - local.get $26 - call $~lib/rt/pure/__release - local.get $25 - call $~lib/rt/pure/__release - local.get $24 - call $~lib/rt/pure/__release - local.get $19 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $18 - call $~lib/rt/pure/__release - local.get $17 - call $~lib/rt/pure/__release - local.get $15 - call $~lib/rt/pure/__release - local.get $14 - call $~lib/rt/pure/__release - local.get $13 - call $~lib/rt/pure/__release - local.get $12 - call $~lib/rt/pure/__release - local.get $11 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release - local.get $9 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int32Array#constructor - 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 - local.get $1 + loop $for-loop|0 + local.get $2 + local.get $5 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.load offset=4 + local.get $2 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $6 + local.set $7 + local.get $3 + local.get $6 + f64.ne + if + i32.const 7952 + i32.const 3 + local.get $2 + f64.convert_i32_s + local.get $3 + local.get $7 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + i32.const 1312 + i32.const 718 + i32.const 7 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> + (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) + (local $9 i32) + (local $10 i32) + (local $11 i32) i32.const 3 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Int32Array#__set - local.get $1 + call $~lib/typedarray/Int64Array#constructor + local.tee $7 + i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $7 i32.const 1 - i32.const 4 - call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int32Array,i32> - local.tee $30 - i32.load offset=8 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $7 i32.const 2 - i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 282 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $30 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i64.const 9 + call $~lib/typedarray/Int64Array#__set i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 283 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $30 - i32.load offset=8 - i32.const 12 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 284 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 + call $~lib/typedarray/Uint8Array#constructor + local.tee $3 + i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $3 i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $3 + i32.const 2 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $3 i32.const 3 - call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.tee $0 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $8 i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 287 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $8 i32.const 1 - call $~lib/typedarray/Int32Array#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 288 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u + i32.const 1001 + call $~lib/typedarray/Int16Array#__set + local.get $8 i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 289 + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Float64Array#constructor + local.tee $11 + local.tee $1 + local.set $9 + block $folding-inner1 + i32.const 4316 + i32.load + local.get $1 + i32.load offset=8 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 1312 - i32.const 290 + i32.shr_u + i32.gt_s + br_if $folding-inner1 + local.get $9 + i32.load offset=4 + local.set $9 + i32.const 4308 + i32.load + local.set $10 + i32.const 4316 + i32.load + local.set $4 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $10 + local.get $0 + i32.const 2 + i32.shl + i32.add + i32.load + f64.convert_i32_s + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $1 + i32.const 10 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 8 - i32.ne - if + i32.const 17 + i32.const 7856 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $9 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> i32.const 0 - i32.const 1312 - i32.const 291 + local.set $0 + i32.const 4380 + i32.load i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $30 - i32.const 1 - i32.const 2 - call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.tee $29 - i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 294 + i32.add + local.get $1 + i32.load offset=8 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $29 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 295 + i32.shr_u + i32.gt_s + br_if $folding-inner1 + local.get $1 + i32.load offset=4 + i32.const 24 + i32.add + local.set $10 + i32.const 4372 + i32.load + local.set $4 + i32.const 4380 + i32.load + local.set $2 + loop $for-loop|00 + local.get $0 + local.get $2 + i32.lt_s + if + local.get $10 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $4 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + f64.promote_f32 + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $1 + i32.const 10 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $29 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if + i32.const 17 + i32.const 8000 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> i32.const 0 - i32.const 1312 - i32.const 296 + local.set $0 + local.get $7 + i32.load offset=8 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $29 - i32.load offset=8 - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 297 + i32.shr_u + i32.const 6 + i32.add + local.get $1 + i32.load offset=8 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $1 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.tee $28 - i32.eq - if - i32.const 0 - i32.const 1312 - i32.const 300 + i32.shr_u + i32.gt_s + br_if $folding-inner1 + local.get $1 + i32.load offset=4 + i32.const 48 + i32.add + local.set $4 + local.get $7 + i32.load offset=4 + local.set $2 + local.get $7 + i32.load offset=8 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $28 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 301 + i32.shr_u + local.set $5 + loop $for-loop|01 + local.get $0 + local.get $5 + i32.lt_s + if + local.get $4 + local.get $0 + i32.const 3 + i32.shl + local.tee $6 + i32.add + local.get $2 + local.get $6 + i32.add + i64.load + f64.convert_i64_s + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|01 + end + end + local.get $1 + i32.const 10 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $28 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.ne - if + i32.const 17 + i32.const 8096 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $4 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> i32.const 0 - i32.const 1312 - i32.const 302 + local.set $0 + local.get $3 + i32.load offset=8 + local.get $1 + i32.load offset=8 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $28 - i32.load offset=8 - local.get $1 - i32.load offset=8 - i32.ne - if + i32.shr_u + i32.gt_s + br_if $folding-inner1 + local.get $1 + i32.load offset=4 + local.set $2 + local.get $3 + i32.load offset=4 + local.set $5 + local.get $3 + i32.load offset=8 + local.set $6 + loop $for-loop|012 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $0 + local.get $5 + 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|012 + end + end i32.const 0 - i32.const 1312 - i32.const 303 + local.set $0 + local.get $8 + 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 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $28 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $30 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int8Array#__set - local.get $30 + i32.shr_u + i32.gt_s + br_if $folding-inner1 + local.get $1 + i32.load offset=4 + i32.const 32 + i32.add + local.set $2 + local.get $8 + i32.load offset=4 + local.set $5 + local.get $8 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $6 + loop $for-loop|03 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $5 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_s + f64.convert_i32_s + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|03 + end + end + i32.const 0 + local.set $0 + i32.const 4524 + i32.load + i32.const 7 + i32.add + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner1 + local.get $1 + i32.load offset=4 + i32.const 56 + i32.add + local.set $2 + i32.const 4516 + i32.load + local.set $5 + i32.const 4524 + i32.load + local.set $6 + loop $for-loop|02 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $0 + local.get $5 + 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|02 + end + end + local.get $1 + i32.const 10 + i32.const 3 + i32.const 17 + i32.const 8192 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + local.get $1 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + local.get $11 + call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + return + end + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 + call $~lib/builtins/abort + unreachable + ) + (func $start:std/typedarray + (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) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 f32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local $19 i32) + (local $20 f64) + (local $21 i32) + (local $22 i32) + (local $23 f32) + (local $24 f64) + (local $25 i32) + (local $26 i32) + (local $27 i32) + (local $28 i32) + (local $29 i32) + i32.const 0 + call $std/typedarray/testInstantiate + i32.const 5 + call $std/typedarray/testInstantiate + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + 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/Int8Array#__set - local.get $30 + call $~lib/typedarray/Int32Array#__set + local.get $1 i32.const 2 i32.const 3 - call $~lib/typedarray/Int8Array#__set - i32.const 0 - local.set $0 - i32.const 0 - local.set $1 - local.get $30 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 95 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 i32.load offset=4 - local.set $29 - local.get $30 + local.get $1 + i32.load + i32.sub + if + i32.const 0 + i32.const 1312 + i32.const 96 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 i32.load offset=8 - local.set $28 - loop $for-loop|0 - local.get $0 - local.get $28 - i32.lt_s - if - local.get $0 - local.get $29 - i32.add - i32.load8_s - local.set $27 - i32.const 4 - global.set $~argumentsLength - local.get $1 - local.get $27 - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end + i32.const 12 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 97 + i32.const 3 + call $~lib/builtins/abort + unreachable end - block $folding-inner22 - block $folding-inner21 - block $folding-inner20 - block $folding-inner19 - block $folding-inner18 - block $folding-inner17 - block $folding-inner16 - block $folding-inner15 - block $folding-inner14 - block $folding-inner13 - block $folding-inner12 - block $folding-inner0 - local.get $1 - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $30 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - 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 - call $~lib/typedarray/REDUCE<~lib/typedarray/Uint8Array,u8,u8> - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - 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 4 - call $~lib/typedarray/REDUCE<~lib/typedarray/Uint8Array,u8,u8> - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $30 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $30 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $30 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - i32.const 0 - local.set $0 - i32.const 0 - local.set $1 - local.get $30 - i32.load offset=4 - local.set $29 - local.get $30 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $28 - loop $for-loop|00 - local.get $0 - local.get $28 - i32.lt_s - if - local.get $29 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.set $27 - i32.const 4 - global.set $~argumentsLength - local.get $1 - local.get $27 - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|00 - end - end - local.get $1 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $30 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $30 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $30 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $30 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - i32.const 0 - local.set $0 - i32.const 0 - local.set $1 - local.get $30 - i32.load offset=4 - local.set $29 - local.get $30 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $28 - loop $for-loop|01 - local.get $0 - local.get $28 - i32.lt_s - if - local.get $29 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.set $27 - i32.const 4 - global.set $~argumentsLength - local.get $1 - local.get $27 - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|01 - end - end - local.get $1 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $30 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - 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 - local.get $1 - i32.const 7 - call $~lib/typedarray/REDUCE<~lib/typedarray/Int32Array,i32,i32> - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - 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 - local.get $1 - i32.const 8 - call $~lib/typedarray/REDUCE<~lib/typedarray/Int32Array,i32,i32> - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - 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 - local.get $1 - i32.const 9 - call $~lib/typedarray/REDUCE<~lib/typedarray/Int64Array,i64,i64> - i64.const 6 - i64.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - 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 - local.get $1 - i32.const 10 - call $~lib/typedarray/REDUCE<~lib/typedarray/Int64Array,i64,i64> - i64.const 6 - i64.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - 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 - i32.load offset=4 - local.set $30 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $29 - loop $for-loop|02 - local.get $0 - local.get $29 - i32.lt_s - if - local.get $30 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $16 - i32.const 4 - global.set $~argumentsLength - local.get $22 - local.get $16 - f32.add - local.set $22 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|02 - end - end - local.get $22 - f32.const 6 - f32.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - 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 - f64.const 0 - local.set $23 - local.get $1 - i32.load offset=4 - local.set $30 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $29 - loop $for-loop|03 - local.get $0 - local.get $29 - i32.lt_s - if - local.get $30 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $21 - i32.const 4 - global.set $~argumentsLength - local.get $23 - local.get $21 - f64.add - local.set $23 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|03 - end - end - local.get $23 - f64.const 6 - f64.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $30 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int8Array#__set - local.get $30 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $30 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int8Array#__set - i32.const 0 - local.set $0 - local.get $30 - i32.load offset=4 - local.set $29 - local.get $30 - i32.load offset=8 - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|04 - local.get $1 - i32.const 0 - i32.ge_s - if - local.get $1 - local.get $29 - i32.add - i32.load8_s - local.set $28 - i32.const 4 - global.set $~argumentsLength - local.get $0 - local.get $28 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|04 - end - end - local.get $0 - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner12 - local.get $30 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - 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 14 - call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Uint8Array,u8,u8> - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner12 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - 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 15 - call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Uint8Array,u8,u8> - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner12 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $30 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $30 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $30 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - i32.const 0 - local.set $0 - local.get $30 - i32.load offset=4 - local.set $29 - local.get $30 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|05 - local.get $1 - i32.const 0 - i32.ge_s - if - local.get $29 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.set $28 - i32.const 4 - global.set $~argumentsLength - local.get $0 - local.get $28 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|05 - end - end - local.get $0 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner12 - local.get $30 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $30 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $30 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $30 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - i32.const 0 - local.set $0 - local.get $30 - i32.load offset=4 - local.set $29 - local.get $30 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|06 - local.get $1 - i32.const 0 - i32.ge_s - if - local.get $29 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.set $28 - i32.const 4 - global.set $~argumentsLength - local.get $0 - local.get $28 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|06 - end - end - local.get $0 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner12 - local.get $30 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - 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 - block $folding-inner11 - block $folding-inner10 - block $folding-inner6 - block $folding-inner5 - block $folding-inner4 - local.get $1 - i32.const 18 - call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int32Array,i32,i32> - i32.const 6 - i32.ne - br_if $folding-inner12 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - 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 - local.get $1 - i32.const 19 - call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int32Array,i32,i32> - i32.const 6 - i32.ne - br_if $folding-inner12 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - 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 - local.get $1 - i32.const 20 - call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int64Array,i64,i64> - i64.const 6 - i64.ne - br_if $folding-inner12 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - 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 - local.get $1 - i32.const 21 - call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int64Array,i64,i64> - i64.const 6 - i64.ne - br_if $folding-inner12 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - 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 - f32.const 0 - local.set $22 - local.get $0 - i32.load offset=4 - local.set $30 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|07 - local.get $1 - i32.const 0 - i32.ge_s - if - local.get $30 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $16 - i32.const 4 - global.set $~argumentsLength - local.get $22 - local.get $16 - f32.add - local.set $22 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|07 - end - end - local.get $22 - f32.const 6 - f32.ne - br_if $folding-inner12 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - 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 - f64.const 0 - local.set $23 - local.get $0 - i32.load offset=4 - local.set $30 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|08 - local.get $1 - i32.const 0 - i32.ge_s - if - local.get $30 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $21 - i32.const 4 - global.set $~argumentsLength - local.get $23 - local.get $21 - f64.add - local.set $23 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|08 - end - end - local.get $23 - f64.const 6 - f64.ne - br_if $folding-inner12 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - 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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - local.set $29 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/__alloc - local.set $30 - local.get $29 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $28 - loop $for-loop|09 - local.get $1 - local.get $29 - i32.lt_s - if - local.get $1 - local.get $26 - i32.add - i32.load8_s - local.set $27 - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $28 - i32.add - local.get $27 - local.get $27 - i32.mul - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|09 - end - end - local.get $30 - local.get $28 - call $~lib/rt/pure/__retain - i32.store - local.get $30 - local.get $28 - i32.store offset=4 - local.get $30 - local.get $29 - i32.store offset=8 - local.get $30 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Int8Array#__get - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int8Array#__get - i32.const 4 - i32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int8Array#__get - i32.const 9 - i32.ne - br_if $folding-inner6 - 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 $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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - local.set $29 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/__alloc - local.set $30 - local.get $29 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $28 - loop $for-loop|010 - local.get $1 - local.get $29 - i32.lt_s - if - local.get $1 - local.get $26 - i32.add - i32.load8_u - local.set $27 - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $28 - i32.add - local.get $27 - local.get $27 - i32.mul - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|010 - end - end - local.get $30 - local.get $28 - call $~lib/rt/pure/__retain - i32.store - local.get $30 - local.get $28 - i32.store offset=4 - local.get $30 - local.get $29 - i32.store offset=8 - local.get $30 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Uint8Array#__get - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint8Array#__get - i32.const 4 - i32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__get - i32.const 9 - i32.ne - br_if $folding-inner6 - 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 $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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - local.set $29 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/__alloc - local.set $30 - local.get $29 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $28 - loop $for-loop|011 - local.get $1 - local.get $29 - i32.lt_s - if - local.get $1 - local.get $26 - i32.add - i32.load8_u - local.set $27 - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $28 - i32.add - local.get $27 - local.get $27 - i32.mul - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|011 - end - end - local.get $30 - local.get $28 - call $~lib/rt/pure/__retain - i32.store - local.get $30 - local.get $28 - i32.store offset=4 - local.get $30 - local.get $29 - i32.store offset=8 - local.get $30 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 4 - i32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 9 - i32.ne - br_if $folding-inner6 - 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 $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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $28 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/__alloc - local.set $30 - local.get $28 - i32.const 1 - i32.shl - local.tee $25 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $29 - loop $for-loop|012 - local.get $1 - local.get $28 - i32.lt_s - if - local.get $26 - local.get $1 - i32.const 1 - i32.shl - local.tee $24 - i32.add - i32.load16_s - local.set $27 - i32.const 3 - global.set $~argumentsLength - local.get $24 - local.get $29 - i32.add - local.get $27 - local.get $27 - i32.mul - i32.store16 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|012 - end - end - local.get $30 - local.get $29 - call $~lib/rt/pure/__retain - i32.store - local.get $30 - local.get $29 - i32.store offset=4 - local.get $30 - local.get $25 - i32.store offset=8 - local.get $30 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Int16Array#__get - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int16Array#__get - i32.const 4 - i32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int16Array#__get - i32.const 9 - i32.ne - br_if $folding-inner6 - 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 $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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $28 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/__alloc - local.set $30 - local.get $28 - i32.const 1 - i32.shl - local.tee $25 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $29 - loop $for-loop|013 - local.get $1 - local.get $28 - i32.lt_s - if - local.get $26 - local.get $1 - i32.const 1 - i32.shl - local.tee $24 - i32.add - i32.load16_u - local.set $27 - i32.const 3 - global.set $~argumentsLength - local.get $24 - local.get $29 - i32.add - local.get $27 - local.get $27 - i32.mul - i32.store16 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|013 - end - end - local.get $30 - local.get $29 - call $~lib/rt/pure/__retain - i32.store - local.get $30 - local.get $29 - i32.store offset=4 - local.get $30 - local.get $25 - i32.store offset=8 - local.get $30 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Uint16Array#__get - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint16Array#__get - i32.const 4 - i32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__get - i32.const 9 - i32.ne - br_if $folding-inner6 - 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 $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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $28 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/__alloc - local.set $30 - local.get $28 - i32.const 2 - i32.shl - local.tee $25 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $29 - loop $for-loop|014 - local.get $1 - local.get $28 - i32.lt_s - if - local.get $26 - local.get $1 - i32.const 2 - i32.shl - local.tee $24 - i32.add - i32.load - local.set $27 - i32.const 3 - global.set $~argumentsLength - local.get $24 - local.get $29 - i32.add - local.get $27 - local.get $27 - i32.mul - i32.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|014 - end - end - local.get $30 - local.get $29 - call $~lib/rt/pure/__retain - i32.store - local.get $30 - local.get $29 - i32.store offset=4 - local.get $30 - local.get $25 - i32.store offset=8 - local.get $30 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int32Array#__get - i32.const 4 - i32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int32Array#__get - i32.const 9 - i32.ne - br_if $folding-inner6 - 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 $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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $28 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/__alloc - local.set $30 - local.get $28 - i32.const 2 - i32.shl - local.tee $25 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $29 - loop $for-loop|015 - local.get $1 - local.get $28 - i32.lt_s - if - local.get $26 - local.get $1 - i32.const 2 - i32.shl - local.tee $24 - i32.add - i32.load - local.set $27 - i32.const 3 - global.set $~argumentsLength - local.get $24 - local.get $29 - i32.add - local.get $27 - local.get $27 - i32.mul - i32.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|015 - end - end - local.get $30 - local.get $29 - call $~lib/rt/pure/__retain - i32.store - local.get $30 - local.get $29 - i32.store offset=4 - local.get $30 - local.get $25 - i32.store offset=8 - local.get $30 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Uint32Array#__get - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint32Array#__get - i32.const 4 - i32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint32Array#__get - i32.const 9 - i32.ne - br_if $folding-inner6 - 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 $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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $28 - local.get $0 - i32.load offset=4 - local.set $27 - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/__alloc - local.set $30 - local.get $28 - i32.const 3 - i32.shl - local.tee $26 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $29 - loop $for-loop|016 - local.get $1 - local.get $28 - i32.lt_s - if - local.get $27 - local.get $1 - i32.const 3 - i32.shl - local.tee $25 - i32.add - i64.load - local.set $20 - i32.const 3 - global.set $~argumentsLength - local.get $25 - local.get $29 - i32.add - local.get $20 - local.get $20 - i64.mul - i64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|016 - end - end - local.get $30 - local.get $29 - call $~lib/rt/pure/__retain - i32.store - local.get $30 - local.get $29 - i32.store offset=4 - local.get $30 - local.get $26 - i32.store offset=8 - local.get $30 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Int64Array#__get - i64.const 1 - i64.ne - br_if $folding-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int64Array#__get - i64.const 4 - i64.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int64Array#__get - i64.const 9 - i64.ne - br_if $folding-inner6 - 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 $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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $28 - local.get $0 - i32.load offset=4 - local.set $27 - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/__alloc - local.set $30 - local.get $28 - i32.const 3 - i32.shl - local.tee $26 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $29 - loop $for-loop|017 - local.get $1 - local.get $28 - i32.lt_s - if - local.get $27 - local.get $1 - i32.const 3 - i32.shl - local.tee $25 - i32.add - i64.load - local.set $20 - i32.const 3 - global.set $~argumentsLength - local.get $25 - local.get $29 - i32.add - local.get $20 - local.get $20 - i64.mul - i64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|017 - end - end - local.get $30 - local.get $29 - call $~lib/rt/pure/__retain - i32.store - local.get $30 - local.get $29 - i32.store offset=4 - local.get $30 - local.get $26 - i32.store offset=8 - local.get $30 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Uint64Array#__get - i64.const 1 - i64.ne - br_if $folding-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint64Array#__get - i64.const 4 - i64.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint64Array#__get - i64.const 9 - i64.ne - br_if $folding-inner6 - 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 $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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $28 - local.get $0 - i32.load offset=4 - local.set $27 - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/__alloc - local.set $30 - local.get $28 - i32.const 2 - i32.shl - local.tee $26 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $29 - loop $for-loop|018 - local.get $1 - local.get $28 - i32.lt_s - if - local.get $27 - local.get $1 - i32.const 2 - i32.shl - local.tee $25 - i32.add - f32.load - local.set $22 - i32.const 3 - global.set $~argumentsLength - local.get $25 - local.get $29 - i32.add - local.get $22 - local.get $22 - f32.mul - f32.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|018 - end - end - local.get $30 - local.get $29 - call $~lib/rt/pure/__retain - i32.store - local.get $30 - local.get $29 - i32.store offset=4 - local.get $30 - local.get $26 - i32.store offset=8 - local.get $30 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Float32Array#__get - f32.const 1 - f32.ne - br_if $folding-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float32Array#__get - f32.const 4 - f32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float32Array#__get - f32.const 9 - f32.ne - br_if $folding-inner6 - 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 $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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $28 - local.get $0 - i32.load offset=4 - local.set $27 - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/__alloc - local.set $30 - local.get $28 - i32.const 3 - i32.shl - local.tee $26 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $29 - loop $for-loop|019 - local.get $1 - local.get $28 - i32.lt_s - if - local.get $27 - local.get $1 - i32.const 3 - i32.shl - local.tee $25 - i32.add - f64.load - local.set $23 - i32.const 3 - global.set $~argumentsLength - local.get $25 - local.get $29 - i32.add - local.get $23 - local.get $23 - f64.mul - f64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|019 - end - end - local.get $30 - local.get $29 - call $~lib/rt/pure/__retain - i32.store - local.get $30 - local.get $29 - i32.store offset=4 - local.get $30 - local.get $26 - i32.store offset=8 - local.get $30 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 1 - f64.ne - br_if $folding-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 4 - f64.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 9 - f64.ne - br_if $folding-inner6 - 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 - local.get $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 46 - call $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8> - i32.eqz - br_if $folding-inner13 - i32.const 47 - call $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8> - br_if $folding-inner14 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 48 - call $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8> - i32.eqz - br_if $folding-inner13 - i32.const 49 - call $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8> - br_if $folding-inner14 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - local.get $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 50 - call $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8> - i32.eqz - br_if $folding-inner13 - i32.const 51 - call $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8> - br_if $folding-inner14 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 52 - call $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16> - i32.eqz - br_if $folding-inner13 - i32.const 53 - call $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16> - br_if $folding-inner14 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 54 - call $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16> - i32.eqz - br_if $folding-inner13 - i32.const 55 - call $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16> - br_if $folding-inner14 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 56 - call $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> - i32.eqz - br_if $folding-inner13 - i32.const 57 - call $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> - br_if $folding-inner14 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 58 - call $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> - i32.eqz - br_if $folding-inner13 - i32.const 59 - call $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> - br_if $folding-inner14 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 60 - call $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> - i32.eqz - br_if $folding-inner13 - i32.const 61 - call $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> - br_if $folding-inner14 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 62 - call $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> - i32.eqz - br_if $folding-inner13 - i32.const 63 - call $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> - br_if $folding-inner14 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 1 - f32.const 4 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 2 - f32.const 6 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 64 - call $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32> - i32.eqz - br_if $folding-inner13 - i32.const 65 - call $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32> - br_if $folding-inner14 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - f64.const 6 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 66 - call $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64> - i32.eqz - br_if $folding-inner13 - i32.const 67 - call $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64> - br_if $folding-inner14 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - local.get $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 68 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8> - i32.const 1 - i32.ne - br_if $folding-inner15 - i32.const 69 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8> - i32.const -1 - i32.ne - br_if $folding-inner16 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - local.get $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 70 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8> - i32.const 1 - i32.ne - br_if $folding-inner15 - i32.const 71 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8> - i32.const -1 - i32.ne - br_if $folding-inner16 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - local.get $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 72 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8> - i32.const 1 - i32.ne - br_if $folding-inner15 - i32.const 73 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8> - i32.const -1 - i32.ne - br_if $folding-inner16 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - local.get $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 - local.get $1 - i32.const 74 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16> - i32.const 1 - i32.ne - br_if $folding-inner15 - i32.const 75 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16> - i32.const -1 - i32.ne - br_if $folding-inner16 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - local.get $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 - local.get $1 - i32.const 76 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16> - i32.const 1 - i32.ne - br_if $folding-inner15 - i32.const 77 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16> - i32.const -1 - i32.ne - br_if $folding-inner16 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - local.get $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 - local.get $1 - i32.const 78 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> - i32.const 1 - i32.ne - br_if $folding-inner15 - i32.const 79 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> - i32.const -1 - i32.ne - br_if $folding-inner16 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - local.get $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 - local.get $1 - i32.const 80 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> - i32.const 1 - i32.ne - br_if $folding-inner15 - i32.const 81 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> - i32.const -1 - i32.ne - br_if $folding-inner16 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - local.get $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 - local.get $1 - i32.const 82 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> - i32.const 1 - i32.ne - br_if $folding-inner15 - i32.const 83 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> - i32.const -1 - i32.ne - br_if $folding-inner16 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - local.get $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 - local.get $1 - i32.const 84 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> - i32.const 1 - i32.ne - br_if $folding-inner15 - i32.const 85 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> - i32.const -1 - i32.ne - br_if $folding-inner16 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - local.get $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 - local.get $1 - i32.const 86 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32> - i32.const 1 - i32.ne - br_if $folding-inner15 - i32.const 87 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32> - i32.const -1 - i32.ne - br_if $folding-inner16 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - local.get $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 - local.get $1 - i32.const 88 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64> - i32.const 1 - i32.ne - br_if $folding-inner15 - i32.const 89 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64> - i32.const -1 - i32.ne - br_if $folding-inner16 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 90 - call $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8> - i32.eqz - br_if $folding-inner17 - i32.const 91 - call $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8> - br_if $folding-inner18 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 92 - call $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8> - i32.eqz - br_if $folding-inner17 - i32.const 93 - call $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8> - br_if $folding-inner18 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - local.get $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 94 - call $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8> - i32.eqz - br_if $folding-inner17 - i32.const 95 - call $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8> - br_if $folding-inner18 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 96 - call $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16> - i32.eqz - br_if $folding-inner17 - i32.const 97 - call $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16> - br_if $folding-inner18 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 98 - call $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16> - i32.eqz - br_if $folding-inner17 - i32.const 99 - call $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16> - br_if $folding-inner18 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 100 - call $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> - i32.eqz - br_if $folding-inner17 - i32.const 101 - call $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> - br_if $folding-inner18 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 102 - call $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> - i32.eqz - br_if $folding-inner17 - i32.const 103 - call $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> - br_if $folding-inner18 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 104 - call $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> - i32.eqz - br_if $folding-inner17 - i32.const 105 - call $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> - br_if $folding-inner18 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 106 - call $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> - i32.eqz - br_if $folding-inner17 - i32.const 107 - call $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> - br_if $folding-inner18 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 1 - f32.const 4 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 2 - f32.const 6 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 108 - call $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32> - i32.eqz - br_if $folding-inner17 - i32.const 109 - call $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32> - br_if $folding-inner18 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - f64.const 6 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 110 - call $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64> - i32.eqz - br_if $folding-inner17 - i32.const 111 - call $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64> - br_if $folding-inner18 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 2704 - 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 2704 - 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 2704 - 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 - i32.load offset=4 - local.set $30 - local.get $0 - i32.load offset=8 - local.set $29 - loop $for-loop|020 - local.get $1 - local.get $29 - i32.lt_s - if - local.get $1 - local.get $30 - i32.add - i32.load8_s - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|020 - end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner19 + local.get $1 + i32.const 0 + call $~lib/typedarray/Int32Array#__get + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 98 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + call $~lib/typedarray/Int32Array#__get + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 99 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + call $~lib/typedarray/Int32Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 100 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int32Array,i32> + local.set $0 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 103 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 104 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 105 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 0 + call $~lib/typedarray/Int32Array#__get + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 106 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/pure/__release + i32.const 8 + call $~lib/typedarray/Float64Array#constructor + 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 7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Float64Array,f64> + local.set $1 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 122 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub + i32.const 16 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 123 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 + i32.const 32 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 124 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + global.set $~argumentsLength + block $__inlined_func$~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64> + local.get $1 + call $~lib/rt/pure/__retain + local.tee $28 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $29 + i32.const 1 + i32.le_s + br_if $__inlined_func$~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64> + local.get $28 + i32.load offset=4 + local.set $0 + local.get $29 + i32.const 2 + i32.eq + if + local.get $0 + f64.load offset=8 + local.set $24 + local.get $0 + f64.load + local.set $20 + i32.const 2 + global.set $~argumentsLength + local.get $24 + local.get $20 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.lt_s + if + local.get $0 + local.get $20 + f64.store offset=8 + local.get $0 + local.get $24 + f64.store + end + br $__inlined_func$~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64> + end + local.get $29 + i32.const 256 + i32.lt_s + if + local.get $0 + local.get $29 + call $~lib/util/sort/insertionSort + else + local.get $0 + local.get $29 + call $~lib/util/sort/weakHeapSort + end + end + local.get $28 + call $~lib/rt/pure/__release + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 4 + f64.eq + if (result i32) + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 5 + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 6 + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.const 7 + f64.eq + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 126 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + i32.const 0 + i32.const -32 + 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 256 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 0 + call $~lib/typedarray/Uint8ClampedArray#__get + if + i32.const 0 + i32.const 1312 + i32.const 135 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 136 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 255 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 137 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int8Array#constructor + 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 4 + i32.const 5 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 1 + i32.const 1 + i32.const 3 + call $~lib/typedarray/FILL<~lib/typedarray/Int8Array,i8> + call $~lib/rt/pure/__release + local.get $1 + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 1504 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $29 + call $std/typedarray/isInt8ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 149 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 0 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/FILL<~lib/typedarray/Int8Array,i8> + call $~lib/rt/pure/__release + local.get $1 + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 1584 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $28 + call $std/typedarray/isInt8ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 152 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.const 0 + i32.const -3 + call $~lib/typedarray/FILL<~lib/typedarray/Int8Array,i8> + call $~lib/rt/pure/__release + local.get $1 + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 1616 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $27 + call $std/typedarray/isInt8ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 155 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + i32.const -2 + i32.const 2147483647 + call $~lib/typedarray/FILL<~lib/typedarray/Int8Array,i8> + call $~lib/rt/pure/__release + local.get $1 + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 1648 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $26 + call $std/typedarray/isInt8ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 158 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 0 + i32.const 1 + i32.const 0 + call $~lib/typedarray/FILL<~lib/typedarray/Int8Array,i8> + call $~lib/rt/pure/__release + local.get $1 + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 1680 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $25 + call $std/typedarray/isInt8ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 161 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> + local.tee $0 + i32.const 0 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/FILL<~lib/typedarray/Int8Array,i8> + call $~lib/rt/pure/__release + local.get $0 + i32.load offset=8 + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 165 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 166 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 167 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 3 + i32.const 0 + i32.const 14 + i32.const 1712 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $22 + call $std/typedarray/isInt8ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 168 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 1744 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $21 + call $std/typedarray/isInt8ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 169 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $28 + call $~lib/rt/pure/__release + local.get $27 + call $~lib/rt/pure/__release + local.get $26 + call $~lib/rt/pure/__release + local.get $25 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $22 + call $~lib/rt/pure/__release + local.get $21 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int32Array#constructor + 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 + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 1 + i32.const 1 + i32.const 3 + call $~lib/typedarray/FILL<~lib/typedarray/Int32Array,i32> + call $~lib/rt/pure/__release + local.get $1 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1776 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $29 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 181 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 0 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/FILL<~lib/typedarray/Int32Array,i32> + call $~lib/rt/pure/__release + local.get $1 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1824 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $28 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 184 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.const 0 + i32.const -3 + call $~lib/typedarray/FILL<~lib/typedarray/Int32Array,i32> + call $~lib/rt/pure/__release + local.get $1 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1872 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $27 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 187 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + i32.const -2 + i32.const 2147483647 + call $~lib/typedarray/FILL<~lib/typedarray/Int32Array,i32> + call $~lib/rt/pure/__release + local.get $1 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1920 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $26 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 190 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 0 + i32.const 1 + i32.const 0 + call $~lib/typedarray/FILL<~lib/typedarray/Int32Array,i32> + call $~lib/rt/pure/__release + local.get $1 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1968 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $25 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 193 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int32Array,i32> + local.tee $0 + i32.const 0 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/FILL<~lib/typedarray/Int32Array,i32> + call $~lib/rt/pure/__release + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 197 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 198 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 12 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 199 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 3 + i32.const 2 + i32.const 15 + i32.const 2016 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $22 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 200 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2048 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $21 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 201 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $28 + call $~lib/rt/pure/__release + local.get $27 + call $~lib/rt/pure/__release + local.get $26 + call $~lib/rt/pure/__release + local.get $25 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $22 + call $~lib/rt/pure/__release + local.get $21 + call $~lib/rt/pure/__release + i32.const 6 + call $~lib/typedarray/Int8Array#constructor + 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 4 + i32.const 5 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 5 + i32.const 6 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 1 + i32.const 6 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> + local.tee $0 + i32.const 0 + call $~lib/typedarray/Int8Array#__get + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 222 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 223 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 224 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 225 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.const 5 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> + local.tee $29 + i32.const 0 + call $~lib/typedarray/Int8Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 228 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $29 + i32.load offset=8 + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 229 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $29 + i32.load offset=4 + local.get $29 + i32.load + i32.sub + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 230 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $29 + i32.load offset=8 + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 231 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $29 + i32.const 1 + i32.const 4 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> + local.tee $28 + i32.const 0 + call $~lib/typedarray/Int8Array#__get + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 234 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + i32.load offset=8 + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 235 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + i32.load offset=4 + local.get $28 + i32.load + i32.sub + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 236 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + i32.load offset=8 + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 237 + 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 + local.get $29 + call $~lib/rt/pure/__release + local.get $28 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int32Array#constructor + 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 + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> + local.set $29 + local.get $1 + i32.const 0 + i32.const 3 + i32.const 2147483647 + call $~lib/typedarray/COPY_WITHIN<~lib/typedarray/Int32Array,i32> + local.tee $28 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2096 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $27 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 248 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $29 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> + local.set $0 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + i32.const 1 + i32.const 3 + i32.const 2147483647 + call $~lib/typedarray/COPY_WITHIN<~lib/typedarray/Int32Array,i32> + local.tee $26 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2144 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $25 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 250 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $29 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> + local.get $0 + call $~lib/rt/pure/__release + local.tee $0 + i32.const 1 + i32.const 2 + i32.const 2147483647 + call $~lib/typedarray/COPY_WITHIN<~lib/typedarray/Int32Array,i32> + local.tee $22 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2192 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $21 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 252 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $29 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> + local.get $0 + call $~lib/rt/pure/__release + local.tee $0 + i32.const 2 + i32.const 2 + i32.const 2147483647 + call $~lib/typedarray/COPY_WITHIN<~lib/typedarray/Int32Array,i32> + local.tee $19 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2240 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $18 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 254 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $29 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> + local.get $0 + call $~lib/rt/pure/__release + local.tee $0 + i32.const 0 + i32.const 3 + i32.const 4 + call $~lib/typedarray/COPY_WITHIN<~lib/typedarray/Int32Array,i32> + local.tee $17 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2288 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $16 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 256 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $29 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> + local.get $0 + call $~lib/rt/pure/__release + local.tee $0 + i32.const 1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/COPY_WITHIN<~lib/typedarray/Int32Array,i32> + local.tee $14 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2336 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $13 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 258 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $29 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> + local.get $0 + call $~lib/rt/pure/__release + local.tee $0 + i32.const 1 + i32.const 2 + i32.const 4 + call $~lib/typedarray/COPY_WITHIN<~lib/typedarray/Int32Array,i32> + local.tee $12 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2384 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $11 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 260 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $29 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> + local.get $0 + call $~lib/rt/pure/__release + local.tee $0 + i32.const 0 + i32.const -2 + i32.const 2147483647 + call $~lib/typedarray/COPY_WITHIN<~lib/typedarray/Int32Array,i32> + local.tee $10 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2432 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $9 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 262 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $29 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> + local.get $0 + call $~lib/rt/pure/__release + local.tee $0 + i32.const 0 + i32.const -2 + i32.const -1 + call $~lib/typedarray/COPY_WITHIN<~lib/typedarray/Int32Array,i32> + local.tee $8 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2480 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 264 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $29 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> + local.get $0 + call $~lib/rt/pure/__release + local.tee $0 + i32.const -4 + i32.const -3 + i32.const -2 + call $~lib/typedarray/COPY_WITHIN<~lib/typedarray/Int32Array,i32> + local.tee $6 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2528 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 266 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $29 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> + local.set $1 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + i32.const -4 + i32.const -3 + i32.const -1 + call $~lib/typedarray/COPY_WITHIN<~lib/typedarray/Int32Array,i32> + local.tee $4 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2576 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $3 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 268 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $29 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> + local.set $0 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + i32.const -4 + i32.const -3 + i32.const 2147483647 + call $~lib/typedarray/COPY_WITHIN<~lib/typedarray/Int32Array,i32> + local.tee $1 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2624 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $2 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 270 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $28 + call $~lib/rt/pure/__release + local.get $27 + call $~lib/rt/pure/__release + local.get $26 + call $~lib/rt/pure/__release + local.get $25 + call $~lib/rt/pure/__release + local.get $22 + call $~lib/rt/pure/__release + local.get $21 + call $~lib/rt/pure/__release + local.get $19 + call $~lib/rt/pure/__release + local.get $18 + call $~lib/rt/pure/__release + local.get $17 + call $~lib/rt/pure/__release + local.get $16 + call $~lib/rt/pure/__release + local.get $14 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $12 + call $~lib/rt/pure/__release + local.get $11 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int32Array#constructor + 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 + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int32Array,i32> + local.tee $29 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 282 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $29 + i32.load offset=4 + local.get $29 + i32.load + i32.sub + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 283 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $29 + i32.load offset=8 + i32.const 12 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 284 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.const 3 + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> + local.tee $0 + i32.const 0 + call $~lib/typedarray/Int32Array#__get + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 287 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + call $~lib/typedarray/Int32Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 288 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 289 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + if + i32.const 0 + i32.const 1312 + i32.const 290 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 8 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 291 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $29 + i32.const 1 + i32.const 2 + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> + local.tee $28 + i32.const 0 + call $~lib/typedarray/Int32Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 294 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 295 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + i32.load offset=4 + local.get $28 + i32.load + i32.sub + if + i32.const 0 + i32.const 1312 + i32.const 296 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + i32.load offset=8 + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 297 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $1 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> + local.tee $27 + i32.eq + if + i32.const 0 + i32.const 1312 + i32.const 300 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $27 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 301 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $27 + i32.load offset=4 + local.get $27 + i32.load + i32.sub + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 302 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $27 + i32.load offset=8 + local.get $1 + i32.load offset=8 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 303 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $28 + call $~lib/rt/pure/__release + local.get $27 + call $~lib/rt/pure/__release + i32.const 0 + local.set $1 + i32.const 0 + local.set $0 + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $29 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set + local.get $29 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $29 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int8Array#__set + local.get $29 + i32.load offset=4 + local.set $28 + local.get $29 + i32.load offset=8 + local.set $27 + loop $for-loop|0 + local.get $1 + local.get $27 + i32.lt_s + if + local.get $1 + local.get $28 + i32.add + i32.load8_s + local.set $26 + i32.const 4 + global.set $~argumentsLength + local.get $0 + local.get $26 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + block $folding-inner24 + block $folding-inner23 + block $folding-inner22 + block $folding-inner21 + block $folding-inner20 + block $folding-inner19 + block $folding-inner3 + block $folding-inner2 + block $folding-inner18 + block $folding-inner17 + block $folding-inner16 + block $folding-inner15 + block $folding-inner7 + block $folding-inner6 + block $folding-inner5 + block $folding-inner4 + block $folding-inner0 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 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get i32.const 255 i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 113 - call $~lib/typedarray/FOREACH<~lib/typedarray/Uint8Array,u8> - global.get $std/typedarray/forEachCallCount - i32.const 3 + i32.const 6 i32.ne - br_if $folding-inner19 - local.get $1 + br_if $folding-inner0 + local.get $29 call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 114 - call $~lib/typedarray/FOREACH<~lib/typedarray/Uint8Array,u8> - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner19 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 2704 - 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 2704 - 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 2704 - 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 - i32.load offset=4 - local.set $30 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $29 - loop $for-loop|021 - local.get $1 - local.get $29 - i32.lt_s - if - local.get $30 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_s - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|021 - end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner19 - 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 $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 2704 - 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 2704 - 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 2704 - 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 - i32.load offset=4 - local.set $30 - local.get $0 - i32.load offset=8 i32.const 1 - i32.shr_u - local.set $29 - loop $for-loop|022 - local.get $1 - local.get $29 - i32.lt_s - if - local.get $30 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_u - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|022 - end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner19 - 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 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set + call $~lib/typedarray/Uint8Array#__set local.get $1 i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 2 - i32.const 2704 i32.const 2 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 117 - call $~lib/typedarray/FOREACH<~lib/typedarray/Int32Array,i32> - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner19 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set + call $~lib/typedarray/Uint8Array#__set local.get $1 i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 118 - call $~lib/typedarray/FOREACH<~lib/typedarray/Int32Array,i32> - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner19 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set + call $~lib/typedarray/Uint8Array#__set local.get $1 - i32.const 119 - call $~lib/typedarray/FOREACH<~lib/typedarray/Int64Array,i64> - global.get $std/typedarray/forEachCallCount i32.const 3 + call $~lib/typedarray/Uint8Array#reduce + i32.const 255 + i32.and + i32.const 6 i32.ne - br_if $folding-inner19 + br_if $folding-inner0 local.get $1 call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount i32.const 3 - call $~lib/typedarray/Uint64Array#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 i32.const 0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $1 i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set + call $~lib/typedarray/Uint8ClampedArray#__set local.get $1 + i32.const 1 i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set + call $~lib/typedarray/Uint8ClampedArray#__set local.get $1 - i32.const 120 - call $~lib/typedarray/FOREACH<~lib/typedarray/Int64Array,i64> - global.get $std/typedarray/forEachCallCount + i32.const 2 i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 4 + call $~lib/typedarray/Uint8Array#reduce + i32.const 255 + i32.and + i32.const 6 i32.ne - br_if $folding-inner19 + br_if $folding-inner0 local.get $1 call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 + call $~lib/typedarray/Int16Array#constructor + local.tee $29 i32.const 0 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $1 i32.const 1 - i32.const 2704 + call $~lib/typedarray/Int16Array#__set + local.get $29 i32.const 1 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $1 i32.const 2 - i32.const 2704 + call $~lib/typedarray/Int16Array#__set + local.get $29 i32.const 2 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#__set i32.const 0 local.set $0 - local.get $1 + i32.const 0 + local.set $1 + local.get $29 i32.load offset=4 - local.set $30 - local.get $1 + local.set $28 + local.get $29 i32.load offset=8 - i32.const 2 + i32.const 1 i32.shr_u - local.set $29 - loop $for-loop|023 + local.set $27 + loop $for-loop|00 local.get $0 - local.get $29 + local.get $27 i32.lt_s if - local.get $30 + local.get $28 local.get $0 - i32.const 2 + i32.const 1 i32.shl i32.add - f32.load - i32.const 3 + i32.load16_s + local.set $26 + i32.const 4 global.set $~argumentsLength - local.get $0 local.get $1 - call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 + local.get $26 + i32.add + local.set $1 local.get $0 i32.const 1 i32.add local.set $0 - br $for-loop|023 + br $for-loop|00 end end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner19 local.get $1 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $29 call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 + call $~lib/typedarray/Uint16Array#constructor + local.tee $29 i32.const 0 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $1 i32.const 1 - i32.const 2704 + call $~lib/typedarray/Uint16Array#__set + local.get $29 i32.const 1 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $1 i32.const 2 - i32.const 2704 + call $~lib/typedarray/Uint16Array#__set + local.get $29 i32.const 2 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set + i32.const 3 + call $~lib/typedarray/Uint16Array#__set i32.const 0 local.set $0 - local.get $1 + i32.const 0 + local.set $1 + local.get $29 i32.load offset=4 - local.set $30 - local.get $1 + local.set $28 + local.get $29 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u - local.set $29 - loop $for-loop|024 + local.set $27 + loop $for-loop|01 local.get $0 - local.get $29 + local.get $27 i32.lt_s if - local.get $30 + local.get $28 local.get $0 - i32.const 3 + i32.const 1 i32.shl i32.add - f64.load - i32.const 3 + i32.load16_u + local.set $26 + i32.const 4 global.set $~argumentsLength - local.get $0 local.get $1 - call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 + local.get $26 + i32.add + local.set $1 local.get $0 i32.const 1 i32.add local.set $0 - br $for-loop|024 - end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner19 - local.get $1 - 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 $30 - i32.const 0 - f64.const nan:0x8000000000000 - call $~lib/typedarray/Float64Array#__set - local.get $30 - f64.const nan:0x8000000000000 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 607 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - block $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64> (result i32) - i32.const 0 - local.set $1 - i32.const 0 - local.get $30 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $29 - if (result i32) - i32.const 0 - local.get $29 - i32.ge_s - else - i32.const 1 - end - br_if $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64> - drop - local.get $30 - i32.load offset=4 - local.set $27 - loop $while-continue|0 - local.get $1 - local.get $29 - i32.lt_s - if - i32.const 1 - local.get $27 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $23 - f64.const nan:0x8000000000000 - f64.eq - if (result i32) - i32.const 1 - else - local.get $23 - local.get $23 - f64.ne - end - br_if $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64> - drop - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - i32.const 0 - end - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 608 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - i32.const 0 - f32.const nan:0x400000 - call $~lib/typedarray/Float32Array#__set - local.get $1 - f32.const nan:0x400000 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 613 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - block $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32> (result i32) - i32.const 0 - local.set $0 - i32.const 0 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $28 - if (result i32) - i32.const 0 - local.get $28 - i32.ge_s - else - i32.const 1 - end - br_if $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32> - drop - local.get $1 - i32.load offset=4 - local.set $26 - loop $while-continue|025 - local.get $0 - local.get $28 - i32.lt_s - if - i32.const 1 - local.get $26 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $22 - f32.const nan:0x400000 - f32.eq - if (result i32) - i32.const 1 - else - local.get $22 - local.get $22 - f32.ne - end - br_if $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32> - drop - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $while-continue|025 - end + br $for-loop|01 end - i32.const 0 - end - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 614 - i32.const 3 - call $~lib/builtins/abort - unreachable end - local.get $30 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int8Array#constructor - 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 4 - i32.const 5 - call $~lib/typedarray/Int8Array#__set - local.get $1 - call $~lib/typedarray/Int8Array#join - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner20 - local.get $1 - call $~lib/typedarray/Int8Array#join - local.tee $30 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner21 - local.get $0 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release local.get $1 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $29 call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint8Array#constructor + i32.const 3 + call $~lib/typedarray/Int32Array#constructor local.tee $1 - local.get $1 i32.const 0 i32.const 1 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Int32Array#__set local.get $1 i32.const 1 i32.const 2 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Int32Array#__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 4 - i32.const 5 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Int32Array#__set local.get $1 - call $~lib/typedarray/Uint8Array#join - local.tee $30 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner20 - call $~lib/typedarray/Uint8Array#join - local.tee $0 - local.get $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner21 - local.get $30 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 7 + call $~lib/typedarray/REDUCE<~lib/typedarray/Int32Array,i32,i32> + i32.const 6 + i32.ne + br_if $folding-inner0 local.get $1 call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#constructor + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor local.tee $1 - local.get $1 i32.const 0 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $1 i32.const 1 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Uint32Array#__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 4 - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $1 - call $~lib/typedarray/Uint8Array#join - local.tee $30 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner20 - call $~lib/typedarray/Uint8Array#join - local.tee $0 - local.get $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner21 - local.get $30 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 8 + call $~lib/typedarray/REDUCE<~lib/typedarray/Int32Array,i32,i32> + i32.const 6 + i32.ne + br_if $folding-inner0 local.get $1 call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int16Array#constructor + i32.const 3 + call $~lib/typedarray/Int64Array#constructor local.tee $1 i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set + i64.const 1 + call $~lib/typedarray/Int64Array#__set local.get $1 i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set + i64.const 2 + call $~lib/typedarray/Int64Array#__set local.get $1 i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set + i64.const 3 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 9 + call $~lib/typedarray/REDUCE<~lib/typedarray/Int64Array,i64,i64> + i64.const 6 + i64.ne + br_if $folding-inner0 local.get $1 + call $~lib/rt/pure/__release i32.const 3 - i32.const 4 - call $~lib/typedarray/Int16Array#__set + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + i32.const 0 + i64.const 1 + call $~lib/typedarray/Uint64Array#__set local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Int16Array#__set + i32.const 1 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set local.get $1 - call $~lib/typedarray/Int16Array#join - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner20 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Uint64Array#__set local.get $1 - call $~lib/typedarray/Int16Array#join - local.tee $30 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner21 - local.get $0 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release + i32.const 10 + call $~lib/typedarray/REDUCE<~lib/typedarray/Int64Array,i64,i64> + i64.const 6 + i64.ne + br_if $folding-inner0 local.get $1 call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint16Array#constructor + i32.const 3 + call $~lib/typedarray/Float32Array#constructor local.tee $1 i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set + 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 - call $~lib/typedarray/Uint16Array#__set + f32.const 3 + call $~lib/typedarray/Float32Array#__set + i32.const 0 + local.set $0 + local.get $1 + i32.load offset=4 + local.set $29 local.get $1 + i32.load offset=8 i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set + i32.shr_u + local.set $28 + loop $for-loop|02 + local.get $0 + local.get $28 + i32.lt_s + if + local.get $29 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $15 + i32.const 4 + global.set $~argumentsLength + local.get $23 + local.get $15 + f32.add + local.set $23 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|02 + end + end + local.get $23 + f32.const 6 + f32.ne + br_if $folding-inner0 local.get $1 + call $~lib/rt/pure/__release i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint16Array#__set + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Uint16Array#__set + i32.const 1 + f64.const 2 + call $~lib/typedarray/Float64Array#__set local.get $1 - call $~lib/typedarray/Uint16Array#join - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner20 + i32.const 2 + f64.const 3 + call $~lib/typedarray/Float64Array#__set + i32.const 0 + local.set $0 + f64.const 0 + local.set $24 local.get $1 - call $~lib/typedarray/Uint16Array#join - local.tee $30 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner21 - local.get $0 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release + i32.load offset=4 + local.set $29 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $28 + loop $for-loop|03 + local.get $0 + local.get $28 + i32.lt_s + if + local.get $29 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $20 + i32.const 4 + global.set $~argumentsLength + local.get $24 + local.get $20 + f64.add + local.set $24 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|03 + end + end + local.get $24 + f64.const 6 + f64.ne + br_if $folding-inner0 local.get $1 call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 + i32.const 0 + local.set $0 + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $29 i32.const 0 i32.const 1 - call $~lib/typedarray/Int32Array#__set - local.get $1 + call $~lib/typedarray/Int8Array#__set + local.get $29 i32.const 1 i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $1 + call $~lib/typedarray/Int8Array#__set + local.get $29 i32.const 2 i32.const 3 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Int32Array#__set - local.get $1 - call $~lib/typedarray/Int32Array#join - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner20 - local.get $1 - call $~lib/typedarray/Int32Array#join - local.tee $30 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner21 + call $~lib/typedarray/Int8Array#__set + local.get $29 + i32.load offset=4 + local.set $28 + local.get $29 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|004 + local.get $1 + i32.const 0 + i32.ge_s + if + local.get $1 + local.get $28 + i32.add + i32.load8_s + local.set $27 + i32.const 4 + global.set $~argumentsLength + local.get $0 + local.get $27 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $for-loop|004 + end + end local.get $0 + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner4 + local.get $29 call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint32Array#constructor + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor local.tee $1 i32.const 0 i32.const 1 - call $~lib/typedarray/Uint32Array#__set + call $~lib/typedarray/Uint8Array#__set local.get $1 i32.const 1 i32.const 2 - call $~lib/typedarray/Uint32Array#__set + call $~lib/typedarray/Uint8Array#__set local.get $1 i32.const 2 i32.const 3 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - call $~lib/typedarray/Uint32Array#join - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner20 + call $~lib/typedarray/Uint8Array#__set local.get $1 - call $~lib/typedarray/Uint32Array#join - local.tee $30 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner21 - local.get $0 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release + i32.const 14 + call $~lib/typedarray/Uint8Array#reduceRight + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner4 local.get $1 call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int64Array#constructor + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor 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 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $1 + i32.const 1 i32.const 2 - i64.const 3 - call $~lib/typedarray/Int64Array#__set + call $~lib/typedarray/Uint8ClampedArray#__set local.get $1 + i32.const 2 i32.const 3 - i64.const 4 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 4 - i64.const 5 - call $~lib/typedarray/Int64Array#__set - local.get $1 - call $~lib/typedarray/Int64Array#join - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner20 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $1 - call $~lib/typedarray/Int64Array#join - local.tee $30 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner21 - local.get $0 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release + i32.const 15 + call $~lib/typedarray/Uint8Array#reduceRight + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner4 local.get $1 call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $29 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 + call $~lib/typedarray/Int16Array#__set + local.get $29 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $29 i32.const 2 - i64.const 3 - call $~lib/typedarray/Uint64Array#__set - local.get $1 i32.const 3 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 4 - i64.const 5 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - call $~lib/typedarray/Uint64Array#join - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner20 - local.get $1 - call $~lib/typedarray/Uint64Array#join - local.tee $30 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner21 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $0 + local.get $29 + i32.load offset=4 + local.set $28 + local.get $29 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|05 + local.get $1 + i32.const 0 + i32.ge_s + if + local.get $28 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.set $27 + i32.const 4 + global.set $~argumentsLength + local.get $0 + local.get $27 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $for-loop|05 + end + end local.get $0 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner4 + local.get $29 call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $29 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 + call $~lib/typedarray/Uint16Array#__set + local.get $29 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $29 i32.const 2 - f32.const 3 - call $~lib/typedarray/Float32Array#__set - local.get $1 i32.const 3 - f32.const 4 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 4 - f32.const 5 - call $~lib/typedarray/Float32Array#__set - local.get $1 - call $~lib/typedarray/Float32Array#join - local.tee $0 - i32.const 4112 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner10 - local.get $1 - call $~lib/typedarray/Float32Array#join - local.tee $30 - i32.const 4112 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner11 + call $~lib/typedarray/Uint16Array#__set + i32.const 0 + local.set $0 + local.get $29 + i32.load offset=4 + local.set $28 + local.get $29 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|06 + local.get $1 + i32.const 0 + i32.ge_s + if + local.get $28 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.set $27 + i32.const 4 + global.set $~argumentsLength + local.get $0 + local.get $27 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $for-loop|06 + end + end local.get $0 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner4 + local.get $29 call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Float64Array#constructor + i32.const 3 + call $~lib/typedarray/Int32Array#constructor local.tee $1 - i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set + local.set $0 local.get $1 + i32.const 0 i32.const 1 - f64.const 2 - call $~lib/typedarray/Float64Array#__set + call $~lib/typedarray/Int32Array#__set local.get $1 + i32.const 1 i32.const 2 - f64.const 3 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 3 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 4 - f64.const 5 - call $~lib/typedarray/Float64Array#__set - local.get $1 - call $~lib/typedarray/Float64Array#join - local.tee $0 - i32.const 4112 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner10 - local.get $1 - call $~lib/typedarray/Float64Array#join - local.tee $30 - i32.const 4112 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner11 - local.get $0 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release + call $~lib/typedarray/Int32Array#__set local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 i32.const 2 - global.set $~argumentsLength - local.get $1 - i32.const 0 - call $~lib/typedarray/Uint8Array.wrap@varargs - local.tee $30 - i32.load offset=8 - if + i32.const 3 + call $~lib/typedarray/Int32Array#__set + block $folding-inner1 + local.get $1 + i32.const 18 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int32Array,i32,i32> + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + 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 + local.get $1 + i32.const 19 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int32Array,i32,i32> + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + 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 + local.get $1 + i32.const 20 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int64Array,i64,i64> + i64.const 6 + i64.ne + br_if $folding-inner1 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + 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 + local.get $1 + i32.const 21 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int64Array,i64,i64> + i64.const 6 + i64.ne + br_if $folding-inner1 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + 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 + f32.const 0 + local.set $23 + local.get $0 + i32.load offset=4 + local.set $29 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|07 + local.get $1 + i32.const 0 + i32.ge_s + if + local.get $29 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $15 + i32.const 4 + global.set $~argumentsLength + local.get $23 + local.get $15 + f32.add + local.set $23 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $for-loop|07 + end + end + local.get $23 + f32.const 6 + f32.ne + br_if $folding-inner4 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + 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 + f64.const 0 + local.set $24 + local.get $0 + i32.load offset=4 + local.set $29 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|08 + local.get $1 + i32.const 0 + i32.ge_s + if + local.get $29 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $20 + i32.const 4 + global.set $~argumentsLength + local.get $24 + local.get $20 + f64.add + local.set $24 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $for-loop|08 + end + end + local.get $24 + f64.const 6 + f64.ne + br_if $folding-inner4 + local.get $0 + call $~lib/rt/pure/__release + call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + 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 + local.get $1 + call $~lib/typedarray/MAP<~lib/typedarray/Int16Array,i16> + local.tee $0 + i32.const 0 + call $~lib/typedarray/Int16Array#__get + i32.const 1 + i32.ne + br_if $folding-inner5 + local.get $0 + i32.const 1 + call $~lib/typedarray/Int16Array#__get + i32.const 4 + i32.ne + br_if $folding-inner6 + local.get $0 + i32.const 2 + call $~lib/typedarray/Int16Array#__get + i32.const 9 + i32.ne + br_if $folding-inner7 + 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 + 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 + local.get $1 + call $~lib/typedarray/MAP<~lib/typedarray/Uint16Array,u16> + local.tee $0 + i32.const 0 + call $~lib/typedarray/Uint16Array#__get + i32.const 1 + i32.ne + br_if $folding-inner5 + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__get + i32.const 4 + i32.ne + br_if $folding-inner6 + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint16Array#__get + i32.const 9 + i32.ne + br_if $folding-inner7 + 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 + 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 + local.get $1 + call $~lib/typedarray/MAP<~lib/typedarray/Int32Array,i32> + local.tee $0 + i32.const 0 + call $~lib/typedarray/Int32Array#__get + i32.const 1 + i32.ne + br_if $folding-inner5 + local.get $0 + i32.const 1 + call $~lib/typedarray/Int32Array#__get + i32.const 4 + i32.ne + br_if $folding-inner6 + local.get $0 + i32.const 2 + call $~lib/typedarray/Int32Array#__get + i32.const 9 + i32.ne + br_if $folding-inner7 + 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 + 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 + local.get $1 + call $~lib/typedarray/MAP<~lib/typedarray/Uint32Array,u32> + local.tee $0 + i32.const 0 + call $~lib/typedarray/Uint32Array#__get + i32.const 1 + i32.ne + br_if $folding-inner5 + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint32Array#__get + i32.const 4 + i32.ne + br_if $folding-inner6 + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint32Array#__get + i32.const 9 + i32.ne + br_if $folding-inner7 + 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 + 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 + local.get $1 + call $~lib/typedarray/MAP<~lib/typedarray/Int64Array,i64> + local.tee $0 + i32.const 0 + call $~lib/typedarray/Int64Array#__get + i64.const 1 + i64.ne + br_if $folding-inner5 + local.get $0 + i32.const 1 + call $~lib/typedarray/Int64Array#__get + i64.const 4 + i64.ne + br_if $folding-inner6 + local.get $0 + i32.const 2 + call $~lib/typedarray/Int64Array#__get + i64.const 9 + i64.ne + br_if $folding-inner7 + 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 + 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 + local.get $1 + call $~lib/typedarray/MAP<~lib/typedarray/Uint64Array,u64> + local.tee $0 + i32.const 0 + call $~lib/typedarray/Uint64Array#__get + i64.const 1 + i64.ne + br_if $folding-inner5 + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint64Array#__get + i64.const 4 + i64.ne + br_if $folding-inner6 + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint64Array#__get + i64.const 9 + i64.ne + br_if $folding-inner7 + 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 + 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 + local.get $1 + call $~lib/typedarray/MAP<~lib/typedarray/Float32Array,f32> + local.tee $0 + i32.const 0 + call $~lib/typedarray/Float32Array#__get + f32.const 1 + f32.ne + br_if $folding-inner5 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float32Array#__get + f32.const 4 + f32.ne + br_if $folding-inner6 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float32Array#__get + f32.const 9 + f32.ne + br_if $folding-inner7 + 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 + 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 + local.get $1 + call $~lib/typedarray/MAP<~lib/typedarray/Float64Array,f64> + local.tee $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 1 + f64.ne + br_if $folding-inner5 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 4 + f64.ne + br_if $folding-inner6 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 9 + f64.ne + br_if $folding-inner7 + 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 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 46 + call $~lib/typedarray/Int8Array#some + i32.eqz + br_if $folding-inner2 + local.get $1 + i32.const 47 + call $~lib/typedarray/Int8Array#some + br_if $folding-inner3 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 48 + call $~lib/typedarray/Uint8Array#some + i32.eqz + br_if $folding-inner2 + local.get $1 + i32.const 49 + call $~lib/typedarray/Uint8Array#some + br_if $folding-inner3 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 50 + call $~lib/typedarray/Uint8Array#some + i32.eqz + br_if $folding-inner2 + local.get $1 + i32.const 51 + call $~lib/typedarray/Uint8Array#some + br_if $folding-inner3 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 52 + call $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16> + i32.eqz + br_if $folding-inner2 + i32.const 53 + call $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16> + br_if $folding-inner3 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 54 + call $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16> + i32.eqz + br_if $folding-inner2 + i32.const 55 + call $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16> + br_if $folding-inner3 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 56 + call $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> + i32.eqz + br_if $folding-inner2 + i32.const 57 + call $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> + br_if $folding-inner3 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 58 + call $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> + i32.eqz + br_if $folding-inner2 + i32.const 59 + call $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> + br_if $folding-inner3 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 60 + call $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> + i32.eqz + br_if $folding-inner2 + i32.const 61 + call $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> + br_if $folding-inner3 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 62 + call $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> + i32.eqz + br_if $folding-inner2 + i32.const 63 + call $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> + br_if $folding-inner3 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 1 + f32.const 4 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 2 + f32.const 6 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 64 + call $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32> + i32.eqz + br_if $folding-inner2 + i32.const 65 + call $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32> + br_if $folding-inner3 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + f64.const 4 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + f64.const 6 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 66 + call $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64> + i32.eqz + br_if $folding-inner2 + i32.const 67 + call $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64> + br_if $folding-inner3 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + 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 68 + call $~lib/typedarray/Int8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner19 + local.get $1 + i32.const 69 + call $~lib/typedarray/Int8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner20 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + 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 70 + call $~lib/typedarray/Uint8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner19 + local.get $1 + i32.const 71 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner20 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 72 + call $~lib/typedarray/Uint8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner19 + local.get $1 + i32.const 73 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner20 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 74 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16> + i32.const 1 + i32.ne + br_if $folding-inner19 + i32.const 75 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16> + i32.const -1 + i32.ne + br_if $folding-inner20 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 76 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16> + i32.const 1 + i32.ne + br_if $folding-inner19 + i32.const 77 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16> + i32.const -1 + i32.ne + br_if $folding-inner20 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 78 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> + i32.const 1 + i32.ne + br_if $folding-inner19 + i32.const 79 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> + i32.const -1 + i32.ne + br_if $folding-inner20 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 80 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> + i32.const 1 + i32.ne + br_if $folding-inner19 + i32.const 81 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> + i32.const -1 + i32.ne + br_if $folding-inner20 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 82 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> + i32.const 1 + i32.ne + br_if $folding-inner19 + i32.const 83 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> + i32.const -1 + i32.ne + br_if $folding-inner20 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 84 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> + i32.const 1 + i32.ne + br_if $folding-inner19 + i32.const 85 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> + i32.const -1 + i32.ne + br_if $folding-inner20 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 86 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32> + i32.const 1 + i32.ne + br_if $folding-inner19 + i32.const 87 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32> + i32.const -1 + i32.ne + br_if $folding-inner20 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 88 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64> + i32.const 1 + i32.ne + br_if $folding-inner19 + i32.const 89 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64> + i32.const -1 + i32.ne + br_if $folding-inner20 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 90 + call $~lib/typedarray/Int8Array#every + i32.eqz + br_if $folding-inner21 + local.get $1 + i32.const 91 + call $~lib/typedarray/Int8Array#every + br_if $folding-inner22 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 92 + call $~lib/typedarray/Uint8Array#every + i32.eqz + br_if $folding-inner21 + local.get $1 + i32.const 93 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner22 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 94 + call $~lib/typedarray/Uint8Array#every + i32.eqz + br_if $folding-inner21 + local.get $1 + i32.const 95 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner22 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 96 + call $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16> + i32.eqz + br_if $folding-inner21 + i32.const 97 + call $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16> + br_if $folding-inner22 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 98 + call $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16> + i32.eqz + br_if $folding-inner21 + i32.const 99 + call $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16> + br_if $folding-inner22 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 100 + call $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> + i32.eqz + br_if $folding-inner21 + i32.const 101 + call $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> + br_if $folding-inner22 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 102 + call $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> + i32.eqz + br_if $folding-inner21 + i32.const 103 + call $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> + br_if $folding-inner22 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 104 + call $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> + i32.eqz + br_if $folding-inner21 + i32.const 105 + call $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> + br_if $folding-inner22 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 106 + call $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> + i32.eqz + br_if $folding-inner21 + i32.const 107 + call $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> + br_if $folding-inner22 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 1 + f32.const 4 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 2 + f32.const 6 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 108 + call $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32> + i32.eqz + br_if $folding-inner21 + i32.const 109 + call $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32> + br_if $folding-inner22 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + f64.const 4 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + f64.const 6 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 110 + call $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64> + i32.eqz + br_if $folding-inner21 + i32.const 111 + call $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64> + br_if $folding-inner22 + local.get $1 + call $~lib/rt/pure/__release + call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + i32.const 2 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 113 + call $~lib/typedarray/Uint8Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner23 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 2 + i32.const 2704 + i32.const 2 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 114 + call $~lib/typedarray/Uint8Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner23 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 2704 + 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 2704 + 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 2704 + 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 + i32.load offset=4 + local.set $29 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $28 + loop $for-loop|09 + local.get $1 + local.get $28 + i32.lt_s + if + local.get $29 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|09 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner23 + 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 $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 2704 + 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 2704 + 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 2704 + 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 + i32.load offset=4 + local.set $29 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $28 + loop $for-loop|010 + local.get $1 + local.get $28 + i32.lt_s + if + local.get $29 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_u + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|010 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner23 + 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 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 117 + call $~lib/typedarray/FOREACH<~lib/typedarray/Int32Array,i32> + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner23 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 118 + call $~lib/typedarray/FOREACH<~lib/typedarray/Int32Array,i32> + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner23 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + i32.const 2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 119 + call $~lib/typedarray/FOREACH<~lib/typedarray/Int64Array,i64> + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner23 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + i32.const 2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 120 + call $~lib/typedarray/FOREACH<~lib/typedarray/Int64Array,i64> + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner23 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + i32.const 2 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + i32.const 0 + local.set $0 + local.get $1 + i32.load offset=4 + local.set $29 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $28 + loop $for-loop|011 + local.get $0 + local.get $28 + i32.lt_s + if + local.get $29 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + i32.const 3 + global.set $~argumentsLength + local.get $0 + local.get $1 + call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|011 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner23 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + i32.const 2 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + i32.const 0 + local.set $0 + local.get $1 + i32.load offset=4 + local.set $29 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $28 + loop $for-loop|012 + local.get $0 + local.get $28 + i32.lt_s + if + local.get $29 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + i32.const 3 + global.set $~argumentsLength + local.get $0 + local.get $1 + call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|012 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner23 + local.get $1 + 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 $29 + i32.const 0 + f64.const nan:0x8000000000000 + call $~lib/typedarray/Float64Array#__set + local.get $29 + f64.const nan:0x8000000000000 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 607 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + block $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64> (result i32) + i32.const 0 + local.set $1 + i32.const 0 + local.get $29 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $28 + if (result i32) + i32.const 0 + local.get $28 + i32.ge_s + else + i32.const 1 + end + br_if $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64> + drop + local.get $29 + i32.load offset=4 + local.set $26 + loop $while-continue|0 + local.get $1 + local.get $28 + i32.lt_s + if + i32.const 1 + local.get $26 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $24 + f64.const nan:0x8000000000000 + f64.eq + if (result i32) + i32.const 1 + else + local.get $24 + local.get $24 + f64.ne + end + br_if $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64> + drop + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|0 + end + end + i32.const 0 + end + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 608 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + i32.const 0 + f32.const nan:0x400000 + call $~lib/typedarray/Float32Array#__set + local.get $1 + f32.const nan:0x400000 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 613 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + block $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32> (result i32) + i32.const 0 + local.set $0 + i32.const 0 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $27 + if (result i32) + i32.const 0 + local.get $27 + i32.ge_s + else + i32.const 1 + end + br_if $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32> + drop + local.get $1 + i32.load offset=4 + local.set $25 + loop $while-continue|013 + local.get $0 + local.get $27 + i32.lt_s + if + i32.const 1 + local.get $25 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $23 + f32.const nan:0x400000 + f32.eq + if (result i32) + i32.const 1 + else + local.get $23 + local.get $23 + f32.ne + end + br_if $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32> + drop + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $while-continue|013 + end + end + i32.const 0 + end + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 614 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $29 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> + i32.const 5 + call $~lib/typedarray/Int16Array#constructor + 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 + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $0 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner15 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint16Array#constructor + 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 + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $0 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner15 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int32Array#constructor + 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 + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $0 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner15 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint32Array#constructor + 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 + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $0 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner15 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int64Array#constructor + 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 + local.get $1 + i32.const 3 + i64.const 4 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 4 + i64.const 5 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $0 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner15 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint64Array#constructor + 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 + local.get $1 + i32.const 3 + i64.const 4 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 4 + i64.const 5 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $0 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner15 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Float32Array#constructor + 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 + local.get $1 + i32.const 3 + f32.const 4 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 4 + f32.const 5 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinFloatArray + local.tee $0 + i32.const 4112 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinFloatArray + local.tee $29 + i32.const 4112 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner18 + local.get $0 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Float64Array#constructor + 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 + local.get $1 + i32.const 3 + f64.const 4 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 4 + f64.const 5 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $~lib/util/string/joinFloatArray + local.tee $0 + i32.const 4112 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $~lib/util/string/joinFloatArray + local.tee $29 + i32.const 4112 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner18 + local.get $0 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 + i32.const 2 + global.set $~argumentsLength + local.get $1 + i32.const 0 + call $~lib/typedarray/Uint8Array.wrap@varargs + local.tee $29 + i32.load offset=8 + if + i32.const 0 + i32.const 1312 + i32.const 691 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 2 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $0 + local.get $1 + call $~lib/rt/pure/__release + i32.const 2 + global.set $~argumentsLength + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint8Array.wrap@varargs + local.set $1 + local.get $29 + call $~lib/rt/pure/__release + local.get $1 + i32.load offset=8 + if + i32.const 0 + i32.const 1312 + i32.const 695 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + 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 $1 + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $29 + i32.const 0 + f32.const 400 + call $~lib/typedarray/Float32Array#__set + local.get $29 + i32.const 1 + f32.const nan:0x400000 + call $~lib/typedarray/Float32Array#__set + local.get $29 + i32.const 2 + f32.const inf + call $~lib/typedarray/Float32Array#__set + i32.const 4 + call $~lib/typedarray/Int64Array#constructor + local.tee $28 + i32.const 0 + i64.const -10 + call $~lib/typedarray/Int64Array#__set + local.get $28 + i32.const 1 + i64.const 100 + call $~lib/typedarray/Int64Array#__set + local.get $28 + i32.const 2 + i64.const 10 + call $~lib/typedarray/Int64Array#__set + local.get $28 + i32.const 3 + i64.const 300 + call $~lib/typedarray/Int64Array#__set + i32.const 2 + call $~lib/typedarray/Int32Array#constructor + local.tee $27 + i32.const 0 + i32.const 300 + call $~lib/typedarray/Int32Array#__set + local.get $27 + i32.const 1 + i32.const -1 + call $~lib/typedarray/Int32Array#__set + i32.const 0 + local.set $0 + local.get $29 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.add + local.get $1 + i32.load offset=8 + i32.gt_s + br_if $folding-inner24 + local.get $1 + i32.load offset=4 + i32.const 1 + i32.add + local.set $25 + local.get $29 + i32.load offset=4 + local.set $22 + local.get $29 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $21 + loop $for-loop|022 + local.get $0 + local.get $21 + i32.lt_s + if + local.get $0 + local.get $25 + i32.add + local.get $22 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $23 + local.get $23 + f32.sub + f32.const 0 + f32.eq + if (result i32) + f32.const 0 + f32.const 255 + local.get $23 + 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|022 + end + end + local.get $1 + local.get $28 + i32.const 4 + call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int64Array,i64> + i32.const 0 + local.set $0 + local.get $27 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 8 + i32.add + local.get $1 + i32.load offset=8 + i32.gt_s + br_if $folding-inner24 + local.get $1 + i32.load offset=4 + i32.const 8 + i32.add + local.set $25 + local.get $27 + i32.load offset=4 + local.set $22 + local.get $27 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $21 + loop $for-loop|023 + local.get $0 + local.get $21 + i32.lt_s + if + local.get $0 + local.get $25 + i32.add + local.get $22 + local.get $0 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $26 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $26 + i32.const 255 + local.get $26 + 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|023 + end + end + local.get $1 + i32.const 10 + i32.const 0 + i32.const 18 + i32.const 8288 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $22 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + i32.const 4 + call $~lib/typedarray/Uint32Array#constructor + local.tee $0 i32.const 0 - i32.const 1312 - i32.const 691 + i32.const 1 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 1 + i32.const 300 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 2 + i32.const 100 + call $~lib/typedarray/Uint32Array#__set + local.get $0 i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 2 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 2 - global.set $~argumentsLength - local.get $0 - i32.const 2 - call $~lib/typedarray/Uint8Array.wrap@varargs - local.set $1 - local.get $30 - call $~lib/rt/pure/__release - local.get $1 - i32.load offset=8 - if + i32.const -1 + call $~lib/typedarray/Uint32Array#__set + i32.const 4 + call $~lib/typedarray/Int16Array#constructor + local.tee $26 i32.const 0 - i32.const 1312 - i32.const 695 + i32.const -10 + call $~lib/typedarray/Int16Array#__set + local.get $26 + i32.const 1 + i32.const 100 + call $~lib/typedarray/Int16Array#__set + local.get $26 + i32.const 2 + i32.const 10 + call $~lib/typedarray/Int16Array#__set + local.get $26 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - 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 $30 - i32.const 0 - f32.const 400 - call $~lib/typedarray/Float32Array#__set - local.get $30 - i32.const 1 - f32.const nan:0x400000 - call $~lib/typedarray/Float32Array#__set - local.get $30 - i32.const 2 - f32.const inf - call $~lib/typedarray/Float32Array#__set - i32.const 4 - call $~lib/typedarray/Int64Array#constructor - local.tee $29 - i32.const 0 - i64.const -10 - call $~lib/typedarray/Int64Array#__set - local.get $29 - i32.const 1 - i64.const 100 - call $~lib/typedarray/Int64Array#__set - local.get $29 - i32.const 2 - i64.const 10 - call $~lib/typedarray/Int64Array#__set - local.get $29 - i32.const 3 - i64.const 300 - call $~lib/typedarray/Int64Array#__set - i32.const 2 - call $~lib/typedarray/Int32Array#constructor - local.tee $28 - i32.const 0 - i32.const 300 - call $~lib/typedarray/Int32Array#__set - local.get $28 - i32.const 1 - i32.const -1 - call $~lib/typedarray/Int32Array#__set - i32.const 0 - local.set $1 - local.get $30 - 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 - br_if $folding-inner22 - local.get $0 - i32.load offset=4 - i32.const 1 - i32.add - local.set $26 - local.get $30 - i32.load offset=4 - local.set $25 - local.get $30 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $24 - loop $for-loop|026 + i32.const 300 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $25 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u local.get $1 - local.get $24 - i32.lt_s - if - local.get $1 - local.get $26 - i32.add + i32.load offset=8 + i32.gt_s + br_if $folding-inner24 + local.get $1 + i32.load offset=4 + local.set $21 + local.get $0 + i32.load offset=4 + local.set $19 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $18 + loop $for-loop|024 local.get $25 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $22 - local.get $22 - f32.sub - f32.const 0 - f32.eq - if (result i32) - f32.const 0 - f32.const 255 - local.get $22 - f32.min - f32.max - i32.trunc_f32_u - else - i32.const 0 + local.get $18 + i32.lt_s + if + i32.const 255 + local.get $19 + local.get $25 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $17 + i32.lt_u + local.set $16 + local.get $21 + local.get $25 + i32.add + i32.const 255 + local.get $17 + local.get $16 + select + i32.store8 + local.get $25 + i32.const 1 + i32.add + local.set $25 + br $for-loop|024 end - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|026 end - end - local.get $0 - local.get $29 - i32.const 4 - call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int64Array,i64> - i32.const 0 - local.set $1 - local.get $28 - 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 - br_if $folding-inner22 - local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - local.set $26 - local.get $28 - i32.load offset=4 - local.set $25 - local.get $28 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $24 - loop $for-loop|027 local.get $1 - local.get $24 - i32.lt_s - if - local.get $1 - local.get $26 - i32.add - local.get $25 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $27 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $27 - i32.const 255 - local.get $27 - 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|027 - end - end - local.get $0 - i32.const 10 - i32.const 0 - i32.const 18 - i32.const 8288 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $25 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - i32.const 4 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 1 - i32.const 300 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 2 - i32.const 100 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 3 - i32.const -1 - call $~lib/typedarray/Uint32Array#__set - i32.const 4 - call $~lib/typedarray/Int16Array#constructor - local.tee $27 - i32.const 0 - i32.const -10 - call $~lib/typedarray/Int16Array#__set - local.get $27 - i32.const 1 - i32.const 100 - call $~lib/typedarray/Int16Array#__set - local.get $27 - i32.const 2 - i32.const 10 - call $~lib/typedarray/Int16Array#__set - local.get $27 - i32.const 3 - i32.const 300 - call $~lib/typedarray/Int16Array#__set - i32.const 0 - local.set $26 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.get $0 - i32.load offset=8 - i32.gt_s - br_if $folding-inner22 - local.get $0 - i32.load offset=4 - local.set $24 - local.get $1 - i32.load offset=4 - local.set $19 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $18 - loop $for-loop|028 local.get $26 - local.get $18 - i32.lt_s - if - local.get $24 - local.get $26 - i32.add - i32.const 255 - local.get $19 - local.get $26 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $17 - i32.const 255 - local.get $17 - i32.lt_u - select - i32.store8 - local.get $26 - i32.const 1 - i32.add - local.set $26 - br $for-loop|028 - end + i32.const 5 + call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int16Array,i16> + local.get $1 + i32.const 10 + i32.const 0 + i32.const 18 + i32.const 8320 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $25 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + local.get $1 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $28 + call $~lib/rt/pure/__release + local.get $27 + call $~lib/rt/pure/__release + local.get $22 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $26 + call $~lib/rt/pure/__release + local.get $25 + call $~lib/rt/pure/__release + return end - local.get $0 - local.get $27 - i32.const 5 - call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int16Array,i16> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 18 - i32.const 8320 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $26 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $0 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $28 - call $~lib/rt/pure/__release - local.get $25 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $27 - call $~lib/rt/pure/__release - local.get $26 - call $~lib/rt/pure/__release - return + br $folding-inner4 end i32.const 0 i32.const 1312 - i32.const 365 + i32.const 323 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 366 + i32.const 344 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 367 + i32.const 365 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 626 - i32.const 5 + i32.const 366 + i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 627 - i32.const 5 + i32.const 367 + i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 323 - i32.const 3 + i32.const 629 + i32.const 5 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 344 - i32.const 3 + i32.const 630 + i32.const 5 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 415 - i32.const 3 + i32.const 626 + i32.const 5 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 417 - i32.const 3 + i32.const 627 + i32.const 5 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 438 + i32.const 415 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 440 + i32.const 417 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 461 + i32.const 438 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 463 + i32.const 440 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 495 + i32.const 461 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 629 - i32.const 5 + i32.const 463 + i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 630 - i32.const 5 + i32.const 495 + i32.const 3 call $~lib/builtins/abort unreachable end diff --git a/tests/compiler/typeof.optimized.wat b/tests/compiler/typeof.optimized.wat index ef8bc54d29..83a4226e70 100644 --- a/tests/compiler/typeof.optimized.wat +++ b/tests/compiler/typeof.optimized.wat @@ -1,7 +1,6 @@ (module (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -17,14 +16,6 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - 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) @@ -118,10 +109,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 diff --git a/tests/compiler/wasi/abort.optimized.wat b/tests/compiler/wasi/abort.optimized.wat index 1f8d5069ad..f98c518dbc 100644 --- a/tests/compiler/wasi/abort.optimized.wat +++ b/tests/compiler/wasi/abort.optimized.wat @@ -1,7 +1,7 @@ (module (type $none_=>_none (func)) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (import "wasi_snapshot_preview1" "fd_write" (func $~lib/bindings/wasi_snapshot_preview1/fd_write (param i32 i32 i32 i32) (result i32))) @@ -12,14 +12,6 @@ (export "_start" (func $~start)) (export "memory" (memory $0)) (export "test" (func $wasi/abort/test)) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) (func $~lib/string/String.UTF8.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -241,7 +233,7 @@ (local $3 i32) (local $4 i32) i32.const 3 - local.set $1 + local.set $2 i32.const 4 local.set $0 i32.const 0 @@ -251,32 +243,36 @@ i64.const 9071471065260641 i64.store i32.const 1040 - i32.const 1040 - call $~lib/string/String#get:length + i32.const 1036 + i32.load + i32.const 1 + i32.shr_u i32.const 19 call $~lib/string/String.UTF8.encodeUnsafe i32.const 19 i32.add - local.tee $3 + local.tee $1 i32.const 544106784 i32.store - local.get $3 + local.get $1 i32.const 4 i32.add - local.tee $3 - i32.const 1088 + local.tee $1 i32.const 1088 - call $~lib/string/String#get:length - local.get $3 + i32.const 1084 + i32.load + i32.const 1 + i32.shr_u + local.get $1 call $~lib/string/String.UTF8.encodeUnsafe i32.add - local.tee $3 + local.tee $1 i32.const 40 i32.store8 i32.const 4 call $~lib/util/number/decimalCount32 local.tee $4 - local.get $3 + local.get $1 i32.const 1 i32.add i32.add @@ -306,37 +302,37 @@ 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 loop $do-continue|1 - local.get $1 + local.get $2 i32.const 10 i32.div_u local.get $3 i32.const 1 i32.sub local.tee $3 - local.get $1 + local.get $2 i32.const 10 i32.rem_u i32.const 48 i32.add i32.store8 - local.tee $1 + local.tee $2 br_if $do-continue|1 end - local.get $2 + local.get $1 local.get $3 i32.add - local.tee $1 + local.tee $2 i32.const 2601 i32.store16 i32.const 4 - local.get $1 + local.get $2 i32.const -10 i32.add i32.store diff --git a/tests/compiler/wasi/trace.optimized.wat b/tests/compiler/wasi/trace.optimized.wat index 0a06b92e84..b68cd111dd 100644 --- a/tests/compiler/wasi/trace.optimized.wat +++ b/tests/compiler/wasi/trace.optimized.wat @@ -1,6 +1,5 @@ (module (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 $none_=>_none (func)) (type $i32_=>_none (func (param i32))) @@ -9,8 +8,9 @@ (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) (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_=>_i32 (func (param i32 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))) + (type $i32_i64_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i64 i32 i64 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) @@ -197,14 +197,6 @@ i32.store offset=12 local.get $3 ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) (func $~lib/string/String.UTF8.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -422,13 +414,6 @@ i64.shr_u i64.add ) - (func $~lib/util/number/umul64e (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.add - i32.const -64 - i32.sub - ) (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) local.get $0 i32.const 10 @@ -527,21 +512,22 @@ local.get $1 i32.store16 ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i64) (param $3 i32) (param $4 i64) (param $5 i32) (result i32) + (local $6 i32) (local $7 i32) (local $8 i32) (local $9 i64) (local $10 i64) (local $11 i64) (local $12 i64) - local.get $3 + local.get $2 local.get $1 i64.sub local.set $9 - local.get $3 + local.get $2 i64.const 1 i32.const 0 - local.get $4 + local.get $3 i32.sub local.tee $8 i64.extend_i32_s @@ -552,16 +538,16 @@ local.tee $11 i64.and local.set $1 - local.get $3 + local.get $2 local.get $8 i64.extend_i32_s i64.shr_u i32.wrap_i64 - local.tee $2 + local.tee $6 call $~lib/util/number/decimalCount32 - local.set $7 + local.set $3 loop $while-continue|0 - local.get $7 + local.get $3 i32.const 0 i32.gt_s if @@ -576,159 +562,159 @@ block $case3|1 block $case2|1 block $case1|1 - local.get $7 - local.tee $4 + local.get $3 + local.tee $7 i32.const 10 i32.ne if - local.get $4 + local.get $7 i32.const 1 i32.sub br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 end - local.get $2 + local.get $6 i32.const 1000000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 1000000000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 100000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 100000000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 10000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 10000000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 1000000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 1000000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 100000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 100000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 10000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 10000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 1000 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 1000 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 100 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 100 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 + local.get $6 i32.const 10 i32.div_u - local.set $4 - local.get $2 + local.set $3 + local.get $6 i32.const 10 i32.rem_u - local.set $2 + local.set $6 br $break|1 end - local.get $2 - local.set $4 + local.get $6 + local.set $3 i32.const 0 - local.set $2 + local.set $6 br $break|1 end i32.const 0 - local.set $4 + local.set $3 end - local.get $4 - local.get $6 + local.get $3 + local.get $5 i32.or if local.get $0 - local.get $6 + local.get $5 i32.const 1 i32.shl i32.add - local.get $4 + local.get $3 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 end local.get $7 i32.const 1 i32.sub - local.set $7 + local.set $3 local.get $1 - local.get $2 + local.get $6 i64.extend_i32_u local.get $8 i64.extend_i32_s i64.shl i64.add - local.tee $3 - local.get $5 + local.tee $2 + local.get $4 i64.le_u if - local.get $7 + local.get $3 global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K local.get $0 - local.get $6 local.get $5 + local.get $4 + local.get $2 local.get $3 - local.get $7 i32.const 2 i32.shl i32.const 1936 @@ -739,7 +725,7 @@ i64.shl local.get $9 call $~lib/util/number/grisuRound - local.get $6 + local.get $5 return end br $while-continue|0 @@ -747,28 +733,27 @@ end local.get $8 i64.extend_i32_s - local.set $3 - loop $while-continue|2 (result i32) - local.get $5 + local.set $2 + loop $while-continue|2 + local.get $4 i64.const 10 i64.mul - local.set $5 + local.set $4 local.get $1 i64.const 10 i64.mul local.tee $1 - local.get $3 + local.get $2 i64.shr_u local.tee $12 - local.get $6 + local.get $5 i64.extend_i32_s i64.or i64.const 0 i64.ne if local.get $0 - local.get $6 - local.tee $2 + local.get $5 i32.const 1 i32.shl i32.add @@ -779,44 +764,44 @@ i32.const 48 i32.add i32.store16 - local.get $2 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 end - local.get $7 + local.get $3 i32.const 1 i32.sub - local.set $7 + local.set $3 local.get $1 local.get $11 i64.and local.tee $1 - local.get $5 + local.get $4 i64.ge_u br_if $while-continue|2 - local.get $7 - global.get $~lib/util/number/_K - i32.add - global.set $~lib/util/number/_K - local.get $0 - local.get $6 - local.get $5 - local.get $1 - local.get $10 - local.get $9 - i32.const 0 - local.get $7 - i32.sub - i32.const 2 - i32.shl - i32.const 1936 - i32.add - i64.load32_u - i64.mul - call $~lib/util/number/grisuRound - local.get $6 end + local.get $3 + global.get $~lib/util/number/_K + i32.add + global.set $~lib/util/number/_K + local.get $0 + local.get $5 + local.get $4 + local.get $1 + local.get $10 + local.get $9 + i32.const 0 + local.get $3 + i32.sub + i32.const 2 + i32.shl + i32.const 1936 + i32.add + i64.load32_u + i64.mul + call $~lib/util/number/grisuRound + local.get $5 ) (func $~lib/util/number/grisu2 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -935,17 +920,11 @@ local.get $4 i64.clz i32.wrap_i64 - local.tee $1 i64.extend_i32_s i64.shl global.get $~lib/util/number/_frc_pow local.tee $4 call $~lib/util/number/umul64f - local.get $5 - local.get $1 - i32.sub - local.get $3 - call $~lib/util/number/umul64e global.get $~lib/util/number/_frc_plus local.get $4 call $~lib/util/number/umul64f @@ -954,7 +933,9 @@ local.tee $6 global.get $~lib/util/number/_exp local.get $3 - call $~lib/util/number/umul64e + i32.add + i32.const -64 + i32.sub local.get $6 global.get $~lib/util/number/_frc_minus local.get $4 @@ -1498,19 +1479,21 @@ i32.const 544106784 i32.store i32.const 2000 - i32.const 2000 - call $~lib/string/String#get:length + i32.const 1996 + i32.load + i32.const 1 + i32.shr_u i32.const 23 call $~lib/string/String.UTF8.encodeUnsafe i32.const 23 i32.add - local.tee $3 + local.tee $2 i32.const 40 i32.store8 local.get $0 call $~lib/util/number/decimalCount32 local.tee $4 - local.get $3 + local.get $2 i32.const 1 i32.add i32.add @@ -1587,76 +1570,73 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) call $~lib/string/String.UTF8.byteLength - local.tee $7 - i32.const 56 - i32.gt_s - local.set $6 - local.get $7 + local.tee $6 i32.const 56 local.get $6 + i32.const 56 + i32.gt_s select i32.const 13 i32.add call $~lib/rt/stub/__alloc - local.tee $7 + local.tee $6 i32.const 8 i32.add local.tee $8 i32.const 4 i32.add - local.set $6 - local.get $7 + local.set $7 local.get $6 + local.get $7 i32.store - local.get $6 + local.get $7 i64.const 9071406388179572 i64.store - local.get $7 + local.get $6 i32.const 7 i32.store offset=4 i32.const 2 - local.get $7 + local.get $6 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write drop - local.get $7 - i32.const 1040 - i32.const 1040 - call $~lib/string/String#get:length local.get $6 + i32.const 1040 + i32.const 1036 + i32.load + i32.const 1 + i32.shr_u + local.get $7 call $~lib/string/String.UTF8.encodeUnsafe i32.store offset=4 i32.const 2 - local.get $7 + local.get $6 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write drop local.get $0 if (result i32) - local.get $6 + local.get $7 i32.const 32 i32.store8 local.get $6 + local.get $7 i32.const 1 i32.add - local.tee $6 + local.tee $7 + local.get $7 local.get $1 call $~lib/util/number/dtoa_stream - local.set $9 local.get $7 - local.get $6 - local.get $9 - local.get $6 call $~lib/string/String.UTF8.encodeUnsafe i32.const 1 i32.add i32.store offset=4 i32.const 2 - local.get $7 + local.get $6 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write @@ -1665,18 +1645,18 @@ i32.const 1 i32.gt_s if - local.get $7 - local.get $6 local.get $6 + local.get $7 + local.get $7 local.get $2 call $~lib/util/number/dtoa_stream - local.get $6 + local.get $7 call $~lib/string/String.UTF8.encodeUnsafe i32.const 1 i32.add i32.store offset=4 i32.const 2 - local.get $7 + local.get $6 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write @@ -1685,18 +1665,18 @@ i32.const 2 i32.gt_s if - local.get $7 - local.get $6 local.get $6 + local.get $7 + local.get $7 local.get $3 call $~lib/util/number/dtoa_stream - local.get $6 + local.get $7 call $~lib/string/String.UTF8.encodeUnsafe i32.const 1 i32.add i32.store offset=4 i32.const 2 - local.get $7 + local.get $6 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write @@ -1705,18 +1685,18 @@ i32.const 3 i32.gt_s if - local.get $7 - local.get $6 local.get $6 + local.get $7 + local.get $7 local.get $4 call $~lib/util/number/dtoa_stream - local.get $6 + local.get $7 call $~lib/string/String.UTF8.encodeUnsafe i32.const 1 i32.add i32.store offset=4 i32.const 2 - local.get $7 + local.get $6 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write @@ -1725,18 +1705,18 @@ i32.const 4 i32.gt_s if - local.get $7 - local.get $6 local.get $6 + local.get $7 + local.get $7 local.get $5 call $~lib/util/number/dtoa_stream - local.get $6 + local.get $7 call $~lib/string/String.UTF8.encodeUnsafe i32.const 1 i32.add i32.store offset=4 i32.const 2 - local.get $7 + local.get $6 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write @@ -1745,29 +1725,29 @@ end end end - local.get $6 + local.get $7 i32.const 1 i32.sub else - local.get $6 + local.get $7 end i32.const 10 i32.store8 - local.get $7 + local.get $6 i32.const 1 i32.store offset=4 i32.const 2 - local.get $7 + local.get $6 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write drop - local.get $7 + local.get $6 i32.const 15 i32.and i32.eqz i32.const 0 - local.get $7 + local.get $6 select i32.eqz if @@ -1776,7 +1756,7 @@ call $~lib/wasi/index/abort unreachable end - local.get $7 + local.get $6 i32.const 16 i32.sub local.tee $0 @@ -1790,7 +1770,7 @@ unreachable end global.get $~lib/rt/stub/offset - local.get $7 + local.get $6 local.get $0 i32.load i32.add diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 2ebe94e386..bd29c156da 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -1,12 +1,11 @@ (module (type $i32_=>_none (func (param i32))) - (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result 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))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result 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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) @@ -112,15 +111,6 @@ i32.const 1 global.set $while/ran ) - (func $~lib/rt/tlsf/SETSL (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=4 - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -156,14 +146,6 @@ i32.add i32.load offset=96 ) - (func $~lib/rt/tlsf/GETSL (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load offset=4 - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -282,9 +264,15 @@ if local.get $0 local.get $3 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $3 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl @@ -292,7 +280,7 @@ i32.xor i32.and local.tee $1 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 local.get $1 i32.eqz if @@ -458,12 +446,12 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $2 local.get $1 i32.const 16 i32.add i32.add - local.get $5 i32.ne if i32.const 0 @@ -553,14 +541,20 @@ i32.store local.get $0 local.get $4 + i32.const 2 + i32.shl + i32.add local.get $0 local.get $4 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 i32.const 1 local.get $2 i32.shl i32.or - call $~lib/rt/tlsf/SETSL + i32.store offset=4 ) (func $~lib/rt/tlsf/addMemory (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -714,10 +708,13 @@ i32.const 23 i32.lt_u if - i32.const 1216 local.get $1 + i32.const 2 + i32.shl + i32.const 1216 + i32.add i32.const 0 - call $~lib/rt/tlsf/SETSL + i32.store offset=4 i32.const 0 local.set $0 loop $for-loop|1 @@ -758,16 +755,16 @@ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 - i32.const 0 - call $~lib/rt/tlsf/GETSL + i32.load offset=4 i32.const -2 i32.and - local.tee $2 + local.tee $1 if (result i32) local.get $0 i32.const 0 - local.get $2 + local.get $1 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -781,8 +778,13 @@ local.get $1 i32.ctz local.tee $1 - call $~lib/rt/tlsf/GETSL + i32.const 2 + i32.shl + i32.add + i32.load offset=4 local.tee $2 + local.set $3 + local.get $2 i32.eqz if i32.const 0 @@ -794,7 +796,7 @@ end local.get $0 local.get $1 - local.get $2 + local.get $3 i32.ctz call $~lib/rt/tlsf/GETHEAD else @@ -830,14 +832,16 @@ i32.eqz if memory.size - local.tee $1 + local.tee $3 + i32.const 16 + i32.shl + local.set $1 + local.get $3 i32.const 16 local.get $0 i32.load offset=1568 local.get $1 i32.const 16 - i32.shl - i32.const 16 i32.sub i32.ne i32.shl @@ -848,9 +852,11 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $1 - local.get $2 i32.gt_s + local.set $1 + local.get $3 + local.get $2 + local.get $1 select memory.grow i32.const 0 @@ -865,7 +871,7 @@ end end local.get $0 - local.get $1 + local.get $3 i32.const 16 i32.shl memory.size @@ -962,22 +968,17 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $while/Ref#constructor (result i32) - (local $0 i32) + (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $1 + local.get $0 i32.const 1216 i32.gt_u if - local.get $1 + local.get $0 i32.const 16 i32.sub - local.tee $0 + local.tee $1 i32.load offset=4 local.tee $2 i32.const -268435456 @@ -996,14 +997,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 local.get $2 i32.const 1 i32.add i32.store offset=4 - local.get $0 + local.get $1 call $~lib/rt/rtrace/onincrement - local.get $0 + local.get $1 i32.load i32.const 1 i32.and @@ -1016,7 +1017,7 @@ unreachable end end - local.get $1 + local.get $0 ) (func $~lib/rt/pure/__release (param $0 i32) local.get $0 @@ -1265,9 +1266,13 @@ global.set $while/ran i32.const 0 local.set $3 - call $while/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $1 - loop $while-continue|05 + loop $while-continue|02 local.get $1 if local.get $3 @@ -1285,14 +1290,18 @@ call $~lib/rt/pure/__release end else - call $while/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $0 local.get $1 call $~lib/rt/pure/__release end local.get $0 local.set $1 - br $while-continue|05 + br $while-continue|02 end end local.get $3 @@ -1333,11 +1342,19 @@ global.set $while/ran i32.const 0 local.set $3 - call $while/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $1 - loop $while-continue|06 + loop $while-continue|05 block $while-break|0 - call $while/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.tee $2 call $~lib/rt/pure/__release local.get $2 @@ -1358,7 +1375,7 @@ local.set $1 br $while-break|0 end - br $while-continue|06 + br $while-continue|05 end end end @@ -1400,14 +1417,14 @@ global.set $while/ran i32.const 0 local.set $3 - loop $while-continue|067 + loop $while-continue|06 local.get $3 i32.const 1 i32.add local.tee $3 i32.const 1 i32.lt_s - br_if $while-continue|067 + br_if $while-continue|06 end i32.const 1 global.set $while/ran From 915fa73f459fde507710009ad359eecbd6a0da2e Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Thu, 7 May 2020 18:58:59 +0300 Subject: [PATCH 3/3] up to 9 --- src/module.ts | 2 +- tests/compiler/do.optimized.wat | 347 +- .../extends-baseaggregate.optimized.wat | 72 +- tests/compiler/for.optimized.wat | 328 +- .../implicit-getter-setter.optimized.wat | 226 +- tests/compiler/issues/1095.optimized.wat | 89 +- tests/compiler/managed-cast.optimized.wat | 142 +- tests/compiler/memory.optimized.wat | 25 +- tests/compiler/object-literal.optimized.wat | 284 +- tests/compiler/rc/local-init.optimized.wat | 62 +- .../rc/logical-and-mismatch.optimized.wat | 134 +- .../rc/logical-or-mismatch.optimized.wat | 134 +- tests/compiler/rc/optimize.optimized.wat | 271 +- tests/compiler/rc/rereturn.optimized.wat | 229 +- .../rc/ternary-mismatch.optimized.wat | 144 +- tests/compiler/resolve-access.optimized.wat | 14 +- tests/compiler/resolve-ternary.optimized.wat | 249 +- .../retain-release-sanity.optimized.wat | 442 +- tests/compiler/retain-return.optimized.wat | 332 +- tests/compiler/runtime-full.optimized.wat | 215 +- .../compiler/std/array-literal.optimized.wat | 277 +- tests/compiler/std/array.optimized.wat | 6913 +++++--- tests/compiler/std/arraybuffer.optimized.wat | 470 +- tests/compiler/std/dataview.optimized.wat | 325 +- tests/compiler/std/map.optimized.wat | 2990 +++- tests/compiler/std/math.optimized.wat | 1196 +- tests/compiler/std/set.optimized.wat | 1863 +- tests/compiler/std/staticarray.optimized.wat | 257 +- .../std/string-casemapping.optimized.wat | 1342 +- .../std/string-encoding.optimized.wat | 512 +- tests/compiler/std/string.optimized.wat | 3498 +++- tests/compiler/std/symbol.optimized.wat | 61 +- tests/compiler/std/typedarray.optimized.wat | 14406 ++++++++++------ tests/compiler/switch.optimized.wat | 166 +- tests/compiler/while.optimized.wat | 448 +- 35 files changed, 25517 insertions(+), 12948 deletions(-) diff --git a/src/module.ts b/src/module.ts index d545a119ad..29da264e0d 100644 --- a/src/module.ts +++ b/src/module.ts @@ -1457,7 +1457,7 @@ export class Module { binaryen._BinaryenSetAlwaysInlineMaxSize( optimizeLevel == 0 && shrinkLevel >= 0 ? 2 - : 7 + : 9 ); binaryen._BinaryenSetFlexibleInlineMaxSize(65); binaryen._BinaryenSetOneCallerInlineMaxSize(80); diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index 6efe15eb06..34794f9177 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -1,7 +1,7 @@ (module + (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) @@ -119,16 +119,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -326,7 +316,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -358,7 +354,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -826,18 +828,15 @@ local.tee $1 i32.eqz if + i32.const 16 memory.size - local.tee $3 + local.tee $2 i32.const 16 i32.shl - local.set $1 - local.get $3 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $1 - i32.const 16 - i32.sub i32.ne i32.shl i32.const 65551 @@ -846,18 +845,18 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - i32.gt_s local.set $1 - local.get $3 local.get $2 local.get $1 + local.get $2 + local.get $1 + i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -866,7 +865,7 @@ end end local.get $0 - local.get $3 + local.get $2 i32.const 16 i32.shl memory.size @@ -951,9 +950,20 @@ i32.and i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.tee $0 local.get $1 - call $~lib/rt/tlsf/GETRIGHT + 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 @@ -1014,7 +1024,167 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (param $0 i32) + (func $do/testRef + (local $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.set $1 + loop $do-continue|0 + local.get $2 + i32.const 1 + i32.add + local.tee $2 + i32.const 10 + i32.eq + if + i32.const 0 + local.set $0 + local.get $1 + if + local.get $1 + i32.const 1216 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + else + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.set $0 + local.get $1 + i32.const 1216 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $0 + local.tee $1 + br_if $do-continue|0 + end + local.get $2 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 1040 + i32.const 150 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + if + i32.const 0 + i32.const 1040 + i32.const 151 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $do/ran + local.get $1 + i32.const 1216 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $do/testRefAutorelease + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.set $0 + loop $do-continue|0 + block $do-break|0 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.const 10 + i32.eq + if + local.get $0 + if + local.get $0 + i32.const 1216 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + i32.const 0 + local.set $0 + br $do-break|0 + end + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $2 + local.get $2 + i32.const 1216 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + br_if $do-continue|0 + end + end + local.get $1 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 1040 + i32.const 170 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + if + i32.const 0 + i32.const 1040 + i32.const 171 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $do/ran local.get $0 i32.const 1216 i32.gt_u @@ -1028,7 +1198,6 @@ (func $start:do (local $0 i32) (local $1 i32) - (local $2 i32) i32.const 0 global.set $do/ran i32.const 10 @@ -1243,65 +1412,7 @@ global.set $do/ran i32.const 0 global.set $do/ran - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.set $0 - loop $do-continue|04 - local.get $2 - i32.const 1 - i32.add - local.tee $2 - i32.const 10 - i32.eq - if - i32.const 0 - local.set $1 - local.get $0 - if - local.get $0 - call $~lib/rt/pure/__release - end - else - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - call $~lib/rt/pure/__release - end - local.get $1 - local.tee $0 - br_if $do-continue|04 - end - local.get $2 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 150 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - if - i32.const 0 - i32.const 1040 - i32.const 151 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $do/ran - local.get $0 - call $~lib/rt/pure/__release + call $do/testRef global.get $do/ran i32.eqz if @@ -1314,67 +1425,7 @@ end i32.const 0 global.set $do/ran - i32.const 0 - local.set $2 - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.set $0 - loop $do-continue|05 - block $do-break|0 - local.get $2 - i32.const 1 - i32.add - local.tee $2 - i32.const 10 - i32.eq - if - local.get $0 - if - local.get $0 - call $~lib/rt/pure/__release - end - i32.const 0 - local.set $0 - br $do-break|0 - end - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $1 - call $~lib/rt/pure/__release - local.get $1 - br_if $do-continue|05 - end - end - local.get $2 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 170 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - if - i32.const 0 - i32.const 1040 - i32.const 171 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $do/ran - local.get $0 - call $~lib/rt/pure/__release + call $do/testRefAutorelease global.get $do/ran i32.eqz if diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index 5d73436993..743fb55d3d 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_none (func (param i32))) - (type $i32_=>_i32 (func (param 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 (func (param i32 i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -43,16 +43,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -250,7 +240,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -282,7 +278,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -869,9 +871,21 @@ i32.and i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $1 + i32.const 16 + i32.add local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -4 + i32.and + i32.add i32.load i32.const -3 i32.and @@ -882,7 +896,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -911,18 +924,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 i32.shl - local.set $5 - local.get $3 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $5 - i32.const 16 - i32.sub i32.ne i32.shl local.get $4 @@ -947,12 +957,12 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 - i32.gt_s - local.set $6 + local.set $5 local.get $3 local.get $5 - local.get $6 + local.get $3 + local.get $5 + i32.gt_s select memory.grow i32.const 0 @@ -1324,8 +1334,16 @@ return end local.get $1 - call $~lib/rt/tlsf/GETRIGHT - local.tee $6 + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $4 + local.set $6 + local.get $4 i32.load local.tee $4 i32.const 1 diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 9e10e3d2d3..30577685a6 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -116,16 +116,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -323,7 +313,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -355,7 +351,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -823,18 +825,15 @@ local.tee $1 i32.eqz if + i32.const 16 memory.size - local.tee $3 + local.tee $2 i32.const 16 i32.shl - local.set $1 - local.get $3 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $1 - i32.const 16 - i32.sub i32.ne i32.shl i32.const 65551 @@ -843,18 +842,18 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - i32.gt_s local.set $1 - local.get $3 local.get $2 local.get $1 + local.get $2 + local.get $1 + i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -863,7 +862,7 @@ end end local.get $0 - local.get $3 + local.get $2 i32.const 16 i32.shl memory.size @@ -948,9 +947,20 @@ i32.and i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.tee $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $0 local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -4 + i32.and + i32.add i32.load i32.const -3 i32.and @@ -1011,12 +1021,89 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 + (func $for/testRef + (local $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.set $1 + loop $for-loop|0 + local.get $1 + if + local.get $2 + i32.const 1 + i32.add + local.tee $2 + i32.const 10 + i32.eq + if + i32.const 0 + local.set $0 + local.get $1 + if + local.get $1 + i32.const 1216 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + else + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.set $0 + local.get $1 + i32.const 1216 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $0 + local.set $1 + br $for-loop|0 + end + end + local.get $2 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 1040 + i32.const 137 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + if + i32.const 0 + i32.const 1040 + i32.const 138 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $for/ran + local.get $1 i32.const 1216 i32.gt_u if - local.get $0 + local.get $1 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -1026,18 +1113,28 @@ (local $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain + local.set $0 call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain local.set $1 - call $~lib/rt/pure/__release + local.get $0 + i32.const 1216 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end loop $for-loop|0 block $for-break0 call $~lib/rt/tlsf/maybeInitialize @@ -1046,20 +1143,34 @@ i32.add call $~lib/rt/pure/__retain local.tee $0 - call $~lib/rt/pure/__release local.get $0 + i32.const 1216 + i32.gt_u if - local.get $2 + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + if + local.get $3 i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 10 i32.eq if local.get $1 if local.get $1 - call $~lib/rt/pure/__release + i32.const 1216 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end i32.const 0 local.set $1 @@ -1071,13 +1182,20 @@ i32.add call $~lib/rt/pure/__retain local.get $1 - call $~lib/rt/pure/__release + i32.const 1216 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.set $1 br $for-loop|0 end end end - local.get $2 + local.get $3 i32.const 10 i32.ne if @@ -1100,27 +1218,32 @@ i32.const 1 global.set $for/ran local.get $1 - call $~lib/rt/pure/__release + i32.const 1216 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $start:for (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $for/ran loop $for-loop|0 - local.get $1 + local.get $0 i32.const 10 i32.lt_s if - 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 $1 + local.get $0 i32.const 10 i32.ne if @@ -1136,20 +1259,20 @@ i32.const 0 global.set $for/ran i32.const 0 - local.set $1 + local.set $0 loop $for-loop|00 - local.get $1 + local.get $0 i32.const 10 i32.lt_s if - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|00 end end - local.get $1 + local.get $0 i32.const 10 i32.ne if @@ -1165,20 +1288,20 @@ i32.const 0 global.set $for/ran i32.const 10 - local.set $1 + local.set $0 loop $for-loop|01 - local.get $1 + local.get $0 i32.const 0 i32.gt_s if - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $for-loop|01 end end - local.get $1 + local.get $0 if i32.const 0 i32.const 1040 @@ -1192,20 +1315,20 @@ i32.const 0 global.set $for/ran i32.const 0 - local.set $1 + local.set $0 loop $for-loop|02 - local.get $1 + local.get $0 i32.const 10 i32.ne if - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|02 end end - local.get $1 + local.get $0 i32.const 10 i32.ne if @@ -1221,15 +1344,15 @@ i32.const 0 global.set $for/ran i32.const 10 - local.set $1 + local.set $0 loop $for-loop|04 - local.get $1 + local.get $0 i32.const 1 i32.sub - local.tee $1 + local.tee $0 br_if $for-loop|04 end - local.get $1 + local.get $0 if i32.const 0 i32.const 1040 @@ -1243,17 +1366,17 @@ i32.const 0 global.set $for/ran i32.const 0 - local.set $1 + local.set $0 loop $for-loop|06 - local.get $1 + local.get $0 i32.const 1 i32.add - local.tee $1 + local.tee $0 i32.const 10 i32.ne br_if $for-loop|06 end - local.get $1 + local.get $0 i32.const 10 i32.ne if @@ -1273,20 +1396,20 @@ i32.const 0 global.set $for/ran i32.const 0 - local.set $1 + local.set $0 loop $for-loop|07 - local.get $1 + local.get $0 i32.const 10 i32.lt_s if - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|07 end end - local.get $1 + local.get $0 i32.const 10 i32.ne if @@ -1322,68 +1445,7 @@ end i32.const 0 global.set $for/ran - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.set $1 - loop $for-loop|03 - local.get $1 - if - local.get $2 - i32.const 1 - i32.add - local.tee $2 - i32.const 10 - i32.eq - if - i32.const 0 - local.set $0 - local.get $1 - if - local.get $1 - call $~lib/rt/pure/__release - end - else - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release - end - local.get $0 - local.set $1 - br $for-loop|03 - end - end - local.get $2 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 137 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - if - i32.const 0 - i32.const 1040 - i32.const 138 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $for/ran - local.get $1 - call $~lib/rt/pure/__release + call $for/testRef global.get $for/ran i32.eqz if diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index 9498a62677..faaee342fa 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -1,12 +1,12 @@ (module (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 (func (param 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_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) @@ -50,16 +50,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -257,7 +247,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -289,7 +285,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -797,11 +799,86 @@ 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 15 + i32.and + if + i32.const 0 + i32.const 1040 + i32.const 357 + 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 32 + 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 16 + i32.add + i32.add + local.tee $1 + local.get $4 + i32.const 16 + 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 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $1 + i32.const 16 + i32.add + 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) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -812,7 +889,6 @@ unreachable end local.get $1 - local.tee $3 i32.const 1073741808 i32.ge_u if @@ -824,20 +900,20 @@ unreachable end local.get $0 - local.get $3 + local.get $1 i32.const 15 i32.add i32.const -16 i32.and - local.tee $1 + local.tee $3 i32.const 16 - local.get $1 + local.get $3 i32.const 16 i32.gt_u select local.tee $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if i32.const 1 @@ -847,21 +923,18 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if + i32.const 16 memory.size - local.tee $1 + local.tee $3 i32.const 16 i32.shl - local.set $5 - local.get $1 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $5 - i32.const 16 - i32.sub i32.ne i32.shl local.get $4 @@ -886,12 +959,12 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 - i32.gt_s - local.set $6 - local.get $1 + local.set $5 + local.get $3 + local.get $5 + local.get $3 local.get $5 - local.get $6 + i32.gt_s select memory.grow i32.const 0 @@ -906,7 +979,7 @@ end end local.get $0 - local.get $1 + local.get $3 i32.const 16 i32.shl memory.size @@ -916,7 +989,7 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if i32.const 0 @@ -928,7 +1001,7 @@ end end end - local.get $1 + local.get $3 i32.load i32.const -4 i32.and @@ -942,81 +1015,25 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 0 i32.store offset=4 - local.get $1 + local.get $3 local.get $2 i32.store offset=8 - local.get $1 local.get $3 + local.get $1 i32.store offset=12 local.get $0 - local.get $1 + local.get $3 call $~lib/rt/tlsf/removeBlock - local.get $1 - i32.load - local.set $2 - local.get $4 - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1040 - i32.const 357 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const -4 - i32.and + local.get $0 + local.get $3 local.get $4 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $4 - local.get $2 - i32.const 2 - i32.and - i32.or - i32.store - local.get $4 - local.get $1 - i32.const 16 - i32.add - i32.add - local.tee $2 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - call $~lib/rt/tlsf/GETRIGHT - local.get $1 - call $~lib/rt/tlsf/GETRIGHT - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $1 + call $~lib/rt/tlsf/prepareBlock + local.get $3 call $~lib/rt/rtrace/onalloc - local.get $1 + local.get $3 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -1152,7 +1169,14 @@ call $~lib/rt/pure/__retain drop local.get $0 - call $~lib/rt/pure/__release + i32.const 1228 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $2 local.get $1 diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index 90813b6b59..430f43707a 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -35,16 +35,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -242,7 +232,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -274,7 +270,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -742,18 +744,15 @@ local.tee $1 i32.eqz if + i32.const 16 memory.size - local.tee $3 + local.tee $2 i32.const 16 i32.shl - local.set $1 - local.get $3 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $1 - i32.const 16 - i32.sub i32.ne i32.shl i32.const 65551 @@ -762,18 +761,18 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - i32.gt_s local.set $1 - local.get $3 local.get $2 local.get $1 + local.get $2 + local.get $1 + i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -782,7 +781,7 @@ end end local.get $0 - local.get $3 + local.get $2 i32.const 16 i32.shl memory.size @@ -867,9 +866,20 @@ i32.and i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.tee $0 local.get $1 - call $~lib/rt/tlsf/GETRIGHT + 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 @@ -930,17 +940,6 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 1260 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) (func $~start (local $0 i32) (local $1 i32) @@ -976,13 +975,27 @@ call $~lib/rt/pure/__retain local.set $2 local.get $1 - call $~lib/rt/pure/__release + i32.const 1260 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 i32.store local.get $0 - call $~lib/rt/pure/__release + i32.const 1260 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/rt/pure/decrement (param $0 i32) (local $1 i32) diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index 90bac99444..3f9d2f519d 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -37,16 +37,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -244,7 +234,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -276,7 +272,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -720,7 +722,6 @@ (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -744,18 +745,15 @@ local.tee $2 i32.eqz if + i32.const 16 memory.size local.tee $2 i32.const 16 i32.shl - local.set $3 - local.get $2 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $3 - i32.const 16 - i32.sub i32.ne i32.shl i32.const 65551 @@ -764,12 +762,12 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - i32.gt_s - local.set $4 + local.set $3 + local.get $2 + local.get $3 local.get $2 local.get $3 - local.get $4 + i32.gt_s select memory.grow i32.const 0 @@ -869,9 +867,20 @@ i32.and i32.store local.get $2 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.tee $0 + local.get $2 + i32.load + i32.const -4 + i32.and + i32.add + local.get $0 local.get $2 - call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -4 + i32.and + i32.add i32.load i32.const -3 i32.and @@ -952,17 +961,6 @@ call $~lib/rt/pure/__retain end ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 1276 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) (func $~lib/rt/__instanceof (param $0 i32) (result i32) local.get $0 i32.const 16 @@ -1003,6 +1001,7 @@ (local $6 i32) (local $7 i32) call $managed-cast/Cat#constructor + local.set $2 call $managed-cast/Cat#constructor local.tee $3 i32.eqz @@ -1075,21 +1074,78 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/pure/__release + local.get $2 + i32.const 1276 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 1276 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 1276 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 1276 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 1276 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 1276 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 1276 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $7 - call $~lib/rt/pure/__release + i32.const 1276 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~start global.get $~started diff --git a/tests/compiler/memory.optimized.wat b/tests/compiler/memory.optimized.wat index b9acc22e85..470eb1382a 100644 --- a/tests/compiler/memory.optimized.wat +++ b/tests/compiler/memory.optimized.wat @@ -1,7 +1,6 @@ (module (type $none_=>_none (func)) (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) "\12\00\00\00\01\00\00\00\01\00\00\00\12\00\00\00m\00e\00m\00o\00r\00y\00.\00t\00s") @@ -16,7 +15,7 @@ (global $memory/ptr (mut i32) (i32.const 1088)) (export "memory" (memory $0)) (start $~start) - (func $memory/test (result i32) + (func $start:memory (local $0 i32) i32.const 1024 i32.const 1024 @@ -26,10 +25,6 @@ i32.add i32.store local.get $0 - ) - (func $start:memory - (local $0 i32) - call $memory/test if i32.const 0 i32.const 1056 @@ -38,7 +33,14 @@ call $~lib/builtins/abort unreachable end - call $memory/test + i32.const 1024 + i32.const 1024 + i32.load + local.tee $0 + i32.const 1 + i32.add + i32.store + local.get $0 i32.const 1 i32.ne if @@ -49,7 +51,14 @@ call $~lib/builtins/abort unreachable end - call $memory/test + i32.const 1024 + i32.const 1024 + i32.load + local.tee $0 + i32.const 1 + i32.add + i32.store + local.get $0 i32.const 2 i32.ne if diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index b8f62c00d1..f10c318c35 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -1,13 +1,13 @@ (module (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 (func (param i32 i32 i32) (result 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))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -42,16 +42,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -249,7 +239,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -281,7 +277,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -789,11 +791,86 @@ 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 15 + i32.and + if + i32.const 0 + i32.const 1088 + i32.const 357 + 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 32 + 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 16 + i32.add + i32.add + local.tee $1 + local.get $4 + i32.const 16 + 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 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $1 + i32.const 16 + i32.add + 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) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -804,7 +881,6 @@ unreachable end local.get $1 - local.tee $3 i32.const 1073741808 i32.ge_u if @@ -816,20 +892,20 @@ unreachable end local.get $0 - local.get $3 + local.get $1 i32.const 15 i32.add i32.const -16 i32.and - local.tee $1 + local.tee $3 i32.const 16 - local.get $1 + local.get $3 i32.const 16 i32.gt_u select local.tee $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if i32.const 1 @@ -839,21 +915,18 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if + i32.const 16 memory.size - local.tee $1 + local.tee $3 i32.const 16 i32.shl - local.set $5 - local.get $1 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $5 - i32.const 16 - i32.sub i32.ne i32.shl local.get $4 @@ -878,12 +951,12 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 - i32.gt_s - local.set $6 - local.get $1 + local.set $5 + local.get $3 + local.get $5 + local.get $3 local.get $5 - local.get $6 + i32.gt_s select memory.grow i32.const 0 @@ -898,7 +971,7 @@ end end local.get $0 - local.get $1 + local.get $3 i32.const 16 i32.shl memory.size @@ -908,7 +981,7 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if i32.const 0 @@ -920,7 +993,7 @@ end end end - local.get $1 + local.get $3 i32.load i32.const -4 i32.and @@ -934,81 +1007,25 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 0 i32.store offset=4 - local.get $1 + local.get $3 local.get $2 i32.store offset=8 - local.get $1 local.get $3 + local.get $1 i32.store offset=12 local.get $0 - local.get $1 + local.get $3 call $~lib/rt/tlsf/removeBlock - local.get $1 - i32.load - local.set $2 - local.get $4 - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1088 - i32.const 357 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const -4 - i32.and + local.get $0 + local.get $3 local.get $4 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $4 - local.get $2 - i32.const 2 - i32.and - i32.or - i32.store - local.get $4 - local.get $1 - i32.const 16 - i32.add - i32.add - local.tee $2 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - call $~lib/rt/tlsf/GETRIGHT - local.get $1 - call $~lib/rt/tlsf/GETRIGHT - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $1 + call $~lib/rt/tlsf/prepareBlock + local.get $3 call $~lib/rt/rtrace/onalloc - local.get $1 + local.get $3 ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) @@ -1061,17 +1078,6 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 1432 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -1479,7 +1485,15 @@ end local.get $0 i32.load offset=4 - call $~lib/rt/pure/__release + local.tee $1 + i32.const 1432 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $~lib/rt/tlsf/maybeInitialize local.get $0 i32.const 16 @@ -1857,19 +1871,19 @@ call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.tee $0 + local.tee $1 i32.const 0 i32.store - local.get $0 + local.get $1 i32.const 0 i32.store offset=4 - local.get $0 + local.get $1 i32.const 123 i32.store - local.get $0 + local.get $1 call $~lib/string/String#substring i32.store offset=4 - local.get $0 + local.get $1 call $object-literal/testUnmanaged call $~lib/rt/tlsf/maybeInitialize i32.const 65 @@ -2085,13 +2099,41 @@ local.get $1 call $object-literal/testOmittedFoo local.get $3 - call $~lib/rt/pure/__release + i32.const 1432 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 1432 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1432 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 1432 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~start global.get $~started diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index 65aa21ec96..38faa7d7a4 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_=>_none (func (param i32))) - (type $i32_=>_i32 (func (param 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 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -34,16 +34,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -241,7 +231,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -273,7 +269,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -741,18 +743,15 @@ local.tee $1 i32.eqz if + i32.const 16 memory.size - local.tee $3 + local.tee $2 i32.const 16 i32.shl - local.set $1 - local.get $3 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $1 - i32.const 16 - i32.sub i32.ne i32.shl i32.const 65551 @@ -761,18 +760,18 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - i32.gt_s local.set $1 - local.get $3 local.get $2 local.get $1 + local.get $2 + local.get $1 + i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -781,7 +780,7 @@ end end local.get $0 - local.get $3 + local.get $2 i32.const 16 i32.shl memory.size @@ -866,9 +865,20 @@ i32.and i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.tee $0 local.get $1 - call $~lib/rt/tlsf/GETRIGHT + 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 diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index 922338bd13..058346effa 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -1,9 +1,9 @@ (module (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) @@ -34,16 +34,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -241,7 +231,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -273,7 +269,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -741,18 +743,15 @@ local.tee $1 i32.eqz if + i32.const 16 memory.size - local.tee $3 + local.tee $2 i32.const 16 i32.shl - local.set $1 - local.get $3 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $1 - i32.const 16 - i32.sub i32.ne i32.shl i32.const 65551 @@ -761,18 +760,18 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - i32.gt_s local.set $1 - local.get $3 local.get $2 local.get $1 + local.get $2 + local.get $1 + i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -781,7 +780,7 @@ end end local.get $0 - local.get $3 + local.get $2 i32.const 16 i32.shl memory.size @@ -866,9 +865,20 @@ i32.and i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.tee $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $0 local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -4 + i32.and + i32.add i32.load i32.const -3 i32.and @@ -929,18 +939,7 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 1184 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~start + (func $start:rc/logical-and-mismatch (local $0 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock @@ -956,13 +955,27 @@ local.tee $0 if local.get $0 - call $~lib/rt/pure/__release + i32.const 1184 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $rc/logical-and-mismatch/gloRef call $~lib/rt/pure/__retain local.set $0 end local.get $0 - call $~lib/rt/pure/__release + i32.const 1184 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $rc/logical-and-mismatch/gloRef local.tee $0 if (result i32) @@ -975,7 +988,15 @@ local.get $0 call $~lib/rt/pure/__retain end - call $~lib/rt/pure/__release + local.tee $0 + i32.const 1184 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 @@ -984,7 +1005,14 @@ local.tee $0 if local.get $0 - call $~lib/rt/pure/__release + i32.const 1184 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 @@ -993,9 +1021,27 @@ local.set $0 end local.get $0 - call $~lib/rt/pure/__release + i32.const 1184 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $rc/logical-and-mismatch/gloRef - call $~lib/rt/pure/__release + local.tee $0 + i32.const 1184 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~start + call $start:rc/logical-and-mismatch ) (func $~lib/rt/pure/decrement (param $0 i32) (local $1 i32) diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index 18639e5dbe..06832bb198 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -1,9 +1,9 @@ (module (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) @@ -34,16 +34,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -241,7 +231,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -273,7 +269,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -741,18 +743,15 @@ local.tee $1 i32.eqz if + i32.const 16 memory.size - local.tee $3 + local.tee $2 i32.const 16 i32.shl - local.set $1 - local.get $3 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $1 - i32.const 16 - i32.sub i32.ne i32.shl i32.const 65551 @@ -761,18 +760,18 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - i32.gt_s local.set $1 - local.get $3 local.get $2 local.get $1 + local.get $2 + local.get $1 + i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -781,7 +780,7 @@ end end local.get $0 - local.get $3 + local.get $2 i32.const 16 i32.shl memory.size @@ -866,9 +865,20 @@ i32.and i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.tee $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $0 local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -4 + i32.and + i32.add i32.load i32.const -3 i32.and @@ -929,18 +939,7 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 1184 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~start + (func $start:rc/logical-or-mismatch (local $0 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock @@ -957,13 +956,27 @@ i32.eqz if local.get $0 - call $~lib/rt/pure/__release + i32.const 1184 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $rc/logical-or-mismatch/gloRef call $~lib/rt/pure/__retain local.set $0 end local.get $0 - call $~lib/rt/pure/__release + i32.const 1184 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $rc/logical-or-mismatch/gloRef local.tee $0 if (result i32) @@ -976,7 +989,15 @@ i32.add call $~lib/rt/pure/__retain end - call $~lib/rt/pure/__release + local.tee $0 + i32.const 1184 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 @@ -986,7 +1007,14 @@ i32.eqz if local.get $0 - call $~lib/rt/pure/__release + i32.const 1184 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 @@ -995,9 +1023,27 @@ local.set $0 end local.get $0 - call $~lib/rt/pure/__release + i32.const 1184 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $rc/logical-or-mismatch/gloRef - call $~lib/rt/pure/__release + local.tee $0 + i32.const 1184 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~start + call $start:rc/logical-or-mismatch ) (func $~lib/rt/pure/decrement (param $0 i32) (local $1 i32) diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 62229dd6ca..ebbd81e46a 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -2,10 +2,10 @@ (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 (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 (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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -124,16 +124,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -331,7 +321,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -363,7 +359,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -871,11 +873,86 @@ 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 15 + i32.and + if + i32.const 0 + i32.const 1088 + i32.const 357 + 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 32 + 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 16 + i32.add + i32.add + local.tee $1 + local.get $4 + i32.const 16 + 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 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $1 + i32.const 16 + i32.add + 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) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -886,7 +963,6 @@ unreachable end local.get $1 - local.tee $3 i32.const 1073741808 i32.ge_u if @@ -898,20 +974,20 @@ unreachable end local.get $0 - local.get $3 + local.get $1 i32.const 15 i32.add i32.const -16 i32.and - local.tee $1 + local.tee $3 i32.const 16 - local.get $1 + local.get $3 i32.const 16 i32.gt_u select local.tee $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if i32.const 1 @@ -921,21 +997,18 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if + i32.const 16 memory.size - local.tee $1 + local.tee $3 i32.const 16 i32.shl - local.set $5 - local.get $1 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $5 - i32.const 16 - i32.sub i32.ne i32.shl local.get $4 @@ -960,12 +1033,12 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 - i32.gt_s - local.set $6 - local.get $1 + local.set $5 + local.get $3 + local.get $5 + local.get $3 local.get $5 - local.get $6 + i32.gt_s select memory.grow i32.const 0 @@ -980,7 +1053,7 @@ end end local.get $0 - local.get $1 + local.get $3 i32.const 16 i32.shl memory.size @@ -990,7 +1063,7 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if i32.const 0 @@ -1002,7 +1075,7 @@ end end end - local.get $1 + local.get $3 i32.load i32.const -4 i32.and @@ -1016,81 +1089,25 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 0 i32.store offset=4 - local.get $1 + local.get $3 local.get $2 i32.store offset=8 - local.get $1 local.get $3 + local.get $1 i32.store offset=12 local.get $0 - local.get $1 + local.get $3 call $~lib/rt/tlsf/removeBlock - local.get $1 - i32.load - local.set $2 - local.get $4 - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1088 - i32.const 357 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const -4 - i32.and + local.get $0 + local.get $3 local.get $4 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $4 - local.get $2 - i32.const 2 - i32.and - i32.or - i32.store - local.get $4 - local.get $1 - i32.const 16 - i32.add - i32.add - local.tee $2 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - call $~lib/rt/tlsf/GETRIGHT - local.get $1 - call $~lib/rt/tlsf/GETRIGHT - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $1 + call $~lib/rt/tlsf/prepareBlock + local.get $3 call $~lib/rt/rtrace/onalloc - local.get $1 + local.get $3 ) (func $rc/optimize/getRef (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -1101,17 +1118,6 @@ i32.add call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 1204 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) (func $rc/optimize/eliminated_rr (param $0 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize i32.const 0 @@ -1135,13 +1141,20 @@ ) (func $rc/optimize/OptimizeARC.keeps.partialRetains (param $0 i32) (param $1 i32) local.get $1 - if (result i32) + if local.get $0 call $~lib/rt/pure/__retain - else + local.set $0 + end + local.get $0 + i32.const 1204 + i32.gt_u + if local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - call $~lib/rt/pure/__release ) (func $rc/optimize/OptimizeARC.keeps.reachesReturn (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -1153,15 +1166,34 @@ return end local.get $0 - call $~lib/rt/pure/__release + i32.const 1204 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 ) (func $rc/optimize/FinalizeARC.eliminates.unnecessaryAllocation + (local $0 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 1 i32.const 0 call $~lib/rt/tlsf/allocateBlock - drop + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 1204 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $rc/optimize/FinalizeARC.keeps.dynamicRetain (param $0 i32) local.get $0 @@ -1170,7 +1202,14 @@ ) (func $rc/optimize/FinalizeARC.keeps.dynamicRelease (param $0 i32) local.get $0 - call $~lib/rt/pure/__release + i32.const 1204 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/rt/pure/decrement (param $0 i32) (local $1 i32) diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index 9fff994434..f09ba07013 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -2,12 +2,12 @@ (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 $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_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1024) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") @@ -37,16 +37,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -244,7 +234,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -276,7 +272,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -784,11 +786,86 @@ 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 15 + i32.and + if + i32.const 0 + i32.const 1040 + i32.const 357 + 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 32 + 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 16 + i32.add + i32.add + local.tee $1 + local.get $4 + i32.const 16 + 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 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $1 + i32.const 16 + i32.add + 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) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -799,7 +876,6 @@ unreachable end local.get $1 - local.tee $3 i32.const 1073741808 i32.ge_u if @@ -811,20 +887,20 @@ unreachable end local.get $0 - local.get $3 + local.get $1 i32.const 15 i32.add i32.const -16 i32.and - local.tee $1 + local.tee $3 i32.const 16 - local.get $1 + local.get $3 i32.const 16 i32.gt_u select local.tee $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if i32.const 1 @@ -834,21 +910,18 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if + i32.const 16 memory.size - local.tee $1 + local.tee $3 i32.const 16 i32.shl - local.set $5 - local.get $1 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $5 - i32.const 16 - i32.sub i32.ne i32.shl local.get $4 @@ -873,12 +946,12 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 - i32.gt_s - local.set $6 - local.get $1 + local.set $5 + local.get $3 local.get $5 - local.get $6 + local.get $3 + local.get $5 + i32.gt_s select memory.grow i32.const 0 @@ -893,7 +966,7 @@ end end local.get $0 - local.get $1 + local.get $3 i32.const 16 i32.shl memory.size @@ -903,7 +976,7 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if i32.const 0 @@ -915,7 +988,7 @@ end end end - local.get $1 + local.get $3 i32.load i32.const -4 i32.and @@ -929,79 +1002,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 0 i32.store offset=4 - local.get $1 + local.get $3 local.get $2 i32.store offset=8 - local.get $1 local.get $3 + local.get $1 i32.store offset=12 local.get $0 - local.get $1 + local.get $3 call $~lib/rt/tlsf/removeBlock - local.get $1 - i32.load - local.set $2 - local.get $4 - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1040 - i32.const 357 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const -4 - i32.and + local.get $0 + local.get $3 local.get $4 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $4 - local.get $2 - i32.const 2 - i32.and - i32.or - i32.store - local.get $4 - local.get $1 - i32.const 16 - i32.add - i32.add - local.tee $2 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - call $~lib/rt/tlsf/GETRIGHT - local.get $1 - call $~lib/rt/tlsf/GETRIGHT - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $1 + call $~lib/rt/tlsf/prepareBlock + local.get $3 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -1072,11 +1089,23 @@ end ) (func $~start + (local $0 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 3 call $~lib/rt/tlsf/allocateBlock - drop + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 1220 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/rt/pure/__collect nop diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index 3aa3efbd71..f19bfca958 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -36,16 +36,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -243,7 +233,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -275,7 +271,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -743,18 +745,15 @@ local.tee $1 i32.eqz if + i32.const 16 memory.size - local.tee $3 + local.tee $2 i32.const 16 i32.shl - local.set $1 - local.get $3 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $1 - i32.const 16 - i32.sub i32.ne i32.shl i32.const 65551 @@ -763,18 +762,18 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - i32.gt_s local.set $1 - local.get $3 local.get $2 local.get $1 + local.get $2 + local.get $1 + i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -783,7 +782,7 @@ end end local.get $0 - local.get $3 + local.get $2 i32.const 16 i32.shl memory.size @@ -868,9 +867,20 @@ i32.and i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.tee $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $0 local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -4 + i32.and + i32.add i32.load i32.const -3 i32.and @@ -944,17 +954,6 @@ call $~lib/rt/pure/__retain end ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 1184 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) (func $rc/ternary-mismatch/test2 (param $0 i32) (result i32) local.get $0 if (result i32) @@ -969,26 +968,73 @@ end ) (func $~start + (local $0 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain global.set $rc/ternary-mismatch/gloRef - i32.const 1 - call $rc/ternary-mismatch/test1 - call $~lib/rt/pure/__release - i32.const 0 - call $rc/ternary-mismatch/test1 - call $~lib/rt/pure/__release - i32.const 1 - call $rc/ternary-mismatch/test2 - call $~lib/rt/pure/__release - i32.const 0 - call $rc/ternary-mismatch/test2 - call $~lib/rt/pure/__release + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 1184 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $rc/ternary-mismatch/gloRef - call $~lib/rt/pure/__release + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 1184 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + global.get $rc/ternary-mismatch/gloRef + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 1184 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 1184 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + global.get $rc/ternary-mismatch/gloRef + local.tee $0 + i32.const 1184 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/rt/pure/decrement (param $0 i32) (local $1 i32) diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index 9e43d0320c..726786e136 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -498,7 +498,7 @@ i64.load call $~lib/util/number/utoa64 ) - (func $resolve-access/Container#constructor (result i32) + (func $resolve-access/fieldAccess (result i32) (local $0 i32) i32.const 8 i32.const 5 @@ -507,11 +507,6 @@ i64.const 0 i64.store local.get $0 - ) - (func $resolve-access/fieldAccess (result i32) - (local $0 i32) - call $resolve-access/Container#constructor - local.tee $0 i64.const 1 i64.store local.get $0 @@ -522,8 +517,13 @@ (local $0 i32) (local $1 i32) (local $2 i32) - call $resolve-access/Container#constructor + i32.const 8 + i32.const 5 + call $~lib/rt/stub/__alloc local.tee $0 + i64.const 0 + i64.store + local.get $0 i64.const 1 i64.store local.get $0 diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 510c6a9ae0..0f374852f0 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -1,13 +1,13 @@ (module (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 (func (param i32 i32 i32) (result i32))) (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 (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 (func (param i32) (result i32))) (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) (type $i32_i64_i64_i32_i64_=>_i32 (func (param i32 i64 i64 i32 i64) (result i32))) (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) @@ -59,16 +59,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -266,7 +256,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -298,7 +294,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -806,11 +808,86 @@ 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 15 + i32.and + if + i32.const 0 + i32.const 1040 + i32.const 357 + 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 32 + 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 16 + i32.add + i32.add + local.tee $1 + local.get $4 + i32.const 16 + 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 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $1 + i32.const 16 + i32.add + 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) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -821,7 +898,6 @@ unreachable end local.get $1 - local.tee $3 i32.const 1073741808 i32.ge_u if @@ -833,20 +909,20 @@ unreachable end local.get $0 - local.get $3 + local.get $1 i32.const 15 i32.add i32.const -16 i32.and - local.tee $1 + local.tee $3 i32.const 16 - local.get $1 + local.get $3 i32.const 16 i32.gt_u select local.tee $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if i32.const 1 @@ -856,21 +932,18 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if + i32.const 16 memory.size - local.tee $1 + local.tee $3 i32.const 16 i32.shl - local.set $5 - local.get $1 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $5 - i32.const 16 - i32.sub i32.ne i32.shl local.get $4 @@ -895,12 +968,12 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 - i32.gt_s - local.set $6 - local.get $1 + local.set $5 + local.get $3 local.get $5 - local.get $6 + local.get $3 + local.get $5 + i32.gt_s select memory.grow i32.const 0 @@ -915,7 +988,7 @@ end end local.get $0 - local.get $1 + local.get $3 i32.const 16 i32.shl memory.size @@ -925,7 +998,7 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if i32.const 0 @@ -937,7 +1010,7 @@ end end end - local.get $1 + local.get $3 i32.load i32.const -4 i32.and @@ -951,79 +1024,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 0 i32.store offset=4 - local.get $1 + local.get $3 local.get $2 i32.store offset=8 - local.get $1 local.get $3 + local.get $1 i32.store offset=12 local.get $0 - local.get $1 + local.get $3 call $~lib/rt/tlsf/removeBlock - local.get $1 - i32.load - local.set $2 - local.get $4 - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1040 - i32.const 357 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const -4 - i32.and + local.get $0 + local.get $3 local.get $4 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $4 - local.get $2 - i32.const 2 - i32.and - i32.or - i32.store - local.get $4 - local.get $1 - i32.const 16 - i32.add - i32.add - local.tee $2 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - call $~lib/rt/tlsf/GETRIGHT - local.get $1 - call $~lib/rt/tlsf/GETRIGHT - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $1 + call $~lib/rt/tlsf/prepareBlock + local.get $3 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -2282,24 +2299,23 @@ (local $1 i32) i32.const 1 call $~lib/util/number/decimalCount32 - local.tee $0 + local.tee $1 i32.const 1 i32.shl - local.set $1 + local.set $0 call $~lib/rt/tlsf/maybeInitialize - local.get $1 + local.get $0 i32.const 1 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.tee $1 + local.tee $0 i32.const 1 - local.get $0 - call $~lib/util/number/utoa32_core local.get $1 - call $~lib/rt/pure/__retain - local.tee $0 + call $~lib/util/number/utoa32_core local.get $0 + call $~lib/rt/pure/__retain + local.tee $1 i32.const 1232 call $~lib/string/String.__eq i32.eqz @@ -2324,9 +2340,24 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/pure/__release + local.get $1 + i32.const 2444 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 2444 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/rt/pure/__collect nop diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index f67d649bb4..9229d9d07f 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -1,9 +1,9 @@ (module (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 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))) @@ -49,16 +49,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -256,7 +246,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -288,7 +284,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -875,9 +877,21 @@ i32.and i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $1 + i32.const 16 + i32.add local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -4 + i32.and + i32.add i32.load i32.const -3 i32.and @@ -888,7 +902,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -917,18 +930,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 i32.shl - local.set $5 - local.get $3 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $5 - i32.const 16 - i32.sub i32.ne i32.shl local.get $4 @@ -953,12 +963,12 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 - i32.gt_s - local.set $6 + local.set $5 local.get $3 local.get $5 - local.get $6 + local.get $3 + local.get $5 + i32.gt_s select memory.grow i32.const 0 @@ -1248,17 +1258,6 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 1652 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) (local $1 i32) local.get $0 @@ -1515,8 +1514,16 @@ return end local.get $1 - call $~lib/rt/tlsf/GETRIGHT - local.tee $6 + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $4 + local.set $6 + local.get $4 i32.load local.tee $4 i32.const 1 @@ -1682,7 +1689,14 @@ i32.ne if local.get $1 - call $~lib/rt/pure/__release + i32.const 1652 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end i32.const 1424 local.set $1 @@ -1710,7 +1724,14 @@ i32.eqz if local.get $1 - call $~lib/rt/pure/__release + i32.const 1652 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 1344 return end @@ -1732,7 +1753,14 @@ local.get $4 call $~lib/util/memory/memmove local.get $1 - call $~lib/rt/pure/__release + i32.const 1652 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 ) (func $start:retain-release-sanity @@ -1748,7 +1776,7 @@ call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.tee $2 + local.tee $0 i32.const 12 call $~lib/util/memory/memset call $~lib/rt/tlsf/maybeInitialize @@ -1770,24 +1798,32 @@ local.get $3 i32.const 0 i32.store offset=12 - local.get $2 - local.tee $0 + local.get $0 + local.set $1 + local.get $0 local.get $3 i32.load local.tee $4 i32.ne if - local.get $0 + local.get $1 call $~lib/rt/pure/__retain - local.set $0 + local.set $1 local.get $4 - call $~lib/rt/pure/__release + i32.const 1652 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 - local.get $0 + local.get $1 i32.store local.get $3 - local.get $2 + local.get $0 i32.store offset=4 local.get $3 i32.const 12 @@ -1801,7 +1837,7 @@ call $~lib/array/Array#push local.get $3 i32.load offset=12 - local.tee $2 + local.tee $0 i32.const 1 i32.lt_s if @@ -1814,27 +1850,34 @@ end local.get $3 i32.load offset=4 - local.get $2 + local.get $0 i32.const 1 i32.sub - local.tee $2 + local.tee $0 i32.const 2 i32.shl i32.add i32.load drop local.get $3 - local.get $2 + local.get $0 i32.store offset=12 local.get $3 - call $~lib/rt/pure/__release + i32.const 1652 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 0 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.tee $2 + local.tee $0 i32.const 0 call $~lib/util/memory/memset call $~lib/rt/tlsf/maybeInitialize @@ -1856,24 +1899,32 @@ local.get $3 i32.const 0 i32.store offset=12 - local.get $2 - local.tee $0 + local.get $0 + local.set $1 + local.get $0 local.get $3 i32.load local.tee $4 i32.ne if - local.get $0 + local.get $1 call $~lib/rt/pure/__retain - local.set $0 + local.set $1 local.get $4 - call $~lib/rt/pure/__release + i32.const 1652 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 - local.get $0 + local.get $1 i32.store local.get $3 - local.get $2 + local.get $0 i32.store offset=4 local.get $3 i32.const 0 @@ -1881,9 +1932,8 @@ local.get $3 i32.const 0 i32.store offset=12 - local.get $3 loop $for-loop|0 - local.get $1 + local.get $2 i32.const 10 i32.lt_s if @@ -1893,7 +1943,7 @@ call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.tee $2 + local.tee $1 i32.const 0 call $~lib/util/memory/memset call $~lib/rt/tlsf/maybeInitialize @@ -1903,98 +1953,137 @@ i32.const 16 i32.add call $~lib/rt/pure/__retain - local.tee $3 + local.tee $0 i32.const 0 i32.store - local.get $3 + local.get $0 i32.const 0 i32.store offset=4 - local.get $3 + local.get $0 i32.const 0 i32.store offset=8 - local.get $3 + local.get $0 i32.const 0 i32.store offset=12 - local.get $2 - local.tee $0 - local.get $3 + local.get $1 + local.set $4 + local.get $1 + local.get $0 i32.load local.tee $5 i32.ne if - local.get $0 + local.get $4 call $~lib/rt/pure/__retain - local.set $0 + local.set $4 local.get $5 - call $~lib/rt/pure/__release + i32.const 1652 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $3 local.get $0 + local.get $4 i32.store - local.get $3 - local.get $2 + local.get $0 + local.get $1 i32.store offset=4 - local.get $3 + local.get $0 i32.const 0 i32.store offset=8 - local.get $3 + local.get $0 i32.const 0 i32.store offset=12 i32.const 0 - local.set $0 + local.set $1 loop $for-loop|1 - local.get $0 + local.get $1 i32.const 10 i32.lt_s if - local.get $3 - local.get $3 + local.get $0 + local.get $0 i32.load offset=12 - local.tee $2 + local.tee $4 i32.const 1 i32.add local.tee $5 call $~lib/array/ensureSize - local.get $3 + local.get $0 i32.load offset=4 - local.get $2 + local.get $4 i32.const 2 i32.shl i32.add i32.const 1344 i32.store - local.get $3 + local.get $0 local.get $5 i32.store offset=12 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|1 end end - local.get $3 - call $~lib/rt/pure/__release - local.get $1 + local.get $0 + i32.const 1652 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|0 end end - call $~lib/rt/pure/__release + local.get $3 + i32.const 1652 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 1360 i32.const 1392 call $~lib/string/String#concat - local.tee $1 + local.tee $3 i32.const 1424 - local.get $1 + local.get $3 select i32.const 1456 call $~lib/string/String#concat - local.get $1 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + local.set $2 + local.get $3 + i32.const 1652 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 1652 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $~lib/rt/tlsf/maybeInitialize i32.const 4 i32.const 6 @@ -2002,7 +2091,7 @@ i32.const 16 i32.add call $~lib/rt/pure/__retain - local.tee $2 + local.tee $0 i32.const 0 i32.store call $~lib/rt/tlsf/maybeInitialize @@ -2015,109 +2104,164 @@ local.tee $3 i32.const 0 i32.store + local.get $0 + local.set $4 local.get $3 - local.tee $0 - local.get $2 local.tee $1 + local.get $0 i32.load - local.tee $4 + local.tee $2 i32.ne if - local.get $0 + local.get $1 call $~lib/rt/pure/__retain - local.set $0 - local.get $4 - call $~lib/rt/pure/__release + local.set $1 + local.get $2 + i32.const 1652 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end + local.get $4 local.get $1 - local.get $0 i32.store - local.get $1 - local.set $0 local.get $3 - local.tee $1 - local.get $0 + local.tee $2 + local.get $4 i32.load - local.tee $4 + local.tee $1 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $4 - call $~lib/rt/pure/__release + local.set $2 + local.get $1 + i32.const 1652 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $0 - local.get $1 + local.get $4 + local.get $2 i32.store - local.get $0 - local.tee $1 + local.get $4 + local.tee $2 local.get $3 - local.tee $0 + local.tee $1 i32.load local.tee $4 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 + local.set $2 local.get $4 - call $~lib/rt/pure/__release + i32.const 1652 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $0 local.get $1 - i32.store local.get $2 - local.tee $1 + i32.store local.get $0 + local.tee $2 + local.get $1 i32.load local.tee $4 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 + local.set $2 local.get $4 - call $~lib/rt/pure/__release + i32.const 1652 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $0 local.get $1 + local.get $2 i32.store local.get $3 - local.get $2 - local.tee $1 + local.get $0 + local.tee $2 i32.load local.tee $4 i32.ne if - local.get $0 + local.get $1 call $~lib/rt/pure/__retain - local.set $0 + local.set $1 local.get $4 - call $~lib/rt/pure/__release + i32.const 1652 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end + local.get $2 local.get $1 - local.get $0 i32.store - local.get $2 + local.get $0 local.get $3 i32.load - local.tee $0 + local.tee $1 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - call $~lib/rt/pure/__release + local.set $2 + local.get $1 + i32.const 1652 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 - local.get $1 - i32.store local.get $2 - call $~lib/rt/pure/__release + i32.store + local.get $0 + i32.const 1652 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 1652 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $~lib/rt/pure/__collect ) (func $~start diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index a5272ed2ce..ee7e13ad86 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -1,9 +1,9 @@ (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_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) @@ -32,16 +32,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -239,7 +229,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -271,7 +267,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -739,18 +741,15 @@ local.tee $1 i32.eqz if + i32.const 16 memory.size - local.tee $3 + local.tee $2 i32.const 16 i32.shl - local.set $1 - local.get $3 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $1 - i32.const 16 - i32.sub i32.ne i32.shl i32.const 65551 @@ -759,18 +758,18 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - i32.gt_s local.set $1 - local.get $3 local.get $2 local.get $1 + local.get $2 + local.get $1 + i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -779,7 +778,7 @@ end end local.get $0 - local.get $3 + local.get $2 i32.const 16 i32.shl memory.size @@ -864,9 +863,20 @@ i32.and i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.tee $0 local.get $1 - call $~lib/rt/tlsf/GETRIGHT + 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 @@ -926,51 +936,275 @@ (func $~setArgumentsLength (param $0 i32) nop ) - (func $~start + (func $start:retain-return (local $0 i32) - global.get $~started - if - return - else - i32.const 1 - global.set $~started - end + (local $1 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock - drop + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 1184 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock - drop + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 1184 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock - drop + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 1184 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock - drop + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 1184 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain global.set $retain-return/ref + global.get $retain-return/ref + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 1184 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + global.get $retain-return/ref + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 1184 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock - drop + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 1184 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock - drop + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 1184 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + global.get $retain-return/ref + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 1184 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + global.get $retain-return/ref + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 1184 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + global.get $retain-return/ref + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 1184 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + global.get $retain-return/ref + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 1184 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock - drop + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 1184 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock - drop + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 1184 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock - drop + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 1184 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock - drop + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 1184 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + global.get $retain-return/ref + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 1184 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + global.get $retain-return/ref + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 1184 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $retain-return/ref local.tee $0 if @@ -987,6 +1221,16 @@ 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) diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index fed0922ce2..af680e6c28 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -1,13 +1,13 @@ (module (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 $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 $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1024) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") @@ -36,16 +36,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -243,7 +233,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -275,7 +271,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -783,11 +785,86 @@ 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 15 + i32.and + if + i32.const 0 + i32.const 1040 + i32.const 357 + 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 32 + 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 16 + i32.add + i32.add + local.tee $1 + local.get $4 + i32.const 16 + 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 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $1 + i32.const 16 + i32.add + 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) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -798,7 +875,6 @@ unreachable end local.get $1 - local.tee $3 i32.const 1073741808 i32.ge_u if @@ -810,20 +886,20 @@ unreachable end local.get $0 - local.get $3 + local.get $1 i32.const 15 i32.add i32.const -16 i32.and - local.tee $1 + local.tee $3 i32.const 16 - local.get $1 + local.get $3 i32.const 16 i32.gt_u select local.tee $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if i32.const 1 @@ -833,21 +909,18 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if + i32.const 16 memory.size - local.tee $1 + local.tee $3 i32.const 16 i32.shl - local.set $5 - local.get $1 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $5 - i32.const 16 - i32.sub i32.ne i32.shl local.get $4 @@ -872,12 +945,12 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 - i32.gt_s - local.set $6 - local.get $1 + local.set $5 + local.get $3 local.get $5 - local.get $6 + local.get $3 + local.get $5 + i32.gt_s select memory.grow i32.const 0 @@ -892,7 +965,7 @@ end end local.get $0 - local.get $1 + local.get $3 i32.const 16 i32.shl memory.size @@ -902,7 +975,7 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if i32.const 0 @@ -914,7 +987,7 @@ end end end - local.get $1 + local.get $3 i32.load i32.const -4 i32.and @@ -928,79 +1001,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 0 i32.store offset=4 - local.get $1 + local.get $3 local.get $2 i32.store offset=8 - local.get $1 local.get $3 + local.get $1 i32.store offset=12 local.get $0 - local.get $1 + local.get $3 call $~lib/rt/tlsf/removeBlock - local.get $1 - i32.load - local.set $2 - local.get $4 - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1040 - i32.const 357 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const -4 - i32.and + local.get $0 + local.get $3 local.get $4 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $4 - local.get $2 - i32.const 2 - i32.and - i32.or - i32.store - local.get $4 - local.get $1 - i32.const 16 - i32.add - i32.add - local.tee $2 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - call $~lib/rt/tlsf/GETRIGHT - local.get $1 - call $~lib/rt/tlsf/GETRIGHT - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $1 + call $~lib/rt/tlsf/prepareBlock + local.get $3 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 7cf4fef24d..a5d04368d8 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -4,10 +4,10 @@ (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 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_=>_none (func (param i32 i32 i32))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -88,16 +88,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -295,7 +285,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -327,7 +323,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -835,11 +837,86 @@ 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 15 + i32.and + if + i32.const 0 + i32.const 1392 + i32.const 357 + 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 32 + 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 16 + i32.add + i32.add + local.tee $1 + local.get $4 + i32.const 16 + 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 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $1 + i32.const 16 + i32.add + 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) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -850,7 +927,6 @@ unreachable end local.get $1 - local.tee $3 i32.const 1073741808 i32.ge_u if @@ -862,20 +938,20 @@ unreachable end local.get $0 - local.get $3 + local.get $1 i32.const 15 i32.add i32.const -16 i32.and - local.tee $1 + local.tee $3 i32.const 16 - local.get $1 + local.get $3 i32.const 16 i32.gt_u select local.tee $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if i32.const 1 @@ -885,21 +961,18 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if + i32.const 16 memory.size - local.tee $1 + local.tee $3 i32.const 16 i32.shl - local.set $5 - local.get $1 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $5 - i32.const 16 - i32.sub i32.ne i32.shl local.get $4 @@ -924,12 +997,12 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 - i32.gt_s - local.set $6 - local.get $1 + local.set $5 + local.get $3 + local.get $5 + local.get $3 local.get $5 - local.get $6 + i32.gt_s select memory.grow i32.const 0 @@ -944,7 +1017,7 @@ end end local.get $0 - local.get $1 + local.get $3 i32.const 16 i32.shl memory.size @@ -954,7 +1027,7 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if i32.const 0 @@ -966,7 +1039,7 @@ end end end - local.get $1 + local.get $3 i32.load i32.const -4 i32.and @@ -980,81 +1053,25 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 0 i32.store offset=4 - local.get $1 + local.get $3 local.get $2 i32.store offset=8 - local.get $1 local.get $3 + local.get $1 i32.store offset=12 local.get $0 - local.get $1 + local.get $3 call $~lib/rt/tlsf/removeBlock - local.get $1 - i32.load - local.set $2 - local.get $4 - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1392 - i32.const 357 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const -4 - i32.and + local.get $0 + local.get $3 local.get $4 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $4 - local.get $2 - i32.const 2 - i32.and - i32.or - i32.store - local.get $4 - local.get $1 - i32.const 16 - i32.add - i32.add - local.tee $2 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - call $~lib/rt/tlsf/GETRIGHT - local.get $1 - call $~lib/rt/tlsf/GETRIGHT - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $1 + call $~lib/rt/tlsf/prepareBlock + local.get $3 call $~lib/rt/rtrace/onalloc - local.get $1 + local.get $3 ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) @@ -1139,17 +1156,6 @@ i32.store offset=12 local.get $2 ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 1536 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) (func $start:std/array-literal (local $0 i32) (local $1 i32) @@ -1510,13 +1516,45 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 - call $~lib/rt/pure/__release + local.tee $0 + i32.const 1536 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array-literal/dynamicArrayI32 - call $~lib/rt/pure/__release + local.tee $0 + i32.const 1536 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array-literal/dynamicArrayRef - call $~lib/rt/pure/__release + local.tee $0 + i32.const 1536 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array-literal/dynamicArrayRefWithCtor - call $~lib/rt/pure/__release + local.tee $0 + i32.const 1536 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 1 i32.const 2 i32.const 6 @@ -1533,7 +1571,14 @@ call $~lib/rt/pure/__retain i32.store local.get $0 - call $~lib/rt/pure/__release + i32.const 1536 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~start call $start:std/array-literal diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index ac99d0ea92..0c33743dd1 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -2,14 +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_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (type $none_=>_f64 (func (result f64))) (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_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i64_=>_i32 (func (param i64) (result i32))) (type $i32_i32_i64_i64_i64_i64_=>_none (func (param i32 i32 i64 i64 i64 i64))) @@ -241,7 +241,6 @@ (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) (global $std/array/i (mut i32) (i32.const 0)) - (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/math/random_seeded (mut i32) (i32.const 0)) (global $~lib/math/random_state0_64 (mut i64) (i64.const 0)) (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) @@ -270,16 +269,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -477,7 +466,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -509,7 +504,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -1096,9 +1097,21 @@ i32.and i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $1 + i32.const 16 + i32.add local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -4 + i32.and + i32.add i32.load i32.const -3 i32.and @@ -1109,7 +1122,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1137,18 +1149,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 i32.shl - local.set $5 - local.get $3 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $5 - i32.const 16 - i32.sub i32.ne i32.shl local.get $4 @@ -1173,12 +1182,12 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 - i32.gt_s - local.set $6 + local.set $5 local.get $3 local.get $5 - local.get $6 + local.get $3 + local.get $5 + i32.gt_s select memory.grow i32.const 0 @@ -1482,17 +1491,6 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 9744 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) (func $~lib/array/Array#constructor (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -1554,7 +1552,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $5 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 local.get $2 @@ -2154,8 +2159,16 @@ return end local.get $1 - call $~lib/rt/tlsf/GETRIGHT - local.tee $6 + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $4 + local.set $6 + local.get $4 i32.load local.tee $4 i32.const 1 @@ -2766,16 +2779,6 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#__unchecked_get (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - call $~lib/rt/pure/__retain - ) (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 @@ -2790,13 +2793,25 @@ unreachable end local.get $0 + i32.load offset=4 local.get $1 - call $~lib/array/Array#__unchecked_get + i32.const 2 + i32.shl + i32.add + i32.load + call $~lib/rt/pure/__retain local.tee $0 i32.eqz if local.get $0 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 4928 i32.const 1088 i32.const 108 @@ -2898,8 +2913,13 @@ unreachable end local.get $0 + i32.load offset=4 local.get $1 - call $~lib/array/Array#__unchecked_get + i32.const 2 + i32.shl + i32.add + i32.load + call $~lib/rt/pure/__retain ) (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -2943,8 +2963,7 @@ i32.eqz ) (func $~setArgumentsLength (param $0 i32) - local.get $0 - global.set $~argumentsLength + nop ) (func $~lib/array/Array#findIndex (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -2972,8 +2991,7 @@ i32.shl i32.add i32.load - i32.const 3 - global.set $~argumentsLength + local.tee $3 local.get $2 local.get $0 local.get $1 @@ -3048,8 +3066,7 @@ i32.shl i32.add i32.load - i32.const 3 - global.set $~argumentsLength + local.tee $3 local.get $2 local.get $0 local.get $1 @@ -3125,8 +3142,7 @@ i32.shl i32.add i32.load - i32.const 3 - global.set $~argumentsLength + local.tee $3 local.get $2 local.get $0 local.get $1 @@ -3202,8 +3218,7 @@ i32.shl i32.add i32.load - i32.const 3 - global.set $~argumentsLength + local.tee $3 local.get $2 local.get $0 local.get $1 @@ -3401,8 +3416,6 @@ i32.add i32.load local.set $7 - i32.const 3 - global.set $~argumentsLength local.get $3 local.get $6 i32.add @@ -3477,10 +3490,7 @@ i32.shl i32.add i32.load - local.set $3 - i32.const 3 - global.set $~argumentsLength - local.get $3 + local.tee $3 local.get $2 local.get $0 local.get $1 @@ -3556,6 +3566,7 @@ select i32.lt_s if + local.get $2 local.get $0 i32.load offset=4 local.get $3 @@ -3563,11 +3574,7 @@ i32.shl i32.add i32.load - local.set $4 - i32.const 4 - global.set $~argumentsLength - local.get $2 - local.get $4 + local.tee $4 local.get $3 local.get $0 local.get $1 @@ -3627,6 +3634,7 @@ i32.const 0 i32.ge_s if + local.get $2 local.get $0 i32.load offset=4 local.get $3 @@ -3634,11 +3642,6 @@ i32.shl i32.add i32.load - local.set $4 - i32.const 4 - global.set $~argumentsLength - local.get $2 - local.get $4 local.get $3 local.get $0 local.get $1 @@ -3751,84 +3754,6 @@ unreachable end ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 f32) - (local $5 f32) - (local $6 i32) - loop $for-loop|0 - local.get $6 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $5 - local.get $6 - i32.const 1 - i32.sub - local.set $3 - loop $while-continue|1 - local.get $3 - i32.const 0 - i32.ge_s - if - block $while-break|1 - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $4 - i32.const 2 - global.set $~argumentsLength - local.get $5 - local.get $4 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 - i32.ge_s - br_if $while-break|1 - local.get $3 - local.tee $2 - i32.const 1 - i32.sub - local.set $3 - local.get $0 - local.get $2 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $4 - f32.store - br $while-continue|1 - end - end - end - local.get $0 - local.get $3 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $5 - f32.store - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|0 - end - end - ) (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -3902,18 +3827,14 @@ i32.shl i32.add f32.load - local.set $4 + local.tee $4 local.get $0 local.get $3 i32.const 2 i32.shl i32.add f32.load - local.set $6 - i32.const 2 - global.set $~argumentsLength - local.get $4 - local.get $6 + local.tee $6 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s @@ -4018,18 +3939,14 @@ if local.get $0 f32.load - local.set $4 + local.tee $4 local.get $0 local.get $1 i32.const 2 i32.shl i32.add f32.load - local.set $6 - i32.const 2 - global.set $~argumentsLength - local.get $4 - local.get $6 + local.tee $6 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s @@ -4120,116 +4037,38 @@ i32.lt_s i32.sub ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) + (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) - (local $5 f64) - (local $6 i32) + (local $5 i32) + (local $6 f64) + (local $7 i32) + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + i32.const 31 + i32.add + i32.const 5 + i32.shr_u + i32.const 2 + i32.shl + local.tee $2 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $5 + i32.const 0 + local.get $2 + call $~lib/util/memory/memset + local.get $1 + i32.const 1 + i32.sub + local.set $3 loop $for-loop|0 - local.get $6 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $6 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $5 - local.get $6 - i32.const 1 - i32.sub - local.set $3 - loop $while-continue|1 - local.get $3 - i32.const 0 - i32.ge_s - if - block $while-break|1 - local.get $0 - local.get $3 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $4 - i32.const 2 - global.set $~argumentsLength - local.get $5 - local.get $4 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 - i32.ge_s - br_if $while-break|1 - local.get $3 - local.tee $2 - i32.const 1 - i32.sub - local.set $3 - local.get $0 - local.get $2 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - local.get $4 - f64.store - br $while-continue|1 - end - end - end - local.get $0 - local.get $3 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - local.get $5 - f64.store - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|0 - end - end - ) - (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 f64) - (local $5 i32) - (local $6 f64) - (local $7 i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $1 - i32.const 31 - i32.add - i32.const 5 - i32.shr_u - i32.const 2 - i32.shl - local.tee $2 - i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $5 - i32.const 0 - local.get $2 - call $~lib/util/memory/memset - local.get $1 - i32.const 1 - i32.sub - local.set $3 - loop $for-loop|0 - local.get $3 - i32.const 0 - i32.gt_s + local.get $3 + i32.const 0 + i32.gt_s if local.get $3 local.set $2 @@ -4271,18 +4110,14 @@ i32.shl i32.add f64.load - local.set $4 + local.tee $4 local.get $0 local.get $3 i32.const 3 i32.shl i32.add f64.load - local.set $6 - i32.const 2 - global.set $~argumentsLength - local.get $4 - local.get $6 + local.tee $6 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s @@ -4387,18 +4222,14 @@ if local.get $0 f64.load - local.set $4 + local.tee $4 local.get $0 local.get $1 i32.const 3 i32.shl i32.add f64.load - local.set $6 - i32.const 2 - global.set $~argumentsLength - local.get $4 - local.get $6 + local.tee $6 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s @@ -4510,85 +4341,6 @@ i32.add f64.load ) - (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) - loop $for-loop|0 - local.get $7 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $7 - i32.const 2 - i32.shl - i32.add - i32.load - local.set $6 - local.get $7 - i32.const 1 - i32.sub - local.set $4 - loop $while-continue|1 - local.get $4 - i32.const 0 - i32.ge_s - if - block $while-break|1 - local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load - local.set $5 - i32.const 2 - global.set $~argumentsLength - local.get $6 - local.get $5 - local.get $2 - call_indirect (type $i32_i32_=>_i32) - i32.const 0 - i32.ge_s - br_if $while-break|1 - local.get $4 - local.tee $3 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.get $3 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.store - br $while-continue|1 - end - end - end - local.get $0 - local.get $4 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|0 - end - end - ) (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -4662,18 +4414,14 @@ i32.shl i32.add i32.load - local.set $3 + local.tee $3 local.get $0 local.get $4 i32.const 2 i32.shl i32.add i32.load - local.set $6 - i32.const 2 - global.set $~argumentsLength - local.get $3 - local.get $6 + local.tee $6 local.get $2 call_indirect (type $i32_i32_=>_i32) i32.const 0 @@ -4779,18 +4527,14 @@ if local.get $0 i32.load - local.set $3 + local.tee $3 local.get $0 local.get $1 i32.const 2 i32.shl i32.add i32.load - local.set $6 - i32.const 2 - global.set $~argumentsLength - local.get $3 - local.get $6 + local.tee $6 local.get $2 call_indirect (type $i32_i32_=>_i32) i32.const 0 @@ -4857,6 +4601,10 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) local.get $0 i32.load offset=12 local.tee $3 @@ -4869,30 +4617,26 @@ end local.get $0 i32.load offset=4 - local.set $4 + local.set $2 local.get $3 i32.const 2 i32.eq if - local.get $4 + local.get $2 i32.load offset=4 - local.set $3 - local.get $4 - i32.load - local.set $2 - i32.const 2 - global.set $~argumentsLength - local.get $3 + local.tee $3 local.get $2 + i32.load + local.tee $5 local.get $1 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $4 local.get $2 + local.get $5 i32.store offset=4 - local.get $4 + local.get $2 local.get $3 i32.store end @@ -4901,61 +4645,128 @@ return end local.get $3 - local.tee $2 i32.const 256 i32.lt_s if - local.get $4 - local.get $2 - local.get $1 - call $~lib/util/sort/insertionSort - else - local.get $4 - local.get $2 - local.get $1 - call $~lib/util/sort/weakHeapSort - end - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.sub - ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.gt_u - local.get $0 - local.get $1 - i32.lt_u - i32.sub - ) - (func $std/array/createReverseOrderedArray (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - call $~lib/array/Array#constructor - local.set $2 - loop $for-loop|0 + local.get $3 + local.set $5 local.get $1 - local.get $0 - i32.lt_s - if - local.get $2 - local.get $1 - local.get $0 - i32.const 1 - i32.sub - local.get $1 - i32.sub - call $~lib/array/Array#__set - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 + local.set $7 + loop $for-loop|0 + local.get $4 + local.get $5 + i32.lt_s + if + local.get $2 + 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 $1 + loop $while-continue|1 + local.get $1 + i32.const 0 + i32.ge_s + if + local.get $6 + local.get $2 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $8 + local.get $7 + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.lt_s + if + local.get $1 + local.tee $3 + i32.const 1 + i32.sub + local.set $1 + local.get $2 + local.get $3 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $8 + i32.store + br $while-continue|1 + end + end + end + local.get $2 + local.get $1 + 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 + else + local.get $2 + local.get $3 + local.get $1 + call $~lib/util/sort/weakHeapSort + end + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.sub + ) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.gt_u + local.get $0 + local.get $1 + i32.lt_u + i32.sub + ) + (func $std/array/createReverseOrderedArray (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + call $~lib/array/Array#constructor + local.set $2 + loop $for-loop|0 + local.get $1 + local.get $0 + i32.lt_s + if + local.get $2 + local.get $1 + local.get $0 + i32.const 1 + i32.sub + local.get $1 + i32.sub + call $~lib/array/Array#__set + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 end end local.get $2 @@ -5036,46 +4847,39 @@ (local $5 i32) (local $6 i32) block $__inlined_func$std/array/isSorted (result i32) + i32.const 1 + local.set $2 local.get $0 local.get $1 call $~lib/array/Array#sort - local.tee $2 - local.set $3 - i32.const 1 - local.set $0 - local.get $2 + local.tee $0 + local.tee $3 i32.load offset=12 local.set $4 loop $for-loop|0 - local.get $0 + local.get $2 local.get $4 i32.lt_s if + i32.const 0 local.get $3 - local.get $0 + local.get $2 i32.const 1 i32.sub call $~lib/array/Array#__get - local.set $5 local.get $3 - local.get $0 + local.get $2 call $~lib/array/Array#__get - local.set $6 - i32.const 2 - global.set $~argumentsLength - i32.const 0 - local.get $5 - local.get $6 local.get $1 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.gt_s br_if $__inlined_func$std/array/isSorted drop - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end @@ -5090,8 +4894,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 - call $~lib/rt/pure/__release + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $start:std/array~anonymous|44 (param $0 i32) (param $1 i32) (result i32) local.get $1 @@ -5127,25 +4938,134 @@ i32.store offset=12 end local.get $2 - local.tee $3 local.get $0 i32.load offset=4 local.get $1 i32.const 2 i32.shl i32.add - local.tee $0 - i32.load local.tee $1 + i32.load + local.tee $0 i32.ne if - local.get $0 - local.get $3 + local.get $1 + local.get $2 call $~lib/rt/pure/__retain i32.store + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + ) + (func $std/array/createReverseOrderedNestedArray (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 8 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $0 + i32.const 0 + i32.const 8 + call $~lib/util/memory/memset + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $2 + i32.const 0 + i32.store + local.get $2 + i32.const 0 + i32.store offset=4 + local.get $2 + i32.const 0 + i32.store offset=8 + local.get $2 + i32.const 0 + i32.store offset=12 + local.get $0 + local.set $1 + local.get $0 + local.get $2 + i32.load + local.tee $4 + i32.ne + if local.get $1 - call $~lib/rt/pure/__release + call $~lib/rt/pure/__retain + local.set $1 + local.get $4 + i32.const 9744 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + i32.const 8 + i32.store offset=8 + local.get $2 + 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 $0 + i32.const 0 + i32.const 1 + local.get $3 + i32.sub + call $~lib/array/Array#__set + local.get $2 + local.get $3 + local.get $0 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end end + local.get $2 ) (func $start:std/array~anonymous|47 (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -5160,9 +5080,13 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) local.get $0 i32.load offset=12 - local.tee $2 + local.tee $5 i32.const 1 i32.le_s if @@ -5172,105 +5096,193 @@ end local.get $0 i32.load offset=4 - local.set $3 - local.get $2 + local.set $2 + local.get $5 i32.const 2 i32.eq if - local.get $3 + local.get $2 i32.load offset=4 - local.set $2 - local.get $3 - i32.load - local.set $4 - i32.const 2 - global.set $~argumentsLength + local.tee $3 local.get $2 - local.get $4 + i32.load + local.tee $5 local.get $1 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $3 - local.get $4 + local.get $2 + local.get $5 i32.store offset=4 - local.get $3 local.get $2 + local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain return end - local.get $3 local.get $2 + local.set $3 local.get $1 - call $~lib/util/sort/insertionSort + local.set $7 + loop $for-loop|0 + local.get $4 + local.get $5 + i32.lt_s + if + local.get $3 + 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 $1 + loop $while-continue|1 + local.get $1 + i32.const 0 + i32.ge_s + if + local.get $6 + local.get $3 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $8 + local.get $7 + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.lt_s + if + local.get $1 + local.tee $2 + i32.const 1 + i32.sub + local.set $1 + local.get $3 + local.get $2 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $8 + i32.store + br $while-continue|1 + end + end + end + local.get $3 + local.get $1 + 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 $0 call $~lib/rt/pure/__retain ) - (func $std/array/assertSorted<~lib/array/Array> (param $0 i32) (param $1 i32) + (func $std/array/isSorted<~lib/array/Array> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - block $__inlined_func$std/array/isSorted<~lib/array/Array> (result i32) - local.get $0 - local.get $1 - call $~lib/array/Array<~lib/array/Array>#sort - local.tee $4 - local.set $5 - i32.const 1 - local.set $0 - local.get $4 - i32.load offset=12 - local.set $6 - loop $for-loop|0 + i32.const 1 + local.set $2 + local.get $0 + i32.load offset=12 + local.set $5 + loop $for-loop|0 + local.get $2 + local.get $5 + i32.lt_s + if local.get $0 - local.get $6 - i32.lt_s + local.get $2 + i32.const 1 + i32.sub + call $~lib/array/Array#__get + local.tee $3 + local.get $0 + local.get $2 + call $~lib/array/Array#__get + local.tee $4 + local.get $1 + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.gt_s if - local.get $5 - local.get $0 - i32.const 1 - i32.sub - call $~lib/array/Array#__get - local.set $2 - local.get $5 - local.get $0 - call $~lib/array/Array#__get - local.set $3 - i32.const 2 - global.set $~argumentsLength - local.get $2 local.get $3 - local.get $1 - call_indirect (type $i32_i32_=>_i32) - i32.const 0 - i32.gt_s + i32.const 9744 + i32.gt_u if - local.get $2 - call $~lib/rt/pure/__release local.get $3 - call $~lib/rt/pure/__release - i32.const 0 - br $__inlined_func$std/array/isSorted<~lib/array/Array> + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $2 - call $~lib/rt/pure/__release + local.get $4 + i32.const 9744 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 0 + return + end + local.get $3 + i32.const 9744 + i32.gt_u + if local.get $3 - call $~lib/rt/pure/__release - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end + local.get $4 + i32.const 9744 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - i32.const 1 end + i32.const 1 + ) + (func $std/array/assertSorted<~lib/array/Array> (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/array/Array>#sort + local.tee $0 + local.get $1 + call $std/array/isSorted<~lib/array/Array> i32.eqz if i32.const 0 @@ -5280,8 +5292,15 @@ call $~lib/builtins/abort unreachable end - local.get $4 - call $~lib/rt/pure/__release + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/array/createReverseOrderedElementsArray (result i32) (local $0 i32) @@ -5330,7 +5349,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $4 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $2 local.get $1 @@ -5366,7 +5392,14 @@ local.get $0 call $~lib/array/Array<~lib/array/Array>#__set local.get $0 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 i32.const 1 i32.add @@ -5383,47 +5416,124 @@ i32.load i32.sub ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isSorted<~lib/string/String | null> (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) (local $3 i32) (local $4 i32) + i32.const 1 + local.set $1 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 + i32.load offset=12 + local.set $4 + loop $for-loop|0 + local.get $1 + local.get $4 + i32.lt_s + if local.get $0 - i64.load local.get $1 - i64.load - i64.eq + i32.const 1 + i32.sub + call $~lib/array/Array#__get + local.tee $2 + local.get $0 + local.get $1 + call $~lib/array/Array#__get + local.tee $3 + call $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 + i32.const 0 + i32.gt_s 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 + i32.const 9744 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 9744 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 0 + return + end + local.get $2 + i32.const 9744 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 9744 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + i32.const 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 @@ -5518,93 +5628,6 @@ end i32.const 0 ) - (func $std/array/assertSorted<~lib/string/String | null>@varargs (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 54 - local.set $2 - end - block $__inlined_func$std/array/isSorted<~lib/string/String | null> (result i32) - i32.const 1 - local.set $1 - local.get $0 - local.get $2 - call $~lib/array/Array<~lib/array/Array>#sort - local.tee $0 - local.set $5 - local.get $0 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 1 - i32.sub - call $~lib/array/Array#__get - local.set $3 - local.get $0 - local.get $1 - call $~lib/array/Array#__get - local.set $4 - i32.const 2 - global.set $~argumentsLength - local.get $3 - local.get $4 - local.get $2 - call_indirect (type $i32_i32_=>_i32) - i32.const 0 - i32.gt_s - if - local.get $3 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - i32.const 0 - br $__inlined_func$std/array/isSorted<~lib/string/String | null> - end - local.get $3 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1 - end - i32.eqz - if - i32.const 0 - i32.const 1296 - i32.const 887 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $5 - call $~lib/rt/pure/__release - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 @@ -5645,6 +5668,92 @@ end i32.const 0 ) + (func $std/array/isArraysEqual<~lib/string/String | null> (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load offset=12 + local.tee $5 + local.get $1 + i32.load offset=12 + i32.ne + if + i32.const 0 + return + end + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + loop $for-loop|0 + local.get $2 + local.get $5 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/array/Array#__get + local.tee $3 + local.get $1 + local.get $2 + call $~lib/array/Array#__get + local.tee $4 + call $~lib/string/String.__eq + i32.eqz + if + local.get $3 + i32.const 9744 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 9744 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 0 + return + end + local.get $3 + i32.const 9744 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 9744 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1 + ) (func $~lib/string/String#concat (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -5659,7 +5768,14 @@ i32.ne if local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end i32.const 6176 local.set $1 @@ -5687,7 +5803,14 @@ i32.eqz if local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 6064 return end @@ -5709,7 +5832,14 @@ local.get $4 call $~lib/util/memory/memmove local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 ) (func $std/array/createRandomString (param $0 i32) (result i32) @@ -5718,18 +5848,13 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 6064 - local.set $1 + local.set $2 loop $for-loop|0 - local.get $4 + local.get $3 local.get $0 i32.lt_s if - local.get $1 - i32.const 6176 - local.get $1 - select block $__inlined_func$~lib/string/String#charAt (result i32) i32.const 6064 call $~lib/math/NativeMath.random @@ -5741,7 +5866,7 @@ f64.mul f64.floor i32.trunc_f64_s - local.tee $2 + local.tee $5 i32.const 5084 i32.load i32.const 1 @@ -5755,43 +5880,70 @@ call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.tee $3 - local.get $2 + local.tee $1 + local.get $5 i32.const 1 i32.shl i32.const 5088 i32.add i32.load16_u i32.store16 - local.get $3 + local.get $1 call $~lib/rt/pure/__retain end - local.tee $5 - call $~lib/string/String#concat - local.tee $2 - local.get $1 - local.tee $3 + local.set $5 local.get $2 local.tee $1 + i32.const 6176 + local.get $1 + select + local.get $5 + call $~lib/string/String#concat + local.tee $4 + local.set $2 + local.get $1 + local.get $4 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $3 - call $~lib/rt/pure/__release + local.set $2 + local.get $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $5 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 + i32.const 9744 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $for-loop|0 end end - local.get $1 + local.get $2 ) (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -6014,7 +6166,14 @@ local.get $0 call $~lib/string/String#substring local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $1 @@ -6292,7 +6451,14 @@ local.get $0 call $~lib/string/String#substring local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $1 @@ -6461,7 +6627,14 @@ local.get $0 call $~lib/string/String#substring local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $1 @@ -7499,7 +7672,14 @@ local.get $0 call $~lib/string/String#substring local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $1 @@ -7512,58 +7692,65 @@ (local $7 i32) (local $8 i32) (local $9 i32) - local.get $2 - local.set $4 local.get $1 i32.const 1 i32.sub - local.tee $6 + local.tee $7 i32.const 0 i32.lt_s if i32.const 6064 return end - local.get $6 + local.get $7 i32.eqz if local.get $0 i32.load - local.tee $5 - if - local.get $5 + local.tee $4 + if (result i32) + local.get $4 call $~lib/rt/pure/__retain - local.set $5 + else + local.get $4 end - local.get $5 + local.tee $0 if (result i32) - local.get $5 + local.get $0 call $~lib/rt/pure/__retain else i32.const 6064 end - local.get $5 - call $~lib/rt/pure/__release + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end i32.const 6064 local.set $1 - local.get $4 + local.get $2 + local.tee $5 i32.const 16 i32.sub i32.load offset=12 i32.const 1 i32.shr_u - local.set $8 + local.set $9 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $4 + local.get $7 i32.lt_s if local.get $3 local.tee $2 local.get $0 - local.get $5 + local.get $4 i32.const 2 i32.shl i32.add @@ -7575,21 +7762,27 @@ call $~lib/rt/pure/__retain local.set $3 local.get $2 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 if - local.get $3 - call $~lib/rt/pure/__retain - local.tee $2 local.get $1 i32.const 6176 local.get $1 select - local.get $2 + local.get $3 + call $~lib/rt/pure/__retain + local.tee $6 call $~lib/string/String#concat local.tee $2 - local.set $9 + local.set $8 local.get $1 local.get $2 i32.ne @@ -7598,24 +7791,47 @@ call $~lib/rt/pure/__retain local.set $2 local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $6 + i32.const 9744 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $8 + i32.const 9744 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - call $~lib/rt/pure/__release - local.get $9 - call $~lib/rt/pure/__release local.get $2 local.set $1 end - local.get $8 + local.get $9 if local.get $1 local.tee $2 i32.const 6176 local.get $1 select - local.get $4 + local.get $5 call $~lib/string/String#concat local.tee $1 + local.set $6 local.get $1 local.get $2 i32.ne @@ -7624,19 +7840,34 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $6 + i32.const 9744 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - call $~lib/rt/pure/__release end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end local.get $0 - local.get $6 + local.get $7 i32.const 2 i32.shl i32.add @@ -7649,21 +7880,27 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $2 if - local.get $2 - call $~lib/rt/pure/__retain - local.tee $0 local.get $1 i32.const 6176 local.get $1 select - local.get $0 + local.get $2 + call $~lib/rt/pure/__retain + local.tee $0 call $~lib/string/String#concat local.tee $3 - local.set $0 + local.set $4 local.get $1 local.get $3 i32.ne @@ -7672,16 +7909,45 @@ call $~lib/rt/pure/__retain local.set $3 local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 9744 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 local.set $1 end local.get $2 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 ) (func $~lib/util/string/joinReferenceArray (param $0 i32) (param $1 i32) (result i32) @@ -7694,14 +7960,14 @@ local.get $1 i32.const 1 i32.sub - local.tee $5 + local.tee $6 i32.const 0 i32.lt_s if i32.const 6064 return end - local.get $5 + local.get $6 i32.eqz if local.get $0 @@ -7713,7 +7979,14 @@ local.set $4 end local.get $4 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 7984 i32.const 6064 local.get $4 @@ -7729,7 +8002,7 @@ local.set $7 loop $for-loop|0 local.get $4 - local.get $5 + local.get $6 i32.lt_s if local.get $3 @@ -7747,7 +8020,14 @@ call $~lib/rt/pure/__retain local.set $3 local.get $2 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 if @@ -7758,6 +8038,7 @@ i32.const 7984 call $~lib/string/String#concat local.tee $2 + local.set $5 local.get $1 local.get $2 i32.ne @@ -7766,9 +8047,24 @@ call $~lib/rt/pure/__retain local.set $2 local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $5 + i32.const 9744 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - call $~lib/rt/pure/__release local.get $2 local.set $1 end @@ -7782,6 +8078,7 @@ i32.const 6304 call $~lib/string/String#concat local.tee $1 + local.set $5 local.get $1 local.get $2 i32.ne @@ -7790,9 +8087,24 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $5 + i32.const 9744 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - call $~lib/rt/pure/__release end local.get $4 i32.const 1 @@ -7802,7 +8114,7 @@ end end local.get $0 - local.get $5 + local.get $6 i32.const 2 i32.shl i32.add @@ -7815,7 +8127,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $2 if @@ -7826,6 +8145,7 @@ i32.const 7984 call $~lib/string/String#concat local.tee $3 + local.set $0 local.get $1 local.get $3 i32.ne @@ -7834,14 +8154,36 @@ call $~lib/rt/pure/__retain local.set $3 local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - call $~lib/rt/pure/__release local.get $3 local.set $1 end local.get $2 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 ) (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -8013,7 +8355,14 @@ local.get $0 call $~lib/string/String#substring local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $1 @@ -8160,7 +8509,14 @@ local.get $0 call $~lib/string/String#substring local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $1 @@ -8440,7 +8796,14 @@ local.get $0 call $~lib/string/String#substring local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $1 @@ -8693,7 +9056,14 @@ local.get $0 call $~lib/string/String#substring local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $1 @@ -8709,14 +9079,14 @@ local.get $1 i32.const 1 i32.sub - local.tee $5 + local.tee $6 i32.const 0 i32.lt_s if i32.const 6064 return end - local.get $5 + local.get $6 i32.eqz if local.get $0 @@ -8739,7 +9109,14 @@ i32.const 6064 end local.get $4 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end i32.const 6064 @@ -8748,10 +9125,10 @@ i32.load i32.const 1 i32.shr_u - local.set $7 + local.set $8 loop $for-loop|0 local.get $4 - local.get $5 + local.get $6 i32.lt_s if local.get $3 @@ -8769,7 +9146,14 @@ call $~lib/rt/pure/__retain local.set $3 local.get $2 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 if @@ -8780,31 +9164,53 @@ i32.const 6304 call $~lib/util/string/joinIntegerArray local.tee $2 + local.set $7 + local.get $1 local.get $1 i32.const 6176 local.get $1 select local.get $2 call $~lib/string/String#concat + local.tee $5 local.tee $2 - local.set $8 - local.get $1 - local.get $2 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $7 + i32.const 9744 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 9744 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release local.get $2 local.set $1 end - local.get $7 + local.get $8 if local.get $1 local.tee $2 @@ -8814,6 +9220,7 @@ i32.const 6304 call $~lib/string/String#concat local.tee $1 + local.set $5 local.get $1 local.get $2 i32.ne @@ -8822,9 +9229,24 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $5 + i32.const 9744 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - call $~lib/rt/pure/__release end local.get $4 i32.const 1 @@ -8834,7 +9256,7 @@ end end local.get $0 - local.get $5 + local.get $6 i32.const 2 i32.shl i32.add @@ -8847,7 +9269,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $2 if @@ -8857,15 +9286,16 @@ i32.load offset=12 i32.const 6304 call $~lib/util/string/joinIntegerArray - local.tee $0 + local.tee $3 + local.set $0 local.get $1 i32.const 6176 local.get $1 select - local.get $0 + local.get $3 call $~lib/string/String#concat local.tee $3 - local.set $0 + local.set $4 local.get $1 local.get $3 i32.ne @@ -8874,16 +9304,45 @@ call $~lib/rt/pure/__retain local.set $3 local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 9744 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 local.set $1 end local.get $2 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 ) (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -9024,7 +9483,14 @@ local.get $0 call $~lib/string/String#substring local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $1 @@ -9040,14 +9506,14 @@ local.get $1 i32.const 1 i32.sub - local.tee $5 + local.tee $6 i32.const 0 i32.lt_s if i32.const 6064 return end - local.get $5 + local.get $6 i32.eqz if local.get $0 @@ -9069,7 +9535,14 @@ i32.const 6064 end local.get $4 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end i32.const 6064 @@ -9078,10 +9551,10 @@ i32.load i32.const 1 i32.shr_u - local.set $7 + local.set $8 loop $for-loop|0 local.get $4 - local.get $5 + local.get $6 i32.lt_s if local.get $3 @@ -9099,7 +9572,14 @@ call $~lib/rt/pure/__retain local.set $3 local.get $2 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 if @@ -9109,31 +9589,53 @@ i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $2 + local.set $7 + local.get $1 local.get $1 i32.const 6176 local.get $1 select local.get $2 call $~lib/string/String#concat + local.tee $5 local.tee $2 - local.set $8 - local.get $1 - local.get $2 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $7 + i32.const 9744 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 9744 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release local.get $2 local.set $1 end - local.get $7 + local.get $8 if local.get $1 local.tee $2 @@ -9143,6 +9645,7 @@ i32.const 6304 call $~lib/string/String#concat local.tee $1 + local.set $5 local.get $1 local.get $2 i32.ne @@ -9151,9 +9654,24 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $5 + i32.const 9744 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - call $~lib/rt/pure/__release end local.get $4 i32.const 1 @@ -9163,7 +9681,7 @@ end end local.get $0 - local.get $5 + local.get $6 i32.const 2 i32.shl i32.add @@ -9176,7 +9694,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $2 if @@ -9185,15 +9710,16 @@ local.get $2 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $0 + local.tee $3 + local.set $0 local.get $1 i32.const 6176 local.get $1 select - local.get $0 + local.get $3 call $~lib/string/String#concat local.tee $3 - local.set $0 + local.set $4 local.get $1 local.get $3 i32.ne @@ -9202,16 +9728,45 @@ call $~lib/rt/pure/__retain local.set $3 local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 9744 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 local.set $1 end local.get $2 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 ) (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (param $0 i32) (param $1 i32) (result i32) @@ -9225,14 +9780,14 @@ local.get $1 i32.const 1 i32.sub - local.tee $5 + local.tee $6 i32.const 0 i32.lt_s if i32.const 6064 return end - local.get $5 + local.get $6 i32.eqz if local.get $0 @@ -9255,7 +9810,14 @@ i32.const 6064 end local.get $4 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end i32.const 6064 @@ -9264,10 +9826,10 @@ i32.load i32.const 1 i32.shr_u - local.set $7 + local.set $8 loop $for-loop|0 local.get $4 - local.get $5 + local.get $6 i32.lt_s if local.get $3 @@ -9285,7 +9847,14 @@ call $~lib/rt/pure/__retain local.set $3 local.get $2 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 if @@ -9296,31 +9865,53 @@ i32.const 6304 call $~lib/util/string/joinIntegerArray local.tee $2 + local.set $7 + local.get $1 local.get $1 i32.const 6176 local.get $1 select local.get $2 call $~lib/string/String#concat + local.tee $5 local.tee $2 - local.set $8 - local.get $1 - local.get $2 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $7 + i32.const 9744 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 9744 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release local.get $2 local.set $1 end - local.get $7 + local.get $8 if local.get $1 local.tee $2 @@ -9330,6 +9921,7 @@ i32.const 6304 call $~lib/string/String#concat local.tee $1 + local.set $5 local.get $1 local.get $2 i32.ne @@ -9338,9 +9930,24 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $5 + i32.const 9744 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - call $~lib/rt/pure/__release end local.get $4 i32.const 1 @@ -9350,7 +9957,7 @@ end end local.get $0 - local.get $5 + local.get $6 i32.const 2 i32.shl i32.add @@ -9363,7 +9970,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $2 if @@ -9373,15 +9987,16 @@ i32.load offset=12 i32.const 6304 call $~lib/util/string/joinIntegerArray - local.tee $0 + local.tee $3 + local.set $0 local.get $1 i32.const 6176 local.get $1 select - local.get $0 + local.get $3 call $~lib/string/String#concat local.tee $3 - local.set $0 + local.set $4 local.get $1 local.get $3 i32.ne @@ -9390,16 +10005,45 @@ call $~lib/rt/pure/__retain local.set $3 local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 9744 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 local.set $1 end local.get $2 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 ) (func $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> (param $0 i32) (param $1 i32) (result i32) @@ -9413,14 +10057,14 @@ local.get $1 i32.const 1 i32.sub - local.tee $5 + local.tee $6 i32.const 0 i32.lt_s if i32.const 6064 return end - local.get $5 + local.get $6 i32.eqz if local.get $0 @@ -9442,7 +10086,14 @@ i32.const 6064 end local.get $4 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end i32.const 6064 @@ -9451,10 +10102,10 @@ i32.load i32.const 1 i32.shr_u - local.set $7 + local.set $8 loop $for-loop|0 local.get $4 - local.get $5 + local.get $6 i32.lt_s if local.get $3 @@ -9472,7 +10123,14 @@ call $~lib/rt/pure/__retain local.set $3 local.get $2 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 if @@ -9482,31 +10140,53 @@ i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> local.tee $2 + local.set $7 + local.get $1 local.get $1 i32.const 6176 local.get $1 select local.get $2 call $~lib/string/String#concat + local.tee $5 local.tee $2 - local.set $8 - local.get $1 - local.get $2 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $7 + i32.const 9744 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 9744 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release local.get $2 local.set $1 end - local.get $7 + local.get $8 if local.get $1 local.tee $2 @@ -9516,6 +10196,7 @@ i32.const 6304 call $~lib/string/String#concat local.tee $1 + local.set $5 local.get $1 local.get $2 i32.ne @@ -9524,9 +10205,24 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $5 + i32.const 9744 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - call $~lib/rt/pure/__release end local.get $4 i32.const 1 @@ -9536,7 +10232,7 @@ end end local.get $0 - local.get $5 + local.get $6 i32.const 2 i32.shl i32.add @@ -9549,7 +10245,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $2 if @@ -9558,15 +10261,16 @@ local.get $2 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $0 + local.tee $3 + local.set $0 local.get $1 i32.const 6176 local.get $1 select - local.get $0 + local.get $3 call $~lib/string/String#concat local.tee $3 - local.set $0 + local.set $4 local.get $1 local.get $3 i32.ne @@ -9575,16 +10279,45 @@ call $~lib/rt/pure/__retain local.set $3 local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 9744 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 local.set $1 end local.get $2 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 ) (func $~lib/array/Array<~lib/array/Array>#flat (param $0 i32) (result i32) @@ -9865,14 +10598,14 @@ (local $33 i32) (local $34 i32) (local $35 i32) - (local $36 i32) - (local $37 i32) + (local $36 f64) + (local $37 f32) (local $38 i32) (local $39 i32) (local $40 i32) (local $41 i32) - (local $42 f64) - (local $43 f32) + (local $42 i32) + (local $43 i32) (local $44 i32) (local $45 i32) (local $46 i32) @@ -9896,6 +10629,7 @@ global.set $std/array/arr i32.const 0 call $std/array/Ref#constructor + local.set $60 call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 5 @@ -9903,7 +10637,7 @@ i32.const 16 i32.add call $~lib/rt/pure/__retain - local.set $61 + local.set $57 call $~lib/rt/tlsf/maybeInitialize i32.const 1 i32.const 0 @@ -9914,7 +10648,7 @@ i32.const 0 i32.const 1 call $~lib/util/memory/memset - local.get $61 + local.get $57 i32.eqz if call $~lib/rt/tlsf/maybeInitialize @@ -9924,37 +10658,44 @@ i32.const 16 i32.add call $~lib/rt/pure/__retain - local.set $61 + local.set $57 end - local.get $61 + local.get $57 i32.const 0 i32.store - local.get $61 + local.get $57 i32.const 0 i32.store offset=4 - local.get $61 + local.get $57 i32.const 0 i32.store offset=8 local.get $0 local.tee $1 - local.get $61 + local.get $57 i32.load - local.tee $57 + local.tee $61 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $57 - call $~lib/rt/pure/__release + local.get $61 + i32.const 9744 + i32.gt_u + if + local.get $61 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $61 + local.get $57 local.get $1 i32.store - local.get $61 + local.get $57 local.get $0 i32.store offset=4 - local.get $61 + local.get $57 i32.const 1 i32.store offset=8 global.get $std/array/arr @@ -9967,29 +10708,52 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/pure/__release - local.get $61 - call $~lib/rt/pure/__release + local.get $60 + i32.const 9744 + i32.gt_u + if + local.get $60 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $57 + i32.const 9744 + i32.gt_u + if + local.get $57 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 5 i32.const 0 i32.const 6 i32.const 1440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $59 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill - call $~lib/rt/pure/__release - local.get $1 - i32.const 5 - i32.const 0 - i32.const 6 - i32.const 1472 - call $~lib/rt/__allocArray + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $59 + i32.const 5 + i32.const 0 + i32.const 6 + i32.const 1472 + call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $58 call $std/array/isArraysEqual i32.eqz if @@ -10000,20 +10764,28 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $59 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill - call $~lib/rt/pure/__release - local.get $1 + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $59 i32.const 5 i32.const 0 i32.const 6 i32.const 1568 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $61 + local.tee $60 call $std/array/isArraysEqual i32.eqz if @@ -10024,20 +10796,28 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $59 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill - call $~lib/rt/pure/__release - local.get $1 + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $59 i32.const 5 i32.const 0 i32.const 6 i32.const 1600 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $61 call $std/array/isArraysEqual i32.eqz if @@ -10048,20 +10828,28 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $59 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill - call $~lib/rt/pure/__release - local.get $1 + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $59 i32.const 5 i32.const 0 i32.const 6 i32.const 1632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $0 call $std/array/isArraysEqual i32.eqz if @@ -10072,20 +10860,28 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $59 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill - call $~lib/rt/pure/__release - local.get $1 + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $59 i32.const 5 i32.const 0 i32.const 6 i32.const 1664 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $54 + local.tee $1 call $std/array/isArraysEqual i32.eqz if @@ -10096,38 +10892,88 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $61 - call $~lib/rt/pure/__release + local.get $59 + i32.const 9744 + i32.gt_u + if + local.get $59 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $58 + i32.const 9744 + i32.gt_u + if + local.get $58 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $60 - call $~lib/rt/pure/__release - local.get $57 - call $~lib/rt/pure/__release - local.get $54 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $60 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $61 + i32.const 9744 + i32.gt_u + if + local.get $61 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 5 i32.const 2 i32.const 7 i32.const 1696 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $59 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill - call $~lib/rt/pure/__release - local.get $1 + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $59 i32.const 5 i32.const 2 i32.const 7 i32.const 1744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $58 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10139,20 +10985,28 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $59 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill - call $~lib/rt/pure/__release - local.get $1 + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $59 i32.const 5 i32.const 2 i32.const 7 i32.const 1792 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $61 + local.tee $60 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10164,20 +11018,28 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $59 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill - call $~lib/rt/pure/__release - local.get $1 + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $59 i32.const 5 i32.const 2 i32.const 7 i32.const 1840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $61 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10189,20 +11051,28 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $59 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill - call $~lib/rt/pure/__release - local.get $1 + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $59 i32.const 5 i32.const 2 i32.const 7 i32.const 1888 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $0 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10214,20 +11084,28 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $59 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill - call $~lib/rt/pure/__release - local.get $1 + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $59 i32.const 5 i32.const 2 i32.const 7 i32.const 1936 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $54 + local.tee $1 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10239,48 +11117,90 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $61 - call $~lib/rt/pure/__release - local.get $60 - call $~lib/rt/pure/__release - local.get $57 - call $~lib/rt/pure/__release - local.get $54 - call $~lib/rt/pure/__release - global.get $std/array/arr - i32.load offset=12 + local.get $59 + i32.const 9744 + i32.gt_u if - i32.const 0 - i32.const 1296 - i32.const 97 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $59 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - global.get $std/array/arr - i32.load - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 2 - i32.shr_s + local.get $58 + i32.const 9744 + i32.gt_u if - i32.const 0 - i32.const 1296 - i32.const 98 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $58 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - global.get $std/array/arr - i32.const 42 - call $~lib/array/Array#push - global.get $std/array/arr - i32.const 0 + local.get $60 + i32.const 9744 + i32.gt_u + if + local.get $60 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $61 + i32.const 9744 + i32.gt_u + if + local.get $61 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + global.get $std/array/arr + i32.load offset=12 + if + i32.const 0 + i32.const 1296 + i32.const 97 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $std/array/arr + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s + if + i32.const 0 + i32.const 1296 + i32.const 98 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $std/array/arr + i32.const 42 + call $~lib/array/Array#push + global.get $std/array/arr + i32.const 0 call $~lib/array/Array#__get i32.const 42 i32.ne @@ -10540,51 +11460,59 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $60 i32.load offset=4 - local.tee $0 + local.tee $1 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $0 + local.get $1 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $1 + local.get $60 i32.load offset=12 local.tee $0 i32.const 0 i32.gt_s if - local.get $1 + local.get $60 i32.load offset=4 - local.tee $60 + local.tee $1 local.get $0 i32.const 2 i32.shl i32.add - local.set $0 + local.set $61 loop $do-continue|0 - local.get $60 + local.get $1 i32.load - call $~lib/rt/pure/__release - local.get $60 + local.tee $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 i32.const 4 i32.add - local.tee $60 - local.get $0 + local.tee $1 + local.get $61 i32.lt_u br_if $do-continue|0 end else - local.get $1 + local.get $60 i32.const 0 call $~lib/array/ensureSize end - local.get $1 + local.get $60 i32.const 0 i32.store offset=12 - local.get $1 + local.get $60 i32.load offset=12 if i32.const 0 @@ -10594,13 +11522,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release + local.get $60 + i32.const 9744 + i32.gt_u + if + local.get $60 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 call $~lib/array/Array#constructor - local.set $0 + local.set $60 global.get $std/array/arr - local.get $0 + local.get $60 call $~lib/array/Array#concat local.set $61 global.get $std/array/arr @@ -10651,9 +11586,17 @@ i32.const 2032 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $0 call $~lib/array/Array#concat - call $~lib/rt/pure/__release + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/arr i32.load i32.const 16 @@ -10710,18 +11653,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $60 i32.const 46 call $~lib/array/Array#push - local.get $0 + local.get $60 i32.const 47 call $~lib/array/Array#push global.get $std/array/arr - local.get $0 + local.get $60 call $~lib/array/Array#concat - local.set $1 + local.set $58 local.get $61 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $61 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/arr i32.load i32.const 16 @@ -10739,7 +11689,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $60 i32.load offset=12 i32.const 2 i32.ne @@ -10751,7 +11701,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $58 i32.load offset=12 i32.const 5 i32.ne @@ -10763,7 +11713,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $58 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -10776,7 +11726,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $58 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -10789,7 +11739,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $58 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -10802,7 +11752,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $58 i32.const 3 call $~lib/array/Array#__get i32.const 46 @@ -10815,7 +11765,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $58 i32.const 4 call $~lib/array/Array#__get i32.const 47 @@ -10828,10 +11778,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $58 call $~lib/array/Array#pop drop - local.get $1 + local.get $58 i32.load offset=12 i32.const 4 i32.ne @@ -10862,10 +11812,17 @@ local.get $61 global.get $std/array/arr call $~lib/array/Array#concat - local.set $60 + local.set $1 + local.get $58 + i32.const 9744 + i32.gt_u + if + local.get $58 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release - local.get $60 i32.load offset=12 i32.const 3 i32.ne @@ -10887,33 +11844,61 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release local.get $60 - call $~lib/rt/pure/__release - local.get $57 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $60 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $61 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $61 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 5 i32.const 2 i32.const 3 i32.const 2064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 0 i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $61 + local.tee $43 i32.const 5 i32.const 2 i32.const 3 i32.const 2112 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $42 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10931,22 +11916,29 @@ i32.const 2160 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - call $~lib/rt/pure/__release + local.set $61 local.get $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $61 i32.const 1 i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $57 + local.tee $41 i32.const 5 i32.const 2 i32.const 3 i32.const 2208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $54 + local.tee $40 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10965,21 +11957,28 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.get $61 + i32.const 9744 + i32.gt_u + if + local.get $61 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 1 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $41 + local.tee $39 i32.const 5 i32.const 2 i32.const 3 i32.const 2304 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $38 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10997,15 +11996,21 @@ i32.const 2352 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 local.get $0 - call $~lib/rt/pure/__release - local.get $1 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const 2 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $56 + local.tee $54 i32.const 5 i32.const 2 i32.const 3 @@ -11030,22 +12035,28 @@ i32.const 2448 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release local.get $0 - i32.const 0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 + i32.const 0 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $55 + local.tee $51 i32.const 5 i32.const 2 i32.const 3 i32.const 2496 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $52 + local.tee $44 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11063,22 +12074,28 @@ i32.const 2544 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 local.get $0 - call $~lib/rt/pure/__release - local.get $1 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const 1 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $50 + local.tee $55 i32.const 5 i32.const 2 i32.const 3 i32.const 2592 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $49 + local.tee $52 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11096,22 +12113,28 @@ i32.const 2640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const 1 i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $33 + local.tee $50 i32.const 5 i32.const 2 i32.const 3 i32.const 2688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $48 + local.tee $49 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11129,22 +12152,28 @@ i32.const 2736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 local.get $0 - call $~lib/rt/pure/__release - local.get $1 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const 0 i32.const -2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $46 + local.tee $48 i32.const 5 i32.const 2 i32.const 3 i32.const 2784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $45 + local.tee $47 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11162,22 +12191,28 @@ i32.const 2832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const 0 i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $47 + local.tee $46 i32.const 5 i32.const 2 i32.const 3 i32.const 2880 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $44 + local.tee $45 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11195,22 +12230,28 @@ i32.const 2928 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 local.get $0 - call $~lib/rt/pure/__release - local.get $1 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const -4 i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - local.tee $40 + local.tee $57 i32.const 5 i32.const 2 i32.const 3 i32.const 2976 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $39 + local.tee $59 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11228,22 +12269,28 @@ i32.const 3024 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const -4 i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $38 + local.tee $58 i32.const 5 i32.const 2 i32.const 3 i32.const 3072 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $37 + local.tee $60 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11263,20 +12310,27 @@ call $~lib/rt/pure/__retain local.set $1 local.get $0 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 i32.const -4 i32.const -3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $0 + local.tee $61 i32.const 5 i32.const 2 i32.const 3 i32.const 3168 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $36 + local.tee $0 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11289,294 +12343,325 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release - local.get $61 - call $~lib/rt/pure/__release - local.get $60 - call $~lib/rt/pure/__release - local.get $57 - call $~lib/rt/pure/__release - local.get $54 - call $~lib/rt/pure/__release - local.get $41 - call $~lib/rt/pure/__release - local.get $58 - call $~lib/rt/pure/__release - local.get $56 - call $~lib/rt/pure/__release - local.get $53 - call $~lib/rt/pure/__release - local.get $55 - call $~lib/rt/pure/__release - local.get $52 - call $~lib/rt/pure/__release - local.get $50 - call $~lib/rt/pure/__release - local.get $49 - call $~lib/rt/pure/__release - local.get $33 - call $~lib/rt/pure/__release - local.get $48 - call $~lib/rt/pure/__release - local.get $46 - call $~lib/rt/pure/__release - local.get $45 - call $~lib/rt/pure/__release - local.get $47 - call $~lib/rt/pure/__release - local.get $44 - call $~lib/rt/pure/__release - local.get $40 - call $~lib/rt/pure/__release - local.get $39 - call $~lib/rt/pure/__release - local.get $38 - call $~lib/rt/pure/__release - local.get $37 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $36 - call $~lib/rt/pure/__release - global.get $std/array/arr - i32.const 42 - call $~lib/array/Array#unshift - global.get $std/array/arr - i32.load offset=12 - i32.const 4 - i32.ne + i32.const 9744 + i32.gt_u if - i32.const 0 - i32.const 1296 - i32.const 222 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - global.get $std/array/arr - i32.load - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 2 - i32.shr_s - i32.const 4 - i32.ne + local.get $43 + i32.const 9744 + i32.gt_u if - i32.const 0 - i32.const 1296 - i32.const 223 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $43 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - global.get $std/array/arr - i32.const 0 - call $~lib/array/Array#__get - i32.const 42 - i32.ne + local.get $42 + i32.const 9744 + i32.gt_u if - i32.const 0 - i32.const 1296 - i32.const 224 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $42 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - global.get $std/array/arr - i32.const 1 - call $~lib/array/Array#__get - i32.const 43 - i32.ne + local.get $41 + i32.const 9744 + i32.gt_u if - i32.const 0 - i32.const 1296 - i32.const 225 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $41 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - global.get $std/array/arr - i32.const 2 - call $~lib/array/Array#__get - i32.const 44 - i32.ne + local.get $40 + i32.const 9744 + i32.gt_u if - i32.const 0 - i32.const 1296 - i32.const 226 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $40 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - global.get $std/array/arr - i32.const 3 - call $~lib/array/Array#__get - i32.const 45 - i32.ne + local.get $39 + i32.const 9744 + i32.gt_u if - i32.const 0 - i32.const 1296 - i32.const 227 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $39 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - global.get $std/array/arr - i32.const 41 - call $~lib/array/Array#unshift - global.get $std/array/arr - i32.load offset=12 - i32.const 5 - i32.ne + local.get $38 + i32.const 9744 + i32.gt_u if - i32.const 0 - i32.const 1296 - i32.const 231 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $38 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $54 + i32.const 9744 + i32.gt_u + if + local.get $54 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $53 + i32.const 9744 + i32.gt_u + if + local.get $53 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $51 + i32.const 9744 + i32.gt_u + if + local.get $51 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $44 + i32.const 9744 + i32.gt_u + if + local.get $44 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $55 + i32.const 9744 + i32.gt_u + if + local.get $55 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $52 + i32.const 9744 + i32.gt_u + if + local.get $52 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $50 + i32.const 9744 + i32.gt_u + if + local.get $50 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $49 + i32.const 9744 + i32.gt_u + if + local.get $49 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $48 + i32.const 9744 + i32.gt_u + if + local.get $48 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $47 + i32.const 9744 + i32.gt_u + if + local.get $47 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $46 + i32.const 9744 + i32.gt_u + if + local.get $46 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $45 + i32.const 9744 + i32.gt_u + if + local.get $45 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $57 + i32.const 9744 + i32.gt_u + if + local.get $57 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $59 + i32.const 9744 + i32.gt_u + if + local.get $59 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $58 + i32.const 9744 + i32.gt_u + if + local.get $58 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $60 + i32.const 9744 + i32.gt_u + if + local.get $60 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $61 + i32.const 9744 + i32.gt_u + if + local.get $61 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end global.get $std/array/arr - i32.load - i32.const 16 - i32.sub + i32.const 42 + call $~lib/array/Array#unshift + global.get $std/array/arr i32.load offset=12 - i32.const 2 - i32.shr_s - i32.const 5 + i32.const 4 i32.ne if i32.const 0 i32.const 1296 - i32.const 232 + i32.const 222 i32.const 3 call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.const 0 - call $~lib/array/Array#__get - i32.const 41 + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s + i32.const 4 i32.ne if i32.const 0 i32.const 1296 - i32.const 233 + i32.const 223 i32.const 3 call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.const 1 + i32.const 0 call $~lib/array/Array#__get i32.const 42 i32.ne if i32.const 0 i32.const 1296 - i32.const 234 + i32.const 224 i32.const 3 call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.const 2 + i32.const 1 call $~lib/array/Array#__get i32.const 43 i32.ne if i32.const 0 i32.const 1296 - i32.const 235 + i32.const 225 i32.const 3 call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.const 3 + i32.const 2 call $~lib/array/Array#__get i32.const 44 i32.ne if i32.const 0 i32.const 1296 - i32.const 236 + i32.const 226 i32.const 3 call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.const 4 + i32.const 3 call $~lib/array/Array#__get i32.const 45 i32.ne if i32.const 0 i32.const 1296 - i32.const 237 + i32.const 227 i32.const 3 call $~lib/builtins/abort unreachable end global.get $std/array/arr - local.tee $0 - i32.load offset=12 - local.tee $61 - i32.const 1 - i32.lt_s - if - i32.const 1984 - i32.const 1088 - i32.const 360 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.tee $1 - i32.load - local.get $1 - local.get $1 - i32.const 4 - i32.add - local.get $61 - i32.const 1 - i32.sub - local.tee $61 - i32.const 2 - i32.shl - local.tee $57 - call $~lib/util/memory/memmove - local.get $1 - local.get $57 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $61 - i32.store offset=12 - global.set $std/array/i - global.get $std/array/i i32.const 41 - i32.ne - if - i32.const 0 - i32.const 1296 - i32.const 246 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + call $~lib/array/Array#unshift global.get $std/array/arr i32.load offset=12 - i32.const 4 + i32.const 5 i32.ne if i32.const 0 i32.const 1296 - i32.const 247 + i32.const 231 i32.const 3 call $~lib/builtins/abort unreachable @@ -11593,7 +12678,7 @@ if i32.const 0 i32.const 1296 - i32.const 248 + i32.const 232 i32.const 3 call $~lib/builtins/abort unreachable @@ -11601,12 +12686,156 @@ global.get $std/array/arr i32.const 0 call $~lib/array/Array#__get - i32.const 42 + i32.const 41 i32.ne if i32.const 0 i32.const 1296 - i32.const 249 + i32.const 233 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $std/array/arr + i32.const 1 + call $~lib/array/Array#__get + i32.const 42 + i32.ne + if + i32.const 0 + i32.const 1296 + i32.const 234 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $std/array/arr + i32.const 2 + call $~lib/array/Array#__get + i32.const 43 + i32.ne + if + i32.const 0 + i32.const 1296 + i32.const 235 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $std/array/arr + i32.const 3 + call $~lib/array/Array#__get + i32.const 44 + i32.ne + if + i32.const 0 + i32.const 1296 + i32.const 236 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $std/array/arr + i32.const 4 + call $~lib/array/Array#__get + i32.const 45 + i32.ne + if + i32.const 0 + i32.const 1296 + i32.const 237 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $std/array/arr + local.tee $60 + i32.load offset=12 + local.tee $1 + i32.const 1 + i32.lt_s + if + i32.const 1984 + i32.const 1088 + i32.const 360 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $60 + i32.load offset=4 + local.tee $58 + i32.load + local.get $58 + local.get $58 + i32.const 4 + i32.add + local.get $1 + i32.const 1 + i32.sub + local.tee $0 + i32.const 2 + i32.shl + local.tee $1 + call $~lib/util/memory/memmove + local.get $1 + local.get $58 + i32.add + i32.const 0 + i32.store + local.get $60 + local.get $0 + i32.store offset=12 + global.set $std/array/i + global.get $std/array/i + i32.const 41 + i32.ne + if + i32.const 0 + i32.const 1296 + i32.const 246 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $std/array/arr + i32.load offset=12 + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1296 + i32.const 247 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $std/array/arr + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1296 + i32.const 248 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + global.get $std/array/arr + i32.const 0 + call $~lib/array/Array#__get + i32.const 42 + i32.ne + if + i32.const 0 + i32.const 1296 + i32.const 249 i32.const 3 call $~lib/builtins/abort unreachable @@ -11733,49 +12962,62 @@ unreachable end global.get $std/array/arr - local.tee $1 + local.tee $61 i32.load offset=12 - local.tee $0 + local.tee $1 if - local.get $1 + local.get $61 i32.load offset=4 - local.set $61 - local.get $1 + local.set $57 + local.get $61 i32.load offset=4 - local.get $0 + local.get $1 i32.const 1 i32.sub i32.const 2 i32.shl i32.add - local.set $60 + local.set $1 loop $while-continue|0 - local.get $61 - local.get $60 + local.get $57 + local.get $1 i32.lt_u if - local.get $61 + local.get $57 i32.load local.set $0 - local.get $61 - local.get $60 + local.get $57 + local.get $1 i32.load i32.store - local.get $60 + local.get $1 local.get $0 i32.store - local.get $61 + local.get $57 i32.const 4 i32.add - local.set $61 - local.get $60 + local.set $57 + local.get $1 i32.const 4 i32.sub - local.set $60 + local.set $1 br $while-continue|0 end end end + local.get $61 + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/arr i32.load offset=12 i32.const 3 @@ -12014,36 +13256,36 @@ i32.const 3216 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 - local.set $57 + local.tee $58 + local.set $1 i32.const 0 - local.set $61 + local.set $57 block $__inlined_func$~lib/array/Array#indexOf - local.get $1 + local.get $58 i32.load offset=12 - local.tee $0 + local.tee $61 if (result i32) i32.const 0 - local.get $0 + local.get $61 i32.ge_s else i32.const 1 end if i32.const -1 - local.set $61 + local.set $57 br $__inlined_func$~lib/array/Array#indexOf end - local.get $57 + local.get $1 i32.load offset=4 - local.set $60 - loop $while-continue|016 + local.set $1 + loop $while-continue|084 + local.get $57 local.get $61 - local.get $0 i32.lt_s if - local.get $60 - local.get $61 + local.get $1 + local.get $57 i32.const 2 i32.shl i32.add @@ -12051,17 +13293,17 @@ f32.const nan:0x400000 f32.eq br_if $__inlined_func$~lib/array/Array#indexOf - local.get $61 + local.get $57 i32.const 1 i32.add - local.set $61 - br $while-continue|016 + local.set $57 + br $while-continue|084 end end i32.const -1 - local.set $61 + local.set $57 end - local.get $61 + local.get $57 i32.const -1 i32.ne if @@ -12078,36 +13320,36 @@ i32.const 3248 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 - local.set $54 + local.tee $60 + local.set $1 i32.const 0 - local.set $61 + local.set $57 block $__inlined_func$~lib/array/Array#indexOf - local.get $0 + local.get $60 i32.load offset=12 - local.tee $60 + local.tee $61 if (result i32) i32.const 0 - local.get $60 + local.get $61 i32.ge_s else i32.const 1 end if i32.const -1 - local.set $61 + local.set $57 br $__inlined_func$~lib/array/Array#indexOf end - local.get $54 + local.get $1 i32.load offset=4 - local.set $57 - loop $while-continue|017 + local.set $1 + loop $while-continue|085 + local.get $57 local.get $61 - local.get $60 i32.lt_s if + local.get $1 local.get $57 - local.get $61 i32.const 3 i32.shl i32.add @@ -12115,17 +13357,17 @@ f64.const nan:0x8000000000000 f64.eq br_if $__inlined_func$~lib/array/Array#indexOf - local.get $61 + local.get $57 i32.const 1 i32.add - local.set $61 - br $while-continue|017 + local.set $57 + br $while-continue|085 end end i32.const -1 - local.set $61 + local.set $57 end - local.get $61 + local.get $57 i32.const -1 i32.ne if @@ -12136,23 +13378,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - global.get $std/array/arr - i32.const 44 - i32.const 0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 1 - i32.ne + local.get $58 + i32.const 9744 + i32.gt_u if - i32.const 0 - i32.const 1296 - i32.const 320 - i32.const 3 + local.get $58 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $60 + i32.const 9744 + i32.gt_u + if + local.get $60 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + global.get $std/array/arr + i32.const 44 + i32.const 0 + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1296 + i32.const 320 + i32.const 3 call $~lib/builtins/abort unreachable end @@ -12298,7 +13554,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $61 + local.set $1 i32.const 0 i32.const 1 i32.const 2 @@ -12306,7 +13562,7 @@ i32.const 3280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $59 i32.load offset=12 local.tee $60 if (result i32) @@ -12318,38 +13574,38 @@ end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $0 + local.get $59 i32.load offset=4 - local.set $54 - loop $while-continue|027 - local.get $61 + local.set $0 + loop $while-continue|097 + local.get $1 local.get $60 i32.lt_s if i32.const 1 - local.get $54 - local.get $61 + local.get $0 + local.get $1 i32.const 2 i32.shl i32.add f32.load - local.tee $43 + local.tee $37 f32.const nan:0x400000 f32.eq if (result i32) i32.const 1 else - local.get $43 - local.get $43 + local.get $37 + local.get $37 f32.ne end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $61 + local.get $1 i32.const 1 i32.add - local.set $61 - br $while-continue|027 + local.set $1 + br $while-continue|097 end end i32.const 0 @@ -12365,7 +13621,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $61 + local.set $57 i32.const 0 i32.const 1 i32.const 3 @@ -12373,50 +13629,50 @@ i32.const 3312 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $58 i32.load offset=12 - local.tee $57 + local.tee $61 if (result i32) i32.const 0 - local.get $57 + local.get $61 i32.ge_s else i32.const 1 end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $60 + local.get $58 i32.load offset=4 - local.set $41 - loop $while-continue|028 - local.get $61 + local.set $1 + loop $while-continue|098 local.get $57 + local.get $61 i32.lt_s if i32.const 1 - local.get $41 - local.get $61 + local.get $1 + local.get $57 i32.const 3 i32.shl i32.add f64.load - local.tee $42 + local.tee $36 f64.const nan:0x8000000000000 f64.eq if (result i32) i32.const 1 else - local.get $42 - local.get $42 + local.get $36 + local.get $36 f64.ne end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $61 + local.get $57 i32.const 1 i32.add - local.set $61 - br $while-continue|028 + local.set $57 + br $while-continue|098 end end i32.const 0 @@ -12434,7 +13690,15 @@ i32.const 1 i32.const 1 call $~lib/array/Array#splice - call $~lib/rt/pure/__release + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/arr i32.load offset=12 i32.const 4 @@ -12490,28 +13754,42 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release - local.get $60 - call $~lib/rt/pure/__release + local.get $59 + i32.const 9744 + i32.gt_u + if + local.get $59 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $58 + i32.const 9744 + i32.gt_u + if + local.get $58 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 5 i32.const 2 i32.const 3 i32.const 3344 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 0 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $60 + local.tee $24 i32.const 5 i32.const 2 i32.const 3 i32.const 3392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $23 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12523,14 +13801,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 2 i32.const 3 i32.const 3440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $56 + local.tee $22 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12548,21 +13826,28 @@ i32.const 3456 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - call $~lib/rt/pure/__release + local.set $0 local.get $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 i32.const 0 i32.const 0 call $~lib/array/Array#splice - local.tee $53 + local.tee $21 i32.const 0 i32.const 2 i32.const 3 i32.const 3504 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $55 + local.tee $20 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12574,14 +13859,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 5 i32.const 2 i32.const 3 i32.const 3520 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $52 + local.tee $19 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12599,21 +13884,28 @@ i32.const 3568 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $1 local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 i32.const 2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $50 + local.tee $18 i32.const 3 i32.const 2 i32.const 3 i32.const 3616 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $49 + local.tee $17 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12625,14 +13917,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 i32.const 2 i32.const 3 i32.const 3648 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $48 + local.tee $16 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12650,21 +13942,28 @@ i32.const 3680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $61 + local.set $0 + local.get $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release - local.get $61 i32.const 2 i32.const 2 call $~lib/array/Array#splice - local.tee $46 + local.tee $15 i32.const 2 i32.const 2 i32.const 3 i32.const 3728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $45 + local.tee $14 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12676,14 +13975,14 @@ call $~lib/builtins/abort unreachable end - local.get $61 + local.get $0 i32.const 3 i32.const 2 i32.const 3 i32.const 3760 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $47 + local.tee $13 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12701,21 +14000,27 @@ i32.const 3792 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 - local.get $61 - call $~lib/rt/pure/__release - local.get $1 + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const 0 i32.const 1 call $~lib/array/Array#splice - local.tee $44 + local.tee $12 i32.const 1 i32.const 2 i32.const 3 i32.const 3840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $40 + local.tee $11 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12727,14 +14032,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 2 i32.const 3 i32.const 3872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $39 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12752,20 +14057,27 @@ i32.const 3904 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const -1 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $38 + local.tee $9 i32.const 1 i32.const 2 i32.const 3 i32.const 3952 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $37 + local.tee $8 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12777,14 +14089,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 2 i32.const 3 i32.const 3984 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $36 + local.tee $7 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12802,20 +14114,27 @@ i32.const 4016 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const -2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $32 + local.tee $6 i32.const 2 i32.const 2 i32.const 3 i32.const 4064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $31 + local.tee $5 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12827,14 +14146,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 3 i32.const 2 i32.const 3 i32.const 4096 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $30 + local.tee $4 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12852,20 +14171,27 @@ i32.const 4128 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const -2 i32.const 1 call $~lib/array/Array#splice - local.tee $35 + local.tee $3 i32.const 1 i32.const 2 i32.const 3 i32.const 4176 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $34 + local.tee $2 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12877,14 +14203,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 2 i32.const 3 i32.const 4208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $34 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12902,20 +14228,27 @@ i32.const 4240 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const -7 i32.const 1 call $~lib/array/Array#splice - local.tee $26 + local.tee $43 i32.const 1 i32.const 2 i32.const 3 i32.const 4288 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $25 + local.tee $42 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12927,14 +14260,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 2 i32.const 3 i32.const 4320 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $24 + local.tee $41 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12952,20 +14285,27 @@ i32.const 4352 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 - i32.const -2 - i32.const -1 - call $~lib/array/Array#splice - local.tee $23 + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 + i32.const -2 + i32.const -1 + call $~lib/array/Array#splice + local.tee $40 i32.const 0 i32.const 2 i32.const 3 i32.const 4400 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $39 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12977,14 +14317,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 5 i32.const 2 i32.const 3 i32.const 4416 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $21 + local.tee $38 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13002,20 +14342,27 @@ i32.const 4464 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const 1 i32.const -2 call $~lib/array/Array#splice - local.tee $20 + local.tee $54 i32.const 0 i32.const 2 i32.const 3 i32.const 4512 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $53 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13027,14 +14374,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 5 i32.const 2 i32.const 3 i32.const 4528 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $51 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13052,20 +14399,27 @@ i32.const 4576 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const 4 i32.const 0 call $~lib/array/Array#splice - local.tee $17 + local.tee $44 i32.const 0 i32.const 2 i32.const 3 i32.const 4624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $55 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13077,14 +14431,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 5 i32.const 2 i32.const 3 i32.const 4640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $52 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13102,20 +14456,28 @@ i32.const 4688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release - local.tee $1 i32.const 7 i32.const 0 call $~lib/array/Array#splice - local.tee $14 + local.tee $50 i32.const 0 i32.const 2 i32.const 3 i32.const 4736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $49 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13134,7 +14496,7 @@ i32.const 4752 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $48 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13152,21 +14514,28 @@ i32.const 4800 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 + local.set $30 local.get $1 - call $~lib/rt/pure/__release - local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $30 i32.const 7 i32.const 5 call $~lib/array/Array#splice - local.tee $11 + local.tee $47 i32.const 0 i32.const 2 i32.const 3 i32.const 4848 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $46 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13178,14 +14547,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $30 i32.const 5 i32.const 2 i32.const 3 i32.const 4864 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $45 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13203,10 +14572,10 @@ i32.const 4912 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $61 + local.tee $0 i32.const 1 call $~lib/array/Array#splice - local.tee $54 + local.tee $1 i32.load offset=12 if i32.const 0 @@ -13216,7 +14585,7 @@ call $~lib/builtins/abort unreachable end - local.get $61 + local.get $0 i32.load offset=12 if i32.const 0 @@ -13232,37 +14601,51 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $33 i32.load offset=4 - local.tee $1 + local.tee $61 i32.const 1 call $std/array/Ref#constructor i32.store - local.get $1 + local.get $61 i32.const 2 call $std/array/Ref#constructor i32.store offset=4 - local.get $1 + local.get $61 i32.const 3 call $std/array/Ref#constructor i32.store offset=8 - local.get $1 + local.get $61 i32.const 4 call $std/array/Ref#constructor i32.store offset=12 - local.get $1 + local.get $61 i32.const 5 call $std/array/Ref#constructor i32.store offset=16 - local.get $61 - call $~lib/rt/pure/__release - local.get $57 + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $33 i32.const 2 call $~lib/array/Array#splice - local.set $41 - local.get $54 - call $~lib/rt/pure/__release - local.get $41 + local.set $31 + local.get $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $31 i32.load offset=12 i32.const 2 i32.ne @@ -13274,10 +14657,10 @@ call $~lib/builtins/abort unreachable end - local.get $41 + local.get $31 i32.const 0 call $~lib/array/Array#__get - local.tee $8 + local.tee $57 i32.load i32.const 3 i32.ne @@ -13289,10 +14672,10 @@ call $~lib/builtins/abort unreachable end - local.get $41 + local.get $31 i32.const 1 call $~lib/array/Array#__get - local.tee $7 + local.tee $59 i32.load i32.const 4 i32.ne @@ -13304,7 +14687,7 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $33 i32.load offset=12 i32.const 3 i32.ne @@ -13316,10 +14699,10 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $33 i32.const 0 call $~lib/array/Array#__get - local.tee $6 + local.tee $58 i32.load i32.const 1 i32.ne @@ -13331,10 +14714,10 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $33 i32.const 1 call $~lib/array/Array#__get - local.tee $5 + local.tee $60 i32.load i32.const 2 i32.ne @@ -13346,10 +14729,10 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $33 i32.const 2 call $~lib/array/Array#__get - local.tee $4 + local.tee $61 i32.load i32.const 5 i32.ne @@ -13367,7 +14750,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $54 + local.tee $32 i32.load offset=4 local.tee $1 i32.const 1 @@ -13380,9 +14763,9 @@ i32.const 2 call $std/array/Ref#constructor i32.store offset=8 - local.get $54 + local.get $32 call $~lib/array/Array#splice - local.tee $33 + local.tee $27 i32.load offset=12 i32.const 1 i32.ne @@ -13394,11 +14777,11 @@ call $~lib/builtins/abort unreachable end - local.get $33 + local.get $27 i32.const 0 call $~lib/array/Array#__get - local.tee $1 - local.get $1 + local.tee $26 + local.get $26 i32.eqz if i32.const 0 @@ -13419,7 +14802,7 @@ call $~lib/builtins/abort unreachable end - local.get $54 + local.get $32 i32.load offset=12 i32.const 2 i32.ne @@ -13431,10 +14814,10 @@ call $~lib/builtins/abort unreachable end - local.get $54 + local.get $32 i32.const 0 call $~lib/array/Array#__get - local.tee $3 + local.tee $0 if i32.const 0 i32.const 1296 @@ -13443,11 +14826,11 @@ call $~lib/builtins/abort unreachable end - local.get $54 + local.get $32 i32.const 1 call $~lib/array/Array#__get - local.tee $61 - local.get $61 + local.tee $25 + local.get $25 i32.eqz if i32.const 0 @@ -13468,108 +14851,465 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release - local.get $60 - call $~lib/rt/pure/__release - local.get $58 - call $~lib/rt/pure/__release - local.get $56 - call $~lib/rt/pure/__release - local.get $53 - call $~lib/rt/pure/__release - local.get $55 - call $~lib/rt/pure/__release - local.get $52 - call $~lib/rt/pure/__release - local.get $50 - call $~lib/rt/pure/__release - local.get $49 - call $~lib/rt/pure/__release - local.get $48 - call $~lib/rt/pure/__release - local.get $46 - call $~lib/rt/pure/__release - local.get $45 - call $~lib/rt/pure/__release - local.get $47 - call $~lib/rt/pure/__release - local.get $44 - call $~lib/rt/pure/__release - local.get $40 - call $~lib/rt/pure/__release - local.get $39 - call $~lib/rt/pure/__release - local.get $38 - call $~lib/rt/pure/__release - local.get $37 - call $~lib/rt/pure/__release - local.get $36 - call $~lib/rt/pure/__release - local.get $32 - call $~lib/rt/pure/__release - local.get $31 - call $~lib/rt/pure/__release local.get $30 - call $~lib/rt/pure/__release - local.get $35 - call $~lib/rt/pure/__release - local.get $34 - call $~lib/rt/pure/__release - local.get $27 - call $~lib/rt/pure/__release - local.get $26 - call $~lib/rt/pure/__release - local.get $25 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $30 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $24 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $24 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $23 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $23 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $22 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $22 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $21 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $21 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $20 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $20 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $19 - call $~lib/rt/pure/__release - local.get $18 - call $~lib/rt/pure/__release - local.get $17 - call $~lib/rt/pure/__release - local.get $16 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $19 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $18 + i32.const 9744 + i32.gt_u + if + local.get $18 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $17 + i32.const 9744 + i32.gt_u + if + local.get $17 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $16 + i32.const 9744 + i32.gt_u + if + local.get $16 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $15 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $15 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $14 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $14 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $13 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $13 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $12 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $12 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $11 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $11 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $10 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $10 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $9 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $8 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $7 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 9744 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $34 + i32.const 9744 + i32.gt_u + if + local.get $34 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $43 + i32.const 9744 + i32.gt_u + if + local.get $43 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $42 + i32.const 9744 + i32.gt_u + if + local.get $42 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $41 + i32.const 9744 + i32.gt_u + if + local.get $41 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $40 + i32.const 9744 + i32.gt_u + if + local.get $40 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $39 + i32.const 9744 + i32.gt_u + if + local.get $39 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $38 + i32.const 9744 + i32.gt_u + if + local.get $38 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $54 + i32.const 9744 + i32.gt_u + if + local.get $54 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $53 + i32.const 9744 + i32.gt_u + if + local.get $53 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $51 + i32.const 9744 + i32.gt_u + if + local.get $51 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $44 + i32.const 9744 + i32.gt_u + if + local.get $44 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $55 + i32.const 9744 + i32.gt_u + if + local.get $55 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $52 + i32.const 9744 + i32.gt_u + if + local.get $52 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $50 + i32.const 9744 + i32.gt_u + if + local.get $50 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $49 + i32.const 9744 + i32.gt_u + if + local.get $49 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $48 + i32.const 9744 + i32.gt_u + if + local.get $48 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $47 + i32.const 9744 + i32.gt_u + if + local.get $47 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $46 + i32.const 9744 + i32.gt_u + if + local.get $46 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $45 + i32.const 9744 + i32.gt_u + if + local.get $45 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $57 + i32.const 9744 + i32.gt_u + if + local.get $57 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $59 + i32.const 9744 + i32.gt_u + if + local.get $59 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $58 + i32.const 9744 + i32.gt_u + if + local.get $58 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $60 + i32.const 9744 + i32.gt_u + if + local.get $60 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $61 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $61 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $26 + i32.const 9744 + i32.gt_u + if + local.get $26 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $25 + i32.const 9744 + i32.gt_u + if + local.get $25 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/arr i32.const 0 i32.const 0 @@ -14042,17 +15782,17 @@ unreachable end loop $for-loop|0 - local.get $59 + local.get $56 i32.const 100 i32.lt_s if global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $59 + local.get $56 i32.const 1 i32.add - local.set $59 + local.set $56 br $for-loop|0 end end @@ -14069,56 +15809,54 @@ i32.const 3 call $~lib/array/Array#push i32.const 0 - local.set $60 + local.set $1 global.get $std/array/arr - local.tee $0 + local.tee $58 i32.load offset=12 - local.tee $61 + local.tee $60 i32.const 2 i32.const 9 i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $59 i32.load offset=4 - local.set $59 - loop $for-loop|030 + local.set $56 + loop $for-loop|0169 + local.get $1 local.get $60 - local.get $61 - local.get $0 - i32.load offset=12 - local.tee $58 - local.get $61 local.get $58 + i32.load offset=12 + local.tee $0 + local.get $60 + local.get $0 i32.lt_s select i32.lt_s if - local.get $60 + local.get $1 i32.const 2 i32.shl - local.tee $58 - local.get $0 + local.tee $61 + local.get $58 i32.load offset=4 i32.add i32.load - local.set $56 - i32.const 3 - global.set $~argumentsLength - local.get $58 - local.get $59 - i32.add + local.set $0 local.get $56 + local.get $61 + i32.add + local.get $0 f32.convert_i32_s f32.store - local.get $60 + local.get $1 i32.const 1 i32.add - local.set $60 - br $for-loop|030 + local.set $1 + br $for-loop|0169 end end - local.get $1 + local.get $59 i32.load offset=12 i32.const 4 i32.ne @@ -14130,7 +15868,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $59 i32.const 0 call $~lib/array/Array#__get global.get $std/array/arr @@ -14151,7 +15889,15 @@ global.get $std/array/arr i32.const 23 call $~lib/array/Array#map - call $~lib/rt/pure/__release + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/i i32.const 6 i32.ne @@ -14180,7 +15926,15 @@ global.get $std/array/arr i32.const 24 call $~lib/array/Array#map - call $~lib/rt/pure/__release + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/i i32.const 406 i32.ne @@ -14209,7 +15963,15 @@ global.get $std/array/arr i32.const 25 call $~lib/array/Array#map - call $~lib/rt/pure/__release + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/i i32.const 1 i32.ne @@ -14239,12 +16001,19 @@ global.get $std/array/arr i32.const 3 call $~lib/array/Array#push - local.get $1 - call $~lib/rt/pure/__release + local.get $59 + i32.const 9744 + i32.gt_u + if + local.get $59 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/arr i32.const 26 call $~lib/array/Array#filter - local.tee $1 + local.tee $0 i32.load offset=12 i32.const 2 i32.ne @@ -14261,7 +16030,15 @@ global.get $std/array/arr i32.const 27 call $~lib/array/Array#filter - call $~lib/rt/pure/__release + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/i i32.const 6 i32.ne @@ -14290,7 +16067,15 @@ global.get $std/array/arr i32.const 28 call $~lib/array/Array#filter - call $~lib/rt/pure/__release + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/i i32.const 406 i32.ne @@ -14319,7 +16104,15 @@ global.get $std/array/arr i32.const 29 call $~lib/array/Array#filter - call $~lib/rt/pure/__release + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/i i32.const 1 i32.ne @@ -14349,8 +16142,15 @@ global.get $std/array/arr i32.const 3 call $~lib/array/Array#push - local.get $1 - call $~lib/rt/pure/__release + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/arr i32.const 30 i32.const 0 @@ -14658,55 +16458,48 @@ call $~lib/bindings/Math/random i64.reinterpret_f64 call $~lib/math/NativeMath.seedRandom - i32.const 8 - i32.const 2 - i32.const 9 - i32.const 5280 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $0 - i32.const 0 - global.set $~argumentsLength block $__inlined_func$~lib/array/Array#sort (result i32) - local.get $0 + i32.const 8 + i32.const 2 + i32.const 9 + i32.const 5280 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $54 i32.load offset=12 local.tee $61 i32.const 1 i32.le_s if - local.get $0 + local.get $54 call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end - local.get $0 + local.get $54 i32.load offset=4 - local.set $1 + local.set $56 local.get $61 i32.const 2 i32.eq if - local.get $1 + local.get $56 f32.load offset=4 - local.set $43 - local.get $1 + local.tee $29 + local.get $56 f32.load - local.set $29 - i32.const 2 - global.set $~argumentsLength - local.get $43 - local.get $29 + local.tee $37 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if - local.get $1 - local.get $29 + local.get $56 + local.get $37 f32.store offset=4 - local.get $1 - local.get $43 + local.get $56 + local.get $29 f32.store end - local.get $0 + local.get $54 call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end @@ -14714,18 +16507,92 @@ i32.const 256 i32.lt_s if - local.get $1 - local.get $61 - call $~lib/util/sort/insertionSort + i32.const 0 + local.set $60 + loop $for-loop|00 + local.get $60 + local.get $61 + i32.lt_s + if + local.get $56 + local.get $60 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $29 + local.get $60 + i32.const 1 + i32.sub + local.set $0 + loop $while-continue|1 + local.get $0 + i32.const 0 + i32.ge_s + if + local.get $29 + local.get $56 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $37 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.lt_s + if + local.get $0 + local.tee $1 + i32.const 1 + i32.sub + local.set $0 + local.get $56 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $37 + f32.store + br $while-continue|1 + end + end + end + local.get $56 + local.get $0 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $29 + f32.store + local.get $60 + i32.const 1 + i32.add + local.set $60 + br $for-loop|00 + end + end else - local.get $1 + local.get $56 local.get $61 call $~lib/util/sort/weakHeapSort end - local.get $0 + local.get $54 call $~lib/rt/pure/__retain end - call $~lib/rt/pure/__release + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end block $__inlined_func$std/array/isArraysEqual (result i32) i32.const 8 i32.const 2 @@ -14733,51 +16600,50 @@ i32.const 5328 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $45 - local.set $61 + local.set $44 i32.const 0 local.set $1 block $folding-inner0 - local.get $0 + local.get $54 i32.load offset=12 - local.tee $59 - local.get $61 + local.tee $0 + local.get $44 i32.load offset=12 i32.ne br_if $folding-inner0 i32.const 1 - local.get $0 - local.get $61 + local.get $44 + local.get $54 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop - loop $for-loop|00 + loop $for-loop|0179 local.get $1 - local.get $59 + local.get $0 i32.lt_s if - local.get $0 + local.get $54 local.get $1 call $~lib/array/Array#__get - local.tee $43 - local.get $43 + local.tee $37 + local.get $37 f32.ne if (result i32) - local.get $61 + local.get $44 local.get $1 call $~lib/array/Array#__get - local.tee $43 - local.get $43 + local.tee $37 + local.get $37 f32.ne else i32.const 0 end i32.eqz if - local.get $0 + local.get $54 local.get $1 call $~lib/array/Array#__get - local.get $61 + local.get $44 local.get $1 call $~lib/array/Array#__get f32.ne @@ -14787,7 +16653,7 @@ i32.const 1 i32.add local.set $1 - br $for-loop|00 + br $for-loop|0179 end end i32.const 1 @@ -14804,74 +16670,141 @@ call $~lib/builtins/abort unreachable end - i32.const 8 - i32.const 3 - i32.const 10 - i32.const 5376 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $61 - i32.const 0 - global.set $~argumentsLength block $__inlined_func$~lib/array/Array#sort (result i32) - local.get $61 + i32.const 8 + i32.const 3 + i32.const 10 + i32.const 5376 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $53 i32.load offset=12 - local.tee $60 + local.tee $61 i32.const 1 i32.le_s if - local.get $61 + local.get $53 call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end - local.get $61 + local.get $53 i32.load offset=4 - local.set $1 - local.get $60 + local.set $56 + local.get $61 i32.const 2 i32.eq if - local.get $1 + local.get $56 f64.load offset=8 - local.set $42 - local.get $1 + local.tee $28 + local.get $56 f64.load - local.set $28 - i32.const 2 - global.set $~argumentsLength - local.get $42 - local.get $28 + local.tee $36 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if - local.get $1 - local.get $28 + local.get $56 + local.get $36 f64.store offset=8 - local.get $1 - local.get $42 + local.get $56 + local.get $28 f64.store end - local.get $61 + local.get $53 call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end - local.get $60 + local.get $61 i32.const 256 i32.lt_s if - local.get $1 - local.get $60 - call $~lib/util/sort/insertionSort + i32.const 0 + local.set $60 + loop $for-loop|01 + local.get $60 + local.get $61 + i32.lt_s + if + local.get $56 + local.get $60 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $28 + local.get $60 + i32.const 1 + i32.sub + local.set $0 + loop $while-continue|12 + local.get $0 + i32.const 0 + i32.ge_s + if + local.get $28 + local.get $56 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $36 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.lt_s + if + local.get $0 + local.tee $1 + i32.const 1 + i32.sub + local.set $0 + local.get $56 + local.get $1 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $36 + f64.store + br $while-continue|12 + end + end + end + local.get $56 + local.get $0 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $28 + f64.store + local.get $60 + i32.const 1 + i32.add + local.set $60 + br $for-loop|01 + end + end else - local.get $1 - local.get $60 + local.get $56 + local.get $61 call $~lib/util/sort/weakHeapSort end - local.get $61 + local.get $53 call $~lib/rt/pure/__retain end - call $~lib/rt/pure/__release + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end block $__inlined_func$std/array/isArraysEqual (result i32) i32.const 8 i32.const 3 @@ -14879,61 +16812,60 @@ i32.const 5456 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $47 - local.set $60 + local.set $55 i32.const 0 - local.set $1 - block $folding-inner01 - local.get $61 + local.set $59 + block $folding-inner0181 + local.get $53 i32.load offset=12 - local.tee $58 - local.get $60 + local.tee $1 + local.get $55 i32.load offset=12 i32.ne - br_if $folding-inner01 + br_if $folding-inner0181 i32.const 1 - local.get $60 - local.get $61 + local.get $53 + local.get $55 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop - loop $for-loop|02 + loop $for-loop|0182 + local.get $59 local.get $1 - local.get $58 i32.lt_s if - local.get $61 - local.get $1 + local.get $53 + local.get $59 call $~lib/array/Array#__get - local.tee $42 - local.get $42 + local.tee $36 + local.get $36 f64.ne if (result i32) - local.get $60 - local.get $1 + local.get $55 + local.get $59 call $~lib/array/Array#__get - local.tee $42 - local.get $42 + local.tee $36 + local.get $36 f64.ne else i32.const 0 end i32.eqz if - local.get $61 - local.get $1 + local.get $53 + local.get $59 call $~lib/array/Array#__get - local.get $60 - local.get $1 + local.get $55 + local.get $59 call $~lib/array/Array#__get f64.ne - br_if $folding-inner01 + br_if $folding-inner0181 end - local.get $1 + local.get $59 i32.const 1 i32.add - local.set $1 - br $for-loop|02 + local.set $59 + br $for-loop|0182 end end i32.const 1 @@ -14956,21 +16888,26 @@ i32.const 5536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $60 - i32.const 0 - global.set $~argumentsLength - local.get $60 + local.tee $57 i32.const 46 call $~lib/array/Array#sort - call $~lib/rt/pure/__release - local.get $60 + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $57 i32.const 5 i32.const 2 i32.const 3 i32.const 5584 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $44 + local.tee $56 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14988,13 +16925,18 @@ i32.const 5632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $59 - i32.const 0 - global.set $~argumentsLength - local.get $59 + local.tee $59 i32.const 47 call $~lib/array/Array#sort - call $~lib/rt/pure/__release + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $59 i32.const 5 i32.const 2 @@ -15002,7 +16944,7 @@ i32.const 5680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $40 + local.tee $61 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15020,64 +16962,64 @@ i32.const 5728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $48 + local.set $58 i32.const 1 i32.const 2 i32.const 3 i32.const 5744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $58 + local.set $52 i32.const 2 i32.const 2 i32.const 3 i32.const 5776 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $56 + local.set $50 i32.const 4 i32.const 2 i32.const 3 i32.const 5808 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $53 + local.set $49 i32.const 4 i32.const 2 i32.const 3 i32.const 5840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 + local.set $51 i32.const 64 call $std/array/createReverseOrderedArray - local.set $55 + local.set $48 i32.const 128 call $std/array/createReverseOrderedArray - local.set $52 + local.set $47 i32.const 1024 call $std/array/createReverseOrderedArray - local.set $50 + local.set $46 i32.const 10000 call $std/array/createReverseOrderedArray - local.set $49 + local.set $45 i32.const 512 call $std/array/createRandomOrderedArray - local.set $46 - local.get $48 + local.set $60 + local.get $58 i32.const 46 call $std/array/assertSorted - local.get $58 + local.get $52 i32.const 46 call $std/array/assertSorted - local.get $58 + local.get $52 i32.const 1 i32.const 2 i32.const 3 i32.const 5872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $39 + local.tee $0 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15089,17 +17031,17 @@ call $~lib/builtins/abort unreachable end - local.get $56 + local.get $50 i32.const 46 call $std/array/assertSorted - local.get $56 + local.get $50 i32.const 2 i32.const 2 i32.const 3 i32.const 5904 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $38 + local.tee $1 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15111,11 +17053,11 @@ call $~lib/builtins/abort unreachable end - local.get $53 + local.get $49 i32.const 46 call $std/array/assertSorted - local.get $53 - local.get $1 + local.get $49 + local.get $51 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15127,11 +17069,11 @@ call $~lib/builtins/abort unreachable end - local.get $55 + local.get $48 i32.const 46 call $std/array/assertSorted - local.get $55 - local.get $1 + local.get $48 + local.get $51 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -15143,11 +17085,11 @@ call $~lib/builtins/abort unreachable end - local.get $52 + local.get $47 i32.const 46 call $std/array/assertSorted - local.get $52 - local.get $1 + local.get $47 + local.get $51 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -15159,11 +17101,11 @@ call $~lib/builtins/abort unreachable end - local.get $50 + local.get $46 i32.const 46 call $std/array/assertSorted - local.get $50 - local.get $1 + local.get $46 + local.get $51 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -15175,11 +17117,11 @@ call $~lib/builtins/abort unreachable end - local.get $49 + local.get $45 i32.const 46 call $std/array/assertSorted - local.get $49 - local.get $1 + local.get $45 + local.get $51 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -15191,236 +17133,291 @@ call $~lib/builtins/abort unreachable end - local.get $46 + local.get $60 i32.const 46 call $std/array/assertSorted - local.get $0 - call $~lib/rt/pure/__release - local.get $45 - call $~lib/rt/pure/__release - local.get $61 - call $~lib/rt/pure/__release - local.get $47 - call $~lib/rt/pure/__release - local.get $60 - call $~lib/rt/pure/__release + local.get $54 + i32.const 9744 + i32.gt_u + if + local.get $54 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $44 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $44 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $53 + i32.const 9744 + i32.gt_u + if + local.get $53 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $55 + i32.const 9744 + i32.gt_u + if + local.get $55 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $57 + i32.const 9744 + i32.gt_u + if + local.get $57 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $56 + i32.const 9744 + i32.gt_u + if + local.get $56 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $59 - call $~lib/rt/pure/__release - local.get $40 - call $~lib/rt/pure/__release - local.get $48 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $59 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $61 + i32.const 9744 + i32.gt_u + if + local.get $61 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $58 - call $~lib/rt/pure/__release - local.get $56 - call $~lib/rt/pure/__release - local.get $53 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $58 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $52 + i32.const 9744 + i32.gt_u + if + local.get $52 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $50 + i32.const 9744 + i32.gt_u + if + local.get $50 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $49 + i32.const 9744 + i32.gt_u + if + local.get $49 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $51 + i32.const 9744 + i32.gt_u + if + local.get $51 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $48 + i32.const 9744 + i32.gt_u + if + local.get $48 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $47 + i32.const 9744 + i32.gt_u + if + local.get $47 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $46 + i32.const 9744 + i32.gt_u + if + local.get $46 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $45 + i32.const 9744 + i32.gt_u + if + local.get $45 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $60 + i32.const 9744 + i32.gt_u + if + local.get $60 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release - local.get $55 - call $~lib/rt/pure/__release - local.get $52 - call $~lib/rt/pure/__release - local.get $50 - call $~lib/rt/pure/__release - local.get $49 - call $~lib/rt/pure/__release - local.get $46 - call $~lib/rt/pure/__release - local.get $39 - call $~lib/rt/pure/__release - local.get $38 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 64 call $std/array/createRandomOrderedArray - local.set $1 + local.set $0 i32.const 257 call $std/array/createRandomOrderedArray - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.const 48 call $std/array/assertSorted - local.get $1 + local.get $0 i32.const 49 call $std/array/assertSorted - local.get $0 + local.get $1 i32.const 50 call $std/array/assertSorted - local.get $0 + local.get $1 i32.const 51 call $std/array/assertSorted - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - local.set $61 - call $~lib/rt/tlsf/maybeInitialize - i32.const 8 - i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $0 - i32.const 0 - i32.const 8 - call $~lib/util/memory/memset - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $60 - i32.const 0 - i32.store - local.get $60 - i32.const 0 - i32.store offset=4 - local.get $60 - i32.const 0 - i32.store offset=8 - local.get $60 - i32.const 0 - i32.store offset=12 local.get $0 - local.tee $1 - local.get $60 - i32.load - local.tee $59 - i32.ne + i32.const 9744 + i32.gt_u if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $59 - call $~lib/rt/pure/__release + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $60 local.get $1 - i32.store - local.get $60 - local.get $0 - i32.store offset=4 - local.get $60 - i32.const 8 - i32.store offset=8 - local.get $60 - i32.const 2 - i32.store offset=12 - loop $for-loop|039 - local.get $61 - 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 $61 - i32.sub - call $~lib/array/Array#__set - local.get $60 - local.get $61 - local.get $1 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $1 - call $~lib/rt/pure/__release - local.get $61 - i32.const 1 - i32.add - local.set $61 - br $for-loop|039 - end + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $60 + call $std/array/createReverseOrderedNestedArray + local.tee $1 i32.const 52 call $std/array/assertSorted<~lib/array/Array> - local.get $60 - call $~lib/rt/pure/__release + local.get $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $std/array/createReverseOrderedElementsArray local.tee $1 i32.const 53 call $std/array/assertSorted<~lib/array/Array> local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 7 i32.const 2 i32.const 15 i32.const 6080 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $59 + local.set $60 i32.const 7 i32.const 2 i32.const 15 i32.const 6128 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $58 - i32.const 1 - global.set $~argumentsLength - local.get $59 - call $std/array/assertSorted<~lib/string/String | null>@varargs - block $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> (result i32) - i32.const 0 - local.set $60 + local.set $56 + local.get $60 + i32.const 54 + call $~lib/array/Array<~lib/array/Array>#sort + local.tee $1 + call $std/array/isSorted<~lib/string/String | null> + i32.eqz + if i32.const 0 - local.get $59 - i32.load offset=12 - local.tee $61 - local.get $58 - i32.load offset=12 - i32.ne - br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> - drop - i32.const 1 - local.get $58 - local.get $59 - i32.eq - br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> - drop - loop $for-loop|03 - local.get $60 - local.get $61 - i32.lt_s - if - local.get $59 - local.get $60 - call $~lib/array/Array#__get - local.tee $1 - local.get $58 - local.get $60 - call $~lib/array/Array#__get - local.tee $0 - call $~lib/string/String.__eq - i32.eqz - if - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - br $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $60 - i32.const 1 - i32.add - local.set $60 - br $for-loop|03 - end - end - i32.const 1 + i32.const 1296 + i32.const 887 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end + local.get $60 + local.get $56 + call $std/array/isArraysEqual<~lib/string/String | null> i32.eqz if i32.const 0 @@ -15431,7 +17428,7 @@ unreachable end i32.const 0 - local.set $60 + local.set $59 call $~lib/rt/tlsf/maybeInitialize i32.const 1600 i32.const 0 @@ -15449,50 +17446,57 @@ i32.const 16 i32.add call $~lib/rt/pure/__retain - local.tee $61 + local.tee $58 i32.const 0 i32.store - local.get $61 + local.get $58 i32.const 0 i32.store offset=4 - local.get $61 + local.get $58 i32.const 0 i32.store offset=8 - local.get $61 + local.get $58 i32.const 0 i32.store offset=12 local.get $0 local.tee $1 - local.get $61 + local.get $58 i32.load - local.tee $56 + local.tee $61 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $56 - call $~lib/rt/pure/__release + local.get $61 + i32.const 9744 + i32.gt_u + if + local.get $61 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $61 + local.get $58 local.get $1 i32.store - local.get $61 + local.get $58 local.get $0 i32.store offset=4 - local.get $61 + local.get $58 i32.const 1600 i32.store offset=8 - local.get $61 + local.get $58 i32.const 400 i32.store offset=12 - loop $for-loop|004 - local.get $60 + loop $for-loop|045 + local.get $59 i32.const 400 i32.lt_s if - local.get $61 - local.get $60 + local.get $58 + local.get $59 call $~lib/math/NativeMath.random f64.const 32 f64.mul @@ -15501,38 +17505,63 @@ local.tee $1 call $~lib/array/Array<~lib/array/Array>#__set local.get $1 - call $~lib/rt/pure/__release - local.get $60 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $59 i32.const 1 i32.add - local.set $60 - br $for-loop|004 + local.set $59 + br $for-loop|045 end end - i32.const 1 - global.set $~argumentsLength - local.get $61 - i32.const 55 - call $std/array/assertSorted<~lib/array/Array> - local.get $59 - call $~lib/rt/pure/__release local.get $58 - call $~lib/rt/pure/__release - local.get $61 - call $~lib/rt/pure/__release + i32.const 55 + call $std/array/assertSorted<~lib/array/Array> + local.get $60 + i32.const 9744 + i32.gt_u + if + local.get $60 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $56 + i32.const 9744 + i32.gt_u + if + local.get $56 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $58 + i32.const 9744 + i32.gt_u + if + local.get $58 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 2 i32.const 0 i32.const 17 i32.const 6208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $61 + local.tee $50 i32.load offset=4 - local.get $61 + local.get $50 i32.load offset=12 call $~lib/util/string/joinBooleanArray - local.tee $1 - local.get $1 + local.tee $57 i32.const 6336 call $~lib/string/String.__eq i32.eqz @@ -15550,15 +17579,13 @@ i32.const 6384 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $49 i32.load offset=4 - local.get $60 + local.get $49 i32.load offset=12 i32.const 6064 call $~lib/util/string/joinIntegerArray - local.tee $1 - local.set $52 - local.get $1 + local.tee $59 i32.const 6448 call $~lib/string/String.__eq i32.eqz @@ -15576,15 +17603,13 @@ i32.const 6480 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $48 i32.load offset=4 - local.get $59 + local.get $48 i32.load offset=12 i32.const 6512 call $~lib/util/string/joinIntegerArray - local.tee $1 - local.set $50 - local.get $1 + local.tee $58 i32.const 6448 call $~lib/string/String.__eq i32.eqz @@ -15602,15 +17627,13 @@ i32.const 6544 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $47 i32.load offset=4 - local.get $58 + local.get $47 i32.load offset=12 i32.const 6576 call $~lib/util/string/joinIntegerArray - local.tee $1 - local.set $49 - local.get $1 + local.tee $60 i32.const 6608 call $~lib/string/String.__eq i32.eqz @@ -15628,14 +17651,12 @@ i32.const 6672 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $56 + local.tee $46 i32.load offset=4 - local.get $56 + local.get $46 i32.load offset=12 call $~lib/util/string/joinFloatArray - local.tee $1 - local.set $48 - local.get $1 + local.tee $56 i32.const 7824 call $~lib/string/String.__eq i32.eqz @@ -15653,15 +17674,13 @@ i32.const 7952 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $53 + local.tee $45 i32.load offset=4 - local.get $53 + local.get $45 i32.load offset=12 i32.const 6064 call $~lib/util/string/joinReferenceArray<~lib/string/String | null> - local.tee $1 - local.set $46 - local.get $1 + local.tee $61 i32.const 7920 call $~lib/string/String.__eq i32.eqz @@ -15679,27 +17698,25 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $55 i32.load offset=4 - local.tee $0 + local.tee $1 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $0 + local.get $1 i32.const 0 i32.store offset=4 - local.get $0 + local.get $1 i32.const 0 call $std/array/Ref#constructor i32.store offset=8 - local.get $1 + local.get $55 i32.load offset=4 - local.get $1 + local.get $55 i32.load offset=12 call $~lib/util/string/joinReferenceArray local.tee $0 - local.set $45 - local.get $0 i32.const 8032 call $~lib/string/String.__eq i32.eqz @@ -15717,24 +17734,22 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $52 i32.load offset=4 - local.tee $47 + local.tee $1 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $47 + local.get $1 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $0 + local.get $52 i32.load offset=4 - local.get $0 + local.get $52 i32.load offset=12 call $~lib/util/string/joinReferenceArray - local.tee $47 - local.set $44 - local.get $47 + local.tee $1 i32.const 8112 call $~lib/string/String.__eq i32.eqz @@ -15746,73 +17761,185 @@ call $~lib/builtins/abort unreachable end - local.get $61 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $60 - call $~lib/rt/pure/__release - local.get $52 - call $~lib/rt/pure/__release - local.get $59 - call $~lib/rt/pure/__release local.get $50 - call $~lib/rt/pure/__release - local.get $58 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $50 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $57 + i32.const 9744 + i32.gt_u + if + local.get $57 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $49 - call $~lib/rt/pure/__release - local.get $56 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $49 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $59 + i32.const 9744 + i32.gt_u + if + local.get $59 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $48 - call $~lib/rt/pure/__release - local.get $53 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $48 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $58 + i32.const 9744 + i32.gt_u + if + local.get $58 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $47 + i32.const 9744 + i32.gt_u + if + local.get $47 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $60 + i32.const 9744 + i32.gt_u + if + local.get $60 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $46 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $46 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $56 + i32.const 9744 + i32.gt_u + if + local.get $56 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $45 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $45 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $61 + i32.const 9744 + i32.gt_u + if + local.get $61 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $55 + i32.const 9744 + i32.gt_u + if + local.get $55 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release - local.get $44 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $52 + i32.const 9744 + i32.gt_u + if + local.get $52 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 i32.const 2 i32.const 3 i32.const 8192 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 + local.set $34 i32.const 1 i32.const 2 i32.const 3 i32.const 8208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 + local.set $43 i32.const 2 i32.const 2 i32.const 3 i32.const 8240 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $61 + local.set $42 i32.const 4 i32.const 2 i32.const 3 i32.const 8272 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $60 - local.get $1 + local.set $41 + local.get $34 i32.load offset=4 - local.get $1 + local.get $34 i32.load offset=12 i32.const 6304 call $~lib/util/string/joinIntegerArray - local.tee $59 - local.get $59 + local.tee $50 i32.const 6064 call $~lib/string/String.__eq i32.eqz @@ -15824,15 +17951,13 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $43 i32.load offset=4 - local.get $0 + local.get $43 i32.load offset=12 i32.const 6304 - call $~lib/util/string/joinIntegerArray - local.tee $59 - local.set $45 - local.get $59 + call $~lib/util/string/joinIntegerArray + local.tee $49 i32.const 7920 call $~lib/string/String.__eq i32.eqz @@ -15844,15 +17969,13 @@ call $~lib/builtins/abort unreachable end - local.get $61 + local.get $42 i32.load offset=4 - local.get $61 + local.get $42 i32.load offset=12 i32.const 6304 call $~lib/util/string/joinIntegerArray - local.tee $59 - local.set $47 - local.get $59 + local.tee $48 i32.const 8304 call $~lib/string/String.__eq i32.eqz @@ -15864,15 +17987,13 @@ call $~lib/builtins/abort unreachable end - local.get $60 + local.get $41 i32.load offset=4 - local.get $60 + local.get $41 i32.load offset=12 i32.const 6304 call $~lib/util/string/joinIntegerArray - local.tee $59 - local.set $44 - local.get $59 + local.tee $47 i32.const 8336 call $~lib/string/String.__eq i32.eqz @@ -15890,14 +18011,12 @@ i32.const 8368 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $53 + local.tee $54 i32.load offset=4 - local.get $53 + local.get $54 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $59 - local.set $40 - local.get $59 + local.tee $46 i32.const 8400 call $~lib/string/String.__eq i32.eqz @@ -15915,14 +18034,12 @@ i32.const 8432 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $55 + local.tee $53 i32.load offset=4 - local.get $55 + local.get $53 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $59 - local.set $39 - local.get $59 + local.tee $45 i32.const 8464 call $~lib/string/String.__eq i32.eqz @@ -15940,14 +18057,12 @@ i32.const 8512 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $52 + local.tee $51 i32.load offset=4 - local.get $52 + local.get $51 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $59 - local.set $38 - local.get $59 + local.tee $57 i32.const 8560 call $~lib/string/String.__eq i32.eqz @@ -15965,14 +18080,12 @@ i32.const 8624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $44 i32.load offset=4 - local.get $50 + local.get $44 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $59 - local.set $37 - local.get $59 i32.const 8672 call $~lib/string/String.__eq i32.eqz @@ -15990,15 +18103,13 @@ i32.const 8784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $49 + local.tee $55 i32.load offset=4 - local.get $49 + local.get $55 i32.load offset=12 i32.const 6304 call $~lib/util/string/joinReferenceArray<~lib/string/String | null> - local.tee $59 - local.set $36 - local.get $59 + local.tee $58 i32.const 8832 call $~lib/string/String.__eq i32.eqz @@ -16016,15 +18127,13 @@ i32.const 8944 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $48 + local.tee $52 i32.load offset=4 - local.get $48 + local.get $52 i32.load offset=12 i32.const 6304 call $~lib/util/string/joinReferenceArray<~lib/string/String | null> - local.tee $59 - local.set $32 - local.get $59 + local.tee $60 i32.const 8976 call $~lib/string/String.__eq i32.eqz @@ -16042,9 +18151,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $40 i32.load offset=4 - local.tee $58 + local.tee $1 i32.const 2 i32.const 2 i32.const 3 @@ -16052,7 +18161,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $58 + local.get $1 i32.const 2 i32.const 2 i32.const 3 @@ -16060,14 +18169,12 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $59 + local.get $40 i32.load offset=4 - local.get $59 + local.get $40 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $58 - local.set $31 - local.get $58 + local.tee $56 i32.const 9072 call $~lib/string/String.__eq i32.eqz @@ -16085,9 +18192,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $39 i32.load offset=4 - local.tee $56 + local.tee $1 i32.const 2 i32.const 0 i32.const 6 @@ -16095,7 +18202,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $56 + local.get $1 i32.const 2 i32.const 0 i32.const 6 @@ -16103,14 +18210,12 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $58 + local.get $39 i32.load offset=4 - local.get $58 + local.get $39 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $56 - local.set $30 - local.get $56 + local.tee $61 i32.const 9072 call $~lib/string/String.__eq i32.eqz @@ -16128,7 +18233,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $56 + local.tee $38 i32.load offset=4 i32.const 1 i32.const 2 @@ -16136,7 +18241,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $34 + local.tee $1 i32.load offset=4 i32.const 1 i32.const 2 @@ -16145,81 +18250,249 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $34 + local.get $1 i32.store - local.get $56 + local.get $38 i32.load offset=4 + local.get $38 + i32.load offset=12 + call $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> + local.tee $1 + i32.const 7920 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1296 + i32.const 1036 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $34 + i32.const 9744 + i32.gt_u + if + local.get $34 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $43 + i32.const 9744 + i32.gt_u + if + local.get $43 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $42 + i32.const 9744 + i32.gt_u + if + local.get $42 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $41 + i32.const 9744 + i32.gt_u + if + local.get $41 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $50 + i32.const 9744 + i32.gt_u + if + local.get $50 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $49 + i32.const 9744 + i32.gt_u + if + local.get $49 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $48 + i32.const 9744 + i32.gt_u + if + local.get $48 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $47 + i32.const 9744 + i32.gt_u + if + local.get $47 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $54 + i32.const 9744 + i32.gt_u + if + local.get $54 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $46 + i32.const 9744 + i32.gt_u + if + local.get $46 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $53 + i32.const 9744 + i32.gt_u + if + local.get $53 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $45 + i32.const 9744 + i32.gt_u + if + local.get $45 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $51 + i32.const 9744 + i32.gt_u + if + local.get $51 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $57 + i32.const 9744 + i32.gt_u + if + local.get $57 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $44 + i32.const 9744 + i32.gt_u + if + local.get $44 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $59 + i32.const 9744 + i32.gt_u + if + local.get $59 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $55 + i32.const 9744 + i32.gt_u + if + local.get $55 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $58 + i32.const 9744 + i32.gt_u + if + local.get $58 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $52 + i32.const 9744 + i32.gt_u + if + local.get $52 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $60 + i32.const 9744 + i32.gt_u + if + local.get $60 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $56 - i32.load offset=12 - call $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> - local.tee $35 - local.set $34 - local.get $35 - i32.const 7920 - call $~lib/string/String.__eq - i32.eqz + i32.const 9744 + i32.gt_u if - i32.const 0 - i32.const 1296 - i32.const 1036 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $56 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release local.get $61 - call $~lib/rt/pure/__release - local.get $60 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $45 - call $~lib/rt/pure/__release - local.get $47 - call $~lib/rt/pure/__release - local.get $44 - call $~lib/rt/pure/__release - local.get $53 - call $~lib/rt/pure/__release - local.get $40 - call $~lib/rt/pure/__release - local.get $55 - call $~lib/rt/pure/__release - local.get $39 - call $~lib/rt/pure/__release - local.get $52 - call $~lib/rt/pure/__release - local.get $38 - call $~lib/rt/pure/__release - local.get $50 - call $~lib/rt/pure/__release - local.get $37 - call $~lib/rt/pure/__release - local.get $49 - call $~lib/rt/pure/__release - local.get $36 - call $~lib/rt/pure/__release - local.get $48 - call $~lib/rt/pure/__release - local.get $32 - call $~lib/rt/pure/__release - local.get $31 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release - local.get $34 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $61 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/arr - call $~lib/rt/pure/__release + local.tee $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 4 i32.const 2 i32.const 12 i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $61 + local.tee $60 i32.load offset=4 local.tee $1 i32.const 1 @@ -16253,9 +18526,9 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=12 - local.get $61 + local.get $60 call $~lib/array/Array<~lib/array/Array>#flat - local.tee $60 + local.tee $56 i32.load offset=12 i32.const 10 i32.ne @@ -16268,14 +18541,14 @@ unreachable end loop $for-loop|1 - local.get $51 + local.get $35 i32.const 10 i32.lt_s if - local.get $60 - local.get $51 + local.get $56 + local.get $35 call $~lib/array/Array#__get - local.get $51 + local.get $35 i32.ne if i32.const 0 @@ -16285,10 +18558,10 @@ call $~lib/builtins/abort unreachable end - local.get $51 + local.get $35 i32.const 1 i32.add - local.set $51 + local.set $35 br $for-loop|1 end end @@ -16298,7 +18571,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $53 + local.tee $61 i32.load offset=4 local.tee $1 i32.const 1 @@ -16332,17 +18605,17 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=12 - local.get $53 + local.get $61 call $~lib/array/Array<~lib/array/Array<~lib/string/String | null>>#flat - local.set $1 + local.set $59 i32.const 8 i32.const 2 i32.const 15 i32.const 9680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 + local.set $58 + local.get $59 i32.load offset=12 i32.const 8 i32.ne @@ -16355,21 +18628,21 @@ unreachable end i32.const 0 - local.set $51 + local.set $35 loop $for-loop|2 - local.get $51 - local.get $0 + local.get $35 + local.get $58 i32.load offset=12 i32.lt_s if - local.get $1 - local.get $51 + local.get $59 + local.get $35 call $~lib/array/Array#__get - local.tee $55 - local.get $0 - local.get $51 + local.tee $0 + local.get $58 + local.get $35 call $~lib/array/Array#__get - local.tee $52 + local.tee $1 call $~lib/string/String.__eq i32.eqz if @@ -16380,14 +18653,28 @@ call $~lib/builtins/abort unreachable end - local.get $55 - call $~lib/rt/pure/__release - local.get $52 - call $~lib/rt/pure/__release - local.get $51 + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $35 i32.const 1 i32.add - local.set $51 + local.set $35 br $for-loop|2 end end @@ -16397,9 +18684,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $51 + local.tee $0 i32.load offset=4 - local.tee $55 + local.tee $1 i32.const 0 i32.const 2 i32.const 3 @@ -16407,7 +18694,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $55 + local.get $1 i32.const 0 i32.const 2 i32.const 3 @@ -16415,9 +18702,9 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $51 + local.get $0 call $~lib/array/Array<~lib/array/Array>#flat - local.tee $55 + local.tee $1 i32.load offset=12 if i32.const 0 @@ -16427,34 +18714,132 @@ call $~lib/builtins/abort unreachable end - local.get $51 - call $~lib/rt/pure/__release - local.get $55 - call $~lib/rt/pure/__release - local.get $57 - call $~lib/rt/pure/__release - local.get $41 - call $~lib/rt/pure/__release - local.get $54 - call $~lib/rt/pure/__release + local.get $0 + i32.const 9744 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 9744 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $33 - call $~lib/rt/pure/__release - local.get $59 - call $~lib/rt/pure/__release - local.get $58 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $33 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $31 + i32.const 9744 + i32.gt_u + if + local.get $31 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $32 + i32.const 9744 + i32.gt_u + if + local.get $32 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $27 + i32.const 9744 + i32.gt_u + if + local.get $27 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $40 + i32.const 9744 + i32.gt_u + if + local.get $40 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $39 + i32.const 9744 + i32.gt_u + if + local.get $39 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $38 + i32.const 9744 + i32.gt_u + if + local.get $38 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $60 + i32.const 9744 + i32.gt_u + if + local.get $60 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $56 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $56 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $61 - call $~lib/rt/pure/__release - local.get $60 - call $~lib/rt/pure/__release - local.get $53 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + i32.const 9744 + i32.gt_u + if + local.get $61 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $59 + i32.const 9744 + i32.gt_u + if + local.get $59 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $58 + i32.const 9744 + i32.gt_u + if + local.get $58 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~start global.get $~started diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 8d67f5aadf..6513852ce3 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1,13 +1,13 @@ (module (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 (func (param i32 i32 i32) (result 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))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -40,16 +40,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -247,7 +237,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -279,7 +275,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -787,11 +789,86 @@ 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 15 + i32.and + if + i32.const 0 + i32.const 1152 + i32.const 357 + 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 32 + 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 16 + i32.add + i32.add + local.tee $1 + local.get $4 + i32.const 16 + 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 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $1 + i32.const 16 + i32.add + 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) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -802,7 +879,6 @@ unreachable end local.get $1 - local.tee $3 i32.const 1073741808 i32.ge_u if @@ -814,20 +890,20 @@ unreachable end local.get $0 - local.get $3 + local.get $1 i32.const 15 i32.add i32.const -16 i32.and - local.tee $1 + local.tee $3 i32.const 16 - local.get $1 + local.get $3 i32.const 16 i32.gt_u select local.tee $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if i32.const 1 @@ -837,21 +913,18 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if + i32.const 16 memory.size - local.tee $1 + local.tee $3 i32.const 16 i32.shl - local.set $5 - local.get $1 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $5 - i32.const 16 - i32.sub i32.ne i32.shl local.get $4 @@ -876,12 +949,12 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 - i32.gt_s - local.set $6 - local.get $1 + local.set $5 + local.get $3 local.get $5 - local.get $6 + local.get $3 + local.get $5 + i32.gt_s select memory.grow i32.const 0 @@ -896,7 +969,7 @@ end end local.get $0 - local.get $1 + local.get $3 i32.const 16 i32.shl memory.size @@ -906,7 +979,7 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if i32.const 0 @@ -918,7 +991,7 @@ end end end - local.get $1 + local.get $3 i32.load i32.const -4 i32.and @@ -932,81 +1005,25 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 0 i32.store offset=4 - local.get $1 + local.get $3 local.get $2 i32.store offset=8 - local.get $1 local.get $3 + local.get $1 i32.store offset=12 local.get $0 - local.get $1 + local.get $3 call $~lib/rt/tlsf/removeBlock - local.get $1 - i32.load - local.set $2 - local.get $4 - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1152 - i32.const 357 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const -4 - i32.and + local.get $0 + local.get $3 local.get $4 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $4 - local.get $2 - i32.const 2 - i32.and - i32.or - i32.store - local.get $4 - local.get $1 - i32.const 16 - i32.add - i32.add - local.tee $2 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - call $~lib/rt/tlsf/GETRIGHT - local.get $1 - call $~lib/rt/tlsf/GETRIGHT - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $1 + call $~lib/rt/tlsf/prepareBlock + local.get $3 call $~lib/rt/rtrace/onalloc - local.get $1 + local.get $3 ) (func $~lib/util/memory/memset (param $0 i32) (param $1 i32) (local $2 i32) @@ -1475,17 +1492,6 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 1440 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) (func $~lib/arraybuffer/ArrayBufferView#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -1547,7 +1553,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $4 - call $~lib/rt/pure/__release + i32.const 1440 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -1580,12 +1593,12 @@ call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.tee $1 + local.tee $0 i32.const 8 call $~lib/util/memory/memset - local.get $1 + local.get $0 call $~lib/rt/pure/__retain - local.tee $9 + local.tee $3 i32.const 16 i32.sub i32.load offset=12 @@ -1599,7 +1612,7 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $3 i32.const 0 i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice @@ -1618,7 +1631,7 @@ unreachable end local.get $1 - local.get $9 + local.get $3 i32.eq if i32.const 0 @@ -1628,13 +1641,20 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $3 i32.const 1 i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 1440 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 16 i32.sub @@ -1649,12 +1669,19 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $3 i32.const -1 i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice local.get $0 - call $~lib/rt/pure/__release + i32.const 1440 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.tee $0 i32.const 16 i32.sub @@ -1669,12 +1696,19 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $3 i32.const 1 i32.const 3 call $~lib/arraybuffer/ArrayBuffer#slice local.get $0 - call $~lib/rt/pure/__release + i32.const 1440 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.tee $0 i32.const 16 i32.sub @@ -1689,12 +1723,19 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $3 i32.const 1 i32.const -1 call $~lib/arraybuffer/ArrayBuffer#slice local.get $0 - call $~lib/rt/pure/__release + i32.const 1440 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.tee $0 i32.const 16 i32.sub @@ -1709,14 +1750,20 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $3 i32.const -3 i32.const -1 call $~lib/arraybuffer/ArrayBuffer#slice - local.set $1 local.get $0 - call $~lib/rt/pure/__release - local.get $1 + i32.const 1440 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const 16 i32.sub i32.load offset=12 @@ -1730,14 +1777,20 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $3 i32.const -4 i32.const 42 call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - local.get $1 - call $~lib/rt/pure/__release local.get $0 + i32.const 1440 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const 16 i32.sub i32.load offset=12 @@ -1751,14 +1804,21 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $3 i32.const 42 i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice - local.set $7 + local.set $4 local.get $0 - call $~lib/rt/pure/__release - local.get $7 + i32.const 1440 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 i32.const 16 i32.sub i32.load offset=12 @@ -1770,7 +1830,7 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $4 i32.eqz if i32.const 0 @@ -1789,39 +1849,40 @@ call $~lib/rt/pure/__retain i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.set $6 + local.set $5 call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 3 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.set $1 + local.set $0 call $~lib/rt/tlsf/maybeInitialize i32.const 8 i32.const 0 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.tee $0 + local.tee $1 i32.const 1376 i32.const 8 call $~lib/util/memory/memmove - local.get $1 local.get $0 + local.get $1 call $~lib/rt/pure/__retain i32.store - local.get $1 local.get $0 - i32.store offset=4 local.get $1 + i32.store offset=4 + local.get $0 i32.const 8 i32.store offset=8 - local.get $1 + local.get $0 i32.const 2 i32.store offset=12 - local.get $1 + local.get $0 call $~lib/rt/pure/__retain + local.set $6 call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 9 @@ -1831,19 +1892,22 @@ call $~lib/rt/pure/__retain i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.set $3 - local.get $6 + local.set $7 + local.get $5 i32.load - local.tee $1 + local.tee $0 i32.const 16 i32.sub - local.tee $0 i32.load offset=12 - local.tee $5 + local.tee $1 + local.set $9 + local.get $1 i32.const 1073741808 i32.gt_u - local.get $5 + local.get $1 local.get $0 + i32.const 16 + i32.sub i32.load offset=12 i32.gt_u i32.or @@ -1862,49 +1926,99 @@ i32.const 16 i32.add call $~lib/rt/pure/__retain - local.tee $8 + local.tee $1 i32.const 0 i32.store - local.get $8 + local.get $1 i32.const 0 i32.store offset=4 - local.get $8 + local.get $1 i32.const 0 i32.store offset=8 + local.get $0 + local.set $2 + local.get $0 local.get $1 - local.set $0 - local.get $1 - local.get $8 i32.load - local.tee $2 + local.tee $8 i32.ne if - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 local.get $2 - call $~lib/rt/pure/__release + call $~lib/rt/pure/__retain + local.set $2 + local.get $8 + i32.const 1440 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $8 - local.get $0 + local.get $1 + local.get $2 i32.store - local.get $8 local.get $1 + local.get $0 i32.store offset=4 - local.get $8 - local.get $5 - i32.store offset=8 + local.get $1 local.get $9 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.store offset=8 local.get $3 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release + i32.const 1440 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 1440 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 1440 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 + i32.const 1440 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 + i32.const 1440 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 1440 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~start call $start:std/arraybuffer diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 4d33086be6..f37fedd18c 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -1,7 +1,7 @@ (module - (type $i32_=>_none (func (param 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 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) @@ -48,16 +48,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -255,7 +245,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -287,7 +283,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -795,11 +797,86 @@ 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 15 + i32.and + if + i32.const 0 + i32.const 1152 + i32.const 357 + 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 32 + 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 16 + i32.add + i32.add + local.tee $1 + local.get $4 + i32.const 16 + 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 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $1 + i32.const 16 + i32.add + 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) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -810,7 +887,6 @@ unreachable end local.get $1 - local.tee $3 i32.const 1073741808 i32.ge_u if @@ -822,20 +898,20 @@ unreachable end local.get $0 - local.get $3 + local.get $1 i32.const 15 i32.add i32.const -16 i32.and - local.tee $1 + local.tee $3 i32.const 16 - local.get $1 + local.get $3 i32.const 16 i32.gt_u select local.tee $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if i32.const 1 @@ -845,21 +921,18 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if + i32.const 16 memory.size - local.tee $1 + local.tee $3 i32.const 16 i32.shl - local.set $5 - local.get $1 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $5 - i32.const 16 - i32.sub i32.ne i32.shl local.get $4 @@ -884,12 +957,12 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 - i32.gt_s - local.set $6 - local.get $1 + local.set $5 + local.get $3 local.get $5 - local.get $6 + local.get $3 + local.get $5 + i32.gt_s select memory.grow i32.const 0 @@ -904,7 +977,7 @@ end end local.get $0 - local.get $1 + local.get $3 i32.const 16 i32.shl memory.size @@ -914,7 +987,7 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if i32.const 0 @@ -926,7 +999,7 @@ end end end - local.get $1 + local.get $3 i32.load i32.const -4 i32.and @@ -940,81 +1013,25 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 0 i32.store offset=4 - local.get $1 + local.get $3 local.get $2 i32.store offset=8 - local.get $1 local.get $3 + local.get $1 i32.store offset=12 local.get $0 - local.get $1 + local.get $3 call $~lib/rt/tlsf/removeBlock - local.get $1 - i32.load - local.set $2 - local.get $4 - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1152 - i32.const 357 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const -4 - i32.and + local.get $0 + local.get $3 local.get $4 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $4 - local.get $2 - i32.const 2 - i32.and - i32.or - i32.store - local.get $4 - local.get $1 - i32.const 16 - i32.add - i32.add - local.tee $2 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - call $~lib/rt/tlsf/GETRIGHT - local.get $1 - call $~lib/rt/tlsf/GETRIGHT - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $1 + call $~lib/rt/tlsf/prepareBlock + local.get $3 call $~lib/rt/rtrace/onalloc - local.get $1 + local.get $3 ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) @@ -1067,17 +1084,6 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 1520 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) (func $~lib/arraybuffer/ArrayBufferView#constructor (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -1146,7 +1152,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $3 - call $~lib/rt/pure/__release + i32.const 1520 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -1231,7 +1244,14 @@ call $~lib/rt/pure/__retain local.set $3 local.get $5 - call $~lib/rt/pure/__release + i32.const 1520 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $4 local.get $3 @@ -1492,17 +1512,6 @@ i32.add i32.load8_u ) - (func $~lib/polyfills/bswap (param $0 i32) (result i32) - local.get $0 - i32.const 8 - i32.shl - local.get $0 - i32.const 65535 - i32.and - i32.const 8 - i32.shr_u - i32.or - ) (func $~lib/dataview/DataView#getUint16 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 @@ -1527,15 +1536,18 @@ i32.load offset=4 i32.add i32.load16_u - local.set $0 - local.get $2 - i32.eqz - if - local.get $0 - call $~lib/polyfills/bswap - local.set $0 - end + local.tee $0 + local.get $0 + i32.const 8 + i32.shl local.get $0 + i32.const 65535 + i32.and + i32.const 8 + i32.shr_u + i32.or + local.get $2 + select ) (func $~lib/dataview/DataView#getUint32 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 @@ -1741,12 +1753,20 @@ local.get $0 i32.load offset=4 local.get $2 - if (result i32) + i32.eqz + if local.get $1 - else + i32.const 8 + i32.shl local.get $1 - call $~lib/polyfills/bswap + i32.const 65535 + i32.and + i32.const 8 + i32.shr_u + i32.or + local.set $1 end + local.get $1 i32.store16 ) (func $~lib/dataview/DataView#setUint32 (param $0 i32) (param $1 i32) (param $2 i32) @@ -3359,18 +3379,25 @@ end local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 16 i32.sub i32.load offset=12 - local.set $2 - local.get $3 - i32.const 0 + local.set $3 local.get $2 + i32.const 0 + local.get $3 call $~lib/dataview/DataView#constructor local.set $2 local.get $0 - call $~lib/rt/pure/__release + i32.const 1520 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 i32.load offset=4 local.get $2 @@ -3397,9 +3424,23 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 1520 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1520 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~start call $start:std/dataview diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 2e2e6e92a4..bc4b7c5ffa 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -9,9 +9,7 @@ (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) - (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) - (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i32_i64_=>_none (func (param i32 i64))) @@ -19,7 +17,9 @@ (type $i32_f64_=>_none (func (param i32 f64))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) + (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f32_f32_=>_i32 (func (param i32 f32 f32) (result i32))) + (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) (type $i64_=>_i32 (func (param i64) (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) @@ -57,16 +57,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -264,7 +254,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -296,7 +292,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -883,9 +885,21 @@ i32.and i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $1 + i32.const 16 + i32.add local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -4 + i32.and + i32.add i32.load i32.const -3 i32.and @@ -896,7 +910,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -924,18 +937,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 i32.shl - local.set $5 - local.get $3 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $5 - i32.const 16 - i32.sub i32.ne i32.shl local.get $4 @@ -960,12 +970,12 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 - i32.gt_s - local.set $6 + local.set $5 local.get $3 local.get $5 - local.get $6 + local.get $3 + local.get $5 + i32.gt_s select memory.grow i32.const 0 @@ -1280,25 +1290,23 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (param $0 i32) + (func $~lib/map/Map#clear (param $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 16 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 local.get $0 + i32.load + local.tee $2 i32.const 1556 i32.gt_u if - local.get $0 + local.get $2 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - ) - (func $~lib/map/Map#clear (param $0 i32) - (local $1 i32) - i32.const 16 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $0 - i32.load - call $~lib/rt/pure/__release local.get $0 local.get $1 i32.store @@ -1310,7 +1318,15 @@ local.set $1 local.get $0 i32.load offset=8 - call $~lib/rt/pure/__release + local.tee $2 + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 i32.store offset=8 @@ -1324,17 +1340,6 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i32) - local.get $0 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - ) (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load @@ -1389,24 +1394,24 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $3 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $8 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 local.get $0 i32.load offset=16 i32.const 12 @@ -1416,38 +1421,41 @@ local.get $2 local.set $4 loop $while-continue|0 - local.get $3 + local.get $5 local.get $7 i32.ne if - local.get $3 + local.get $5 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $4 - local.get $3 + local.get $5 i32.load8_s i32.store8 local.get $4 - local.get $3 + local.get $5 i32.load offset=4 i32.store offset=4 local.get $4 - local.get $5 local.get $3 - i32.load8_s - call $~lib/util/hash/HASH local.get $1 + local.get $5 + i32.load8_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul i32.and i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $6 i32.load i32.store offset=8 - local.get $8 + local.get $6 local.get $4 i32.store local.get $4 @@ -1455,28 +1463,35 @@ i32.add local.set $4 end - local.get $3 + local.get $5 i32.const 12 i32.add - local.set $3 + local.set $5 br $while-continue|0 end end - local.get $5 - local.tee $3 + local.get $3 + local.tee $5 local.get $0 i32.load local.tee $4 i32.ne if - local.get $3 + local.get $5 call $~lib/rt/pure/__retain - local.set $3 + local.set $5 local.get $4 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 - local.get $3 + local.get $5 i32.store local.get $0 local.get $1 @@ -1485,39 +1500,69 @@ local.tee $1 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $3 - call $~lib/rt/pure/__release + local.get $5 + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 i32.store offset=8 local.get $0 - local.get $6 + local.get $8 i32.store offset=12 local.get $0 local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 - call $~lib/rt/pure/__release + local.get $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 local.get $1 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + local.tee $3 + local.set $4 + local.get $0 local.get $1 - call $~lib/util/hash/HASH - local.tee $4 + local.get $3 call $~lib/map/Map#find local.tee $3 if @@ -1603,7 +1648,14 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/map/Map#find local.tee $0 i32.eqz @@ -1674,7 +1726,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $4 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 local.get $2 @@ -1904,8 +1963,16 @@ return end local.get $1 - call $~lib/rt/tlsf/GETRIGHT - local.tee $6 + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $4 + local.set $6 + local.get $4 i32.load local.tee $4 i32.const 1 @@ -1928,10 +1995,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 @@ -2182,7 +2249,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $5 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 local.get $2 @@ -2302,12 +2376,21 @@ ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) + (local $2 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $0 i32.load - call $~lib/rt/pure/__release + local.tee $2 + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 i32.store @@ -2319,7 +2402,15 @@ local.set $1 local.get $0 i32.load offset=8 - call $~lib/rt/pure/__release + local.tee $2 + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 i32.store offset=8 @@ -2396,24 +2487,24 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $3 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $8 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 local.get $0 i32.load offset=16 i32.const 3 @@ -2423,38 +2514,41 @@ local.get $2 local.set $4 loop $while-continue|0 - local.get $3 + local.get $5 local.get $7 i32.ne if - local.get $3 + local.get $5 i32.load offset=4 i32.const 1 i32.and i32.eqz if local.get $4 - local.get $3 + local.get $5 i32.load8_s i32.store8 local.get $4 - local.get $3 + local.get $5 i32.load8_s offset=1 i32.store8 offset=1 local.get $4 - local.get $5 local.get $3 - i32.load8_s - call $~lib/util/hash/HASH local.get $1 + local.get $5 + i32.load8_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul i32.and i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $6 i32.load i32.store offset=4 - local.get $8 + local.get $6 local.get $4 i32.store local.get $4 @@ -2462,28 +2556,35 @@ i32.add local.set $4 end - local.get $3 + local.get $5 i32.const 8 i32.add - local.set $3 + local.set $5 br $while-continue|0 end end - local.get $5 - local.tee $3 + local.get $3 + local.tee $5 local.get $0 i32.load local.tee $4 i32.ne if - local.get $3 + local.get $5 call $~lib/rt/pure/__retain - local.set $3 + local.set $5 local.get $4 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 - local.get $3 + local.get $5 i32.store local.get $0 local.get $1 @@ -2492,29 +2593,50 @@ local.tee $1 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $3 - call $~lib/rt/pure/__release + local.get $5 + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 i32.store offset=8 local.get $0 - local.get $6 + local.get $8 i32.store offset=12 local.get $0 local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 - call $~lib/rt/pure/__release + local.get $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -2522,11 +2644,19 @@ (local $5 i32) local.get $1 local.tee $3 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + local.tee $1 local.set $4 local.get $0 i32.load - local.get $4 + local.get $1 local.get $0 i32.load offset=4 i32.and @@ -2812,7 +2942,14 @@ call $~lib/rt/pure/__retain local.set $5 local.get $4 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $5 @@ -2821,7 +2958,8 @@ local.get $1 i32.store offset=4 local.get $2 - local.tee $1 + local.set $1 + local.get $2 local.get $0 i32.load offset=8 local.tee $5 @@ -2831,7 +2969,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $5 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -2844,9 +2989,23 @@ i32.load offset=20 i32.store offset=16 local.get $3 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -2943,7 +3102,14 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/map/Map#find local.tee $1 i32.eqz @@ -3047,7 +3213,14 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/map/Map#find if i32.const 0 @@ -3067,11 +3240,26 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/map/Map#find i32.eqz if @@ -3134,7 +3322,14 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/map/Map#find i32.eqz if @@ -3174,11 +3369,26 @@ i32.const 20 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/map/Map#find i32.eqz if @@ -3227,21 +3437,23 @@ call $~lib/builtins/abort unreachable end + i32.const 0 + local.set $3 local.get $0 i32.load offset=8 - local.set $5 + local.set $4 local.get $0 i32.load offset=16 local.tee $6 call $~lib/array/Array#constructor local.set $1 loop $for-loop|0 - local.get $4 + local.get $5 local.get $6 i32.lt_s if - local.get $5 local.get $4 + local.get $5 i32.const 12 i32.mul i32.add @@ -3261,10 +3473,10 @@ i32.add local.set $3 end - local.get $4 + local.get $5 i32.const 1 i32.add - local.set $4 + local.set $5 br $for-loop|0 end end @@ -3334,7 +3546,14 @@ local.get $0 local.get $4 local.get $4 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/map/Map#find i32.eqz if @@ -3349,7 +3568,14 @@ i32.const 20 i32.sub local.tee $8 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul local.set $9 local.get $0 local.get $8 @@ -3368,7 +3594,15 @@ local.get $4 local.get $4 call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 local.get $7 i32.const 20 @@ -3376,7 +3610,15 @@ local.tee $4 local.get $4 call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 i32.const 1 i32.add @@ -3422,7 +3664,14 @@ local.get $0 local.get $2 local.get $2 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/map/Map#find i32.eqz if @@ -3458,7 +3707,14 @@ local.get $0 local.get $2 local.get $2 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/map/Map#find if i32.const 0 @@ -3501,7 +3757,14 @@ local.get $0 local.get $2 local.get $2 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/map/Map#find if i32.const 0 @@ -3521,11 +3784,26 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $2 local.get $2 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/map/Map#find i32.eqz if @@ -3542,7 +3820,14 @@ local.get $0 local.get $2 local.get $2 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/map/Map#find if i32.const 0 @@ -3584,19 +3869,54 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - 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 - ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) + i32.const 1556 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 1556 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3692,7 +4012,14 @@ call $~lib/rt/pure/__retain local.set $5 local.get $4 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $5 @@ -3711,7 +4038,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $5 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -3724,9 +4058,23 @@ i32.load offset=20 i32.store offset=16 local.get $3 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -3905,7 +4253,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $4 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 local.get $2 @@ -4019,7 +4374,14 @@ call $~lib/rt/pure/__retain local.set $5 local.get $4 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $5 @@ -4038,7 +4400,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $5 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -4051,9 +4420,23 @@ i32.load offset=20 i32.store offset=16 local.get $3 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -4322,14 +4705,23 @@ local.get $1 i32.const 255 i32.and - local.tee $3 i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 - local.get $3 + local.get $1 + i32.const 255 + i32.and i32.const -2128831035 i32.xor i32.const 16777619 @@ -4430,14 +4822,23 @@ local.get $1 i32.const 255 i32.and - local.tee $3 i32.const 20 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 - local.get $3 + local.get $1 + i32.const 255 + i32.and i32.const -2128831035 i32.xor i32.const 16777619 @@ -4492,19 +4893,19 @@ local.set $3 local.get $0 i32.load offset=8 - local.set $5 + local.set $4 local.get $0 i32.load offset=16 local.tee $6 call $~lib/array/Array#constructor local.set $1 loop $for-loop|0 - local.get $4 + local.get $5 local.get $6 i32.lt_s if - local.get $5 local.get $4 + local.get $5 i32.const 12 i32.mul i32.add @@ -4524,10 +4925,10 @@ i32.add local.set $3 end - local.get $4 + local.get $5 i32.const 1 i32.add - local.set $4 + local.set $5 br $for-loop|0 end end @@ -4641,7 +5042,15 @@ local.get $4 local.get $4 call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 local.get $7 i32.const 20 @@ -4649,7 +5058,15 @@ local.tee $4 local.get $4 call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 i32.const 1 i32.add @@ -4798,14 +5215,23 @@ local.get $2 i32.const 255 i32.and - local.tee $4 i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $2 - local.get $4 + local.get $2 + i32.const 255 + i32.and i32.const -2128831035 i32.xor i32.const 16777619 @@ -4873,15 +5299,50 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/util/hash/hash16 (param $0 i32) (result i32) local.get $0 @@ -4965,24 +5426,24 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $3 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $8 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 local.get $0 i32.load offset=16 i32.const 12 @@ -4992,27 +5453,27 @@ local.get $2 local.set $4 loop $while-continue|0 - local.get $3 + local.get $5 local.get $7 i32.ne if - local.get $3 + local.get $5 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $4 - local.get $3 + local.get $5 i32.load16_s i32.store16 local.get $4 - local.get $3 + local.get $5 i32.load offset=4 i32.store offset=4 local.get $4 - local.get $5 local.get $3 + local.get $5 i32.load16_s call $~lib/util/hash/hash16 local.get $1 @@ -5020,10 +5481,10 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $6 i32.load i32.store offset=8 - local.get $8 + local.get $6 local.get $4 i32.store local.get $4 @@ -5031,59 +5492,88 @@ i32.add local.set $4 end - local.get $3 + local.get $5 i32.const 12 i32.add - local.set $3 + local.set $5 br $while-continue|0 end end - local.get $5 - local.tee $3 + local.get $3 + local.tee $5 local.get $0 i32.load local.tee $4 i32.ne if - local.get $3 + local.get $5 call $~lib/rt/pure/__retain - local.set $3 + local.set $5 local.get $4 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 - local.get $3 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.tee $1 + local.set $1 + local.get $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $3 - call $~lib/rt/pure/__release + local.get $5 + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 i32.store offset=8 local.get $0 - local.get $6 + local.get $8 i32.store offset=12 local.get $0 local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release + local.get $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -5264,7 +5754,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $5 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 local.get $2 @@ -5341,24 +5838,24 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $3 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $8 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 local.get $0 i32.load offset=16 i32.const 3 @@ -5368,27 +5865,27 @@ local.get $2 local.set $4 loop $while-continue|0 - local.get $3 + local.get $5 local.get $7 i32.ne if - local.get $3 + local.get $5 i32.load offset=4 i32.const 1 i32.and i32.eqz if local.get $4 - local.get $3 + local.get $5 i32.load16_s i32.store16 local.get $4 - local.get $3 + local.get $5 i32.load16_s offset=2 i32.store16 offset=2 local.get $4 - local.get $5 local.get $3 + local.get $5 i32.load16_s call $~lib/util/hash/hash16 local.get $1 @@ -5396,10 +5893,10 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $6 i32.load i32.store offset=4 - local.get $8 + local.get $6 local.get $4 i32.store local.get $4 @@ -5407,59 +5904,88 @@ i32.add local.set $4 end - local.get $3 + local.get $5 i32.const 8 i32.add - local.set $3 + local.set $5 br $while-continue|0 end end - local.get $5 - local.tee $3 + local.get $3 + local.tee $5 local.get $0 i32.load local.tee $4 i32.ne if - local.get $3 + local.get $5 call $~lib/rt/pure/__retain - local.set $3 + local.set $5 local.get $4 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 - local.get $3 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.tee $1 + local.set $1 + local.get $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $3 - call $~lib/rt/pure/__release + local.get $5 + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 i32.store offset=8 local.get $0 - local.get $6 + local.get $8 i32.store offset=12 local.get $0 local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 - call $~lib/rt/pure/__release + local.get $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -5723,7 +6249,15 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 call $~lib/map/Map#has @@ -5826,7 +6360,15 @@ i32.const 20 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 call $~lib/map/Map#has @@ -5877,21 +6419,23 @@ call $~lib/builtins/abort unreachable end + i32.const 0 + local.set $3 local.get $0 i32.load offset=8 - local.set $5 + local.set $6 local.get $0 i32.load offset=16 - local.tee $6 + local.tee $4 call $~lib/array/Array#constructor local.set $1 loop $for-loop|0 + local.get $5 local.get $4 - local.get $6 i32.lt_s if + local.get $6 local.get $5 - local.get $4 i32.const 12 i32.mul i32.add @@ -5911,10 +6455,10 @@ i32.add local.set $3 end - local.get $4 + local.get $5 i32.const 1 i32.add - local.set $4 + local.set $5 br $for-loop|0 end end @@ -5952,7 +6496,7 @@ local.get $3 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $4 + local.set $5 loop $for-loop|4 local.get $2 local.get $1 @@ -5978,13 +6522,13 @@ i32.shl i32.add i32.load16_s - local.set $5 + local.set $4 local.get $6 local.get $2 call $~lib/array/Array#__get local.set $7 local.get $0 - local.get $5 + local.get $4 call $~lib/map/Map#has i32.eqz if @@ -6010,18 +6554,34 @@ unreachable end local.get $3 - local.get $5 - local.get $5 - call $~lib/map/Map#set - call $~lib/rt/pure/__release local.get $4 + local.get $4 + call $~lib/map/Map#set + local.tee $4 + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $5 - local.get $5 + local.tee $4 + local.get $4 call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 i32.const 1 i32.add @@ -6041,7 +6601,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.load offset=20 i32.const 100 i32.ne @@ -6160,7 +6720,15 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $2 call $~lib/map/Map#has @@ -6219,26 +6787,50 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - local.get $1 - local.get $1 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/map/Map#find - i32.const 0 - i32.ne + i32.const 1556 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) (local $2 i32) @@ -6251,24 +6843,24 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $3 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $8 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 local.get $0 i32.load offset=16 i32.const 12 @@ -6278,27 +6870,27 @@ local.get $2 local.set $4 loop $while-continue|0 - local.get $3 + local.get $5 local.get $7 i32.ne if - local.get $3 + local.get $5 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $4 - local.get $3 + local.get $5 i32.load16_u i32.store16 local.get $4 - local.get $3 + local.get $5 i32.load offset=4 i32.store offset=4 local.get $4 - local.get $5 local.get $3 + local.get $5 i32.load16_u call $~lib/util/hash/hash16 local.get $1 @@ -6306,10 +6898,10 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $6 i32.load i32.store offset=8 - local.get $8 + local.get $6 local.get $4 i32.store local.get $4 @@ -6317,59 +6909,88 @@ i32.add local.set $4 end - local.get $3 + local.get $5 i32.const 12 i32.add - local.set $3 + local.set $5 br $while-continue|0 end end - local.get $5 - local.tee $3 + local.get $3 + local.tee $5 local.get $0 i32.load local.tee $4 i32.ne if - local.get $3 + local.get $5 call $~lib/rt/pure/__retain - local.set $3 + local.set $5 local.get $4 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 - local.get $3 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.tee $1 + local.set $1 + local.get $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $3 - call $~lib/rt/pure/__release + local.get $5 + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 i32.store offset=8 local.get $0 - local.get $6 + local.get $8 i32.store offset=12 local.get $0 local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 - call $~lib/rt/pure/__release + local.get $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -6546,7 +7167,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $5 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 local.get $2 @@ -6573,24 +7201,24 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $3 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $8 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 local.get $0 i32.load offset=16 i32.const 3 @@ -6600,27 +7228,27 @@ local.get $2 local.set $4 loop $while-continue|0 - local.get $3 + local.get $5 local.get $7 i32.ne if - local.get $3 + local.get $5 i32.load offset=4 i32.const 1 i32.and i32.eqz if local.get $4 - local.get $3 + local.get $5 i32.load16_u i32.store16 local.get $4 - local.get $3 + local.get $5 i32.load16_u offset=2 i32.store16 offset=2 local.get $4 - local.get $5 local.get $3 + local.get $5 i32.load16_u call $~lib/util/hash/hash16 local.get $1 @@ -6628,10 +7256,10 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $6 i32.load i32.store offset=4 - local.get $8 + local.get $6 local.get $4 i32.store local.get $4 @@ -6639,59 +7267,88 @@ i32.add local.set $4 end - local.get $3 + local.get $5 i32.const 8 i32.add - local.set $3 + local.set $5 br $while-continue|0 end end - local.get $5 - local.tee $3 + local.get $3 + local.tee $5 local.get $0 i32.load local.tee $4 i32.ne if - local.get $3 + local.get $5 call $~lib/rt/pure/__retain - local.set $3 + local.set $5 local.get $4 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 - local.get $3 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.tee $1 + local.set $1 + local.get $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $3 - call $~lib/rt/pure/__release + local.get $5 + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 i32.store offset=8 local.get $0 - local.get $6 + local.get $8 i32.store offset=12 local.get $0 local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 - call $~lib/rt/pure/__release + local.get $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/map/Map#set (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -6894,6 +7551,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 14 @@ -6930,7 +7588,11 @@ if local.get $0 local.get $1 - call $~lib/map/Map#has + local.get $1 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -6947,10 +7609,22 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 - call $~lib/map/Map#has + local.get $1 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7007,7 +7681,11 @@ if local.get $0 local.get $1 - call $~lib/map/Map#has + local.get $1 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7042,10 +7720,22 @@ i32.const 20 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 - call $~lib/map/Map#has + local.get $1 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7091,21 +7781,23 @@ call $~lib/builtins/abort unreachable end + i32.const 0 + local.set $3 local.get $0 i32.load offset=8 - local.set $5 + local.set $4 local.get $0 i32.load offset=16 local.tee $6 call $~lib/array/Array#constructor local.set $1 loop $for-loop|0 - local.get $4 + local.get $5 local.get $6 i32.lt_s if - local.get $5 local.get $4 + local.get $5 i32.const 12 i32.mul i32.add @@ -7125,10 +7817,10 @@ i32.add local.set $3 end - local.get $4 + local.get $5 i32.const 1 i32.add - local.set $4 + local.set $5 br $for-loop|0 end end @@ -7166,7 +7858,7 @@ local.get $3 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $4 + local.set $5 loop $for-loop|4 local.get $2 local.get $1 @@ -7192,14 +7884,18 @@ i32.shl i32.add i32.load16_u - local.set $5 + local.set $4 local.get $6 local.get $2 call $~lib/array/Array#__get local.set $7 local.get $0 - local.get $5 - call $~lib/map/Map#has + local.get $4 + local.get $4 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7213,7 +7909,12 @@ local.get $7 i32.const 20 i32.sub - call $~lib/map/Map#has + local.tee $8 + local.get $8 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7224,18 +7925,34 @@ unreachable end local.get $3 - local.get $5 - local.get $5 - call $~lib/map/Map#set - call $~lib/rt/pure/__release local.get $4 + local.get $4 + call $~lib/map/Map#set + local.tee $4 + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $5 - local.get $5 + local.tee $4 + local.get $4 call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 i32.const 1 i32.add @@ -7255,7 +7972,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.load offset=20 i32.const 100 i32.ne @@ -7278,7 +7995,11 @@ if local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7310,7 +8031,11 @@ call $~lib/map/Map#delete local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -7349,7 +8074,11 @@ if local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -7366,10 +8095,22 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7384,7 +8125,11 @@ call $~lib/map/Map#delete local.get $0 local.get $2 - call $~lib/map/Map#has + local.get $2 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -7425,15 +8170,50 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -7456,7 +8236,6 @@ ) (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 local.get $1 @@ -7479,22 +8258,20 @@ i32.const 1 i32.sub i32.store offset=20 - i32.const 4 - local.get $0 - i32.load offset=20 - local.tee $1 - i32.gt_u - local.set $2 local.get $0 i32.load offset=4 i32.const 1 i32.shr_u - local.tee $3 + local.tee $2 i32.const 1 i32.add i32.const 4 + local.get $0 + i32.load offset=20 + local.tee $1 + i32.const 4 local.get $1 - local.get $2 + i32.gt_u select i32.ge_u if (result i32) @@ -7512,7 +8289,7 @@ end if local.get $0 - local.get $3 + local.get $2 call $~lib/map/Map#rehash end ) @@ -7552,7 +8329,15 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 local.get $1 @@ -7643,7 +8428,15 @@ i32.const 20 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 local.get $1 @@ -7692,21 +8485,23 @@ call $~lib/builtins/abort unreachable end + i32.const 0 + local.set $3 local.get $0 i32.load offset=8 - local.set $5 + local.set $4 local.get $0 i32.load offset=16 local.tee $6 call $~lib/array/Array#constructor local.set $1 loop $for-loop|00 - local.get $4 + local.get $5 local.get $6 i32.lt_s if - local.get $5 local.get $4 + local.get $5 i32.const 12 i32.mul i32.add @@ -7726,10 +8521,10 @@ i32.add local.set $3 end - local.get $4 + local.get $5 i32.const 1 i32.add - local.set $4 + local.set $5 br $for-loop|00 end end @@ -7740,7 +8535,7 @@ call $~lib/map/Map#values local.set $6 call $~lib/map/Map#constructor - local.set $4 + local.set $3 call $~lib/map/Map#constructor local.set $5 loop $for-loop|2 @@ -7752,14 +8547,14 @@ local.get $1 local.get $2 call $~lib/array/Array#__get - local.set $3 + local.set $4 local.get $6 local.get $2 call $~lib/array/Array#__get local.set $7 local.get $0 - local.get $3 - local.get $3 + local.get $4 + local.get $4 call $~lib/util/hash/hash32 call $~lib/map/Map#find i32.eqz @@ -7788,19 +8583,35 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 local.get $3 + local.get $4 + local.get $4 call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 i32.const 1 i32.add @@ -7808,7 +8619,7 @@ br $for-loop|2 end end - local.get $4 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -7929,7 +8740,15 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $2 local.get $2 @@ -7992,15 +8811,50 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/array/Array#constructor (param $0 i32) (result i32) (local $1 i32) @@ -8062,7 +8916,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $5 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 local.get $2 @@ -8139,7 +9000,15 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 local.get $1 @@ -8230,7 +9099,15 @@ i32.const 20 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 local.get $1 @@ -8279,21 +9156,23 @@ call $~lib/builtins/abort unreachable end + i32.const 0 + local.set $3 local.get $0 i32.load offset=8 - local.set $5 + local.set $4 local.get $0 i32.load offset=16 local.tee $6 call $~lib/array/Array#constructor local.set $1 loop $for-loop|00 - local.get $4 + local.get $5 local.get $6 i32.lt_s if - local.get $5 local.get $4 + local.get $5 i32.const 12 i32.mul i32.add @@ -8313,10 +9192,10 @@ i32.add local.set $3 end - local.get $4 + local.get $5 i32.const 1 i32.add - local.set $4 + local.set $5 br $for-loop|00 end end @@ -8404,7 +9283,15 @@ local.get $4 local.get $4 call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 local.get $7 i32.const 20 @@ -8412,7 +9299,15 @@ local.tee $4 local.get $4 call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 i32.const 1 i32.add @@ -8541,7 +9436,15 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $2 local.get $2 @@ -8604,24 +9507,68 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) + (local $2 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $0 i32.load - call $~lib/rt/pure/__release + local.tee $2 + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 i32.store @@ -8633,7 +9580,15 @@ local.set $1 local.get $0 i32.load offset=8 - call $~lib/rt/pure/__release + local.tee $2 + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 i32.store offset=8 @@ -8849,7 +9804,14 @@ call $~lib/rt/pure/__retain local.set $5 local.get $4 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $5 @@ -8858,7 +9820,8 @@ local.get $1 i32.store offset=4 local.get $2 - local.tee $1 + local.set $1 + local.get $2 local.get $0 i32.load offset=8 local.tee $5 @@ -8868,7 +9831,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $5 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -8881,9 +9851,23 @@ i32.load offset=20 i32.store offset=16 local.get $3 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) @@ -9054,9 +10038,16 @@ call $~lib/rt/pure/__retain local.set $2 local.get $5 - call $~lib/rt/pure/__release - end - local.get $3 + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $3 local.get $2 i32.store local.get $3 @@ -9174,12 +10165,21 @@ ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) + (local $2 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $0 i32.load - call $~lib/rt/pure/__release + local.tee $2 + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 i32.store @@ -9191,7 +10191,15 @@ local.set $1 local.get $0 i32.load offset=8 - call $~lib/rt/pure/__release + local.tee $2 + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 i32.store offset=8 @@ -9321,7 +10329,14 @@ call $~lib/rt/pure/__retain local.set $5 local.get $4 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $5 @@ -9330,7 +10345,8 @@ local.get $1 i32.store offset=4 local.get $2 - local.tee $1 + local.set $1 + local.get $2 local.get $0 i32.load offset=8 local.tee $5 @@ -9340,7 +10356,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $5 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -9353,9 +10376,23 @@ i32.load offset=20 i32.store offset=16 local.get $3 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/map/Map#set (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) @@ -9363,11 +10400,10 @@ (local $5 i32) local.get $1 call $~lib/util/hash/hash64 - local.tee $3 - local.set $5 + local.set $4 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i32.load offset=4 i32.and @@ -9444,11 +10480,11 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $4 + local.tee $5 i32.const 1 i32.add i32.store offset=16 - local.get $4 + local.get $5 i32.const 24 i32.mul i32.add @@ -9467,7 +10503,7 @@ local.get $3 local.get $0 i32.load - local.get $5 + local.get $4 local.get $0 i32.load offset=4 i32.and @@ -9487,7 +10523,6 @@ (func $~lib/map/Map#delete (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 local.get $1 local.get $1 @@ -9510,22 +10545,20 @@ i32.const 1 i32.sub i32.store offset=20 - i32.const 4 - local.get $0 - i32.load offset=20 - local.tee $2 - i32.gt_u - local.set $3 local.get $0 i32.load offset=4 i32.const 1 i32.shr_u - local.tee $4 + local.tee $3 i32.const 1 i32.add i32.const 4 + local.get $0 + i32.load offset=20 + local.tee $2 + i32.const 4 local.get $2 - local.get $3 + i32.gt_u select i32.ge_u if (result i32) @@ -9543,7 +10576,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/map/Map#rehash end ) @@ -9610,7 +10643,15 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 local.get $0 @@ -9704,7 +10745,15 @@ i32.const 20 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 local.get $0 @@ -9756,19 +10805,19 @@ end local.get $1 i32.load offset=8 - local.set $6 + local.set $7 local.get $1 i32.load offset=16 - local.tee $4 + local.tee $5 call $~lib/array/Array#constructor - local.set $5 + local.set $3 loop $for-loop|00 - local.get $3 local.get $4 + local.get $5 i32.lt_s if - local.get $6 - local.get $3 + local.get $7 + local.get $4 i32.const 4 i32.shl i32.add @@ -9778,7 +10827,7 @@ i32.and i32.eqz if - local.get $5 + local.get $3 local.get $2 local.get $8 i64.load @@ -9788,19 +10837,19 @@ i32.add local.set $2 end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|00 end end - local.get $5 + local.get $3 local.get $2 call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values - local.set $6 + local.set $7 call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 22 @@ -9829,21 +10878,21 @@ local.get $2 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $3 + local.set $4 loop $for-loop|2 - local.get $7 - local.get $5 + local.get $6 + local.get $3 i32.load offset=12 i32.lt_s if - local.get $5 - local.get $7 + local.get $3 + local.get $6 call $~lib/array/Array#__get local.set $0 - local.get $6 local.get $7 + local.get $6 call $~lib/array/Array#__get - local.set $4 + local.set $5 local.get $1 local.get $0 local.get $0 @@ -9859,7 +10908,7 @@ unreachable end local.get $1 - local.get $4 + local.get $5 i32.const 20 i32.sub i64.extend_i32_s @@ -9880,19 +10929,35 @@ local.get $0 local.get $0 call $~lib/map/Map#set - call $~lib/rt/pure/__release - local.get $3 + local.tee $8 + i32.const 1556 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 + local.get $5 i32.const 20 i32.sub - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 call $~lib/map/Map#set - call $~lib/rt/pure/__release - local.get $7 + local.tee $5 + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 i32.const 1 i32.add - local.set $7 + local.set $6 br $for-loop|2 end end @@ -9908,7 +10973,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -10019,7 +11084,15 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $6 + i32.const 1556 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 local.get $0 @@ -10081,16 +11154,51 @@ call $~lib/builtins/abort unreachable end - 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 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 + i32.const 1556 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/array/Array#constructor (param $0 i32) (result i32) (local $1 i32) @@ -10152,7 +11260,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $5 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 local.get $2 @@ -10231,7 +11346,15 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 local.get $0 @@ -10325,7 +11448,15 @@ i32.const 20 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 local.get $0 @@ -10377,19 +11508,19 @@ end local.get $1 i32.load offset=8 - local.set $6 + local.set $7 local.get $1 i32.load offset=16 - local.tee $4 + local.tee $5 call $~lib/array/Array#constructor - local.set $5 + local.set $3 loop $for-loop|00 - local.get $3 local.get $4 + local.get $5 i32.lt_s if - local.get $6 - local.get $3 + local.get $7 + local.get $4 i32.const 4 i32.shl i32.add @@ -10399,7 +11530,7 @@ i32.and i32.eqz if - local.get $5 + local.get $3 local.get $2 local.get $8 i64.load @@ -10409,19 +11540,19 @@ i32.add local.set $2 end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|00 end end - local.get $5 + local.get $3 local.get $2 call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values - local.set $6 + local.set $7 call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 25 @@ -10450,21 +11581,21 @@ local.get $2 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $3 + local.set $4 loop $for-loop|2 - local.get $7 - local.get $5 + local.get $6 + local.get $3 i32.load offset=12 i32.lt_s if - local.get $5 - local.get $7 + local.get $3 + local.get $6 call $~lib/array/Array#__get local.set $0 - local.get $6 local.get $7 + local.get $6 call $~lib/array/Array#__get - local.set $4 + local.set $5 local.get $1 local.get $0 local.get $0 @@ -10480,7 +11611,7 @@ unreachable end local.get $1 - local.get $4 + local.get $5 i32.const 20 i32.sub i64.extend_i32_s @@ -10501,19 +11632,35 @@ local.get $0 local.get $0 call $~lib/map/Map#set - call $~lib/rt/pure/__release - local.get $3 + local.tee $8 + i32.const 1556 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 + local.get $5 i32.const 20 i32.sub - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 call $~lib/map/Map#set - call $~lib/rt/pure/__release - local.get $7 + local.tee $5 + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 i32.const 1 i32.add - local.set $7 + local.set $6 br $for-loop|2 end end @@ -10529,7 +11676,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -10640,7 +11787,15 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $6 + i32.const 1556 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 local.get $0 @@ -10702,16 +11857,51 @@ call $~lib/builtins/abort unreachable end - 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 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 + i32.const 1556 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 @@ -10754,16 +11944,6 @@ end i32.const 0 ) - (func $~lib/map/Map#has (param $0 i32) (param $1 f32) (result i32) - local.get $0 - local.get $1 - local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find - i32.const 0 - i32.ne - ) (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -10775,24 +11955,24 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $3 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $8 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 local.get $0 i32.load offset=16 i32.const 12 @@ -10802,27 +11982,27 @@ local.get $2 local.set $4 loop $while-continue|0 - local.get $3 + local.get $5 local.get $7 i32.ne if - local.get $3 + local.get $5 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $4 - local.get $3 + local.get $5 f32.load f32.store local.get $4 - local.get $3 + local.get $5 i32.load offset=4 i32.store offset=4 local.get $4 - local.get $5 local.get $3 + local.get $5 f32.load i32.reinterpret_f32 call $~lib/util/hash/hash32 @@ -10831,10 +12011,10 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $6 i32.load i32.store offset=8 - local.get $8 + local.get $6 local.get $4 i32.store local.get $4 @@ -10842,59 +12022,88 @@ i32.add local.set $4 end - local.get $3 + local.get $5 i32.const 12 i32.add - local.set $3 + local.set $5 br $while-continue|0 end end - local.get $5 - local.tee $3 + local.get $3 + local.tee $5 local.get $0 i32.load local.tee $4 i32.ne if - local.get $3 + local.get $5 call $~lib/rt/pure/__retain - local.set $3 + local.set $5 local.get $4 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 - local.get $3 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.tee $1 + local.set $1 + local.get $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $3 - call $~lib/rt/pure/__release + local.get $5 + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 i32.store offset=8 local.get $0 - local.get $6 + local.get $8 i32.store offset=12 local.get $0 local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 - call $~lib/rt/pure/__release + local.get $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) @@ -11069,7 +12278,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $5 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 local.get $2 @@ -11182,24 +12398,24 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $3 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $8 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 local.get $0 i32.load offset=16 i32.const 12 @@ -11209,27 +12425,27 @@ local.get $2 local.set $4 loop $while-continue|0 - local.get $3 + local.get $5 local.get $7 i32.ne if - local.get $3 + local.get $5 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $4 - local.get $3 + local.get $5 f32.load f32.store local.get $4 - local.get $3 + local.get $5 f32.load offset=4 f32.store offset=4 local.get $4 - local.get $5 local.get $3 + local.get $5 f32.load i32.reinterpret_f32 call $~lib/util/hash/hash32 @@ -11238,10 +12454,10 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $6 i32.load i32.store offset=8 - local.get $8 + local.get $6 local.get $4 i32.store local.get $4 @@ -11249,59 +12465,88 @@ i32.add local.set $4 end - local.get $3 + local.get $5 i32.const 12 i32.add - local.set $3 + local.set $5 br $while-continue|0 end end - local.get $5 - local.tee $3 + local.get $3 + local.tee $5 local.get $0 i32.load local.tee $4 i32.ne if - local.get $3 + local.get $5 call $~lib/rt/pure/__retain - local.set $3 + local.set $5 local.get $4 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 - local.get $3 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.tee $1 + local.set $1 + local.get $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $3 - call $~lib/rt/pure/__release + local.get $5 + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 i32.store offset=8 local.get $0 - local.get $6 + local.get $8 i32.store offset=12 local.get $0 local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 - call $~lib/rt/pure/__release + local.get $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/map/Map#set (param $0 i32) (param $1 f32) (param $2 f32) (result i32) (local $3 i32) @@ -11466,6 +12711,8 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 f32) + (local $9 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 26 @@ -11500,7 +12747,10 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -11516,10 +12766,21 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -11573,7 +12834,10 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -11606,10 +12870,21 @@ i32.const 20 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -11656,7 +12931,7 @@ end local.get $1 call $~lib/map/Map#keys - local.set $4 + local.set $5 local.get $1 call $~lib/map/Map#values local.set $7 @@ -11691,12 +12966,12 @@ local.set $6 loop $for-loop|2 local.get $3 - local.get $4 + local.get $5 i32.load offset=12 i32.lt_s if local.get $3 - local.get $4 + local.get $5 i32.load offset=12 i32.ge_u if @@ -11707,7 +12982,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.load offset=4 local.get $3 i32.const 2 @@ -11718,10 +12993,13 @@ local.get $7 local.get $3 call $~lib/array/Array#__get - local.set $5 + local.set $4 local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -11732,11 +13010,15 @@ unreachable end local.get $1 - local.get $5 + local.get $4 i32.const 20 i32.sub f32.convert_i32_s - call $~lib/map/Map#has + local.tee $8 + local.get $8 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -11750,15 +13032,31 @@ local.get $0 local.get $0 call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $9 + i32.const 1556 + i32.gt_u + if + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - local.get $5 + local.get $4 i32.const 20 i32.sub - local.tee $5 - local.get $5 + local.tee $4 + local.get $4 call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 i32.const 1 i32.add @@ -11799,7 +13097,10 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -11830,7 +13131,10 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -11867,7 +13171,10 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -11883,10 +13190,21 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -11901,7 +13219,10 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -11941,16 +13262,51 @@ call $~lib/builtins/abort unreachable end - local.get $4 - call $~lib/rt/pure/__release + local.get $5 + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $7 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 @@ -11993,16 +13349,6 @@ end i32.const 0 ) - (func $~lib/map/Map#has (param $0 i32) (param $1 f64) (result i32) - local.get $0 - local.get $1 - local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find - i32.const 0 - i32.ne - ) (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -12014,24 +13360,24 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $3 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $8 i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 local.get $0 i32.load offset=16 i32.const 4 @@ -12041,27 +13387,27 @@ local.get $2 local.set $4 loop $while-continue|0 - local.get $3 + local.get $5 local.get $7 i32.ne if - local.get $3 + local.get $5 i32.load offset=12 i32.const 1 i32.and i32.eqz if local.get $4 - local.get $3 + local.get $5 f64.load f64.store local.get $4 - local.get $3 + local.get $5 i32.load offset=8 i32.store offset=8 local.get $4 - local.get $5 local.get $3 + local.get $5 f64.load i64.reinterpret_f64 call $~lib/util/hash/hash64 @@ -12070,10 +13416,10 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $6 i32.load i32.store offset=12 - local.get $8 + local.get $6 local.get $4 i32.store local.get $4 @@ -12081,59 +13427,88 @@ i32.add local.set $4 end - local.get $3 + local.get $5 i32.const 16 i32.add - local.set $3 + local.set $5 br $while-continue|0 end end - local.get $5 - local.tee $3 + local.get $3 + local.tee $5 local.get $0 i32.load local.tee $4 i32.ne if - local.get $3 + local.get $5 call $~lib/rt/pure/__retain - local.set $3 + local.set $5 local.get $4 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 - local.get $3 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.tee $1 + local.set $1 + local.get $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $3 - call $~lib/rt/pure/__release + local.get $5 + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 i32.store offset=8 local.get $0 - local.get $6 + local.get $8 i32.store offset=12 local.get $0 local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 - call $~lib/rt/pure/__release + local.get $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) @@ -12308,7 +13683,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $5 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 local.get $2 @@ -12421,24 +13803,24 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $3 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $8 i32.const 24 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor local.set $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 local.get $0 i32.load offset=16 i32.const 24 @@ -12448,27 +13830,27 @@ local.get $2 local.set $4 loop $while-continue|0 - local.get $3 + local.get $5 local.get $7 i32.ne if - local.get $3 + local.get $5 i32.load offset=16 i32.const 1 i32.and i32.eqz if local.get $4 - local.get $3 + local.get $5 f64.load f64.store local.get $4 - local.get $3 + local.get $5 f64.load offset=8 f64.store offset=8 local.get $4 - local.get $5 local.get $3 + local.get $5 f64.load i64.reinterpret_f64 call $~lib/util/hash/hash64 @@ -12477,10 +13859,10 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $6 i32.load i32.store offset=16 - local.get $8 + local.get $6 local.get $4 i32.store local.get $4 @@ -12488,59 +13870,88 @@ i32.add local.set $4 end - local.get $3 + local.get $5 i32.const 24 i32.add - local.set $3 + local.set $5 br $while-continue|0 end end - local.get $5 - local.tee $3 + local.get $3 + local.tee $5 local.get $0 i32.load local.tee $4 i32.ne if - local.get $3 + local.get $5 call $~lib/rt/pure/__retain - local.set $3 + local.set $5 local.get $4 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 - local.get $3 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.tee $1 + local.set $1 + local.get $2 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $5 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $3 - call $~lib/rt/pure/__release + local.get $5 + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 i32.store offset=8 local.get $0 - local.get $6 + local.get $8 i32.store offset=12 local.get $0 local.get $0 i32.load offset=20 i32.store offset=16 - local.get $5 - call $~lib/rt/pure/__release + local.get $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/map/Map#set (param $0 i32) (param $1 f64) (param $2 f64) (result i32) (local $3 i32) @@ -12739,6 +14150,8 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 f64) + (local $9 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 29 @@ -12773,7 +14186,10 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -12789,10 +14205,21 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -12846,7 +14273,10 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -12879,10 +14309,21 @@ i32.const 20 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -12929,7 +14370,7 @@ end local.get $1 call $~lib/map/Map#keys - local.set $4 + local.set $5 local.get $1 call $~lib/map/Map#values local.set $7 @@ -12964,12 +14405,12 @@ local.set $6 loop $for-loop|2 local.get $3 - local.get $4 + local.get $5 i32.load offset=12 i32.lt_s if local.get $3 - local.get $4 + local.get $5 i32.load offset=12 i32.ge_u if @@ -12980,7 +14421,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.load offset=4 local.get $3 i32.const 3 @@ -12991,10 +14432,13 @@ local.get $7 local.get $3 call $~lib/array/Array#__get - local.set $5 + local.set $4 local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -13005,11 +14449,15 @@ unreachable end local.get $1 - local.get $5 + local.get $4 i32.const 20 i32.sub f64.convert_i32_s - call $~lib/map/Map#has + local.tee $8 + local.get $8 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -13023,15 +14471,31 @@ local.get $0 local.get $0 call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $9 + i32.const 1556 + i32.gt_u + if + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - local.get $5 + local.get $4 i32.const 20 i32.sub - local.tee $5 - local.get $5 + local.tee $4 + local.get $4 call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 i32.const 1 i32.add @@ -13072,7 +14536,10 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -13103,7 +14570,10 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -13140,7 +14610,10 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -13156,10 +14629,21 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -13174,7 +14658,10 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 1312 @@ -13214,16 +14701,51 @@ call $~lib/builtins/abort unreachable end - local.get $4 - call $~lib/rt/pure/__release + local.get $5 + i32.const 1556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $7 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 1556 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~start call $std/map/testNumeric diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 5c89808da0..d38201c13b 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -7,8 +7,6 @@ (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (type $f32_f32_=>_f32 (func (param f32 f32) (result f32))) (type $none_=>_none (func)) - (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) - (type $f64_=>_i32 (func (param f64) (result i32))) (type $f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64) (result i32))) (type $f32_i32_=>_f32 (func (param f32 i32) (result f32))) (type $f64_=>_f32 (func (param f64) (result f32))) @@ -21,14 +19,17 @@ (type $f64_=>_none (func (param f64))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i64_=>_i32 (func (param i64) (result i32))) - (type $f32_=>_i32 (func (param f32) (result i32))) (type $f32_i32_=>_i32 (func (param f32 i32) (result i32))) (type $f32_i32_i32_=>_i32 (func (param f32 i32 i32) (result i32))) + (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) (type $f64_i64_i32_=>_i32 (func (param f64 i64 i32) (result i32))) (type $i64_=>_i64 (func (param i64) (result i64))) (type $i64_i32_=>_i64 (func (param i64 i32) (result i64))) (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) + (type $f32_f32_f32_=>_f32 (func (param f32 f32 f32) (result f32))) (type $f64_i32_=>_f32 (func (param f64 i32) (result f32))) + (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)) @@ -89,17 +90,6 @@ (global $~lib/math/NativeMath.sincos_cos (mut f64) (f64.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/math/NativeMath.signbit (param $0 f64) (result i32) - local.get $0 - i64.reinterpret_f64 - i64.const 63 - i64.shr_u - i32.wrap_i64 - local.get $0 - local.get $0 - f64.eq - i32.and - ) (func $~lib/math/NativeMath.scalbn (param $0 f64) (param $1 i32) (result f64) local.get $1 i32.const 1023 @@ -177,96 +167,113 @@ f64.reinterpret_i64 f64.mul ) - (func $std/math/check (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/ulperr (param $0 f64) (param $1 f64) (param $2 f64) (result f64) (local $3 i32) - local.get $0 - local.get $1 - f64.eq - if - i32.const 1 - return - end local.get $1 local.get $1 f64.ne + i32.const 0 + local.get $0 + local.get $0 + f64.ne + select if - local.get $0 - local.get $0 - f64.ne + f64.const 0 return end - block $__inlined_func$std/math/ulperr - local.get $1 - local.get $1 - f64.ne - i32.const 0 + 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 $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 - call $~lib/math/NativeMath.signbit - local.get $1 - call $~lib/math/NativeMath.signbit - 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 - local.get $1 - f64.const 0.5 - f64.mul - local.set $1 - f64.const 8988465674311579538646525e283 - local.get $0 - f64.copysign - local.set $0 - end - local.get $0 - local.get $1 - f64.sub + i32.and local.get $1 i64.reinterpret_f64 - i64.const 52 + i64.const 63 i64.shr_u - i64.const 2047 - i64.and i32.wrap_i64 - local.tee $3 - i32.eqz + local.get $1 + local.get $1 + f64.eq + i32.and + i32.eq if - local.get $3 - i32.const 1 - i32.add - local.set $3 + local.get $2 + return end - i32.const 0 + f64.const inf + return + end + local.get $0 + local.get $0 + f64.sub + f64.const 0 + f64.ne + if + local.get $1 + f64.const 0.5 + f64.mul + local.set $1 + f64.const 8988465674311579538646525e283 + local.get $0 + f64.copysign + local.set $0 + end + local.get $0 + local.get $1 + f64.sub + local.get $1 + i64.reinterpret_f64 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + i32.wrap_i64 + local.tee $3 + i32.eqz + if local.get $3 - i32.const -1075 + i32.const 1 i32.add - i32.sub - call $~lib/math/NativeMath.scalbn - local.get $2 - f64.add - local.set $2 + local.set $3 end + i32.const 0 + local.get $3 + i32.const -1075 + i32.add + 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.get $0 + local.get $1 + f64.eq + if + i32.const 1 + return + end + local.get $1 + local.get $1 + f64.ne + if + local.get $0 + local.get $0 + f64.ne + return + end + local.get $0 + local.get $1 + local.get $2 + call $std/math/ulperr f64.abs f64.const 1.5 f64.ge @@ -276,16 +283,6 @@ end i32.const 1 ) - (func $~lib/math/NativeMathf.signbit (param $0 f32) (result i32) - local.get $0 - i32.reinterpret_f32 - i32.const 31 - i32.shr_u - local.get $0 - local.get $0 - f32.eq - i32.and - ) (func $~lib/math/NativeMathf.scalbn (param $0 f32) (param $1 i32) (result f32) local.get $1 i32.const 127 @@ -362,95 +359,110 @@ f32.reinterpret_i32 f32.mul ) - (func $std/math/check (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/ulperrf (param $0 f32) (param $1 f32) (param $2 f32) (result f32) (local $3 i32) - local.get $0 - local.get $1 - f32.eq - if - i32.const 1 - return - end local.get $1 local.get $1 f32.ne + i32.const 0 + local.get $0 + local.get $0 + f32.ne + select if - local.get $0 - local.get $0 - f32.ne + f32.const 0 return end - block $__inlined_func$std/math/ulperrf - local.get $1 - local.get $1 - f32.ne - i32.const 0 + local.get $0 + local.get $1 + f32.eq + if local.get $0 + i32.reinterpret_f32 + i32.const 31 + i32.shr_u 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 - call $~lib/math/NativeMathf.signbit - local.get $1 - call $~lib/math/NativeMathf.signbit - 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 - local.get $1 - f32.const 0.5 - f32.mul - local.set $1 - f32.const 1701411834604692317316873e14 - local.get $0 - f32.copysign - local.set $0 - end - local.get $0 - local.get $1 - f32.sub + i32.and local.get $1 i32.reinterpret_f32 - i32.const 23 + i32.const 31 i32.shr_u - i32.const 255 + local.get $1 + local.get $1 + f32.eq i32.and - local.tee $3 - i32.eqz + i32.eq if - local.get $3 - i32.const 1 - i32.add - local.set $3 + local.get $2 + return end - i32.const 0 + f32.const inf + return + end + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.ne + if + local.get $1 + f32.const 0.5 + f32.mul + local.set $1 + f32.const 1701411834604692317316873e14 + local.get $0 + f32.copysign + local.set $0 + end + local.get $0 + local.get $1 + f32.sub + local.get $1 + i32.reinterpret_f32 + i32.const 23 + i32.shr_u + i32.const 255 + i32.and + local.tee $3 + i32.eqz + if local.get $3 - i32.const -150 + i32.const 1 i32.add - i32.sub - call $~lib/math/NativeMathf.scalbn - local.get $2 - f32.add - local.set $2 + local.set $3 + end + i32.const 0 + local.get $3 + 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.get $0 + local.get $1 + f32.eq + if + i32.const 1 + return end + local.get $1 + local.get $1 + f32.ne + if + local.get $0 + local.get $0 + f32.ne + return + end + local.get $0 + local.get $1 local.get $2 + call $std/math/ulperrf f32.abs f32.const 1.5 f32.ge @@ -4467,16 +4479,6 @@ end local.get $0 ) - (func $~lib/math/expo2 (param $0 f64) (result f64) - local.get $0 - f64.const 1416.0996898839683 - f64.sub - call $~lib/math/NativeMath.exp - f64.const 2247116418577894884661631e283 - f64.mul - f64.const 2247116418577894884661631e283 - f64.mul - ) (func $std/math/test_cosh (param $0 f64) (param $1 f64) (param $2 f64) (result i32) (local $3 f64) (local $4 i32) @@ -4534,7 +4536,13 @@ br $__inlined_func$~lib/math/NativeMath.cosh end local.get $3 - call $~lib/math/expo2 + f64.const 1416.0996898839683 + f64.sub + call $~lib/math/NativeMath.exp + f64.const 2247116418577894884661631e283 + f64.mul + f64.const 2247116418577894884661631e283 + f64.mul end local.get $1 local.get $2 @@ -4930,72 +4938,64 @@ end local.get $0 ) - (func $~lib/math/expo2f (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cosh (param $0 f32) (result f32) + (local $1 i32) local.get $0 - f32.const 162.88958740234375 - f32.sub - call $~lib/math/NativeMathf.exp - f32.const 1661534994731144841129758e11 - f32.mul - f32.const 1661534994731144841129758e11 - f32.mul - ) - (func $std/math/test_coshf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - (local $3 i32) - block $__inlined_func$~lib/math/NativeMathf.cosh (result f32) - local.get $0 - i32.reinterpret_f32 - i32.const 2147483647 - i32.and - local.tee $3 - f32.reinterpret_i32 - local.set $0 - local.get $3 - i32.const 1060205079 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $1 + f32.reinterpret_i32 + local.set $0 + local.get $1 + i32.const 1060205079 + i32.lt_u + if + local.get $1 + i32.const 964689920 i32.lt_u if f32.const 1 - local.get $3 - i32.const 964689920 - i32.lt_u - br_if $__inlined_func$~lib/math/NativeMathf.cosh - drop - f32.const 1 - local.get $0 - call $~lib/math/NativeMathf.expm1 - local.tee $0 - local.get $0 - f32.mul - f32.const 2 - f32.const 2 - local.get $0 - f32.mul - f32.add - f32.div - f32.add - br $__inlined_func$~lib/math/NativeMathf.cosh - end - local.get $3 - i32.const 1118925335 - i32.lt_u - if - f32.const 0.5 - local.get $0 - call $~lib/math/NativeMathf.exp - local.tee $0 - f32.mul - f32.const 0.5 - local.get $0 - f32.div - f32.add - br $__inlined_func$~lib/math/NativeMathf.cosh + return end + f32.const 1 + local.get $0 + call $~lib/math/NativeMathf.expm1 + local.tee $0 + local.get $0 + f32.mul + f32.const 2 + f32.const 2 local.get $0 - call $~lib/math/expo2f + f32.mul + f32.add + f32.div + f32.add + return end local.get $1 - local.get $2 - call $std/math/check + i32.const 1118925335 + i32.lt_u + if + f32.const 0.5 + local.get $0 + call $~lib/math/NativeMathf.exp + local.tee $0 + f32.mul + f32.const 0.5 + local.get $0 + f32.div + f32.add + return + end + local.get $0 + f32.const 162.88958740234375 + f32.sub + call $~lib/math/NativeMathf.exp + f32.const 1661534994731144841129758e11 + f32.mul + f32.const 1661534994731144841129758e11 + f32.mul ) (func $std/math/test_exp (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 @@ -8199,28 +8199,6 @@ unreachable end ) - (func $std/math/test_round (param $0 f64) (param $1 f64) (result i32) - local.get $0 - f64.const 0.5 - f64.add - f64.floor - local.get $0 - f64.copysign - local.get $1 - f64.const 0 - call $std/math/check - ) - (func $std/math/test_roundf (param $0 f32) (param $1 f32) (result i32) - local.get $0 - f32.const 0.5 - f32.add - f32.floor - local.get $0 - f32.copysign - local.get $1 - f32.const 0 - call $std/math/check - ) (func $std/math/test_sign (param $0 f64) (param $1 f64) (result i32) f64.const 1 local.get $0 @@ -8912,82 +8890,86 @@ local.get $2 call $std/math/check ) - (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 + (func $~lib/math/NativeMath.sinh (param $0 f64) (result f64) + (local $1 f64) + (local $2 f64) + (local $3 i32) + (local $4 i64) local.get $0 i64.reinterpret_f64 i64.const 9223372036854775807 i64.and - local.tee $7 + local.tee $4 f64.reinterpret_i64 - local.set $4 + local.set $1 f64.const 0.5 local.get $0 f64.copysign - 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 + 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 i32.lt_u if - local.get $4 - call $~lib/math/NativeMath.expm1 - local.set $4 - local.get $6 - i32.const 1072693248 + local.get $3 + i32.const 1045430272 i32.lt_u if - local.get $6 - i32.const 1045430272 - i32.lt_u - br_if $__inlined_func$~lib/math/NativeMath.sinh - local.get $5 - f64.const 2 - local.get $4 - f64.mul - 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 + local.get $0 + return end - local.get $5 - local.get $4 - local.get $4 - local.get $4 + local.get $2 + f64.const 2 + local.get $1 + f64.mul + local.get $1 + local.get $1 + f64.mul + local.get $1 f64.const 1 f64.add f64.div - f64.add + f64.sub f64.mul - local.set $3 - br $__inlined_func$~lib/math/NativeMath.sinh + return end - f64.const 2 - local.get $5 - f64.mul - local.get $4 - call $~lib/math/expo2 + local.get $2 + local.get $1 + local.get $1 + local.get $1 + f64.const 1 + f64.add + f64.div + f64.add f64.mul - local.set $3 + return end - local.get $3 + f64.const 2 + local.get $2 + f64.mul + local.get $1 + f64.const 1416.0996898839683 + f64.sub + call $~lib/math/NativeMath.exp + f64.const 2247116418577894884661631e283 + f64.mul + f64.const 2247116418577894884661631e283 + f64.mul + 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 $1 local.get $2 call $std/math/check @@ -9001,77 +8983,77 @@ i32.const 0 end ) - (func $std/math/test_sinhf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $~lib/math/NativeMathf.sinh (param $0 f32) (result f32) + (local $1 f32) + (local $2 i32) (local $3 f32) - (local $4 i32) - (local $5 f32) local.get $0 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $4 + local.tee $2 f32.reinterpret_i32 - local.set $3 + local.set $1 f32.const 0.5 local.get $0 f32.copysign - local.set $5 - block $__inlined_func$~lib/math/NativeMathf.sinh - local.get $4 - i32.const 1118925335 + local.set $3 + local.get $2 + i32.const 1118925335 + i32.lt_u + if + local.get $1 + call $~lib/math/NativeMathf.expm1 + local.set $1 + local.get $2 + i32.const 1065353216 i32.lt_u if - local.get $3 - call $~lib/math/NativeMathf.expm1 - local.set $3 - local.get $4 - i32.const 1065353216 + local.get $2 + i32.const 964689920 i32.lt_u if - local.get $4 - i32.const 964689920 - i32.lt_u - br_if $__inlined_func$~lib/math/NativeMathf.sinh - local.get $5 - f32.const 2 - local.get $3 - f32.mul - 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 + local.get $0 + return end - local.get $5 - local.get $3 - local.get $3 local.get $3 + f32.const 2 + local.get $1 + f32.mul + local.get $1 + local.get $1 + f32.mul + local.get $1 f32.const 1 f32.add f32.div - f32.add + f32.sub f32.mul - local.set $0 - br $__inlined_func$~lib/math/NativeMathf.sinh + return end - f32.const 2 - local.get $5 - f32.mul local.get $3 - call $~lib/math/expo2f + local.get $1 + local.get $1 + local.get $1 + f32.const 1 + f32.add + f32.div + f32.add f32.mul - local.set $0 + return end - local.get $0 + f32.const 2 + local.get $3 + f32.mul local.get $1 - local.get $2 - call $std/math/check + f32.const 162.88958740234375 + f32.sub + call $~lib/math/NativeMathf.exp + f32.const 1661534994731144841129758e11 + f32.mul + f32.const 1661534994731144841129758e11 + f32.mul + f32.mul ) (func $std/math/test_sqrt (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 @@ -20505,9 +20487,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.cosh f32.const 1593.5216064453125 f32.const 0.26242581009864807 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -20518,9 +20501,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.cosh f32.const 38.56174087524414 f32.const -0.08168885856866837 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -20531,9 +20515,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.cosh f32.const 2182.631103515625 f32.const -0.02331414446234703 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -20544,9 +20529,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.cosh f32.const 343.2738037109375 f32.const 0.20081493258476257 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -20557,9 +20543,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.cosh f32.const 5291.78173828125 f32.const 0.36286723613739014 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -20570,9 +20557,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.cosh f32.const 1.2272322177886963 f32.const 0.32777416706085205 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -20583,9 +20571,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.cosh f32.const 1.0838085412979126 f32.const -0.039848703891038895 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -20596,9 +20585,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.cosh f32.const 1.161980390548706 f32.const 0.15274477005004883 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -20609,9 +20599,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.cosh f32.const 1.314923644065857 f32.const -0.2387111485004425 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -20622,9 +20613,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.cosh f32.const 1.2393412590026855 f32.const -0.45791932940483093 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -20635,9 +20627,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.cosh f32.const 1 f32.const 0 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -20648,9 +20641,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.cosh f32.const 1 f32.const 0 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -20661,9 +20655,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.cosh f32.const inf f32.const 0 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -20674,9 +20669,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.cosh f32.const inf f32.const 0 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -20687,9 +20683,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.cosh f32.const nan:0x400000 f32.const 0 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -38090,9 +38087,10 @@ br $for-loop|1 end end - f64.const -8.06684839057968 f64.const -8 - call $std/math/test_round + f64.const -8 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38102,9 +38100,10 @@ call $~lib/builtins/abort unreachable end - f64.const 4.345239849338305 f64.const 4 - call $std/math/test_round + f64.const 4 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38114,9 +38113,10 @@ call $~lib/builtins/abort unreachable end - f64.const -8.38143342755525 f64.const -8 - call $std/math/test_round + f64.const -8 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38126,9 +38126,10 @@ call $~lib/builtins/abort unreachable end - f64.const -6.531673581913484 f64.const -7 - call $std/math/test_round + f64.const -7 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38138,9 +38139,10 @@ call $~lib/builtins/abort unreachable end - f64.const 9.267056966972586 f64.const 9 - call $std/math/test_round + f64.const 9 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38150,9 +38152,10 @@ call $~lib/builtins/abort unreachable end - f64.const 0.6619858980995045 f64.const 1 - call $std/math/test_round + f64.const 1 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38162,9 +38165,10 @@ call $~lib/builtins/abort unreachable end - f64.const -0.4066039223853553 f64.const -0 - call $std/math/test_round + f64.const -0 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38174,9 +38178,10 @@ call $~lib/builtins/abort unreachable end - f64.const 0.5617597462207241 f64.const 1 - call $std/math/test_round + f64.const 1 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38186,9 +38191,10 @@ call $~lib/builtins/abort unreachable end - f64.const 0.7741522965913037 f64.const 1 - call $std/math/test_round + f64.const 1 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38198,9 +38204,10 @@ call $~lib/builtins/abort unreachable end - f64.const -0.6787637026394024 f64.const -1 - call $std/math/test_round + f64.const -1 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38212,7 +38219,8 @@ end f64.const nan:0x8000000000000 f64.const nan:0x8000000000000 - call $std/math/test_round + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38224,7 +38232,8 @@ end f64.const inf f64.const inf - call $std/math/test_round + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38236,7 +38245,8 @@ end f64.const -inf f64.const -inf - call $std/math/test_round + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38248,7 +38258,8 @@ end f64.const 0 f64.const 0 - call $std/math/test_round + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38260,7 +38271,8 @@ end f64.const -0 f64.const -0 - call $std/math/test_round + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38272,7 +38284,8 @@ end f64.const 1 f64.const 1 - call $std/math/test_round + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38284,7 +38297,8 @@ end f64.const -1 f64.const -1 - call $std/math/test_round + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38294,9 +38308,10 @@ call $~lib/builtins/abort unreachable end - f64.const 0.5 f64.const 1 - call $std/math/test_round + f64.const 1 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38306,9 +38321,10 @@ call $~lib/builtins/abort unreachable end - f64.const -0.5 f64.const -0 - call $std/math/test_round + f64.const -0 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38318,9 +38334,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.5 f64.const 2 - call $std/math/test_round + f64.const 2 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38330,9 +38347,10 @@ call $~lib/builtins/abort unreachable end - f64.const -1.5 f64.const -1 - call $std/math/test_round + f64.const -1 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38342,9 +38360,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.0000152587890625 f64.const 1 - call $std/math/test_round + f64.const 1 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38354,9 +38373,10 @@ call $~lib/builtins/abort unreachable end - f64.const -1.0000152587890625 f64.const -1 - call $std/math/test_round + f64.const -1 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38366,9 +38386,10 @@ call $~lib/builtins/abort unreachable end - f64.const 0.9999923706054688 f64.const 1 - call $std/math/test_round + f64.const 1 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38378,9 +38399,10 @@ call $~lib/builtins/abort unreachable end - f64.const -0.9999923706054688 f64.const -1 - call $std/math/test_round + f64.const -1 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38390,9 +38412,10 @@ call $~lib/builtins/abort unreachable end - f64.const 7.888609052210118e-31 f64.const 0 - call $std/math/test_round + f64.const 0 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38402,9 +38425,10 @@ call $~lib/builtins/abort unreachable end - f64.const -7.888609052210118e-31 f64.const -0 - call $std/math/test_round + f64.const -0 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38414,9 +38438,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.066848754882812 f32.const -8 - call $std/math/test_roundf + f32.const -8 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38426,9 +38451,10 @@ call $~lib/builtins/abort unreachable end - f32.const 4.345239639282227 f32.const 4 - call $std/math/test_roundf + f32.const 4 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38438,9 +38464,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.381433486938477 f32.const -8 - call $std/math/test_roundf + f32.const -8 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38450,9 +38477,10 @@ call $~lib/builtins/abort unreachable end - f32.const -6.531673431396484 f32.const -7 - call $std/math/test_roundf + f32.const -7 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38462,9 +38490,10 @@ call $~lib/builtins/abort unreachable end - f32.const 9.267057418823242 f32.const 9 - call $std/math/test_roundf + f32.const 9 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38474,9 +38503,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.6619858741760254 f32.const 1 - call $std/math/test_roundf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38486,9 +38516,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.40660393238067627 f32.const -0 - call $std/math/test_roundf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38498,9 +38529,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5617597699165344 f32.const 1 - call $std/math/test_roundf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38510,9 +38542,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.7741522789001465 f32.const 1 - call $std/math/test_roundf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38522,9 +38555,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.6787636876106262 f32.const -1 - call $std/math/test_roundf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38536,7 +38570,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_roundf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38548,7 +38583,8 @@ end f32.const inf f32.const inf - call $std/math/test_roundf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38560,7 +38596,8 @@ end f32.const -inf f32.const -inf - call $std/math/test_roundf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38572,7 +38609,8 @@ end f32.const 0 f32.const 0 - call $std/math/test_roundf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38584,7 +38622,8 @@ end f32.const -0 f32.const -0 - call $std/math/test_roundf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38596,7 +38635,8 @@ end f32.const 1 f32.const 1 - call $std/math/test_roundf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38608,7 +38648,8 @@ end f32.const -1 f32.const -1 - call $std/math/test_roundf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38618,9 +38659,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5 f32.const 1 - call $std/math/test_roundf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38630,9 +38672,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.5 f32.const -0 - call $std/math/test_roundf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38642,9 +38685,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.5 f64.const 2 - call $std/math/test_round + f64.const 2 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38654,9 +38698,10 @@ call $~lib/builtins/abort unreachable end - f64.const -1.5 f64.const -1 - call $std/math/test_round + f64.const -1 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38666,9 +38711,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.0000152587890625 f32.const 1 - call $std/math/test_roundf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38678,9 +38724,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1.0000152587890625 f32.const -1 - call $std/math/test_roundf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38690,9 +38737,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.9999923706054688 f32.const 1 - call $std/math/test_roundf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38702,9 +38750,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.9999923706054688 f32.const -1 - call $std/math/test_roundf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38714,9 +38763,10 @@ call $~lib/builtins/abort unreachable end - f32.const 7.888609052210118e-31 f32.const 0 - call $std/math/test_roundf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38726,9 +38776,10 @@ call $~lib/builtins/abort unreachable end - f32.const -7.888609052210118e-31 f32.const -0 - call $std/math/test_roundf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38954,178 +39005,6 @@ call $~lib/builtins/abort unreachable end - f64.const 0 - call $~lib/math/NativeMath.signbit - if - i32.const 0 - i32.const 1040 - i32.const 3127 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - f64.const -0 - call $~lib/math/NativeMath.signbit - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 3128 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - f64.const 1 - call $~lib/math/NativeMath.signbit - if - i32.const 0 - i32.const 1040 - i32.const 3129 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - f64.const -1 - call $~lib/math/NativeMath.signbit - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 3130 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.signbit - if - i32.const 0 - i32.const 1040 - i32.const 3131 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - f64.const -nan:0x8000000000000 - call $~lib/math/NativeMath.signbit - if - i32.const 0 - i32.const 1040 - i32.const 3132 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - f64.const inf - call $~lib/math/NativeMath.signbit - if - i32.const 0 - i32.const 1040 - i32.const 3133 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - f64.const -inf - call $~lib/math/NativeMath.signbit - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 3134 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - f32.const 0 - call $~lib/math/NativeMathf.signbit - if - i32.const 0 - i32.const 1040 - i32.const 3140 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - f32.const -0 - call $~lib/math/NativeMathf.signbit - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 3141 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - f32.const 1 - call $~lib/math/NativeMathf.signbit - if - i32.const 0 - i32.const 1040 - i32.const 3142 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - f32.const -1 - call $~lib/math/NativeMathf.signbit - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 3143 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - f32.const nan:0x400000 - call $~lib/math/NativeMathf.signbit - if - i32.const 0 - i32.const 1040 - i32.const 3144 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - f32.const -nan:0x400000 - call $~lib/math/NativeMathf.signbit - if - i32.const 0 - i32.const 1040 - i32.const 3145 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - f32.const inf - call $~lib/math/NativeMathf.signbit - if - i32.const 0 - i32.const 1040 - i32.const 3146 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - f32.const -inf - call $~lib/math/NativeMathf.signbit - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 3147 - i32.const 1 - call $~lib/builtins/abort - unreachable - end f64.const -8.06684839057968 f64.const 4.535662560676869 call $~lib/math/NativeMath.rem @@ -43409,9 +43288,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.sinh f32.const -1593.521240234375 f32.const 0.1671663224697113 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -43422,9 +43302,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.sinh f32.const 38.548770904541016 f32.const -0.49340328574180603 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -43435,9 +43316,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.sinh f32.const -2182.630859375 f32.const 0.0849970355629921 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -43448,9 +43330,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.sinh f32.const -343.2723388671875 f32.const 0.0704190656542778 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -43461,9 +43344,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.sinh f32.const 5291.78125 f32.const -0.44362515211105347 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -43474,9 +43358,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.sinh f32.const 0.7114062309265137 f32.const 0.058103885501623154 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -43487,9 +43372,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.sinh f32.const -0.4179006516933441 f32.const 0.39349499344825745 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -43500,9 +43386,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.sinh f32.const 0.5917755961418152 f32.const -0.4183797240257263 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -43513,9 +43400,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.sinh f32.const 0.8538292050361633 f32.const 0.45992106199264526 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -43526,9 +43414,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.sinh f32.const -0.7320976257324219 f32.const -0.48159059882164 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -43539,9 +43428,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.sinh f32.const 0 f32.const 0 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -43552,9 +43442,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.sinh f32.const -0 f32.const 0 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -43565,9 +43456,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.sinh f32.const inf f32.const 0 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -43578,9 +43470,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.sinh f32.const -inf f32.const 0 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -43591,9 +43484,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.sinh f32.const nan:0x400000 f32.const 0 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 854a6780a7..c94042df4d 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -8,15 +8,15 @@ (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) - (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i32_i64_=>_none (func (param i32 i64))) (type $i32_f32_=>_none (func (param i32 f32))) (type $i32_f64_=>_none (func (param i32 f64))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) + (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) + (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i64_=>_i32 (func (param i64) (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) @@ -54,16 +54,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -261,7 +251,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -293,7 +289,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -880,9 +882,21 @@ i32.and i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $1 + i32.const 16 + i32.add local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -4 + i32.and + i32.add i32.load i32.const -3 i32.and @@ -893,7 +907,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -921,18 +934,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 i32.shl - local.set $5 - local.get $3 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $5 - i32.const 16 - i32.sub i32.ne i32.shl local.get $4 @@ -957,12 +967,12 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 - i32.gt_s - local.set $6 + local.set $5 local.get $3 local.get $5 - local.get $6 + local.get $3 + local.get $5 + i32.gt_s select memory.grow i32.const 0 @@ -1277,25 +1287,23 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (param $0 i32) + (func $~lib/set/Set#clear (param $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 16 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 local.get $0 + i32.load + local.tee $2 i32.const 1444 i32.gt_u if - local.get $0 + local.get $2 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - ) - (func $~lib/set/Set#clear (param $0 i32) - (local $1 i32) - i32.const 16 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $0 - i32.load - call $~lib/rt/pure/__release local.get $0 local.get $1 i32.store @@ -1307,7 +1315,15 @@ local.set $1 local.get $0 i32.load offset=8 - call $~lib/rt/pure/__release + local.tee $2 + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 i32.store offset=8 @@ -1352,17 +1368,6 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i32) - local.get $0 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - ) (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load @@ -1427,7 +1432,7 @@ i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $6 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor @@ -1440,11 +1445,11 @@ i32.const 3 i32.shl i32.add - local.set $6 + local.set $5 local.get $2 local.set $3 loop $while-continue|0 - local.get $6 + local.get $5 local.get $8 i32.ne if @@ -1460,18 +1465,21 @@ i32.store8 local.get $3 local.get $4 + local.get $1 local.get $8 i32.load8_s - call $~lib/util/hash/HASH - local.get $1 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul i32.and i32.const 2 i32.shl i32.add - local.tee $5 + local.tee $7 i32.load i32.store offset=4 - local.get $5 + local.get $7 local.get $3 i32.store local.get $3 @@ -1490,14 +1498,21 @@ local.tee $3 local.get $0 i32.load - local.tee $8 + local.tee $7 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $8 - call $~lib/rt/pure/__release + local.get $7 + i32.const 1444 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $3 @@ -1516,32 +1531,62 @@ call $~lib/rt/pure/__retain local.set $1 local.get $3 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 i32.store offset=8 local.get $0 - local.get $7 + local.get $6 i32.store offset=12 local.get $0 local.get $0 i32.load offset=20 i32.store offset=16 local.get $4 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 local.get $1 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + local.tee $2 + local.set $3 + local.get $0 local.get $1 - call $~lib/util/hash/HASH - local.tee $3 + local.get $2 call $~lib/set/Set#find i32.eqz if @@ -1672,7 +1717,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $4 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 local.get $2 @@ -1902,8 +1954,16 @@ return end local.get $1 - call $~lib/rt/tlsf/GETRIGHT - local.tee $6 + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $4 + local.set $6 + local.get $4 i32.load local.tee $4 i32.const 1 @@ -1926,10 +1986,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 @@ -2144,7 +2204,14 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/set/Set#find local.tee $1 i32.eqz @@ -2221,7 +2288,14 @@ local.get $0 local.get $2 local.get $2 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/set/Set#find if i32.const 0 @@ -2234,11 +2308,26 @@ local.get $0 local.get $2 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $2 local.get $2 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/set/Set#find i32.eqz if @@ -2282,7 +2371,14 @@ local.get $0 local.get $2 local.get $2 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/set/Set#find i32.eqz if @@ -2296,11 +2392,26 @@ local.get $0 local.get $2 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $2 local.get $2 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/set/Set#find i32.eqz if @@ -2330,6 +2441,8 @@ call $~lib/builtins/abort unreachable end + i32.const 0 + local.set $3 local.get $0 i32.load offset=8 local.set $5 @@ -2386,7 +2499,14 @@ local.get $1 call $~lib/array/Array#__get local.tee $4 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul local.set $5 local.get $0 local.get $4 @@ -2406,7 +2526,15 @@ local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 i32.const 1 i32.add @@ -2441,7 +2569,14 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/set/Set#find i32.eqz if @@ -2458,7 +2593,14 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/set/Set#find if i32.const 0 @@ -2501,7 +2643,14 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/set/Set#find if i32.const 0 @@ -2514,11 +2663,26 @@ local.get $0 local.get $1 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/set/Set#find i32.eqz if @@ -2535,8 +2699,15 @@ local.get $0 local.get $1 local.get $1 - call $~lib/util/hash/HASH - call $~lib/set/Set#find + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -2577,11 +2748,32 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) @@ -2708,7 +2900,14 @@ call $~lib/rt/pure/__retain local.set $3 local.get $7 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $3 @@ -2727,7 +2926,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $3 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -2740,9 +2946,23 @@ i32.load offset=20 i32.store offset=16 local.get $4 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -2890,7 +3110,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $4 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 local.get $2 @@ -3028,7 +3255,15 @@ local.get $0 local.get $2 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $2 local.get $2 @@ -3098,7 +3333,15 @@ local.get $0 local.get $2 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $2 local.get $2 @@ -3137,6 +3380,8 @@ call $~lib/builtins/abort unreachable end + i32.const 0 + local.set $3 local.get $0 i32.load offset=8 local.set $5 @@ -3218,7 +3463,15 @@ local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 i32.const 1 i32.add @@ -3337,7 +3590,15 @@ local.get $0 local.get $1 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 local.get $1 @@ -3410,11 +3671,32 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) @@ -3609,7 +3891,14 @@ call $~lib/rt/pure/__retain local.set $3 local.get $8 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $3 @@ -3618,7 +3907,8 @@ local.get $1 i32.store offset=4 local.get $2 - local.tee $1 + local.set $1 + local.get $2 local.get $0 i32.load offset=8 local.tee $3 @@ -3628,7 +3918,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $3 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -3641,9 +3938,23 @@ i32.load offset=20 i32.store offset=16 local.get $4 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -3794,7 +4105,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $5 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 local.get $2 @@ -3956,7 +4274,7 @@ call $~lib/set/Set#constructor local.set $0 loop $for-loop|1 - local.get $2 + local.get $1 i32.const 16 i32.shl i32.const 16 @@ -3965,7 +4283,7 @@ i32.lt_s if local.get $0 - local.get $2 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -3976,11 +4294,19 @@ unreachable end local.get $0 - local.get $2 + local.get $1 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - local.get $2 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -3991,10 +4317,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $for-loop|1 end end @@ -4011,9 +4337,9 @@ unreachable end i32.const 50 - local.set $2 + local.set $1 loop $for-loop|3 - local.get $2 + local.get $1 i32.const 16 i32.shl i32.const 16 @@ -4022,7 +4348,7 @@ i32.lt_s if local.get $0 - local.get $2 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -4034,11 +4360,19 @@ unreachable end local.get $0 - local.get $2 + local.get $1 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - local.get $2 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -4049,10 +4383,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $for-loop|3 end end @@ -4068,6 +4402,8 @@ call $~lib/builtins/abort unreachable end + i32.const 0 + local.set $3 local.get $0 i32.load offset=8 local.set $5 @@ -4075,7 +4411,7 @@ i32.load offset=16 local.tee $6 call $~lib/array/Array#constructor - local.set $2 + local.set $1 loop $for-loop|0 local.get $4 local.get $6 @@ -4092,7 +4428,7 @@ i32.and i32.eqz if - local.get $2 + local.get $1 local.get $3 local.get $7 i32.load16_s @@ -4109,20 +4445,20 @@ br $for-loop|0 end end - local.get $2 + local.get $1 local.get $3 call $~lib/array/Array#set:length call $~lib/set/Set#constructor local.set $3 loop $for-loop|4 - local.get $1 local.get $2 + local.get $1 i32.load offset=12 i32.lt_s if local.get $0 - local.get $2 local.get $1 + local.get $2 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -4135,15 +4471,23 @@ unreachable end local.get $3 - local.get $2 local.get $1 + local.get $2 call $~lib/array/Array#__get call $~lib/set/Set#add - call $~lib/rt/pure/__release - local.get $1 + local.tee $4 + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|4 end end @@ -4161,9 +4505,9 @@ unreachable end i32.const 0 - local.set $1 + local.set $2 loop $for-loop|6 - local.get $1 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -4172,7 +4516,7 @@ i32.lt_s if local.get $0 - local.get $1 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -4184,10 +4528,10 @@ unreachable end local.get $0 - local.get $1 + local.get $2 call $~lib/set/Set#delete local.get $0 - local.get $1 + local.get $2 call $~lib/set/Set#has if i32.const 0 @@ -4197,10 +4541,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|6 end end @@ -4217,9 +4561,9 @@ unreachable end i32.const 0 - local.set $1 + local.set $2 loop $for-loop|8 - local.get $1 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -4228,7 +4572,7 @@ i32.lt_s if local.get $0 - local.get $1 + local.get $2 call $~lib/set/Set#has if i32.const 0 @@ -4239,11 +4583,19 @@ unreachable end local.get $0 - local.get $1 + local.get $2 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - local.get $1 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -4255,10 +4607,10 @@ unreachable end local.get $0 - local.get $1 + local.get $2 call $~lib/set/Set#delete local.get $0 - local.get $1 + local.get $2 call $~lib/set/Set#has if i32.const 0 @@ -4268,10 +4620,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|8 end end @@ -4299,14 +4651,35 @@ call $~lib/builtins/abort unreachable end - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/set/Set#constructor (result i32) + local.get $1 + i32.const 1444 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 1444 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/set/Set#constructor (result i32) (local $0 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 24 @@ -4337,17 +4710,6 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/set/Set#find - i32.const 0 - i32.ne - ) (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -4439,7 +4801,14 @@ call $~lib/rt/pure/__retain local.set $3 local.get $8 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $3 @@ -4448,7 +4817,8 @@ local.get $1 i32.store offset=4 local.get $2 - local.tee $1 + local.set $1 + local.get $2 local.get $0 i32.load offset=8 local.tee $3 @@ -4458,7 +4828,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $3 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -4471,9 +4848,23 @@ i32.load offset=20 i32.store offset=16 local.get $4 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -4622,7 +5013,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $5 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 local.get $2 @@ -4740,7 +5138,11 @@ if local.get $0 local.get $2 - call $~lib/set/Set#has + local.get $2 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -4752,10 +5154,22 @@ local.get $0 local.get $2 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $2 - call $~lib/set/Set#has + local.get $2 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -4795,7 +5209,11 @@ if local.get $0 local.get $2 - call $~lib/set/Set#has + local.get $2 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -4808,10 +5226,22 @@ local.get $0 local.get $2 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $2 - call $~lib/set/Set#has + local.get $2 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -4840,6 +5270,8 @@ call $~lib/builtins/abort unreachable end + i32.const 0 + local.set $3 local.get $0 i32.load offset=8 local.set $5 @@ -4896,7 +5328,12 @@ local.get $2 local.get $1 call $~lib/array/Array#__get - call $~lib/set/Set#has + local.tee $4 + local.get $4 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -4911,7 +5348,15 @@ local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 i32.const 1 i32.add @@ -4943,7 +5388,11 @@ if local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -4958,7 +5407,11 @@ call $~lib/set/Set#delete local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -4997,7 +5450,11 @@ if local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -5009,10 +5466,22 @@ local.get $0 local.get $1 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -5027,7 +5496,11 @@ call $~lib/set/Set#delete local.get $0 local.get $1 - call $~lib/set/Set#has + local.get $1 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -5068,11 +5541,32 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) @@ -5192,46 +5686,46 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 + local.set $4 local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $8 + local.tee $7 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $2 local.get $0 i32.load offset=8 - local.tee $5 + local.tee $8 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $7 + local.set $6 local.get $2 - local.set $4 + local.set $3 loop $while-continue|0 - local.get $5 - local.get $7 + local.get $6 + local.get $8 i32.ne if - local.get $5 + local.get $8 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $4 - local.get $5 + local.get $3 + local.get $8 i32.load i32.store - local.get $4 local.get $3 - local.get $5 + local.get $4 + local.get $8 i32.load call $~lib/util/hash/hash32 local.get $1 @@ -5239,70 +5733,99 @@ i32.const 2 i32.shl i32.add - local.tee $6 + local.tee $5 i32.load i32.store offset=4 - local.get $6 - local.get $4 + local.get $5 + local.get $3 i32.store - local.get $4 + local.get $3 i32.const 8 i32.add - local.set $4 + local.set $3 end - local.get $5 + local.get $8 i32.const 8 i32.add - local.set $5 + local.set $8 br $while-continue|0 end end - local.get $3 - local.tee $5 + local.get $4 + local.tee $3 local.get $0 i32.load - local.tee $4 + local.tee $8 i32.ne if - local.get $5 + local.get $3 call $~lib/rt/pure/__retain - local.set $5 - local.get $4 - call $~lib/rt/pure/__release + local.set $3 + local.get $8 + i32.const 1444 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 - local.get $5 + local.get $3 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.tee $1 + local.set $1 + local.get $2 local.get $0 i32.load offset=8 - local.tee $5 + local.tee $3 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $5 - call $~lib/rt/pure/__release + local.get $3 + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 i32.store offset=8 local.get $0 - local.get $8 + local.get $7 i32.store offset=12 local.get $0 local.get $0 i32.load offset=20 i32.store offset=16 - local.get $3 - call $~lib/rt/pure/__release + local.get $4 + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -5447,7 +5970,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $5 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 local.get $2 @@ -5536,7 +6066,6 @@ ) (func $~lib/set/Set#delete (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 local.get $1 @@ -5559,22 +6088,20 @@ i32.const 1 i32.sub i32.store offset=20 - i32.const 4 - local.get $0 - i32.load offset=20 - local.tee $1 - i32.gt_u - local.set $2 local.get $0 i32.load offset=4 i32.const 1 i32.shr_u - local.tee $3 + local.tee $2 i32.const 1 i32.add i32.const 4 + local.get $0 + i32.load offset=20 + local.tee $1 + i32.const 4 local.get $1 - local.get $2 + i32.gt_u select i32.ge_u if (result i32) @@ -5592,7 +6119,7 @@ end if local.get $0 - local.get $3 + local.get $2 call $~lib/set/Set#rehash end ) @@ -5628,7 +6155,15 @@ local.get $0 local.get $2 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $2 local.get $2 @@ -5686,7 +6221,15 @@ local.get $0 local.get $2 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $2 local.get $2 @@ -5720,6 +6263,8 @@ call $~lib/builtins/abort unreachable end + i32.const 0 + local.set $3 local.get $0 i32.load offset=8 local.set $5 @@ -5794,7 +6339,15 @@ local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 i32.const 1 i32.add @@ -5894,7 +6447,15 @@ local.get $0 local.get $1 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 local.get $1 @@ -5957,11 +6518,32 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) @@ -6054,7 +6636,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $5 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 local.get $2 @@ -6102,7 +6691,15 @@ local.get $0 local.get $2 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $2 local.get $2 @@ -6160,7 +6757,15 @@ local.get $0 local.get $2 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $2 local.get $2 @@ -6194,6 +6799,8 @@ call $~lib/builtins/abort unreachable end + i32.const 0 + local.set $3 local.get $0 i32.load offset=8 local.set $5 @@ -6268,7 +6875,15 @@ local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 i32.const 1 i32.add @@ -6368,7 +6983,15 @@ local.get $0 local.get $1 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 local.get $1 @@ -6431,20 +7054,50 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/set/Set#clear (param $0 i32) (local $1 i32) + (local $2 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $0 i32.load - call $~lib/rt/pure/__release + local.tee $2 + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 i32.store @@ -6456,7 +7109,15 @@ local.set $1 local.get $0 i32.load offset=8 - call $~lib/rt/pure/__release + local.tee $2 + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 i32.store offset=8 @@ -6623,46 +7284,46 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 + local.set $4 local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $8 + local.tee $7 i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $2 local.get $0 i32.load offset=8 - local.tee $5 + local.tee $8 local.get $0 i32.load offset=16 i32.const 4 i32.shl i32.add - local.set $7 + local.set $6 local.get $2 - local.set $4 + local.set $3 loop $while-continue|0 - local.get $5 - local.get $7 + local.get $6 + local.get $8 i32.ne if - local.get $5 + local.get $8 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $4 - local.get $5 + local.get $3 + local.get $8 i64.load i64.store - local.get $4 local.get $3 - local.get $5 + local.get $4 + local.get $8 i64.load call $~lib/util/hash/hash64 local.get $1 @@ -6670,82 +7331,109 @@ i32.const 2 i32.shl i32.add - local.tee $6 + local.tee $5 i32.load i32.store offset=8 - local.get $6 - local.get $4 + local.get $5 + local.get $3 i32.store - local.get $4 + local.get $3 i32.const 16 i32.add - local.set $4 + local.set $3 end - local.get $5 + local.get $8 i32.const 16 i32.add - local.set $5 + local.set $8 br $while-continue|0 end end - local.get $3 - local.tee $5 + local.get $4 + local.tee $3 local.get $0 i32.load - local.tee $4 + local.tee $8 i32.ne if - local.get $5 + local.get $3 call $~lib/rt/pure/__retain - local.set $5 - local.get $4 - call $~lib/rt/pure/__release + local.set $3 + local.get $8 + i32.const 1444 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 - local.get $5 + local.get $3 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $2 - local.tee $1 + local.set $1 + local.get $2 local.get $0 i32.load offset=8 - local.tee $5 + local.tee $3 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $5 - call $~lib/rt/pure/__release + local.get $3 + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 i32.store offset=8 local.get $0 - local.get $8 + local.get $7 i32.store offset=12 local.get $0 local.get $0 i32.load offset=20 i32.store offset=16 - local.get $3 - call $~lib/rt/pure/__release + local.get $4 + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $1 - call $~lib/util/hash/hash64 - local.tee $2 - local.set $3 local.get $0 local.get $1 - local.get $2 + local.get $1 + call $~lib/util/hash/hash64 + local.tee $3 call $~lib/set/Set#find i32.eqz if @@ -6880,7 +7568,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $5 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 local.get $2 @@ -6970,7 +7665,6 @@ (func $~lib/set/Set#delete (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 local.get $1 local.get $1 @@ -6993,22 +7687,20 @@ i32.const 1 i32.sub i32.store offset=20 - i32.const 4 - local.get $0 - i32.load offset=20 - local.tee $2 - i32.gt_u - local.set $3 local.get $0 i32.load offset=4 i32.const 1 i32.shr_u - local.tee $4 + local.tee $3 i32.const 1 i32.add i32.const 4 + local.get $0 + i32.load offset=20 + local.tee $2 + i32.const 4 local.get $2 - local.get $3 + i32.gt_u select i32.ge_u if (result i32) @@ -7026,7 +7718,7 @@ end if local.get $0 - local.get $4 + local.get $3 call $~lib/set/Set#rehash end ) @@ -7063,7 +7755,15 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 local.get $0 @@ -7121,7 +7821,15 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 local.get $0 @@ -7162,7 +7870,7 @@ i32.load offset=16 local.tee $7 call $~lib/array/Array#constructor - local.set $3 + local.set $2 loop $for-loop|00 local.get $4 local.get $7 @@ -7179,15 +7887,15 @@ i32.and i32.eqz if - local.get $3 local.get $2 + local.get $3 local.get $8 i64.load call $~lib/array/Array#__set - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 end local.get $4 i32.const 1 @@ -7196,19 +7904,19 @@ br $for-loop|00 end end - local.get $3 local.get $2 + local.get $3 call $~lib/array/Array#set:length call $~lib/set/Set#constructor - local.set $2 + local.set $3 loop $for-loop|2 local.get $5 - local.get $3 + local.get $2 i32.load offset=12 i32.lt_s if local.get $1 - local.get $3 + local.get $2 local.get $5 call $~lib/array/Array#__get local.tee $0 @@ -7224,12 +7932,20 @@ call $~lib/builtins/abort unreachable end - local.get $2 local.get $3 + local.get $2 local.get $5 call $~lib/array/Array#__get call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 i32.const 1 i32.add @@ -7237,7 +7953,7 @@ br $for-loop|2 end end - local.get $2 + local.get $3 i32.load offset=20 local.get $1 i32.load offset=20 @@ -7329,7 +8045,15 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 local.get $0 @@ -7391,12 +8115,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 - call $~lib/rt/pure/__release local.get $2 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) @@ -7489,7 +8234,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $5 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 local.get $2 @@ -7538,7 +8290,15 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 local.get $0 @@ -7596,7 +8356,15 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 local.get $0 @@ -7637,7 +8405,7 @@ i32.load offset=16 local.tee $7 call $~lib/array/Array#constructor - local.set $3 + local.set $2 loop $for-loop|00 local.get $4 local.get $7 @@ -7654,15 +8422,15 @@ i32.and i32.eqz if - local.get $3 local.get $2 + local.get $3 local.get $8 i64.load call $~lib/array/Array#__set - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 end local.get $4 i32.const 1 @@ -7671,19 +8439,19 @@ br $for-loop|00 end end - local.get $3 local.get $2 + local.get $3 call $~lib/array/Array#set:length call $~lib/set/Set#constructor - local.set $2 + local.set $3 loop $for-loop|2 local.get $5 - local.get $3 + local.get $2 i32.load offset=12 i32.lt_s if local.get $1 - local.get $3 + local.get $2 local.get $5 call $~lib/array/Array#__get local.tee $0 @@ -7699,12 +8467,20 @@ call $~lib/builtins/abort unreachable end - local.get $2 local.get $3 + local.get $2 local.get $5 call $~lib/array/Array#__get call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 i32.const 1 i32.add @@ -7712,7 +8488,7 @@ br $for-loop|2 end end - local.get $2 + local.get $3 i32.load offset=20 local.get $1 i32.load offset=20 @@ -7804,7 +8580,15 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $4 + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 local.get $0 @@ -7855,23 +8639,44 @@ unreachable end local.get $1 - call $~lib/set/Set#clear - local.get $1 - i32.load offset=20 + call $~lib/set/Set#clear + local.get $1 + i32.load offset=20 + if + i32.const 0 + i32.const 1312 + i32.const 49 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 1444 + i32.gt_u if - i32.const 0 - i32.const 1312 - i32.const 49 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement 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 ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) @@ -7945,16 +8750,6 @@ end i32.const 0 ) - (func $~lib/set/Set#has (param $0 i32) (param $1 f32) (result i32) - local.get $0 - local.get $1 - local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find - i32.const 0 - i32.ne - ) (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -8047,7 +8842,14 @@ call $~lib/rt/pure/__retain local.set $3 local.get $8 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $3 @@ -8056,7 +8858,8 @@ local.get $1 i32.store offset=4 local.get $2 - local.tee $1 + local.set $1 + local.get $2 local.get $0 i32.load offset=8 local.tee $3 @@ -8066,7 +8869,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $3 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -8079,9 +8889,23 @@ i32.load offset=20 i32.store offset=16 local.get $4 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/set/Set#add (param $0 i32) (param $1 f32) (result i32) (local $2 i32) @@ -8229,7 +9053,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $5 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 local.get $2 @@ -8419,6 +9250,7 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) call $~lib/set/Set#constructor local.set $1 loop $for-loop|0 @@ -8428,7 +9260,10 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -8440,10 +9275,21 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -8481,7 +9327,10 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -8494,10 +9343,21 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -8541,7 +9401,11 @@ local.get $2 local.get $3 call $~lib/array/Array#__get - call $~lib/set/Set#has + local.tee $0 + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -8556,7 +9420,15 @@ local.get $3 call $~lib/array/Array#__get call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $5 + i32.const 1444 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 i32.const 1 i32.add @@ -8586,7 +9458,10 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -8601,7 +9476,10 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -8638,7 +9516,10 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -8650,10 +9531,21 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -8668,7 +9560,10 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -8709,11 +9604,32 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) @@ -8787,16 +9703,6 @@ end i32.const 0 ) - (func $~lib/set/Set#has (param $0 i32) (param $1 f64) (result i32) - local.get $0 - local.get $1 - local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find - i32.const 0 - i32.ne - ) (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -8889,7 +9795,14 @@ call $~lib/rt/pure/__retain local.set $3 local.get $8 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $3 @@ -8898,7 +9811,8 @@ local.get $1 i32.store offset=4 local.get $2 - local.tee $1 + local.set $1 + local.get $2 local.get $0 i32.load offset=8 local.tee $3 @@ -8908,7 +9822,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $3 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -8921,9 +9842,23 @@ i32.load offset=20 i32.store offset=16 local.get $4 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/set/Set#add (param $0 i32) (param $1 f64) (result i32) (local $2 i32) @@ -9071,7 +10006,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $5 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 local.get $2 @@ -9261,6 +10203,7 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) call $~lib/set/Set#constructor local.set $1 loop $for-loop|0 @@ -9270,7 +10213,10 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -9282,10 +10228,21 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -9323,7 +10280,10 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -9336,10 +10296,21 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -9383,7 +10354,11 @@ local.get $2 local.get $3 call $~lib/array/Array#__get - call $~lib/set/Set#has + local.tee $0 + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -9398,7 +10373,15 @@ local.get $3 call $~lib/array/Array#__get call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $5 + i32.const 1444 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 i32.const 1 i32.add @@ -9428,7 +10411,10 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -9443,7 +10429,10 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -9480,7 +10469,10 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -9492,10 +10484,21 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 1444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -9510,7 +10513,10 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 1312 @@ -9551,11 +10557,32 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 1444 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~start call $std/set/testNumeric diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index e823ed5b6b..0bb1a6488f 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -1,13 +1,13 @@ (module (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 (func (param i32 i32 i32) (result 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))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -88,16 +88,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -295,7 +285,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -327,7 +323,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -835,11 +837,86 @@ 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 15 + i32.and + if + i32.const 0 + i32.const 1328 + i32.const 357 + 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 32 + 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 16 + i32.add + i32.add + local.tee $1 + local.get $4 + i32.const 16 + 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 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $1 + i32.const 16 + i32.add + 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) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -850,7 +927,6 @@ unreachable end local.get $1 - local.tee $3 i32.const 1073741808 i32.ge_u if @@ -862,20 +938,20 @@ unreachable end local.get $0 - local.get $3 + local.get $1 i32.const 15 i32.add i32.const -16 i32.and - local.tee $1 + local.tee $3 i32.const 16 - local.get $1 + local.get $3 i32.const 16 i32.gt_u select local.tee $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if i32.const 1 @@ -885,21 +961,18 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if + i32.const 16 memory.size - local.tee $1 + local.tee $3 i32.const 16 i32.shl - local.set $5 - local.get $1 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $5 - i32.const 16 - i32.sub i32.ne i32.shl local.get $4 @@ -924,12 +997,12 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 - i32.gt_s - local.set $6 - local.get $1 + local.set $5 + local.get $3 local.get $5 - local.get $6 + local.get $3 + local.get $5 + i32.gt_s select memory.grow i32.const 0 @@ -944,7 +1017,7 @@ end end local.get $0 - local.get $1 + local.get $3 i32.const 16 i32.shl memory.size @@ -954,7 +1027,7 @@ local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $1 + local.tee $3 i32.eqz if i32.const 0 @@ -966,7 +1039,7 @@ end end end - local.get $1 + local.get $3 i32.load i32.const -4 i32.and @@ -980,81 +1053,25 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 0 i32.store offset=4 - local.get $1 + local.get $3 local.get $2 i32.store offset=8 - local.get $1 local.get $3 + local.get $1 i32.store offset=12 local.get $0 - local.get $1 + local.get $3 call $~lib/rt/tlsf/removeBlock - local.get $1 - i32.load - local.set $2 - local.get $4 - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1328 - i32.const 357 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const -4 - i32.and + local.get $0 + local.get $3 local.get $4 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $4 - local.get $2 - i32.const 2 - i32.and - i32.or - i32.store - local.get $4 - local.get $1 - i32.const 16 - i32.add - i32.add - local.tee $2 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - call $~lib/rt/tlsf/GETRIGHT - local.get $1 - call $~lib/rt/tlsf/GETRIGHT - i32.load - i32.const -3 - i32.and - i32.store - end - local.get $1 + call $~lib/rt/tlsf/prepareBlock + local.get $3 call $~lib/rt/rtrace/onalloc - local.get $1 + local.get $3 ) (func $~lib/util/memory/memmove (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -1299,19 +1316,9 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 1472 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) (func $start:std/staticarray (local $0 i32) + (local $1 i32) i32.const 1040 i32.const 1 call $~lib/staticarray/StaticArray#__get @@ -1481,7 +1488,15 @@ call $~lib/rt/__allocBuffer call $~lib/rt/pure/__retain global.get $std/staticarray/arr3 - call $~lib/rt/pure/__release + local.tee $1 + i32.const 1472 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.set $std/staticarray/arr3 global.get $std/staticarray/arr3 i32.const 1 @@ -1525,7 +1540,14 @@ local.tee $0 if local.get $0 - call $~lib/rt/pure/__release + i32.const 1472 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end i32.const 0 global.set $std/staticarray/arr3 @@ -1533,7 +1555,14 @@ local.tee $0 if local.get $0 - call $~lib/rt/pure/__release + i32.const 1472 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end i32.const 0 global.set $std/staticarray/arr4 diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 6754f0fa77..077ad5056e 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -1,7 +1,7 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) + (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_=>_none (func (param i32 i32 i32))) @@ -369,16 +369,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -576,7 +566,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -608,7 +604,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -1195,9 +1197,21 @@ i32.and i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $1 + i32.const 16 + i32.add local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -4 + i32.and + i32.add i32.load i32.const -3 i32.and @@ -1208,7 +1222,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1236,18 +1249,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 i32.shl - local.set $5 - local.get $3 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $5 - i32.const 16 - i32.sub i32.ne i32.shl local.get $4 @@ -1272,12 +1282,12 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 - i32.gt_s - local.set $6 + local.set $5 local.get $3 local.get $5 - local.get $6 + local.get $3 + local.get $5 + i32.gt_s select memory.grow i32.const 0 @@ -1713,8 +1723,16 @@ return end local.get $1 - call $~lib/rt/tlsf/GETRIGHT - local.tee $6 + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $4 + local.set $6 + local.get $4 i32.load local.tee $4 i32.const 1 @@ -2142,17 +2160,6 @@ call $~lib/rt/tlsf/__realloc call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 18616 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -2294,30 +2301,6 @@ i32.const 1 i32.and ) - (func $~lib/util/string/isCaseIgnorable (param $0 i32) (result i32) - local.get $0 - i32.const 918000 - i32.lt_u - if (result i32) - i32.const 6658 - local.get $0 - call $~lib/util/string/stagedBinaryLookup - else - i32.const 0 - end - ) - (func $~lib/util/string/isCased (param $0 i32) (result i32) - local.get $0 - i32.const 127370 - i32.lt_u - if (result i32) - i32.const 9666 - local.get $0 - call $~lib/util/string/stagedBinaryLookup - else - i32.const 0 - end - ) (func $~lib/util/string/isFinalSigma (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -2334,10 +2317,10 @@ local.get $4 i32.gt_s select - local.set $5 + local.set $7 loop $while-continue|0 local.get $3 - local.get $5 + local.get $7 i32.gt_s if block $__inlined_func$~lib/util/string/codePointBefore (result i32) @@ -2376,7 +2359,7 @@ i32.shl i32.add i32.load16_u - local.tee $7 + local.tee $5 i32.const 64512 i32.and i32.const 55296 @@ -2385,7 +2368,7 @@ local.get $3 i32.const 1023 i32.and - local.get $7 + local.get $5 i32.const 1023 i32.and i32.const 10 @@ -2406,11 +2389,29 @@ select end local.tee $3 - call $~lib/util/string/isCaseIgnorable + local.set $5 + local.get $3 + i32.const 918000 + i32.lt_u + if (result i32) + i32.const 6658 + local.get $5 + call $~lib/util/string/stagedBinaryLookup + else + i32.const 0 + end i32.eqz if local.get $3 - call $~lib/util/string/isCased + i32.const 127370 + i32.lt_u + if (result i32) + i32.const 9666 + local.get $3 + call $~lib/util/string/stagedBinaryLookup + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -2448,10 +2449,10 @@ local.get $2 i32.lt_s select - local.set $4 + local.set $5 loop $while-continue|1 local.get $3 - local.get $4 + local.get $5 i32.lt_s if local.get $0 @@ -2478,13 +2479,13 @@ i32.shl i32.add i32.load16_u offset=2 - local.tee $5 + local.tee $4 i32.const 64512 i32.and i32.const 56320 i32.eq if - local.get $5 + local.get $4 local.get $1 i32.const 10 i32.shl @@ -2495,11 +2496,27 @@ end end local.get $1 - call $~lib/util/string/isCaseIgnorable + i32.const 918000 + i32.lt_u + if (result i32) + i32.const 6658 + local.get $1 + call $~lib/util/string/stagedBinaryLookup + else + i32.const 0 + end i32.eqz if local.get $1 - call $~lib/util/string/isCased + i32.const 127370 + i32.lt_u + if (result i32) + i32.const 9666 + local.get $1 + call $~lib/util/string/stagedBinaryLookup + else + i32.const 0 + end i32.eqz return end @@ -3079,7 +3096,14 @@ i32.ne if local.get $1 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end i32.const 18336 local.set $1 @@ -3107,7 +3131,14 @@ i32.eqz if local.get $1 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 1040 return end @@ -3129,7 +3160,14 @@ local.get $4 call $~lib/util/memory/memmove local.get $1 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 ) (func $start:std/string-casemapping @@ -3137,15 +3175,15 @@ (local $1 i64) (local $2 i64) (local $3 i32) - (local $4 i64) + (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i64) + (local $6 i64) + (local $7 i32) (local $8 i32) (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) + (local $12 i64) (local $13 i32) (local $14 i32) (local $15 i32) @@ -3232,9 +3270,10 @@ (local $96 i32) (local $97 i32) (local $98 i32) + (local $99 i32) i32.const 1040 call $~lib/string/String#toUpperCase - local.tee $13 + local.tee $14 i32.const 1040 call $~lib/string/String.__eq i32.eqz @@ -3248,7 +3287,7 @@ end i32.const 1040 call $~lib/string/String#toLowerCase - local.tee $14 + local.tee $15 i32.const 1040 call $~lib/string/String.__eq i32.eqz @@ -3262,7 +3301,7 @@ end i32.const 11264 call $~lib/string/String#toUpperCase - local.tee $15 + local.tee $16 i32.const 11312 call $~lib/string/String.__eq i32.eqz @@ -3276,7 +3315,7 @@ end i32.const 11360 call $~lib/string/String#toLowerCase - local.tee $16 + local.tee $17 i32.const 11408 call $~lib/string/String.__eq i32.eqz @@ -3290,7 +3329,7 @@ end i32.const 11456 call $~lib/string/String#toUpperCase - local.tee $17 + local.tee $18 i32.const 11552 call $~lib/string/String.__eq i32.eqz @@ -3304,7 +3343,7 @@ end i32.const 11552 call $~lib/string/String#toLowerCase - local.tee $18 + local.tee $19 i32.const 11648 call $~lib/string/String.__eq i32.eqz @@ -3318,7 +3357,7 @@ end i32.const 11744 call $~lib/string/String#toUpperCase - local.tee $19 + local.tee $20 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -3332,7 +3371,7 @@ end i32.const 11808 call $~lib/string/String#toLowerCase - local.tee $20 + local.tee $21 i32.const 11872 call $~lib/string/String.__eq i32.eqz @@ -3346,7 +3385,7 @@ end i32.const 11936 call $~lib/string/String#toUpperCase - local.tee $21 + local.tee $22 i32.const 12032 call $~lib/string/String.__eq i32.eqz @@ -3360,7 +3399,7 @@ end i32.const 12032 call $~lib/string/String#toLowerCase - local.tee $22 + local.tee $23 i32.const 12128 call $~lib/string/String.__eq i32.eqz @@ -3374,7 +3413,7 @@ end i32.const 12224 call $~lib/string/String#toUpperCase - local.tee $23 + local.tee $24 i32.const 12320 call $~lib/string/String.__eq i32.eqz @@ -3388,7 +3427,7 @@ end i32.const 12320 call $~lib/string/String#toLowerCase - local.tee $24 + local.tee $25 i32.const 12416 call $~lib/string/String.__eq i32.eqz @@ -3402,7 +3441,7 @@ end i32.const 12512 call $~lib/string/String#toUpperCase - local.tee $25 + local.tee $26 i32.const 12576 call $~lib/string/String.__eq i32.eqz @@ -3416,7 +3455,7 @@ end i32.const 12640 call $~lib/string/String#toUpperCase - local.tee $26 + local.tee $27 i32.const 12704 call $~lib/string/String.__eq i32.eqz @@ -3430,7 +3469,7 @@ end i32.const 12784 call $~lib/string/String#toUpperCase - local.tee $27 + local.tee $28 i32.const 12848 call $~lib/string/String.__eq i32.eqz @@ -3444,7 +3483,7 @@ end i32.const 12912 call $~lib/string/String#toUpperCase - local.tee $28 + local.tee $29 i32.const 12992 call $~lib/string/String.__eq i32.eqz @@ -3458,7 +3497,7 @@ end i32.const 13072 call $~lib/string/String#toUpperCase - local.tee $29 + local.tee $30 i32.const 13136 call $~lib/string/String.__eq i32.eqz @@ -3472,7 +3511,7 @@ end i32.const 13200 call $~lib/string/String#toUpperCase - local.tee $30 + local.tee $31 i32.const 13264 call $~lib/string/String.__eq i32.eqz @@ -3486,7 +3525,7 @@ end i32.const 13328 call $~lib/string/String#toUpperCase - local.tee $31 + local.tee $32 i32.const 13408 call $~lib/string/String.__eq i32.eqz @@ -3500,7 +3539,7 @@ end i32.const 13488 call $~lib/string/String#toUpperCase - local.tee $32 + local.tee $33 i32.const 13568 call $~lib/string/String.__eq i32.eqz @@ -3514,7 +3553,7 @@ end i32.const 13648 call $~lib/string/String#toUpperCase - local.tee $33 + local.tee $34 i32.const 13792 call $~lib/string/String.__eq i32.eqz @@ -3528,7 +3567,7 @@ end i32.const 13648 call $~lib/string/String#toLowerCase - local.tee $34 + local.tee $35 i32.const 13936 call $~lib/string/String.__eq i32.eqz @@ -3542,7 +3581,7 @@ end i32.const 14080 call $~lib/string/String#toUpperCase - local.tee $35 + local.tee $36 i32.const 14112 call $~lib/string/String.__eq i32.eqz @@ -3556,7 +3595,7 @@ end i32.const 14144 call $~lib/string/String#toLowerCase - local.tee $36 + local.tee $37 i32.const 14176 call $~lib/string/String.__eq i32.eqz @@ -3570,7 +3609,7 @@ end i32.const 14208 call $~lib/string/String#toUpperCase - local.tee $37 + local.tee $38 i32.const 14400 call $~lib/string/String.__eq i32.eqz @@ -3584,9 +3623,9 @@ end i32.const 14080 call $~lib/string/String#toUpperCase - local.tee $38 - call $~lib/string/String#toLowerCase local.tee $39 + call $~lib/string/String#toLowerCase + local.tee $40 i32.const 14608 call $~lib/string/String.__eq i32.eqz @@ -3600,9 +3639,9 @@ end i32.const 14640 call $~lib/string/String#toUpperCase - local.tee $40 - call $~lib/string/String#toLowerCase local.tee $41 + call $~lib/string/String#toLowerCase + local.tee $42 i32.const 14672 call $~lib/string/String.__eq i32.eqz @@ -3616,9 +3655,9 @@ end i32.const 14704 call $~lib/string/String#toUpperCase - local.tee $42 - call $~lib/string/String#toLowerCase local.tee $43 + call $~lib/string/String#toLowerCase + local.tee $44 i32.const 14704 call $~lib/string/String.__eq i32.eqz @@ -3632,9 +3671,9 @@ end i32.const 65536 call $~lib/string/String.fromCodePoint - local.tee $44 - call $~lib/string/String#toLowerCase local.tee $45 + call $~lib/string/String#toLowerCase + local.tee $46 i32.const 14960 call $~lib/string/String.__eq i32.eqz @@ -3648,9 +3687,9 @@ end i32.const 65536 call $~lib/string/String.fromCodePoint - local.tee $46 - call $~lib/string/String#toUpperCase local.tee $47 + call $~lib/string/String#toUpperCase + local.tee $48 i32.const 14960 call $~lib/string/String.__eq i32.eqz @@ -3664,7 +3703,7 @@ end i32.const 14992 call $~lib/string/String#toLowerCase - local.tee $48 + local.tee $49 i32.const 15024 call $~lib/string/String.__eq i32.eqz @@ -3678,7 +3717,7 @@ end i32.const 15056 call $~lib/string/String#toLowerCase - local.tee $49 + local.tee $50 i32.const 15088 call $~lib/string/String.__eq i32.eqz @@ -3692,7 +3731,7 @@ end i32.const 15120 call $~lib/string/String#toLowerCase - local.tee $50 + local.tee $51 i32.const 15152 call $~lib/string/String.__eq i32.eqz @@ -3706,7 +3745,7 @@ end i32.const 15184 call $~lib/string/String#toLowerCase - local.tee $51 + local.tee $52 i32.const 15216 call $~lib/string/String.__eq i32.eqz @@ -3720,7 +3759,7 @@ end i32.const 15248 call $~lib/string/String#toLowerCase - local.tee $52 + local.tee $53 i32.const 15280 call $~lib/string/String.__eq i32.eqz @@ -3734,7 +3773,7 @@ end i32.const 15312 call $~lib/string/String#toLowerCase - local.tee $53 + local.tee $54 i32.const 15344 call $~lib/string/String.__eq i32.eqz @@ -3748,7 +3787,7 @@ end i32.const 15376 call $~lib/string/String#toLowerCase - local.tee $54 + local.tee $55 i32.const 15408 call $~lib/string/String.__eq i32.eqz @@ -3762,7 +3801,7 @@ end i32.const 15440 call $~lib/string/String#toLowerCase - local.tee $55 + local.tee $56 i32.const 15472 call $~lib/string/String.__eq i32.eqz @@ -3776,7 +3815,7 @@ end i32.const 15504 call $~lib/string/String#toLowerCase - local.tee $56 + local.tee $57 i32.const 15536 call $~lib/string/String.__eq i32.eqz @@ -3790,7 +3829,7 @@ end i32.const 15568 call $~lib/string/String#toLowerCase - local.tee $57 + local.tee $58 i32.const 15600 call $~lib/string/String.__eq i32.eqz @@ -3804,7 +3843,7 @@ end i32.const 15632 call $~lib/string/String#toLowerCase - local.tee $58 + local.tee $59 i32.const 15664 call $~lib/string/String.__eq i32.eqz @@ -3818,7 +3857,7 @@ end i32.const 15696 call $~lib/string/String#toLowerCase - local.tee $59 + local.tee $60 i32.const 15728 call $~lib/string/String.__eq i32.eqz @@ -3832,7 +3871,7 @@ end i32.const 15760 call $~lib/string/String#toLowerCase - local.tee $60 + local.tee $61 i32.const 15792 call $~lib/string/String.__eq i32.eqz @@ -3846,7 +3885,7 @@ end i32.const 15824 call $~lib/string/String#toLowerCase - local.tee $61 + local.tee $62 i32.const 15856 call $~lib/string/String.__eq i32.eqz @@ -3860,7 +3899,7 @@ end i32.const 15888 call $~lib/string/String#toLowerCase - local.tee $62 + local.tee $63 i32.const 15920 call $~lib/string/String.__eq i32.eqz @@ -3874,7 +3913,7 @@ end i32.const 15952 call $~lib/string/String#toLowerCase - local.tee $63 + local.tee $64 i32.const 15984 call $~lib/string/String.__eq i32.eqz @@ -3888,7 +3927,7 @@ end i32.const 16016 call $~lib/string/String#toLowerCase - local.tee $64 + local.tee $65 i32.const 16048 call $~lib/string/String.__eq i32.eqz @@ -3902,7 +3941,7 @@ end i32.const 16080 call $~lib/string/String#toLowerCase - local.tee $65 + local.tee $66 i32.const 16112 call $~lib/string/String.__eq i32.eqz @@ -3916,7 +3955,7 @@ end i32.const 16144 call $~lib/string/String#toLowerCase - local.tee $66 + local.tee $67 i32.const 16176 call $~lib/string/String.__eq i32.eqz @@ -3930,7 +3969,7 @@ end i32.const 16208 call $~lib/string/String#toLowerCase - local.tee $67 + local.tee $68 i32.const 16240 call $~lib/string/String.__eq i32.eqz @@ -3944,7 +3983,7 @@ end i32.const 16272 call $~lib/string/String#toLowerCase - local.tee $68 + local.tee $69 i32.const 16304 call $~lib/string/String.__eq i32.eqz @@ -3958,7 +3997,7 @@ end i32.const 16336 call $~lib/string/String#toLowerCase - local.tee $69 + local.tee $70 i32.const 16368 call $~lib/string/String.__eq i32.eqz @@ -3972,7 +4011,7 @@ end i32.const 16400 call $~lib/string/String#toLowerCase - local.tee $70 + local.tee $71 i32.const 16432 call $~lib/string/String.__eq i32.eqz @@ -3986,7 +4025,7 @@ end i32.const 16464 call $~lib/string/String#toLowerCase - local.tee $71 + local.tee $72 i32.const 16496 call $~lib/string/String.__eq i32.eqz @@ -4000,7 +4039,7 @@ end i32.const 16528 call $~lib/string/String#toLowerCase - local.tee $72 + local.tee $73 i32.const 16560 call $~lib/string/String.__eq i32.eqz @@ -4014,7 +4053,7 @@ end i32.const 16592 call $~lib/string/String#toLowerCase - local.tee $73 + local.tee $74 i32.const 15664 call $~lib/string/String.__eq i32.eqz @@ -4028,7 +4067,7 @@ end i32.const 16624 call $~lib/string/String#toLowerCase - local.tee $74 + local.tee $75 i32.const 16656 call $~lib/string/String.__eq i32.eqz @@ -4042,7 +4081,7 @@ end i32.const 16688 call $~lib/string/String#toLowerCase - local.tee $75 + local.tee $76 i32.const 16720 call $~lib/string/String.__eq i32.eqz @@ -4056,7 +4095,7 @@ end i32.const 16752 call $~lib/string/String#toLowerCase - local.tee $76 + local.tee $77 i32.const 16784 call $~lib/string/String.__eq i32.eqz @@ -4070,7 +4109,7 @@ end i32.const 16816 call $~lib/string/String#toLowerCase - local.tee $77 + local.tee $78 i32.const 16848 call $~lib/string/String.__eq i32.eqz @@ -4084,7 +4123,7 @@ end i32.const 16880 call $~lib/string/String#toLowerCase - local.tee $78 + local.tee $79 i32.const 16912 call $~lib/string/String.__eq i32.eqz @@ -4098,7 +4137,7 @@ end i32.const 16944 call $~lib/string/String#toLowerCase - local.tee $79 + local.tee $80 i32.const 16976 call $~lib/string/String.__eq i32.eqz @@ -4112,7 +4151,7 @@ end i32.const 17008 call $~lib/string/String#toLowerCase - local.tee $80 + local.tee $81 i32.const 17040 call $~lib/string/String.__eq i32.eqz @@ -4126,7 +4165,7 @@ end i32.const 17072 call $~lib/string/String#toLowerCase - local.tee $81 + local.tee $82 i32.const 17104 call $~lib/string/String.__eq i32.eqz @@ -4140,7 +4179,7 @@ end i32.const 17136 call $~lib/string/String#toLowerCase - local.tee $82 + local.tee $83 i32.const 17168 call $~lib/string/String.__eq i32.eqz @@ -4154,7 +4193,7 @@ end i32.const 17200 call $~lib/string/String#toLowerCase - local.tee $83 + local.tee $84 i32.const 17232 call $~lib/string/String.__eq i32.eqz @@ -4168,7 +4207,7 @@ end i32.const 17264 call $~lib/string/String#toLowerCase - local.tee $84 + local.tee $85 i32.const 17296 call $~lib/string/String.__eq i32.eqz @@ -4182,7 +4221,7 @@ end i32.const 17328 call $~lib/string/String#toLowerCase - local.tee $85 + local.tee $86 i32.const 17360 call $~lib/string/String.__eq i32.eqz @@ -4196,7 +4235,7 @@ end i32.const 17392 call $~lib/string/String#toUpperCase - local.tee $86 + local.tee $87 i32.const 17424 call $~lib/string/String.__eq i32.eqz @@ -4210,7 +4249,7 @@ end i32.const 14640 call $~lib/string/String#toUpperCase - local.tee $87 + local.tee $88 i32.const 17456 call $~lib/string/String.__eq i32.eqz @@ -4224,7 +4263,7 @@ end i32.const 17488 call $~lib/string/String#toUpperCase - local.tee $88 + local.tee $89 i32.const 17520 call $~lib/string/String.__eq i32.eqz @@ -4238,7 +4277,7 @@ end i32.const 17552 call $~lib/string/String#toUpperCase - local.tee $89 + local.tee $90 i32.const 17584 call $~lib/string/String.__eq i32.eqz @@ -4252,7 +4291,7 @@ end i32.const 17616 call $~lib/string/String#toUpperCase - local.tee $90 + local.tee $91 i32.const 17648 call $~lib/string/String.__eq i32.eqz @@ -4266,7 +4305,7 @@ end i32.const 17680 call $~lib/string/String#toUpperCase - local.tee $91 + local.tee $92 i32.const 17712 call $~lib/string/String.__eq i32.eqz @@ -4280,7 +4319,7 @@ end i32.const 17744 call $~lib/string/String#toUpperCase - local.tee $92 + local.tee $93 i32.const 17712 call $~lib/string/String.__eq i32.eqz @@ -4294,7 +4333,7 @@ end i32.const 17776 call $~lib/string/String#toUpperCase - local.tee $93 + local.tee $94 i32.const 17808 call $~lib/string/String.__eq i32.eqz @@ -4308,7 +4347,7 @@ end i32.const 17840 call $~lib/string/String#toUpperCase - local.tee $94 + local.tee $95 i32.const 17872 call $~lib/string/String.__eq i32.eqz @@ -4322,7 +4361,7 @@ end i32.const 17904 call $~lib/string/String#toUpperCase - local.tee $95 + local.tee $96 i32.const 17936 call $~lib/string/String.__eq i32.eqz @@ -4336,7 +4375,7 @@ end i32.const 17968 call $~lib/string/String#toUpperCase - local.tee $96 + local.tee $97 i32.const 18000 call $~lib/string/String.__eq i32.eqz @@ -4350,7 +4389,7 @@ end i32.const 18032 call $~lib/string/String#toUpperCase - local.tee $97 + local.tee $98 i32.const 18064 call $~lib/string/String.__eq i32.eqz @@ -4364,7 +4403,7 @@ end i32.const 18096 call $~lib/string/String#toUpperCase - local.tee $98 + local.tee $99 i32.const 18128 call $~lib/string/String.__eq i32.eqz @@ -4383,18 +4422,18 @@ if local.get $3 call $~lib/string/String.fromCodePoint - local.tee $12 + local.tee $11 call $~lib/string/String#toLowerCase - local.set $5 - local.get $12 + local.set $7 + local.get $11 call $~lib/string/String#toUpperCase - local.set $6 - local.get $5 + local.set $8 + local.get $7 i32.const 0 call $~lib/string/String#codePointAt i64.extend_i32_s - local.set $4 - local.get $5 + local.set $6 + local.get $7 i32.const 1 call $~lib/string/String#codePointAt i64.extend_i32_s @@ -4402,14 +4441,14 @@ i64.const 0 i64.ge_u if - local.get $4 + local.get $6 local.get $0 i64.const 16 i64.shl i64.add - local.set $4 + local.set $6 end - local.get $5 + local.get $7 i32.const 2 call $~lib/string/String#codePointAt i64.extend_i32_s @@ -4417,19 +4456,19 @@ i64.const 0 i64.ge_u if - local.get $4 + local.get $6 local.get $0 i64.const 32 i64.shl i64.add - local.set $4 + local.set $6 end - local.get $6 + local.get $8 i32.const 0 call $~lib/string/String#codePointAt i64.extend_i32_s local.set $0 - local.get $6 + local.get $8 i32.const 1 call $~lib/string/String#codePointAt i64.extend_i32_s @@ -4444,7 +4483,7 @@ i64.add local.set $0 end - local.get $6 + local.get $8 i32.const 2 call $~lib/string/String#codePointAt i64.extend_i32_s @@ -4503,12 +4542,12 @@ i32.const 1 call $std/string-casemapping/toUpperCaseFromIndex i64.extend_i32_s - local.tee $7 + local.tee $12 i64.const 0 i64.ge_u if local.get $2 - local.get $7 + local.get $12 i64.const 16 i64.shl i64.add @@ -4518,19 +4557,19 @@ i32.const 2 call $std/string-casemapping/toUpperCaseFromIndex i64.extend_i32_s - local.tee $7 + local.tee $12 i64.const 0 i64.ge_u if local.get $2 - local.get $7 + local.get $12 i64.const 32 i64.shl i64.add local.set $2 end local.get $1 - local.get $4 + local.get $6 i64.ne if i32.const 18160 @@ -4543,11 +4582,13 @@ f64.const 0 call $~lib/builtins/trace i32.const 18240 - local.get $4 + local.get $6 call $~lib/util/number/utoa64 - local.tee $8 - call $~lib/string/String#concat local.tee $9 + call $~lib/string/String#concat + local.tee $4 + local.set $10 + local.get $4 i32.const 0 f64.const 0 f64.const 0 @@ -4555,12 +4596,16 @@ f64.const 0 f64.const 0 call $~lib/builtins/trace - i32.const 18368 local.get $1 call $~lib/util/number/utoa64 - local.tee $10 + local.tee $5 + local.set $4 + i32.const 18368 + local.get $5 call $~lib/string/String#concat - local.tee $11 + local.tee $13 + local.set $5 + local.get $13 i32.const 0 f64.const 0 f64.const 0 @@ -4568,14 +4613,42 @@ f64.const 0 f64.const 0 call $~lib/builtins/trace - local.get $8 - call $~lib/rt/pure/__release local.get $9 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $10 - call $~lib/rt/pure/__release - local.get $11 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $10 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 18616 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 18616 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -4593,9 +4666,11 @@ i32.const 18512 local.get $0 call $~lib/util/number/utoa64 - local.tee $8 - call $~lib/string/String#concat local.tee $9 + call $~lib/string/String#concat + local.tee $4 + local.set $10 + local.get $4 i32.const 0 f64.const 0 f64.const 0 @@ -4603,12 +4678,16 @@ f64.const 0 f64.const 0 call $~lib/builtins/trace - i32.const 18576 local.get $2 call $~lib/util/number/utoa64 - local.tee $10 + local.tee $5 + local.set $4 + i32.const 18576 + local.get $5 call $~lib/string/String#concat - local.tee $11 + local.tee $13 + local.set $5 + local.get $13 i32.const 0 f64.const 0 f64.const 0 @@ -4616,21 +4695,70 @@ f64.const 0 f64.const 0 call $~lib/builtins/trace - local.get $8 - call $~lib/rt/pure/__release local.get $9 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $10 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $10 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 18616 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 18616 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $11 + i32.const 18616 + i32.gt_u + if local.get $11 - call $~lib/rt/pure/__release + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 + i32.const 18616 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $8 + i32.const 18616 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $12 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release local.get $3 i32.const 1 i32.add @@ -4638,178 +4766,780 @@ br $for-loop|0 end end - local.get $13 - call $~lib/rt/pure/__release local.get $14 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $14 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $15 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $15 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $16 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $16 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $17 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $17 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $18 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $18 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $19 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $19 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $20 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $20 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $21 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $21 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $22 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $22 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $23 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $23 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $24 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $24 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $25 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $25 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $26 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $26 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $27 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $27 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $28 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $28 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $29 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $29 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $30 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $30 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $31 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $31 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $32 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $32 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $33 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $33 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $34 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $34 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $35 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $35 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $36 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $36 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $37 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $37 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $38 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $38 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $39 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $39 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $40 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $40 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $41 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $41 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $42 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $42 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $43 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $43 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $44 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $44 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $45 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $45 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $46 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $46 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $47 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $47 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $48 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $48 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $49 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $49 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $50 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $50 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $51 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $51 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $52 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $52 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $53 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $53 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $54 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $54 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $55 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $55 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $56 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $56 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $57 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $57 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $58 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $58 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $59 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $59 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $60 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $60 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $61 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $61 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $62 - call $~lib/rt/pure/__release - local.get $63 - call $~lib/rt/pure/__release - local.get $64 - call $~lib/rt/pure/__release - local.get $65 - call $~lib/rt/pure/__release - local.get $66 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $62 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $63 + i32.const 18616 + i32.gt_u + if + local.get $63 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $64 + i32.const 18616 + i32.gt_u + if + local.get $64 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $65 + i32.const 18616 + i32.gt_u + if + local.get $65 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $66 + i32.const 18616 + i32.gt_u + if + local.get $66 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $67 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $67 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $68 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $68 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $69 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $69 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $70 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $70 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $71 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $71 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $72 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $72 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $73 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $73 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $74 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $74 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $75 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $75 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $76 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $76 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $77 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $77 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $78 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $78 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $79 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $79 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $80 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $80 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $81 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $81 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $82 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $82 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $83 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $83 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $84 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $84 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $85 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $85 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $86 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $86 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $87 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $87 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $88 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $88 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $89 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $89 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $90 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $90 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $91 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $91 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $92 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $92 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $93 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $93 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $94 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $94 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $95 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $95 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $96 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $96 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $97 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $97 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $98 - call $~lib/rt/pure/__release + i32.const 18616 + i32.gt_u + if + local.get $98 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $99 + i32.const 18616 + i32.gt_u + if + local.get $99 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~start global.get $~started diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index d931c90c0c..0ffe9fd9f3 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -4,9 +4,9 @@ (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_=>_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 $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -86,17 +86,6 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 22060 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) (func $~lib/rt/tlsf/SETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $2 @@ -110,16 +99,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -317,7 +296,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -349,7 +334,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -936,9 +927,21 @@ i32.and i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -4 + i32.and + i32.add + local.get $1 + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add i32.load i32.const -3 i32.and @@ -949,7 +952,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -977,18 +979,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 i32.shl - local.set $5 - local.get $3 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $5 - i32.const 16 - i32.sub i32.ne i32.shl local.get $4 @@ -1013,12 +1012,12 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 - i32.gt_s - local.set $6 + local.set $5 local.get $3 local.get $5 - local.get $6 + local.get $3 + local.get $5 + i32.gt_s select memory.grow i32.const 0 @@ -1452,7 +1451,14 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 22060 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/string/String.UTF16.decodeUnsafe (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -1621,7 +1627,7 @@ local.get $0 local.get $1 call $~lib/string/String.UTF16.decodeUnsafe - local.tee $3 + local.tee $1 i32.const 1040 call $~lib/string/String.__eq i32.eqz @@ -1636,7 +1642,7 @@ local.get $0 i32.const 4 call $~lib/string/String.UTF16.decodeUnsafe - local.tee $4 + local.tee $3 i32.const 1312 call $~lib/string/String.__eq i32.eqz @@ -1653,7 +1659,7 @@ i32.add i32.const 2 call $~lib/string/String.UTF16.decodeUnsafe - local.tee $5 + local.tee $4 i32.const 1344 call $~lib/string/String.__eq i32.eqz @@ -1670,7 +1676,7 @@ i32.add i32.const 4 call $~lib/string/String.UTF16.decodeUnsafe - local.tee $6 + local.tee $5 i32.const 1376 call $~lib/string/String.__eq i32.eqz @@ -1687,7 +1693,7 @@ i32.add i32.const 4 call $~lib/string/String.UTF16.decodeUnsafe - local.tee $7 + local.tee $6 i32.const 1408 call $~lib/string/String.__eq i32.eqz @@ -1704,7 +1710,7 @@ i32.add i32.const 0 call $~lib/string/String.UTF16.decodeUnsafe - local.tee $1 + local.tee $7 i32.const 1296 call $~lib/string/String.__eq i32.eqz @@ -1717,21 +1723,77 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release + i32.const 22060 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 22060 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 22060 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 22060 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 22060 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 22060 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $7 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release + i32.const 22060 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 22060 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/string/String.UTF8.byteLength (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -2166,7 +2228,14 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 22060 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/string-encoding/testUTF8EncodeNullTerminated (local $0 i32) @@ -2320,7 +2389,14 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 22060 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) local.get $1 @@ -2361,8 +2437,16 @@ return end local.get $1 - call $~lib/rt/tlsf/GETRIGHT - local.tee $6 + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $4 + local.set $6 + local.get $4 i32.load local.tee $4 i32.const 1 @@ -2673,19 +2757,17 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 1040 i32.const 1 call $~lib/string/String.UTF8.encode - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 i32.const 16 i32.sub i32.load offset=12 i32.const 1 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $0 - local.get $0 + local.tee $3 i32.const 1040 call $~lib/string/String.__eq i32.eqz @@ -2747,9 +2829,7 @@ i32.load offset=12 i32.const 1 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $1 - local.set $4 - local.get $1 + local.tee $4 i32.const 1520 call $~lib/string/String.__eq i32.eqz @@ -2764,16 +2844,14 @@ i32.const 1488 i32.const 0 call $~lib/string/String.UTF8.encode - local.tee $1 - local.get $1 + local.tee $2 + local.get $2 i32.const 16 i32.sub i32.load offset=12 i32.const 1 call $~lib/string/String.UTF8.decodeUnsafe local.tee $5 - local.set $6 - local.get $5 i32.const 1520 call $~lib/string/String.__eq i32.eqz @@ -2785,17 +2863,60 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/pure/__release + local.get $3 + i32.const 22060 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + i32.const 22060 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 22060 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 22060 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 22060 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 22060 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/string-encoding/testUTF8DecodeUnsafe (local $0 i32) @@ -2815,13 +2936,12 @@ i32.const 1040 i32.const 0 call $~lib/string/String.UTF8.byteLength - local.set $9 + local.set $1 local.get $0 - local.tee $1 i32.const 0 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $8 + local.tee $2 i32.const 1296 call $~lib/string/String.__eq i32.eqz @@ -2833,11 +2953,11 @@ call $~lib/builtins/abort unreachable end + local.get $0 local.get $1 - local.get $9 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $7 + local.tee $1 i32.const 1040 call $~lib/string/String.__eq i32.eqz @@ -2849,11 +2969,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $6 + local.tee $3 i32.const 1312 call $~lib/string/String.__eq i32.eqz @@ -2865,13 +2985,13 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.add i32.const 2 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $5 + local.tee $4 i32.const 1376 call $~lib/string/String.__eq i32.eqz @@ -2883,13 +3003,13 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 6 i32.add i32.const 4 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $4 + local.tee $5 i32.const 1408 call $~lib/string/String.__eq i32.eqz @@ -2901,13 +3021,13 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 10 i32.add i32.const 0 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $3 + local.tee $6 i32.const 1296 call $~lib/string/String.__eq i32.eqz @@ -2919,13 +3039,13 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.add i32.const 100 i32.const 1 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $2 + local.tee $7 i32.const 1552 call $~lib/string/String.__eq i32.eqz @@ -2937,13 +3057,13 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 6 i32.add i32.const 100 i32.const 1 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $9 + local.tee $8 i32.const 1408 call $~lib/string/String.__eq i32.eqz @@ -2955,13 +3075,13 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 10 i32.add i32.const 100 i32.const 1 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $1 + local.tee $9 i32.const 1296 call $~lib/string/String.__eq i32.eqz @@ -2973,45 +3093,113 @@ call $~lib/builtins/abort unreachable end - local.get $8 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release local.get $2 - call $~lib/rt/pure/__release - local.get $9 - call $~lib/rt/pure/__release + i32.const 22060 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 22060 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 22060 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 22060 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 22060 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 + i32.const 22060 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 + i32.const 22060 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $8 + i32.const 22060 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $9 + i32.const 22060 + i32.gt_u + if + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 22060 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/string-encoding/testLarge (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 i32.const 0 call $~lib/string/String.UTF8.encode - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 i32.const 16 i32.sub i32.load offset=12 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $1 - local.get $1 + local.tee $3 local.get $0 call $~lib/string/String.__eq i32.eqz @@ -3025,15 +3213,13 @@ end local.get $0 call $~lib/string/String.UTF16.encode - local.tee $1 - local.get $1 + local.tee $2 + local.get $2 i32.const 16 i32.sub i32.load offset=12 call $~lib/string/String.UTF16.decodeUnsafe local.tee $4 - local.set $5 - local.get $4 local.get $0 call $~lib/string/String.__eq i32.eqz @@ -3045,18 +3231,46 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release + local.get $3 + i32.const 22060 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 22060 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 22060 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 22060 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $start:std/string-encoding (local $0 i32) (local $1 i32) - (local $2 i32) i32.const 1036 i32.load i32.const 12 @@ -3079,7 +3293,6 @@ i32.load offset=12 call $~lib/string/String.UTF16.decodeUnsafe local.tee $1 - local.get $1 i32.const 1040 call $~lib/string/String.__eq i32.eqz @@ -3091,9 +3304,24 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/pure/__release + local.get $1 + i32.const 22060 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 22060 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $std/string-encoding/testUTF16DecodeUnsafe i32.const 1040 i32.const 0 @@ -3134,7 +3362,6 @@ i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe local.tee $1 - local.get $1 i32.const 1040 call $~lib/string/String.__eq i32.eqz @@ -3146,9 +3373,24 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/pure/__release + local.get $1 + i32.const 22060 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 22060 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $std/string-encoding/testUTF8DecodeNullTerminated call $std/string-encoding/testUTF8DecodeUnsafe i32.const 1584 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index c8cd42c88e..52d81ef418 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -440,17 +440,6 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 17912 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) local.get $0 @@ -599,16 +588,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -806,7 +785,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -838,7 +823,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -1425,9 +1416,21 @@ i32.and i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $1 + i32.const 16 + i32.add local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -4 + i32.and + i32.add i32.load i32.const -3 i32.and @@ -1438,7 +1441,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1466,18 +1468,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 i32.shl - local.set $5 - local.get $3 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $5 - i32.const 16 - i32.sub i32.ne i32.shl local.get $4 @@ -1502,12 +1501,12 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 - i32.gt_s - local.set $6 + local.set $5 local.get $3 local.get $5 - local.get $6 + local.get $3 + local.get $5 + i32.gt_s select memory.grow i32.const 0 @@ -4034,7 +4033,14 @@ i32.ne if local.get $1 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end i32.const 1648 local.set $1 @@ -4062,7 +4068,14 @@ i32.eqz if local.get $1 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 1280 return end @@ -4084,7 +4097,14 @@ local.get $4 call $~lib/util/memory/memmove local.get $1 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 ) (func $~lib/string/String.__gt (param $0 i32) (param $1 i32) (result i32) @@ -4452,8 +4472,16 @@ return end local.get $1 - call $~lib/rt/tlsf/GETRIGHT - local.tee $6 + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $4 + local.set $6 + local.get $4 i32.load local.tee $4 i32.const 1 @@ -5615,7 +5643,14 @@ i32.eqz if local.get $0 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 13248 i32.const 13136 i32.const 108 @@ -7033,6 +7068,7 @@ (local $209 i32) (local $210 i32) (local $211 i32) + (local $212 i32) global.get $std/string/str i32.const 1040 i32.ne @@ -7163,7 +7199,7 @@ global.set $~argumentsLength i32.const 0 call $~lib/string/String.fromCharCode@varargs - local.tee $44 + local.tee $43 i32.const 1296 call $~lib/string/String.__eq i32.eqz @@ -7179,7 +7215,7 @@ global.set $~argumentsLength i32.const 54 call $~lib/string/String.fromCharCode@varargs - local.tee $45 + local.tee $44 i32.const 1472 call $~lib/string/String.__eq i32.eqz @@ -7195,7 +7231,7 @@ global.set $~argumentsLength i32.const 65590 call $~lib/string/String.fromCharCode@varargs - local.tee $46 + local.tee $45 i32.const 1472 call $~lib/string/String.__eq i32.eqz @@ -7210,7 +7246,7 @@ i32.const 55296 i32.const 57088 call $~lib/string/String.fromCharCode - local.tee $47 + local.tee $46 i32.const 1504 call $~lib/string/String.__eq i32.eqz @@ -7224,7 +7260,7 @@ end i32.const 0 call $~lib/string/String.fromCodePoint - local.tee $48 + local.tee $47 i32.const 1296 call $~lib/string/String.__eq i32.eqz @@ -7238,7 +7274,7 @@ end i32.const 54 call $~lib/string/String.fromCodePoint - local.tee $49 + local.tee $48 i32.const 1472 call $~lib/string/String.__eq i32.eqz @@ -7252,7 +7288,7 @@ end i32.const 119558 call $~lib/string/String.fromCodePoint - local.tee $50 + local.tee $49 i32.const 1584 call $~lib/string/String.__eq i32.eqz @@ -7264,61 +7300,41 @@ call $~lib/builtins/abort unreachable end - global.get $std/string/str - local.set $9 - i32.const 1616 - local.tee $1 - i32.eqz - if - i32.const 1616 - call $~lib/rt/pure/__release - i32.const 1648 - local.set $1 - end - local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - local.tee $0 - local.set $10 - block $__inlined_func$~lib/string/String#startsWith - local.get $0 + block $__inlined_func$~lib/string/String#startsWith (result i32) + i32.const 1612 + i32.load + i32.const 1 + i32.shr_u + local.tee $1 + local.set $0 i32.const 0 - local.get $9 + local.get $1 + i32.const 0 + global.get $std/string/str + local.tee $3 i32.const 16 i32.sub i32.load offset=12 i32.const 1 i32.shr_u - local.tee $5 + local.tee $1 i32.const 0 - local.get $5 + local.get $1 i32.lt_s select - local.tee $0 + local.tee $5 i32.add - local.get $5 + local.get $1 i32.gt_s - if - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - local.set $0 - br $__inlined_func$~lib/string/String#startsWith - end - local.get $9 + br_if $__inlined_func$~lib/string/String#startsWith + drop + local.get $3 + local.get $5 + i32.const 1616 local.get $0 - local.get $1 - local.get $10 call $~lib/util/string/compareImpl i32.eqz - local.set $0 - local.get $1 - call $~lib/rt/pure/__release end - local.get $0 i32.eqz if i32.const 0 @@ -7329,37 +7345,35 @@ unreachable end block $__inlined_func$~lib/string/String#endsWith (result i32) - i32.const 1676 - i32.load - i32.const 1 - i32.shr_u - local.tee $5 - local.set $10 i32.const 0 i32.const 536870904 global.get $std/string/str - local.tee $1 + local.tee $0 i32.const 16 i32.sub i32.load offset=12 i32.const 1 i32.shr_u - local.tee $0 + local.tee $3 i32.const 536870904 - local.get $0 + local.get $3 i32.lt_s select - local.get $5 + i32.const 1676 + i32.load + i32.const 1 + i32.shr_u + local.tee $3 i32.sub - local.tee $0 + local.tee $5 i32.const 0 i32.lt_s br_if $__inlined_func$~lib/string/String#endsWith drop - local.get $1 local.get $0 + local.get $5 i32.const 1680 - local.get $10 + local.get $3 call $~lib/util/string/compareImpl i32.eqz end @@ -7390,7 +7404,7 @@ i32.const 0 i32.const 1744 call $~lib/string/String#padStart - local.tee $51 + local.tee $50 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7406,7 +7420,7 @@ i32.const 15 i32.const 1744 call $~lib/string/String#padStart - local.tee $52 + local.tee $51 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7422,7 +7436,7 @@ i32.const 3 i32.const 1744 call $~lib/string/String#padStart - local.tee $53 + local.tee $52 i32.const 1776 call $~lib/string/String.__eq i32.eqz @@ -7438,7 +7452,7 @@ i32.const 10 i32.const 1280 call $~lib/string/String#padStart - local.tee $54 + local.tee $53 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -7454,7 +7468,7 @@ i32.const 100 i32.const 1280 call $~lib/string/String#padStart - local.tee $55 + local.tee $54 i32.const 1328 call $~lib/string/String.__eq i32.eqz @@ -7470,7 +7484,7 @@ i32.const 5 i32.const 1744 call $~lib/string/String#padStart - local.tee $56 + local.tee $55 i32.const 1840 call $~lib/string/String.__eq i32.eqz @@ -7486,7 +7500,7 @@ i32.const 6 i32.const 1872 call $~lib/string/String#padStart - local.tee $57 + local.tee $56 i32.const 1904 call $~lib/string/String.__eq i32.eqz @@ -7502,7 +7516,7 @@ i32.const 8 i32.const 1872 call $~lib/string/String#padStart - local.tee $58 + local.tee $57 i32.const 1936 call $~lib/string/String.__eq i32.eqz @@ -7518,7 +7532,7 @@ i32.const 0 i32.const 1744 call $~lib/string/String#padEnd - local.tee $59 + local.tee $58 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7534,7 +7548,7 @@ i32.const 15 i32.const 1744 call $~lib/string/String#padEnd - local.tee $60 + local.tee $59 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7550,7 +7564,7 @@ i32.const 3 i32.const 1744 call $~lib/string/String#padEnd - local.tee $61 + local.tee $60 i32.const 1776 call $~lib/string/String.__eq i32.eqz @@ -7566,7 +7580,7 @@ i32.const 10 i32.const 1280 call $~lib/string/String#padEnd - local.tee $62 + local.tee $61 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -7582,7 +7596,7 @@ i32.const 100 i32.const 1280 call $~lib/string/String#padEnd - local.tee $63 + local.tee $62 i32.const 1328 call $~lib/string/String.__eq i32.eqz @@ -7598,7 +7612,7 @@ i32.const 5 i32.const 1744 call $~lib/string/String#padEnd - local.tee $64 + local.tee $63 i32.const 1968 call $~lib/string/String.__eq i32.eqz @@ -7614,7 +7628,7 @@ i32.const 6 i32.const 1808 call $~lib/string/String#padEnd - local.tee $65 + local.tee $64 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -7630,7 +7644,7 @@ i32.const 8 i32.const 1808 call $~lib/string/String#padEnd - local.tee $66 + local.tee $65 i32.const 2032 call $~lib/string/String.__eq i32.eqz @@ -8057,7 +8071,7 @@ end i32.const 1280 call $~lib/string/String#trimStart - local.tee $67 + local.tee $66 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -8071,7 +8085,7 @@ end i32.const 2288 call $~lib/string/String#trimStart - local.tee $68 + local.tee $67 i32.const 2288 call $~lib/string/String.__eq i32.eqz @@ -8085,7 +8099,7 @@ end i32.const 2320 call $~lib/string/String#trimStart - local.tee $69 + local.tee $68 i32.const 2368 call $~lib/string/String.__eq i32.eqz @@ -8099,7 +8113,7 @@ end i32.const 1280 call $~lib/string/String#trimEnd - local.tee $70 + local.tee $69 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -8113,7 +8127,7 @@ end i32.const 2288 call $~lib/string/String#trimEnd - local.tee $71 + local.tee $70 i32.const 2288 call $~lib/string/String.__eq i32.eqz @@ -8127,7 +8141,7 @@ end i32.const 2320 call $~lib/string/String#trimEnd - local.tee $72 + local.tee $71 i32.const 2400 call $~lib/string/String.__eq i32.eqz @@ -8141,7 +8155,7 @@ end i32.const 1280 call $~lib/string/String#trim - local.tee $73 + local.tee $72 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -8155,7 +8169,7 @@ end i32.const 2288 call $~lib/string/String#trim - local.tee $74 + local.tee $73 i32.const 2288 call $~lib/string/String.__eq i32.eqz @@ -8169,7 +8183,7 @@ end i32.const 2320 call $~lib/string/String#trim - local.tee $75 + local.tee $74 i32.const 1808 call $~lib/string/String.__eq i32.eqz @@ -9846,25 +9860,25 @@ i32.const 7840 i32.const 8000 call $~lib/string/String#concat - local.tee $41 + local.tee $3 i32.const 1648 - local.get $41 + local.get $3 select i32.const 8160 call $~lib/string/String#concat - local.tee $42 + local.tee $5 i32.const 1648 - local.get $42 + local.get $5 select i32.const 8320 call $~lib/string/String#concat - local.tee $43 + local.tee $42 i32.const 1648 - local.get $43 + local.get $42 select i32.const 8480 call $~lib/string/String#concat - local.tee $76 + local.tee $75 call $~lib/util/string/strtod f64.const 1797693134862315708145274e284 f64.ne @@ -10216,11 +10230,18 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release - i32.const 1280 - i32.const 1280 - call $~lib/string/String.__eq - i32.eqz + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 1280 + i32.const 1280 + call $~lib/string/String.__eq + i32.eqz if i32.const 0 i32.const 1088 @@ -10547,20 +10568,18 @@ end i32.const 65377 call $~lib/string/String.fromCodePoint - local.set $9 + local.tee $0 i32.const 55296 call $~lib/string/String.fromCodePoint - local.tee $5 + local.tee $1 i32.const 1648 - local.get $5 + local.get $1 select i32.const 56322 call $~lib/string/String.fromCodePoint - local.tee $10 + local.tee $4 call $~lib/string/String#concat - local.tee $1 - local.get $9 - local.get $1 + local.tee $6 call $~lib/string/String.__gt i32.eqz if @@ -10571,13 +10590,42 @@ call $~lib/builtins/abort unreachable end - local.get $9 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + local.get $0 + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 17912 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 + i32.const 17912 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 1868 i32.load i32.const 1 @@ -10595,7 +10643,7 @@ i32.const 1280 i32.const 100 call $~lib/string/String#repeat - local.tee $77 + local.tee $6 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -10610,7 +10658,7 @@ i32.const 1328 i32.const 0 call $~lib/string/String#repeat - local.tee $78 + local.tee $76 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -10625,7 +10673,7 @@ i32.const 1328 i32.const 1 call $~lib/string/String#repeat - local.tee $79 + local.tee $77 i32.const 1328 call $~lib/string/String.__eq i32.eqz @@ -10640,7 +10688,7 @@ i32.const 1328 i32.const 2 call $~lib/string/String#repeat - local.tee $80 + local.tee $78 i32.const 11840 call $~lib/string/String.__eq i32.eqz @@ -10655,7 +10703,7 @@ i32.const 1328 i32.const 3 call $~lib/string/String#repeat - local.tee $81 + local.tee $79 i32.const 11920 call $~lib/string/String.__eq i32.eqz @@ -10670,7 +10718,7 @@ i32.const 11424 i32.const 4 call $~lib/string/String#repeat - local.tee $82 + local.tee $80 i32.const 11952 call $~lib/string/String.__eq i32.eqz @@ -10685,7 +10733,7 @@ i32.const 1328 i32.const 5 call $~lib/string/String#repeat - local.tee $83 + local.tee $81 i32.const 11984 call $~lib/string/String.__eq i32.eqz @@ -10700,7 +10748,7 @@ i32.const 1328 i32.const 6 call $~lib/string/String#repeat - local.tee $84 + local.tee $82 i32.const 12016 call $~lib/string/String.__eq i32.eqz @@ -10715,7 +10763,7 @@ i32.const 1328 i32.const 7 call $~lib/string/String#repeat - local.tee $85 + local.tee $83 i32.const 12048 call $~lib/string/String.__eq i32.eqz @@ -10731,7 +10779,7 @@ i32.const 1280 i32.const 1280 call $~lib/string/String#replace - local.tee $86 + local.tee $84 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -10747,7 +10795,7 @@ i32.const 1280 i32.const 5552 call $~lib/string/String#replace - local.tee $87 + local.tee $85 i32.const 5552 call $~lib/string/String.__eq i32.eqz @@ -10763,7 +10811,7 @@ i32.const 5552 i32.const 1280 call $~lib/string/String#replace - local.tee $88 + local.tee $86 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -10779,7 +10827,7 @@ i32.const 1280 i32.const 1280 call $~lib/string/String#replace - local.tee $89 + local.tee $87 i32.const 5552 call $~lib/string/String.__eq i32.eqz @@ -10795,7 +10843,7 @@ i32.const 5584 i32.const 5552 call $~lib/string/String#replace - local.tee $90 + local.tee $88 i32.const 1808 call $~lib/string/String.__eq i32.eqz @@ -10811,7 +10859,7 @@ i32.const 1808 i32.const 5552 call $~lib/string/String#replace - local.tee $91 + local.tee $89 i32.const 5552 call $~lib/string/String.__eq i32.eqz @@ -10827,7 +10875,7 @@ i32.const 2256 i32.const 5552 call $~lib/string/String#replace - local.tee $92 + local.tee $90 i32.const 1808 call $~lib/string/String.__eq i32.eqz @@ -10843,7 +10891,7 @@ i32.const 11424 i32.const 11424 call $~lib/string/String#replace - local.tee $93 + local.tee $91 i32.const 1808 call $~lib/string/String.__eq i32.eqz @@ -10859,7 +10907,7 @@ i32.const 5584 i32.const 5552 call $~lib/string/String#replace - local.tee $94 + local.tee $92 i32.const 12112 call $~lib/string/String.__eq i32.eqz @@ -10875,7 +10923,7 @@ i32.const 1280 i32.const 5552 call $~lib/string/String#replace - local.tee $95 + local.tee $93 i32.const 12144 call $~lib/string/String.__eq i32.eqz @@ -10891,7 +10939,7 @@ i32.const 12208 i32.const 5552 call $~lib/string/String#replace - local.tee $96 + local.tee $94 i32.const 12144 call $~lib/string/String.__eq i32.eqz @@ -10907,7 +10955,7 @@ i32.const 12240 i32.const 12272 call $~lib/string/String#replace - local.tee $97 + local.tee $95 i32.const 12304 call $~lib/string/String.__eq i32.eqz @@ -10923,7 +10971,7 @@ i32.const 12240 i32.const 1280 call $~lib/string/String#replace - local.tee $98 + local.tee $96 i32.const 11424 call $~lib/string/String.__eq i32.eqz @@ -10939,7 +10987,7 @@ i32.const 1280 i32.const 1808 call $~lib/string/String#replaceAll - local.tee $99 + local.tee $97 i32.const 1808 call $~lib/string/String.__eq i32.eqz @@ -10955,7 +11003,7 @@ i32.const 5584 i32.const 5552 call $~lib/string/String#replaceAll - local.tee $100 + local.tee $98 i32.const 1808 call $~lib/string/String.__eq i32.eqz @@ -10971,7 +11019,7 @@ i32.const 1808 i32.const 5552 call $~lib/string/String#replaceAll - local.tee $101 + local.tee $99 i32.const 12272 call $~lib/string/String.__eq i32.eqz @@ -10987,7 +11035,7 @@ i32.const 1808 i32.const 5552 call $~lib/string/String#replaceAll - local.tee $102 + local.tee $100 i32.const 12384 call $~lib/string/String.__eq i32.eqz @@ -11003,7 +11051,7 @@ i32.const 11424 i32.const 11424 call $~lib/string/String#replaceAll - local.tee $103 + local.tee $101 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -11019,7 +11067,7 @@ i32.const 1328 i32.const 12384 call $~lib/string/String#replaceAll - local.tee $104 + local.tee $102 i32.const 12448 call $~lib/string/String.__eq i32.eqz @@ -11035,7 +11083,7 @@ i32.const 11424 i32.const 12272 call $~lib/string/String#replaceAll - local.tee $105 + local.tee $103 i32.const 12496 call $~lib/string/String.__eq i32.eqz @@ -11051,7 +11099,7 @@ i32.const 12560 i32.const 12272 call $~lib/string/String#replaceAll - local.tee $106 + local.tee $104 i32.const 12592 call $~lib/string/String.__eq i32.eqz @@ -11067,7 +11115,7 @@ i32.const 2256 i32.const 5552 call $~lib/string/String#replaceAll - local.tee $107 + local.tee $105 i32.const 1808 call $~lib/string/String.__eq i32.eqz @@ -11083,7 +11131,7 @@ i32.const 12624 i32.const 12272 call $~lib/string/String#replaceAll - local.tee $108 + local.tee $106 i32.const 2256 call $~lib/string/String.__eq i32.eqz @@ -11099,7 +11147,7 @@ i32.const 12656 i32.const 5552 call $~lib/string/String#replaceAll - local.tee $109 + local.tee $107 i32.const 12688 call $~lib/string/String.__eq i32.eqz @@ -11115,7 +11163,7 @@ i32.const 11424 i32.const 5552 call $~lib/string/String#replaceAll - local.tee $110 + local.tee $108 i32.const 5552 call $~lib/string/String.__eq i32.eqz @@ -11131,7 +11179,7 @@ i32.const 5584 i32.const 5552 call $~lib/string/String#replaceAll - local.tee $111 + local.tee $109 i32.const 12720 call $~lib/string/String.__eq i32.eqz @@ -11147,7 +11195,7 @@ i32.const 1280 i32.const 1280 call $~lib/string/String#replaceAll - local.tee $112 + local.tee $110 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -11163,7 +11211,7 @@ i32.const 1280 i32.const 5552 call $~lib/string/String#replaceAll - local.tee $113 + local.tee $111 i32.const 5552 call $~lib/string/String.__eq i32.eqz @@ -11179,7 +11227,7 @@ i32.const 5552 i32.const 1280 call $~lib/string/String#replaceAll - local.tee $114 + local.tee $112 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -11195,7 +11243,7 @@ i32.const 1280 i32.const 1280 call $~lib/string/String#replaceAll - local.tee $115 + local.tee $113 i32.const 5552 call $~lib/string/String.__eq i32.eqz @@ -11211,7 +11259,7 @@ i32.const 1808 i32.const 5584 call $~lib/string/String#replaceAll - local.tee $116 + local.tee $114 i32.const 5584 call $~lib/string/String.__eq i32.eqz @@ -11227,7 +11275,7 @@ i32.const 2224 i32.const 5584 call $~lib/string/String#replaceAll - local.tee $117 + local.tee $115 i32.const 1808 call $~lib/string/String.__eq i32.eqz @@ -11243,7 +11291,7 @@ i32.const 1280 i32.const 5552 call $~lib/string/String#replaceAll - local.tee $118 + local.tee $116 i32.const 12752 call $~lib/string/String.__eq i32.eqz @@ -11259,7 +11307,7 @@ i32.const 1280 i32.const 1280 call $~lib/string/String#replaceAll - local.tee $119 + local.tee $117 i32.const 1808 call $~lib/string/String.__eq i32.eqz @@ -11272,14 +11320,22 @@ unreachable end global.get $std/string/str - call $~lib/rt/pure/__release + local.tee $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 12784 global.set $std/string/str i32.const 12784 i32.const 0 i32.const 2147483647 call $~lib/string/String#slice - local.tee $120 + local.tee $118 i32.const 12784 call $~lib/string/String.__eq i32.eqz @@ -11295,7 +11351,7 @@ i32.const -1 i32.const 2147483647 call $~lib/string/String#slice - local.tee $121 + local.tee $119 i32.const 12832 call $~lib/string/String.__eq i32.eqz @@ -11311,7 +11367,7 @@ i32.const -5 i32.const 2147483647 call $~lib/string/String#slice - local.tee $122 + local.tee $120 i32.const 12864 call $~lib/string/String.__eq i32.eqz @@ -11327,7 +11383,7 @@ i32.const 2 i32.const 7 call $~lib/string/String#slice - local.tee $123 + local.tee $121 i32.const 12896 call $~lib/string/String.__eq i32.eqz @@ -11343,7 +11399,7 @@ i32.const -11 i32.const -6 call $~lib/string/String#slice - local.tee $124 + local.tee $122 i32.const 12928 call $~lib/string/String.__eq i32.eqz @@ -11359,7 +11415,7 @@ i32.const 4 i32.const 3 call $~lib/string/String#slice - local.tee $125 + local.tee $123 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -11375,7 +11431,7 @@ i32.const 0 i32.const -1 call $~lib/string/String#slice - local.tee $126 + local.tee $124 i32.const 12960 call $~lib/string/String.__eq i32.eqz @@ -11391,7 +11447,7 @@ i32.const 0 i32.const 2147483647 call $~lib/string/String#substr - local.tee $127 + local.tee $125 i32.const 12784 call $~lib/string/String.__eq i32.eqz @@ -11407,7 +11463,7 @@ i32.const -1 i32.const 2147483647 call $~lib/string/String#substr - local.tee $128 + local.tee $126 i32.const 12832 call $~lib/string/String.__eq i32.eqz @@ -11423,7 +11479,7 @@ i32.const -5 i32.const 2147483647 call $~lib/string/String#substr - local.tee $129 + local.tee $127 i32.const 12864 call $~lib/string/String.__eq i32.eqz @@ -11439,7 +11495,7 @@ i32.const 2 i32.const 7 call $~lib/string/String#substr - local.tee $130 + local.tee $128 i32.const 13008 call $~lib/string/String.__eq i32.eqz @@ -11455,7 +11511,7 @@ i32.const -11 i32.const -6 call $~lib/string/String#substr - local.tee $131 + local.tee $129 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -11471,7 +11527,7 @@ i32.const 4 i32.const 3 call $~lib/string/String#substr - local.tee $132 + local.tee $130 i32.const 13040 call $~lib/string/String.__eq i32.eqz @@ -11487,7 +11543,7 @@ i32.const 0 i32.const -1 call $~lib/string/String#substr - local.tee $133 + local.tee $131 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -11503,7 +11559,7 @@ i32.const 0 i32.const 100 call $~lib/string/String#substr - local.tee $134 + local.tee $132 i32.const 12784 call $~lib/string/String.__eq i32.eqz @@ -11519,7 +11575,7 @@ i32.const 4 i32.const 4 call $~lib/string/String#substr - local.tee $135 + local.tee $133 i32.const 13072 call $~lib/string/String.__eq i32.eqz @@ -11535,7 +11591,7 @@ i32.const 4 i32.const -3 call $~lib/string/String#substr - local.tee $136 + local.tee $134 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -11551,7 +11607,7 @@ i32.const 0 i32.const 2147483647 call $~lib/string/String#substring - local.tee $137 + local.tee $135 i32.const 12784 call $~lib/string/String.__eq i32.eqz @@ -11567,7 +11623,7 @@ i32.const -1 i32.const 2147483647 call $~lib/string/String#substring - local.tee $138 + local.tee $136 i32.const 12784 call $~lib/string/String.__eq i32.eqz @@ -11583,7 +11639,7 @@ i32.const -5 i32.const 2147483647 call $~lib/string/String#substring - local.tee $139 + local.tee $137 i32.const 12784 call $~lib/string/String.__eq i32.eqz @@ -11599,7 +11655,7 @@ i32.const 2 i32.const 7 call $~lib/string/String#substring - local.tee $140 + local.tee $138 i32.const 12896 call $~lib/string/String.__eq i32.eqz @@ -11615,7 +11671,7 @@ i32.const -11 i32.const -6 call $~lib/string/String#substring - local.tee $141 + local.tee $139 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -11631,7 +11687,7 @@ i32.const 4 i32.const 3 call $~lib/string/String#substring - local.tee $142 + local.tee $140 i32.const 13104 call $~lib/string/String.__eq i32.eqz @@ -11647,7 +11703,7 @@ i32.const 0 i32.const -1 call $~lib/string/String#substring - local.tee $143 + local.tee $141 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -11663,7 +11719,7 @@ i32.const 0 i32.const 100 call $~lib/string/String#substring - local.tee $144 + local.tee $142 i32.const 12784 call $~lib/string/String.__eq i32.eqz @@ -11679,7 +11735,7 @@ i32.const 4 i32.const 4 call $~lib/string/String#substring - local.tee $145 + local.tee $143 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -11695,7 +11751,7 @@ i32.const 4 i32.const -3 call $~lib/string/String#substring - local.tee $146 + local.tee $144 i32.const 2256 call $~lib/string/String.__eq i32.eqz @@ -11722,11 +11778,18 @@ local.tee $0 i32.const 1280 call $~lib/string/String.__eq - local.set $11 + local.set $7 local.get $0 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $11 + local.get $7 i32.eqz if i32.const 0 @@ -11742,7 +11805,14 @@ call $~lib/string/String#split local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.load offset=12 if @@ -11757,25 +11827,39 @@ i32.const 2064 i32.const 2147483647 call $~lib/string/String#split - local.set $11 + local.set $1 local.get $0 - call $~lib/rt/pure/__release - local.get $11 + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 i32.load offset=12 i32.const 1 i32.eq if - local.get $11 + local.get $1 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 i32.const 1280 call $~lib/string/String.__eq - local.set $13 + local.set $8 local.get $0 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $13 + local.get $8 i32.eqz if i32.const 0 @@ -11789,25 +11873,39 @@ i32.const 5744 i32.const 2147483647 call $~lib/string/String#split - local.set $1 - local.get $11 - call $~lib/rt/pure/__release + local.set $0 local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 i32.load offset=12 i32.const 1 i32.eq if - local.get $1 + local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $0 + local.tee $1 i32.const 13360 call $~lib/string/String.__eq - local.set $6 - local.get $0 - call $~lib/rt/pure/__release + local.set $9 + local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $6 + local.get $9 i32.eqz if i32.const 0 @@ -11821,49 +11919,77 @@ i32.const 2064 i32.const 2147483647 call $~lib/string/String#split - local.set $6 + local.set $1 + local.get $0 + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release - local.get $6 i32.load offset=12 i32.const 3 i32.eq if - local.get $6 + local.get $1 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 i32.const 1328 call $~lib/string/String.__eq - local.set $14 + local.set $10 local.get $0 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $14 + local.get $10 if - local.get $6 + local.get $1 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 i32.const 11392 call $~lib/string/String.__eq - local.set $15 + local.set $11 local.get $0 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $15 + local.get $11 if - local.get $6 + local.get $1 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 i32.const 12240 call $~lib/string/String.__eq - local.set $16 + local.set $12 local.get $0 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $16 + local.get $12 i32.eqz if i32.const 0 @@ -11877,49 +12003,77 @@ i32.const 13424 i32.const 2147483647 call $~lib/string/String#split - local.set $1 - local.get $6 - call $~lib/rt/pure/__release + local.set $0 local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 i32.load offset=12 i32.const 3 i32.eq if - local.get $1 + local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $0 + local.tee $1 i32.const 1328 call $~lib/string/String.__eq - local.set $17 - local.get $0 - call $~lib/rt/pure/__release + local.set $13 + local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $17 + local.get $13 if - local.get $1 + local.get $0 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - local.tee $0 + local.tee $1 i32.const 11392 call $~lib/string/String.__eq - local.set $18 - local.get $0 - call $~lib/rt/pure/__release + local.set $14 + local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $18 + local.get $14 if - local.get $1 + local.get $0 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - local.tee $0 + local.tee $1 i32.const 12240 call $~lib/string/String.__eq - local.set $3 - local.get $0 - call $~lib/rt/pure/__release + local.set $15 + local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $3 + local.get $15 i32.eqz if i32.const 0 @@ -11933,61 +12087,96 @@ i32.const 2064 i32.const 2147483647 call $~lib/string/String#split - local.set $3 + local.set $1 + local.get $0 + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release - local.get $3 i32.load offset=12 i32.const 4 i32.eq if - local.get $3 + local.get $1 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 i32.const 1328 call $~lib/string/String.__eq - local.set $19 + local.set $16 local.get $0 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $19 + local.get $16 if - local.get $3 + local.get $1 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 i32.const 11392 call $~lib/string/String.__eq - local.set $20 + local.set $17 local.get $0 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $20 + local.get $17 if - local.get $3 + local.get $1 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 i32.const 1280 call $~lib/string/String.__eq - local.set $21 + local.set $18 local.get $0 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $21 + local.get $18 if - local.get $3 + local.get $1 i32.const 3 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 i32.const 12240 call $~lib/string/String.__eq - local.set $22 + local.set $19 local.get $0 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $22 + local.get $19 i32.eqz if i32.const 0 @@ -12001,61 +12190,96 @@ i32.const 2064 i32.const 2147483647 call $~lib/string/String#split - local.set $1 - local.get $3 - call $~lib/rt/pure/__release + local.set $0 local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 i32.load offset=12 i32.const 4 i32.eq if - local.get $1 + local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $0 + local.tee $1 i32.const 1280 call $~lib/string/String.__eq - local.set $23 - local.get $0 - call $~lib/rt/pure/__release + local.set $20 + local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $23 + local.get $20 if - local.get $1 + local.get $0 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - local.tee $0 + local.tee $1 i32.const 1328 call $~lib/string/String.__eq - local.set $24 - local.get $0 - call $~lib/rt/pure/__release + local.set $21 + local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $24 + local.get $21 if - local.get $1 + local.get $0 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - local.tee $0 + local.tee $1 i32.const 11392 call $~lib/string/String.__eq - local.set $25 - local.get $0 - call $~lib/rt/pure/__release + local.set $22 + local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $25 + local.get $22 if - local.get $1 + local.get $0 i32.const 3 call $~lib/array/Array<~lib/string/String>#__get - local.tee $0 + local.tee $1 i32.const 12240 call $~lib/string/String.__eq - local.set $4 - local.get $0 - call $~lib/rt/pure/__release + local.set $23 + local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $4 + local.get $23 i32.eqz if i32.const 0 @@ -12069,61 +12293,96 @@ i32.const 2064 i32.const 2147483647 call $~lib/string/String#split - local.set $4 + local.set $1 + local.get $0 + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release - local.get $4 i32.load offset=12 i32.const 4 i32.eq if - local.get $4 + local.get $1 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 i32.const 1328 call $~lib/string/String.__eq - local.set $26 + local.set $24 local.get $0 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $26 + local.get $24 if - local.get $4 + local.get $1 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 i32.const 11392 call $~lib/string/String.__eq - local.set $27 + local.set $25 local.get $0 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $27 + local.get $25 if - local.get $4 + local.get $1 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 i32.const 12240 call $~lib/string/String.__eq - local.set $28 + local.set $26 local.get $0 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $28 + local.get $26 if - local.get $4 + local.get $1 i32.const 3 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 i32.const 1280 call $~lib/string/String.__eq - local.set $29 + local.set $27 local.get $0 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $29 + local.get $27 i32.eqz if i32.const 0 @@ -12137,49 +12396,77 @@ i32.const 1280 i32.const 2147483647 call $~lib/string/String#split - local.set $1 - local.get $4 - call $~lib/rt/pure/__release + local.set $0 local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 i32.load offset=12 i32.const 3 i32.eq if - local.get $1 + local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $0 + local.tee $1 i32.const 1328 call $~lib/string/String.__eq - local.set $30 - local.get $0 - call $~lib/rt/pure/__release + local.set $28 + local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $30 + local.get $28 if - local.get $1 + local.get $0 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - local.tee $0 + local.tee $1 i32.const 11392 call $~lib/string/String.__eq - local.set $31 - local.get $0 - call $~lib/rt/pure/__release + local.set $29 + local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $31 + local.get $29 if - local.get $1 + local.get $0 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - local.tee $0 + local.tee $1 i32.const 12240 call $~lib/string/String.__eq - local.set $12 - local.get $0 - call $~lib/rt/pure/__release + local.set $30 + local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $12 + local.get $30 i32.eqz if i32.const 0 @@ -12193,10 +12480,17 @@ i32.const 1280 i32.const 0 call $~lib/string/String#split - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $4 local.get $0 + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 i32.load offset=12 if i32.const 0 @@ -12210,25 +12504,39 @@ i32.const 1280 i32.const 1 call $~lib/string/String#split - local.set $12 - local.get $0 - call $~lib/rt/pure/__release - local.get $12 + local.set $1 + local.get $4 + i32.const 17912 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 i32.load offset=12 i32.const 1 i32.eq if - local.get $12 + local.get $1 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 i32.const 1328 call $~lib/string/String.__eq - local.set $32 + local.set $31 local.get $0 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $32 + local.get $31 i32.eqz if i32.const 0 @@ -12242,25 +12550,39 @@ i32.const 2064 i32.const 1 call $~lib/string/String#split - local.set $1 - local.get $12 - call $~lib/rt/pure/__release + local.set $0 local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 i32.load offset=12 i32.const 1 i32.eq if - local.get $1 + local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $0 + local.tee $1 i32.const 1328 call $~lib/string/String.__eq - local.set $7 - local.get $0 - call $~lib/rt/pure/__release + local.set $32 + local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $7 + local.get $32 i32.eqz if i32.const 0 @@ -12274,15 +12596,22 @@ i32.const 1280 i32.const 4 call $~lib/string/String#split - local.set $7 + local.set $1 + local.get $0 + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release - local.get $7 i32.load offset=12 i32.const 3 i32.eq if - local.get $7 + local.get $1 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 @@ -12290,11 +12619,18 @@ call $~lib/string/String.__eq local.set $33 local.get $0 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $33 if - local.get $7 + local.get $1 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 @@ -12302,21 +12638,35 @@ call $~lib/string/String.__eq local.set $34 local.get $0 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $34 if - local.get $7 + local.get $1 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get local.tee $0 i32.const 12240 call $~lib/string/String.__eq - local.set $8 + local.set $35 local.get $0 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $8 + local.get $35 i32.eqz if i32.const 0 @@ -12330,49 +12680,77 @@ i32.const 1280 i32.const -1 call $~lib/string/String#split - local.set $8 - local.get $7 - call $~lib/rt/pure/__release - local.get $8 + local.set $0 + local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 i32.load offset=12 i32.const 3 i32.eq if - local.get $8 + local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $0 + local.tee $1 i32.const 1328 call $~lib/string/String.__eq - local.set $35 - local.get $0 - call $~lib/rt/pure/__release - end - local.get $35 + local.set $36 + local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $36 if - local.get $8 + local.get $0 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - local.tee $0 + local.tee $1 i32.const 11392 call $~lib/string/String.__eq - local.set $36 - local.get $0 - call $~lib/rt/pure/__release + local.set $37 + local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $36 + local.get $37 if - local.get $8 + local.get $0 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - local.tee $0 + local.tee $1 i32.const 12240 call $~lib/string/String.__eq - local.set $37 - local.get $0 - call $~lib/rt/pure/__release + local.set $38 + local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $37 + local.get $38 i32.eqz if i32.const 0 @@ -12387,8 +12765,15 @@ i32.const -1 call $~lib/string/String#split local.set $1 - local.get $8 - call $~lib/rt/pure/__release + local.get $0 + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 i32.load offset=12 i32.const 3 @@ -12400,11 +12785,18 @@ local.tee $0 i32.const 1328 call $~lib/string/String.__eq - local.set $38 + local.set $39 local.get $0 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $38 + local.get $39 if local.get $1 i32.const 1 @@ -12412,11 +12804,18 @@ local.tee $0 i32.const 11392 call $~lib/string/String.__eq - local.set $39 + local.set $40 local.get $0 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $39 + local.get $40 if local.get $1 i32.const 2 @@ -12424,11 +12823,18 @@ local.tee $0 i32.const 12240 call $~lib/string/String.__eq - local.set $40 + local.set $41 local.get $0 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $40 + local.get $41 i32.eqz if i32.const 0 @@ -12439,10 +12845,17 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 call $~lib/util/number/itoa32 - local.tee $147 + local.tee $1 i32.const 2432 call $~lib/string/String.__eq i32.eqz @@ -12456,7 +12869,7 @@ end i32.const 1 call $~lib/util/number/itoa32 - local.tee $148 + local.tee $0 i32.const 2496 call $~lib/string/String.__eq i32.eqz @@ -12470,7 +12883,7 @@ end i32.const 8 call $~lib/util/number/itoa32 - local.tee $149 + local.tee $4 i32.const 13552 call $~lib/string/String.__eq i32.eqz @@ -12484,7 +12897,7 @@ end i32.const 12 call $~lib/util/number/itoa32 - local.tee $150 + local.tee $7 i32.const 13584 call $~lib/string/String.__eq i32.eqz @@ -12498,7 +12911,7 @@ end i32.const 123 call $~lib/util/number/itoa32 - local.tee $151 + local.tee $8 i32.const 1872 call $~lib/string/String.__eq i32.eqz @@ -12512,7 +12925,7 @@ end i32.const -1000 call $~lib/util/number/itoa32 - local.tee $152 + local.tee $9 i32.const 13616 call $~lib/string/String.__eq i32.eqz @@ -12526,7 +12939,7 @@ end i32.const 1234 call $~lib/util/number/itoa32 - local.tee $153 + local.tee $10 i32.const 13648 call $~lib/string/String.__eq i32.eqz @@ -12540,7 +12953,7 @@ end i32.const 12345 call $~lib/util/number/itoa32 - local.tee $154 + local.tee $11 i32.const 13680 call $~lib/string/String.__eq i32.eqz @@ -12554,7 +12967,7 @@ end i32.const 123456 call $~lib/util/number/itoa32 - local.tee $155 + local.tee $12 i32.const 13712 call $~lib/string/String.__eq i32.eqz @@ -12568,7 +12981,7 @@ end i32.const 1111111 call $~lib/util/number/itoa32 - local.tee $156 + local.tee $13 i32.const 13744 call $~lib/string/String.__eq i32.eqz @@ -12582,7 +12995,7 @@ end i32.const 1234567 call $~lib/util/number/itoa32 - local.tee $157 + local.tee $14 i32.const 13776 call $~lib/string/String.__eq i32.eqz @@ -12596,7 +13009,7 @@ end i32.const 12345678 call $~lib/util/number/itoa32 - local.tee $158 + local.tee $15 i32.const 13808 call $~lib/string/String.__eq i32.eqz @@ -12610,7 +13023,7 @@ end i32.const 123456789 call $~lib/util/number/itoa32 - local.tee $159 + local.tee $16 i32.const 13840 call $~lib/string/String.__eq i32.eqz @@ -12624,7 +13037,7 @@ end i32.const 2147483646 call $~lib/util/number/itoa32 - local.tee $160 + local.tee $17 i32.const 13888 call $~lib/string/String.__eq i32.eqz @@ -12638,7 +13051,7 @@ end i32.const 2147483647 call $~lib/util/number/itoa32 - local.tee $161 + local.tee $18 i32.const 13936 call $~lib/string/String.__eq i32.eqz @@ -12652,7 +13065,7 @@ end i32.const -2147483648 call $~lib/util/number/itoa32 - local.tee $162 + local.tee $19 i32.const 13984 call $~lib/string/String.__eq i32.eqz @@ -12666,7 +13079,7 @@ end i32.const -1 call $~lib/util/number/itoa32 - local.tee $163 + local.tee $20 i32.const 14032 call $~lib/string/String.__eq i32.eqz @@ -12680,7 +13093,7 @@ end i32.const 0 call $~lib/util/number/utoa32 - local.tee $164 + local.tee $21 i32.const 2432 call $~lib/string/String.__eq i32.eqz @@ -12694,7 +13107,7 @@ end i32.const 1000 call $~lib/util/number/utoa32 - local.tee $165 + local.tee $22 i32.const 14064 call $~lib/string/String.__eq i32.eqz @@ -12708,7 +13121,7 @@ end i32.const 2147483647 call $~lib/util/number/utoa32 - local.tee $166 + local.tee $23 i32.const 13936 call $~lib/string/String.__eq i32.eqz @@ -12722,7 +13135,7 @@ end i32.const -2147483648 call $~lib/util/number/utoa32 - local.tee $167 + local.tee $24 i32.const 14096 call $~lib/string/String.__eq i32.eqz @@ -12736,7 +13149,7 @@ end i32.const -1 call $~lib/util/number/utoa32 - local.tee $168 + local.tee $25 i32.const 14144 call $~lib/string/String.__eq i32.eqz @@ -12750,7 +13163,7 @@ end i64.const 0 call $~lib/util/number/utoa64 - local.tee $169 + local.tee $26 i32.const 2432 call $~lib/string/String.__eq i32.eqz @@ -12764,7 +13177,7 @@ end i64.const 12 call $~lib/util/number/utoa64 - local.tee $170 + local.tee $27 i32.const 13584 call $~lib/string/String.__eq i32.eqz @@ -12778,7 +13191,7 @@ end i64.const 123 call $~lib/util/number/utoa64 - local.tee $171 + local.tee $28 i32.const 1872 call $~lib/string/String.__eq i32.eqz @@ -12792,7 +13205,7 @@ end i64.const 1234 call $~lib/util/number/utoa64 - local.tee $172 + local.tee $29 i32.const 13648 call $~lib/string/String.__eq i32.eqz @@ -12806,7 +13219,7 @@ end i64.const 12345 call $~lib/util/number/utoa64 - local.tee $173 + local.tee $30 i32.const 13680 call $~lib/string/String.__eq i32.eqz @@ -12820,7 +13233,7 @@ end i64.const 123456 call $~lib/util/number/utoa64 - local.tee $174 + local.tee $31 i32.const 13712 call $~lib/string/String.__eq i32.eqz @@ -12834,7 +13247,7 @@ end i64.const 1234567 call $~lib/util/number/utoa64 - local.tee $175 + local.tee $32 i32.const 13776 call $~lib/string/String.__eq i32.eqz @@ -12848,7 +13261,7 @@ end i64.const 99999999 call $~lib/util/number/utoa64 - local.tee $176 + local.tee $33 i32.const 14192 call $~lib/string/String.__eq i32.eqz @@ -12862,7 +13275,7 @@ end i64.const 100000000 call $~lib/util/number/utoa64 - local.tee $177 + local.tee $34 i32.const 14224 call $~lib/string/String.__eq i32.eqz @@ -12876,7 +13289,7 @@ end i64.const 4294967295 call $~lib/util/number/utoa64 - local.tee $178 + local.tee $35 i32.const 14144 call $~lib/string/String.__eq i32.eqz @@ -12890,7 +13303,7 @@ end i64.const 4294967297 call $~lib/util/number/utoa64 - local.tee $179 + local.tee $36 i32.const 14272 call $~lib/string/String.__eq i32.eqz @@ -12904,7 +13317,7 @@ end i64.const 68719476735 call $~lib/util/number/utoa64 - local.tee $180 + local.tee $37 i32.const 14320 call $~lib/string/String.__eq i32.eqz @@ -12918,7 +13331,7 @@ end i64.const 868719476735 call $~lib/util/number/utoa64 - local.tee $181 + local.tee $38 i32.const 14368 call $~lib/string/String.__eq i32.eqz @@ -12932,7 +13345,7 @@ end i64.const 8687194767350 call $~lib/util/number/utoa64 - local.tee $182 + local.tee $39 i32.const 14416 call $~lib/string/String.__eq i32.eqz @@ -12946,7 +13359,7 @@ end i64.const 86871947673501 call $~lib/util/number/utoa64 - local.tee $183 + local.tee $40 i32.const 14464 call $~lib/string/String.__eq i32.eqz @@ -12960,7 +13373,7 @@ end i64.const 999868719476735 call $~lib/util/number/utoa64 - local.tee $184 + local.tee $41 i32.const 14512 call $~lib/string/String.__eq i32.eqz @@ -12974,7 +13387,7 @@ end i64.const 9999868719476735 call $~lib/util/number/utoa64 - local.tee $185 + local.tee $145 i32.const 14560 call $~lib/string/String.__eq i32.eqz @@ -12988,7 +13401,7 @@ end i64.const 19999868719476735 call $~lib/util/number/utoa64 - local.tee $186 + local.tee $146 i32.const 14608 call $~lib/string/String.__eq i32.eqz @@ -13002,7 +13415,7 @@ end i64.const 129999868719476735 call $~lib/util/number/utoa64 - local.tee $187 + local.tee $147 i32.const 14672 call $~lib/string/String.__eq i32.eqz @@ -13016,7 +13429,7 @@ end i64.const 1239999868719476735 call $~lib/util/number/utoa64 - local.tee $188 + local.tee $148 i32.const 14736 call $~lib/string/String.__eq i32.eqz @@ -13030,7 +13443,7 @@ end i64.const -1 call $~lib/util/number/utoa64 - local.tee $189 + local.tee $149 i32.const 14800 call $~lib/string/String.__eq i32.eqz @@ -13044,7 +13457,7 @@ end i64.const 0 call $~lib/util/number/itoa64 - local.tee $190 + local.tee $150 i32.const 2432 call $~lib/string/String.__eq i32.eqz @@ -13058,7 +13471,7 @@ end i64.const -1234 call $~lib/util/number/itoa64 - local.tee $191 + local.tee $151 i32.const 14864 call $~lib/string/String.__eq i32.eqz @@ -13072,7 +13485,7 @@ end i64.const 4294967295 call $~lib/util/number/itoa64 - local.tee $192 + local.tee $152 i32.const 14144 call $~lib/string/String.__eq i32.eqz @@ -13086,7 +13499,7 @@ end i64.const 4294967297 call $~lib/util/number/itoa64 - local.tee $193 + local.tee $153 i32.const 14272 call $~lib/string/String.__eq i32.eqz @@ -13100,7 +13513,7 @@ end i64.const -4294967295 call $~lib/util/number/itoa64 - local.tee $194 + local.tee $154 i32.const 14896 call $~lib/string/String.__eq i32.eqz @@ -13114,7 +13527,7 @@ end i64.const 68719476735 call $~lib/util/number/itoa64 - local.tee $195 + local.tee $155 i32.const 14320 call $~lib/string/String.__eq i32.eqz @@ -13128,7 +13541,7 @@ end i64.const -68719476735 call $~lib/util/number/itoa64 - local.tee $196 + local.tee $156 i32.const 14944 call $~lib/string/String.__eq i32.eqz @@ -13142,7 +13555,7 @@ end i64.const -868719476735 call $~lib/util/number/itoa64 - local.tee $197 + local.tee $157 i32.const 14992 call $~lib/string/String.__eq i32.eqz @@ -13156,7 +13569,7 @@ end i64.const -999868719476735 call $~lib/util/number/itoa64 - local.tee $198 + local.tee $158 i32.const 15040 call $~lib/string/String.__eq i32.eqz @@ -13170,7 +13583,7 @@ end i64.const -19999868719476735 call $~lib/util/number/itoa64 - local.tee $199 + local.tee $159 i32.const 15088 call $~lib/string/String.__eq i32.eqz @@ -13184,7 +13597,7 @@ end i64.const 9223372036854775807 call $~lib/util/number/itoa64 - local.tee $200 + local.tee $160 i32.const 15152 call $~lib/string/String.__eq i32.eqz @@ -13198,7 +13611,7 @@ end i64.const -9223372036854775808 call $~lib/util/number/itoa64 - local.tee $201 + local.tee $161 i32.const 15216 call $~lib/string/String.__eq i32.eqz @@ -13212,7 +13625,7 @@ end f64.const 0 call $~lib/util/number/dtoa - local.tee $202 + local.tee $162 i32.const 15280 call $~lib/string/String.__eq i32.eqz @@ -13226,7 +13639,7 @@ end f64.const -0 call $~lib/util/number/dtoa - local.tee $203 + local.tee $163 i32.const 15280 call $~lib/string/String.__eq i32.eqz @@ -13240,7 +13653,7 @@ end f64.const nan:0x8000000000000 call $~lib/util/number/dtoa - local.tee $204 + local.tee $164 i32.const 5808 call $~lib/string/String.__eq i32.eqz @@ -13254,7 +13667,7 @@ end f64.const inf call $~lib/util/number/dtoa - local.tee $205 + local.tee $165 i32.const 15312 call $~lib/string/String.__eq i32.eqz @@ -13268,7 +13681,7 @@ end f64.const -inf call $~lib/util/number/dtoa - local.tee $206 + local.tee $166 i32.const 7024 call $~lib/string/String.__eq i32.eqz @@ -13282,7 +13695,7 @@ end f64.const 2.220446049250313e-16 call $~lib/util/number/dtoa - local.tee $207 + local.tee $167 i32.const 6320 call $~lib/string/String.__eq i32.eqz @@ -13296,7 +13709,7 @@ end f64.const -2.220446049250313e-16 call $~lib/util/number/dtoa - local.tee $208 + local.tee $168 i32.const 16256 call $~lib/string/String.__eq i32.eqz @@ -13310,7 +13723,7 @@ end f64.const 1797693134862315708145274e284 call $~lib/util/number/dtoa - local.tee $209 + local.tee $169 i32.const 6384 call $~lib/string/String.__eq i32.eqz @@ -13324,7 +13737,7 @@ end f64.const -1797693134862315708145274e284 call $~lib/util/number/dtoa - local.tee $210 + local.tee $170 i32.const 16320 call $~lib/string/String.__eq i32.eqz @@ -13338,7 +13751,7 @@ end f64.const 4185580496821356722454785e274 call $~lib/util/number/dtoa - local.tee $211 + local.tee $171 i32.const 16384 call $~lib/string/String.__eq i32.eqz @@ -13352,7 +13765,7 @@ end f64.const 2.2250738585072014e-308 call $~lib/util/number/dtoa - local.tee $9 + local.tee $172 i32.const 16448 call $~lib/string/String.__eq i32.eqz @@ -13366,7 +13779,7 @@ end f64.const 4.940656e-318 call $~lib/util/number/dtoa - local.tee $5 + local.tee $173 i32.const 16512 call $~lib/string/String.__eq i32.eqz @@ -13380,7 +13793,7 @@ end f64.const 9060801153433600 call $~lib/util/number/dtoa - local.tee $10 + local.tee $174 i32.const 16560 call $~lib/string/String.__eq i32.eqz @@ -13394,7 +13807,7 @@ end f64.const 4708356024711512064 call $~lib/util/number/dtoa - local.tee $11 + local.tee $175 i32.const 16624 call $~lib/string/String.__eq i32.eqz @@ -13408,7 +13821,7 @@ end f64.const 9409340012568248320 call $~lib/util/number/dtoa - local.tee $13 + local.tee $176 i32.const 16688 call $~lib/string/String.__eq i32.eqz @@ -13422,7 +13835,7 @@ end f64.const 5e-324 call $~lib/util/number/dtoa - local.tee $6 + local.tee $177 i32.const 6448 call $~lib/string/String.__eq i32.eqz @@ -13436,7 +13849,7 @@ end f64.const 1 call $~lib/util/number/dtoa - local.tee $14 + local.tee $178 i32.const 16752 call $~lib/string/String.__eq i32.eqz @@ -13450,7 +13863,7 @@ end f64.const 0.1 call $~lib/util/number/dtoa - local.tee $15 + local.tee $179 i32.const 3456 call $~lib/string/String.__eq i32.eqz @@ -13464,7 +13877,7 @@ end f64.const -1 call $~lib/util/number/dtoa - local.tee $16 + local.tee $180 i32.const 16784 call $~lib/string/String.__eq i32.eqz @@ -13478,7 +13891,7 @@ end f64.const -0.1 call $~lib/util/number/dtoa - local.tee $17 + local.tee $181 i32.const 16816 call $~lib/string/String.__eq i32.eqz @@ -13492,7 +13905,7 @@ end f64.const 1e6 call $~lib/util/number/dtoa - local.tee $18 + local.tee $182 i32.const 16848 call $~lib/string/String.__eq i32.eqz @@ -13506,7 +13919,7 @@ end f64.const 1e-06 call $~lib/util/number/dtoa - local.tee $3 + local.tee $183 i32.const 16896 call $~lib/string/String.__eq i32.eqz @@ -13520,7 +13933,7 @@ end f64.const -1e6 call $~lib/util/number/dtoa - local.tee $19 + local.tee $184 i32.const 16928 call $~lib/string/String.__eq i32.eqz @@ -13534,7 +13947,7 @@ end f64.const -1e-06 call $~lib/util/number/dtoa - local.tee $20 + local.tee $185 i32.const 16976 call $~lib/string/String.__eq i32.eqz @@ -13548,7 +13961,7 @@ end f64.const 1e7 call $~lib/util/number/dtoa - local.tee $21 + local.tee $186 i32.const 17024 call $~lib/string/String.__eq i32.eqz @@ -13562,7 +13975,7 @@ end f64.const 1e-07 call $~lib/util/number/dtoa - local.tee $22 + local.tee $187 i32.const 17072 call $~lib/string/String.__eq i32.eqz @@ -13576,7 +13989,7 @@ end f64.const 1.e+308 call $~lib/util/number/dtoa - local.tee $23 + local.tee $188 i32.const 3680 call $~lib/string/String.__eq i32.eqz @@ -13590,7 +14003,7 @@ end f64.const -1.e+308 call $~lib/util/number/dtoa - local.tee $24 + local.tee $189 i32.const 17104 call $~lib/string/String.__eq i32.eqz @@ -13604,7 +14017,7 @@ end f64.const inf call $~lib/util/number/dtoa - local.tee $25 + local.tee $190 i32.const 15312 call $~lib/string/String.__eq i32.eqz @@ -13618,7 +14031,7 @@ end f64.const -inf call $~lib/util/number/dtoa - local.tee $4 + local.tee $191 i32.const 7024 call $~lib/string/String.__eq i32.eqz @@ -13632,7 +14045,7 @@ end f64.const 1e-308 call $~lib/util/number/dtoa - local.tee $26 + local.tee $192 i32.const 17136 call $~lib/string/String.__eq i32.eqz @@ -13646,7 +14059,7 @@ end f64.const -1e-308 call $~lib/util/number/dtoa - local.tee $27 + local.tee $193 i32.const 17168 call $~lib/string/String.__eq i32.eqz @@ -13660,7 +14073,7 @@ end f64.const 1e-323 call $~lib/util/number/dtoa - local.tee $28 + local.tee $194 i32.const 17200 call $~lib/string/String.__eq i32.eqz @@ -13674,7 +14087,7 @@ end f64.const -1e-323 call $~lib/util/number/dtoa - local.tee $29 + local.tee $195 i32.const 17232 call $~lib/string/String.__eq i32.eqz @@ -13688,7 +14101,7 @@ end f64.const 0 call $~lib/util/number/dtoa - local.tee $30 + local.tee $196 i32.const 15280 call $~lib/string/String.__eq i32.eqz @@ -13702,7 +14115,7 @@ end f64.const 4294967272 call $~lib/util/number/dtoa - local.tee $31 + local.tee $197 i32.const 17264 call $~lib/string/String.__eq i32.eqz @@ -13716,7 +14129,7 @@ end f64.const 1.2312145673456234e-08 call $~lib/util/number/dtoa - local.tee $12 + local.tee $198 i32.const 17312 call $~lib/string/String.__eq i32.eqz @@ -13730,7 +14143,7 @@ end f64.const 555555555.5555556 call $~lib/util/number/dtoa - local.tee $32 + local.tee $199 i32.const 17376 call $~lib/string/String.__eq i32.eqz @@ -13744,7 +14157,7 @@ end f64.const 0.9999999999999999 call $~lib/util/number/dtoa - local.tee $7 + local.tee $200 i32.const 17440 call $~lib/string/String.__eq i32.eqz @@ -13758,7 +14171,7 @@ end f64.const 1 call $~lib/util/number/dtoa - local.tee $33 + local.tee $201 i32.const 16752 call $~lib/string/String.__eq i32.eqz @@ -13772,7 +14185,7 @@ end f64.const 12.34 call $~lib/util/number/dtoa - local.tee $34 + local.tee $202 i32.const 17504 call $~lib/string/String.__eq i32.eqz @@ -13786,7 +14199,7 @@ end f64.const 0.3333333333333333 call $~lib/util/number/dtoa - local.tee $8 + local.tee $203 i32.const 17536 call $~lib/string/String.__eq i32.eqz @@ -13800,7 +14213,7 @@ end f64.const 1234e17 call $~lib/util/number/dtoa - local.tee $35 + local.tee $204 i32.const 17600 call $~lib/string/String.__eq i32.eqz @@ -13814,7 +14227,7 @@ end f64.const 1234e18 call $~lib/util/number/dtoa - local.tee $36 + local.tee $205 i32.const 17664 call $~lib/string/String.__eq i32.eqz @@ -13828,7 +14241,7 @@ end f64.const 2.71828 call $~lib/util/number/dtoa - local.tee $37 + local.tee $206 i32.const 17712 call $~lib/string/String.__eq i32.eqz @@ -13842,7 +14255,7 @@ end f64.const 0.0271828 call $~lib/util/number/dtoa - local.tee $38 + local.tee $207 i32.const 17744 call $~lib/string/String.__eq i32.eqz @@ -13856,7 +14269,7 @@ end f64.const 271.828 call $~lib/util/number/dtoa - local.tee $39 + local.tee $208 i32.const 17792 call $~lib/string/String.__eq i32.eqz @@ -13870,7 +14283,7 @@ end f64.const 1.1e+128 call $~lib/util/number/dtoa - local.tee $40 + local.tee $209 i32.const 17824 call $~lib/string/String.__eq i32.eqz @@ -13884,7 +14297,7 @@ end f64.const 1.1e-64 call $~lib/util/number/dtoa - local.tee $1 + local.tee $210 i32.const 17856 call $~lib/string/String.__eq i32.eqz @@ -13898,7 +14311,7 @@ end f64.const 0.000035689 call $~lib/util/number/dtoa - local.tee $0 + local.tee $211 i32.const 17888 call $~lib/string/String.__eq i32.eqz @@ -13911,429 +14324,1914 @@ unreachable end global.get $std/string/str - call $~lib/rt/pure/__release + local.tee $212 + i32.const 17912 + i32.gt_u + if + local.get $212 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $43 + i32.const 17912 + i32.gt_u + if + local.get $43 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $44 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $44 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $45 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $45 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $46 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $46 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $47 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $47 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $48 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $48 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $49 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $49 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $50 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $50 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $51 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $51 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $52 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $52 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $53 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $53 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $54 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $54 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $55 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $55 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $56 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $56 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $57 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $57 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $58 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $58 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $59 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $59 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $60 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $60 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $61 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $61 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $62 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $62 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $63 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $63 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $64 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $64 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $65 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $65 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $66 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $66 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $67 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $67 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $68 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $68 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $69 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $69 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $70 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $70 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $71 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $71 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $72 - call $~lib/rt/pure/__release - local.get $73 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $72 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $73 + i32.const 17912 + i32.gt_u + if + local.get $73 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $74 - call $~lib/rt/pure/__release - local.get $75 - call $~lib/rt/pure/__release - local.get $41 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $74 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 17912 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 17912 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $42 - call $~lib/rt/pure/__release - local.get $43 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $42 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $75 + i32.const 17912 + i32.gt_u + if + local.get $75 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $78 + i32.const 17912 + i32.gt_u + if + local.get $78 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $79 + i32.const 17912 + i32.gt_u + if + local.get $79 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $77 + i32.const 17912 + i32.gt_u + if + local.get $77 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $76 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $76 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 + i32.const 17912 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $80 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $80 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $81 - call $~lib/rt/pure/__release - local.get $79 - call $~lib/rt/pure/__release - local.get $78 - call $~lib/rt/pure/__release - local.get $77 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $81 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $82 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $82 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $83 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $83 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $84 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $84 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $85 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $85 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $86 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $86 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $87 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $87 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $88 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $88 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $89 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $89 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $90 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $90 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $91 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $91 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $92 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $92 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $93 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $93 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $94 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $94 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $95 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $95 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $96 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $96 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $97 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $97 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $98 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $98 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $99 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $99 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $100 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $100 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $101 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $101 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $102 - call $~lib/rt/pure/__release - local.get $103 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $102 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $103 + i32.const 17912 + i32.gt_u + if + local.get $103 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $104 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $104 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $105 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $105 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $106 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $106 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $107 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $107 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $108 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $108 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $109 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $109 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $110 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $110 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $111 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $111 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $112 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $112 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $113 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $113 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $114 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $114 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $115 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $115 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $116 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $116 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $117 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $117 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $118 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $118 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $119 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $119 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $120 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $120 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $121 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $121 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $122 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $122 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $123 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $123 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $124 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $124 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $125 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $125 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $126 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $126 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $127 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $127 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $128 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $128 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $129 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $129 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $130 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $130 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $131 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $131 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $132 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $132 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $133 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $133 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $134 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $134 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $135 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $135 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $136 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $136 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $137 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $137 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $138 - call $~lib/rt/pure/__release - local.get $139 - call $~lib/rt/pure/__release - local.get $140 - call $~lib/rt/pure/__release - local.get $141 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $138 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $139 + i32.const 17912 + i32.gt_u + if + local.get $139 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $140 + i32.const 17912 + i32.gt_u + if + local.get $140 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $141 + i32.const 17912 + i32.gt_u + if + local.get $141 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $142 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $142 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $143 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $143 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $144 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $144 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 17912 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 17912 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 17912 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 + i32.const 17912 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $8 + i32.const 17912 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $9 + i32.const 17912 + i32.gt_u + if + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $10 + i32.const 17912 + i32.gt_u + if + local.get $10 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $11 + i32.const 17912 + i32.gt_u + if + local.get $11 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $12 + i32.const 17912 + i32.gt_u + if + local.get $12 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $13 + i32.const 17912 + i32.gt_u + if + local.get $13 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $14 + i32.const 17912 + i32.gt_u + if + local.get $14 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $15 + i32.const 17912 + i32.gt_u + if + local.get $15 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $16 + i32.const 17912 + i32.gt_u + if + local.get $16 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $17 + i32.const 17912 + i32.gt_u + if + local.get $17 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $18 + i32.const 17912 + i32.gt_u + if + local.get $18 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $19 + i32.const 17912 + i32.gt_u + if + local.get $19 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $20 + i32.const 17912 + i32.gt_u + if + local.get $20 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $21 + i32.const 17912 + i32.gt_u + if + local.get $21 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $22 + i32.const 17912 + i32.gt_u + if + local.get $22 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $23 + i32.const 17912 + i32.gt_u + if + local.get $23 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $24 + i32.const 17912 + i32.gt_u + if + local.get $24 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $25 + i32.const 17912 + i32.gt_u + if + local.get $25 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $26 + i32.const 17912 + i32.gt_u + if + local.get $26 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $27 + i32.const 17912 + i32.gt_u + if + local.get $27 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $28 + i32.const 17912 + i32.gt_u + if + local.get $28 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $29 + i32.const 17912 + i32.gt_u + if + local.get $29 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $30 + i32.const 17912 + i32.gt_u + if + local.get $30 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $31 + i32.const 17912 + i32.gt_u + if + local.get $31 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $32 + i32.const 17912 + i32.gt_u + if + local.get $32 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $33 + i32.const 17912 + i32.gt_u + if + local.get $33 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $34 + i32.const 17912 + i32.gt_u + if + local.get $34 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $35 + i32.const 17912 + i32.gt_u + if + local.get $35 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $36 + i32.const 17912 + i32.gt_u + if + local.get $36 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $37 + i32.const 17912 + i32.gt_u + if + local.get $37 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $38 + i32.const 17912 + i32.gt_u + if + local.get $38 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $39 + i32.const 17912 + i32.gt_u + if + local.get $39 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $40 + i32.const 17912 + i32.gt_u + if + local.get $40 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $41 + i32.const 17912 + i32.gt_u + if + local.get $41 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $145 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $145 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $146 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $146 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $147 - call $~lib/rt/pure/__release - local.get $149 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $147 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $148 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $148 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $149 + i32.const 17912 + i32.gt_u + if + local.get $149 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $150 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $150 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $151 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $151 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $152 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $152 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $153 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $153 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $154 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $154 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $155 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $155 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $156 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $156 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $157 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $157 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $158 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $158 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $159 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $159 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $160 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $160 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $161 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $161 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $162 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $162 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $163 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $163 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $164 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $164 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $165 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $165 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $166 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $166 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $167 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $167 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $168 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $168 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $169 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $169 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $170 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $170 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $171 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $171 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $172 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $172 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $173 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $173 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $174 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $174 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $175 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $175 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $176 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $176 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $177 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $177 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $178 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $178 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $179 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $179 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $180 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $180 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $181 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $181 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $182 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $182 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $183 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $183 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $184 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $184 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $185 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $185 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $186 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $186 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $187 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $187 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $188 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $188 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $189 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $189 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $190 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $190 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $191 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $191 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $192 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $192 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $193 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $193 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $194 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $194 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $195 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $195 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $196 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $196 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $197 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $197 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $198 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $198 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $199 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $199 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $200 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $200 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $201 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $201 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $202 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $202 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $203 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $203 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $204 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $204 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $205 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $205 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $206 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $206 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $207 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $207 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $208 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $208 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $209 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $209 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $210 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $210 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $211 - call $~lib/rt/pure/__release - local.get $9 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release - local.get $11 - call $~lib/rt/pure/__release - local.get $13 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $14 - call $~lib/rt/pure/__release - local.get $15 - 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 $3 - call $~lib/rt/pure/__release - local.get $19 - call $~lib/rt/pure/__release - local.get $20 - call $~lib/rt/pure/__release - local.get $21 - call $~lib/rt/pure/__release - local.get $22 - call $~lib/rt/pure/__release - local.get $23 - call $~lib/rt/pure/__release - local.get $24 - call $~lib/rt/pure/__release - local.get $25 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $26 - call $~lib/rt/pure/__release - local.get $27 - call $~lib/rt/pure/__release - local.get $28 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release - local.get $31 - call $~lib/rt/pure/__release - local.get $12 - call $~lib/rt/pure/__release - local.get $32 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $33 - call $~lib/rt/pure/__release - local.get $34 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release - local.get $35 - call $~lib/rt/pure/__release - local.get $36 - call $~lib/rt/pure/__release - local.get $37 - call $~lib/rt/pure/__release - local.get $38 - call $~lib/rt/pure/__release - local.get $39 - call $~lib/rt/pure/__release - local.get $40 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + i32.const 17912 + i32.gt_u + if + local.get $211 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/string/getString (result i32) global.get $std/string/str diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 8de00aba2f..dd79b73c9d 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -851,7 +851,7 @@ i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $7 + local.set $5 local.get $3 i32.const 3 i32.shl @@ -861,40 +861,40 @@ i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 + local.set $3 local.get $0 i32.load offset=8 - local.tee $8 + local.tee $4 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $5 - local.get $2 - local.set $3 + local.set $7 + local.get $3 + local.set $2 loop $while-continue|0 - local.get $5 - local.get $8 + local.get $4 + local.get $7 i32.ne if - local.get $8 + local.get $4 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 - local.get $8 + local.get $2 + local.get $4 i32.load i32.store - local.get $3 - local.get $8 + local.get $2 + local.get $4 i32.load offset=4 i32.store offset=4 - local.get $3 - local.get $7 - local.get $8 + local.get $2 + local.get $5 + local.get $4 i32.load call $~lib/util/hash/hash32 local.get $1 @@ -902,21 +902,21 @@ i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $8 i32.load i32.store offset=8 - local.get $4 - local.get $3 + local.get $8 + local.get $2 i32.store - local.get $3 + local.get $2 i32.const 12 i32.add - local.set $3 + local.set $2 end - local.get $8 + local.get $4 i32.const 12 i32.add - local.set $8 + local.set $4 br $while-continue|0 end end @@ -924,7 +924,7 @@ i32.load drop local.get $0 - local.get $7 + local.get $5 i32.store local.get $0 local.get $1 @@ -933,7 +933,7 @@ i32.load offset=8 drop local.get $0 - local.get $2 + local.get $3 i32.store offset=8 local.get $0 local.get $6 @@ -1415,15 +1415,8 @@ if local.get $0 i32.const 2 - i32.eq - br_if $case1|0 - block $tablify|0 - local.get $0 - i32.const 3 - i32.sub - br_table $case2|0 $case3|0 $case4|0 $case5|0 $case6|0 $case7|0 $case8|0 $case9|0 $case10|0 $tablify|0 - end - br $case11|0 + i32.sub + br_table $case1|0 $case2|0 $case3|0 $case4|0 $case5|0 $case6|0 $case7|0 $case8|0 $case9|0 $case10|0 $case11|0 end i32.const 1360 br $break|0 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 343fd80aec..c0bae12ef8 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -222,16 +222,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -429,7 +419,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -461,7 +457,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -1048,9 +1050,21 @@ i32.and i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $1 + i32.const 16 + i32.add local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.load + i32.const -4 + i32.and + i32.add i32.load i32.const -3 i32.and @@ -1061,7 +1075,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1089,18 +1102,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 i32.shl - local.set $5 - local.get $3 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $5 - i32.const 16 - i32.sub i32.ne i32.shl local.get $4 @@ -1125,12 +1135,12 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 - i32.gt_s - local.set $6 + local.set $5 local.get $3 local.get $5 - local.get $6 + local.get $3 + local.get $5 + i32.gt_s select memory.grow i32.const 0 @@ -1434,17 +1444,6 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 8332 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) (func $~lib/arraybuffer/ArrayBufferView#constructor (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -1506,7 +1505,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $4 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -2125,27 +2131,104 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $7 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $8 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $9 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $10 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $10 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $11 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $11 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/typedarray/Int32Array#__set (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 @@ -2935,11 +3018,9 @@ i32.add local.tee $0 i32.const 0 - i32.gt_s - local.set $2 local.get $0 i32.const 0 - local.get $2 + i32.gt_s select else local.get $2 @@ -2959,11 +3040,9 @@ i32.add local.tee $2 i32.const 0 - i32.gt_s - local.set $3 local.get $2 i32.const 0 - local.get $3 + i32.gt_s select else local.get $3 @@ -3293,11 +3372,9 @@ i32.add local.tee $0 i32.const 0 - i32.gt_s - local.set $1 local.get $0 i32.const 0 - local.get $1 + i32.gt_s select else local.get $1 @@ -3317,11 +3394,9 @@ i32.add local.tee $1 i32.const 0 - i32.gt_s - local.set $2 local.get $1 i32.const 0 - local.get $2 + i32.gt_s select else local.get $2 @@ -3562,9 +3637,9 @@ i32.const 0 i32.gt_s select - local.tee $2 - call $~lib/typedarray/Int32Array#constructor local.tee $3 + call $~lib/typedarray/Int32Array#constructor + local.tee $2 call $~lib/rt/pure/__retain local.tee $4 i32.load offset=4 @@ -3574,12 +3649,19 @@ i32.const 2 i32.shl i32.add - local.get $2 + local.get $3 i32.const 2 i32.shl call $~lib/util/memory/memmove - local.get $3 - call $~lib/rt/pure/__release + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 ) (func $~lib/typedarray/COPY_WITHIN<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) @@ -3779,69 +3861,225 @@ local.get $2 i32.store16 ) - (func $~lib/typedarray/Uint16Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.ge_u - if - i32.const 1376 - i32.const 1440 - i32.const 547 - i32.const 64 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.get $2 - i32.store16 - ) - (func $~lib/typedarray/REDUCE<~lib/typedarray/Int32Array,i32,i32> (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $2 + 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.load offset=4 local.set $4 local.get $0 i32.load offset=8 - i32.const 2 + i32.const 1 i32.shr_u - local.set $5 + local.set $0 loop $for-loop|0 - local.get $2 - local.get $5 + local.get $1 + local.get $0 i32.lt_s if local.get $4 - local.get $2 - i32.const 2 + local.get $1 + i32.const 1 i32.shl i32.add - i32.load - local.set $6 + i32.load16_s + local.set $5 i32.const 4 global.set $~argumentsLength local.get $3 - local.get $6 - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_i32_=>_i32) + local.get $5 + i32.add local.set $3 - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 + br $for-loop|0 + end + end + local.get $3 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 323 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/typedarray/Uint16Array#__set (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.ge_u + if + i32.const 1376 + i32.const 1440 + i32.const 547 + i32.const 64 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.get $2 + i32.store16 + ) + (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $2 + 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.load offset=4 + local.set $4 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $0 + loop $for-loop|0 + local.get $1 + local.get $0 + i32.lt_s + if + local.get $4 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.set $5 + i32.const 4 + global.set $~argumentsLength + local.get $3 + local.get $5 + i32.add + local.set $3 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + local.get $3 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 323 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/typedarray/REDUCE<~lib/typedarray/Int32Array,i32,i32> (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 $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $5 + loop $for-loop|0 + local.get $2 + local.get $5 + i32.lt_s + if + local.get $4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + i32.const 4 + global.set $~argumentsLength + local.get $3 + local.get $6 + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_i32_=>_i32) + local.set $3 + local.get $2 + i32.const 1 + i32.add + local.set $2 br $for-loop|0 end end @@ -3997,57 +4235,28 @@ local.get $1 f32.add ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) - local.get $0 - local.get $1 - f64.add - ) - (func $~lib/typedarray/Uint8Array#reduceRight (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> + (local $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) + (local $3 f32) (local $4 i32) - (local $5 i32) - local.get $0 - i32.load offset=4 - local.set $4 + (local $5 f32) + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $2 + local.tee $0 + i32.const 0 + f32.const 1 + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=8 i32.const 1 - i32.sub - local.set $2 - loop $for-loop|0 - local.get $2 - i32.const 0 - i32.ge_s - if - local.get $2 - local.get $4 - i32.add - i32.load8_u - local.set $5 - i32.const 4 - global.set $~argumentsLength - local.get $3 - local.get $5 - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $for-loop|0 - end - end - local.get $3 - ) - (func $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int32Array,i32,i32> (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + 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.load offset=4 local.set $4 @@ -4055,83 +4264,651 @@ i32.load offset=8 i32.const 2 i32.shr_u - i32.const 1 - i32.sub - local.set $2 + local.set $0 loop $for-loop|0 - local.get $2 - i32.const 0 - i32.ge_s + local.get $1 + local.get $0 + i32.lt_s if local.get $4 - local.get $2 + local.get $1 i32.const 2 i32.shl i32.add - i32.load + f32.load local.set $5 i32.const 4 global.set $~argumentsLength local.get $3 local.get $5 - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_i32_=>_i32) + f32.add local.set $3 - local.get $2 + local.get $1 i32.const 1 - i32.sub - local.set $2 + i32.add + local.set $1 br $for-loop|0 end end local.get $3 - ) - (func $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int64Array,i64,i64> (param $0 i32) (param $1 i32) (result i64) - (local $2 i32) + f32.const 6 + f32.ne + if + i32.const 0 + i32.const 1312 + i32.const 323 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + local.get $0 + local.get $1 + f64.add + ) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 f64) + (local $4 i32) + (local $5 f64) + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $2 + 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.load offset=4 + local.set $4 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $0 + loop $for-loop|0 + local.get $1 + local.get $0 + i32.lt_s + if + local.get $4 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $5 + i32.const 4 + global.set $~argumentsLength + local.get $3 + local.get $5 + f64.add + local.set $3 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + local.get $3 + f64.const 6 + f64.ne + if + i32.const 0 + i32.const 1312 + i32.const 323 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + 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.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|0 + local.get $0 + i32.const 0 + i32.ge_s + if + local.get $0 + local.get $3 + i32.add + i32.load8_s + local.set $4 + i32.const 4 + global.set $~argumentsLength + local.get $2 + local.get $4 + i32.add + local.set $2 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|0 + end + end + local.get $2 + i32.const 255 + i32.and + i32.const 6 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 344 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/typedarray/Uint8Array#reduceRight (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $2 + loop $for-loop|0 + local.get $2 + i32.const 0 + i32.ge_s + if + local.get $2 + local.get $4 + i32.add + i32.load8_u + local.set $5 + i32.const 4 + global.set $~argumentsLength + local.get $3 + local.get $5 + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_i32_=>_i32) + local.set $3 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $for-loop|0 + end + end + local.get $3 + ) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + 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.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|0 + local.get $0 + i32.const 0 + i32.ge_s + if + local.get $3 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.set $4 + i32.const 4 + global.set $~argumentsLength + local.get $2 + local.get $4 + i32.add + local.set $2 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|0 + end + end + local.get $2 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 344 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + 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.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|0 + local.get $0 + i32.const 0 + i32.ge_s + if + local.get $3 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.set $4 + i32.const 4 + global.set $~argumentsLength + local.get $2 + local.get $4 + i32.add + local.set $2 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|0 + end + end + local.get $2 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 344 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int32Array,i32,i32> (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.sub + local.set $2 + loop $for-loop|0 + local.get $2 + i32.const 0 + i32.ge_s + if + local.get $4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 + i32.const 4 + global.set $~argumentsLength + local.get $3 + local.get $5 + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_i32_=>_i32) + local.set $3 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $for-loop|0 + end + end + local.get $3 + ) + (func $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int64Array,i64,i64> (param $0 i32) (param $1 i32) (result i64) + (local $2 i32) (local $3 i64) (local $4 i32) (local $5 i64) local.get $0 i32.load offset=4 - local.set $4 + local.set $4 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 1 + i32.sub + local.set $2 + loop $for-loop|0 + local.get $2 + i32.const 0 + i32.ge_s + if + local.get $4 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + local.set $5 + i32.const 4 + global.set $~argumentsLength + local.get $3 + local.get $5 + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i64_i64_i32_i32_=>_i64) + local.set $3 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $for-loop|0 + end + end + local.get $3 + ) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> + (local $0 i32) + (local $1 i32) + (local $2 f32) + (local $3 i32) + (local $4 f32) + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + 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.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|0 + local.get $0 + i32.const 0 + i32.ge_s + if + local.get $3 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $4 + i32.const 4 + global.set $~argumentsLength + local.get $2 + local.get $4 + f32.add + local.set $2 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|0 + end + end + local.get $2 + f32.const 6 + f32.ne + if + i32.const 0 + i32.const 1312 + i32.const 344 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> + (local $0 i32) + (local $1 i32) + (local $2 f64) + (local $3 i32) + (local $4 f64) + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + 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.load offset=4 + local.set $3 local.get $0 i32.load offset=8 i32.const 3 i32.shr_u i32.const 1 i32.sub - local.set $2 + local.set $0 loop $for-loop|0 - local.get $2 + local.get $0 i32.const 0 i32.ge_s if - local.get $4 - local.get $2 + local.get $3 + local.get $0 i32.const 3 i32.shl i32.add - i64.load - local.set $5 + f64.load + local.set $4 i32.const 4 global.set $~argumentsLength - local.get $3 - local.get $5 local.get $2 + local.get $4 + f64.add + local.set $2 local.get $0 - local.get $1 - call_indirect (type $i64_i64_i32_i32_=>_i64) - local.set $3 - local.get $2 i32.const 1 i32.sub - local.set $2 + local.set $0 br $for-loop|0 end end - local.get $3 + local.get $2 + f64.const 6 + f64.ne + if + i32.const 0 + i32.const 1312 + i32.const 344 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -4146,7 +4923,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) i32.const 3 call $~lib/typedarray/Int8Array#constructor local.tee $1 @@ -4166,8 +4942,7 @@ local.set $6 local.get $1 i32.load offset=8 - local.tee $4 - local.set $7 + local.set $3 call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 3 @@ -4176,15 +4951,15 @@ i32.add local.set $0 call $~lib/rt/tlsf/maybeInitialize - local.get $4 + local.get $3 i32.const 0 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.set $3 + local.set $4 loop $for-loop|0 local.get $2 - local.get $4 + local.get $3 i32.lt_s if local.get $2 @@ -4195,7 +4970,7 @@ i32.const 3 global.set $~argumentsLength local.get $2 - local.get $3 + local.get $4 i32.add local.get $5 local.get $5 @@ -4209,14 +4984,14 @@ end end local.get $0 - local.get $3 + local.get $4 call $~lib/rt/pure/__retain i32.store local.get $0 - local.get $3 + local.get $4 i32.store offset=4 local.get $0 - local.get $7 + local.get $3 i32.store offset=8 local.get $0 call $~lib/rt/pure/__retain @@ -4260,9 +5035,23 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/typedarray/Uint8Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 @@ -4291,7 +5080,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) i32.const 3 call $~lib/typedarray/Uint8Array#constructor local.tee $1 @@ -4311,8 +5099,7 @@ local.set $6 local.get $1 i32.load offset=8 - local.tee $4 - local.set $7 + local.set $3 call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 4 @@ -4321,15 +5108,15 @@ i32.add local.set $0 call $~lib/rt/tlsf/maybeInitialize - local.get $4 + local.get $3 i32.const 0 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.set $3 + local.set $4 loop $for-loop|0 local.get $2 - local.get $4 + local.get $3 i32.lt_s if local.get $2 @@ -4340,7 +5127,7 @@ i32.const 3 global.set $~argumentsLength local.get $2 - local.get $3 + local.get $4 i32.add local.get $5 local.get $5 @@ -4354,14 +5141,14 @@ end end local.get $0 - local.get $3 + local.get $4 call $~lib/rt/pure/__retain i32.store local.get $0 - local.get $3 + local.get $4 i32.store offset=4 local.get $0 - local.get $7 + local.get $3 i32.store offset=8 local.get $0 call $~lib/rt/pure/__retain @@ -4405,9 +5192,23 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (local $0 i32) @@ -4417,7 +5218,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $1 @@ -4437,8 +5237,7 @@ local.set $6 local.get $1 i32.load offset=8 - local.tee $4 - local.set $7 + local.set $3 call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 5 @@ -4447,15 +5246,15 @@ i32.add local.set $0 call $~lib/rt/tlsf/maybeInitialize - local.get $4 + local.get $3 i32.const 0 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.set $3 + local.set $4 loop $for-loop|0 local.get $2 - local.get $4 + local.get $3 i32.lt_s if local.get $2 @@ -4466,7 +5265,7 @@ i32.const 3 global.set $~argumentsLength local.get $2 - local.get $3 + local.get $4 i32.add local.get $5 local.get $5 @@ -4480,14 +5279,14 @@ end end local.get $0 - local.get $3 + local.get $4 call $~lib/rt/pure/__retain i32.store local.get $0 - local.get $3 + local.get $4 i32.store offset=4 local.get $0 - local.get $7 + local.get $3 i32.store offset=8 local.get $0 call $~lib/rt/pure/__retain @@ -4531,9 +5330,23 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/typedarray/MAP<~lib/typedarray/Int16Array,i16> (param $0 i32) (result i32) (local $1 i32) @@ -4626,12 +5439,89 @@ unreachable end local.get $0 - i32.load offset=4 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + ) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + 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/MAP<~lib/typedarray/Int16Array,i16> + local.tee $1 + i32.const 0 + call $~lib/typedarray/Int16Array#__get + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 365 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + call $~lib/typedarray/Int16Array#__get + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 366 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + call $~lib/typedarray/Int16Array#__get + i32.const 9 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 367 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_s + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/typedarray/MAP<~lib/typedarray/Uint16Array,u16> (param $0 i32) (result i32) (local $1 i32) @@ -4731,6 +5621,83 @@ i32.add i32.load16_u ) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + 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/MAP<~lib/typedarray/Uint16Array,u16> + local.tee $1 + i32.const 0 + call $~lib/typedarray/Uint16Array#__get + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 365 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint16Array#__get + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 366 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__get + i32.const 9 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 367 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) (func $~lib/typedarray/MAP<~lib/typedarray/Int32Array,i32> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -4806,6 +5773,83 @@ local.get $0 call $~lib/rt/pure/__retain ) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + 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/MAP<~lib/typedarray/Int32Array,i32> + local.tee $1 + i32.const 0 + call $~lib/typedarray/Int32Array#__get + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 365 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + call $~lib/typedarray/Int32Array#__get + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 366 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + call $~lib/typedarray/Int32Array#__get + i32.const 9 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 367 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) (func $~lib/typedarray/MAP<~lib/typedarray/Uint32Array,u32> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -4896,13 +5940,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + 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/MAP<~lib/typedarray/Uint32Array,u32> + local.tee $1 + i32.const 0 + call $~lib/typedarray/Uint32Array#__get + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 365 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint32Array#__get + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 366 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint32Array#__get + i32.const 9 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 367 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 @@ -5007,6 +6128,83 @@ i32.add i64.load ) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + 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/MAP<~lib/typedarray/Int64Array,i64> + local.tee $1 + i32.const 0 + call $~lib/typedarray/Int64Array#__get + i64.const 1 + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 365 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + call $~lib/typedarray/Int64Array#__get + i64.const 4 + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 366 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + call $~lib/typedarray/Int64Array#__get + i64.const 9 + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 367 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) (func $~lib/typedarray/MAP<~lib/typedarray/Uint64Array,u64> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -5105,6 +6303,83 @@ i32.add i64.load ) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + 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/MAP<~lib/typedarray/Uint64Array,u64> + local.tee $1 + i32.const 0 + call $~lib/typedarray/Uint64Array#__get + i64.const 1 + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 365 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint64Array#__get + i64.const 4 + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 366 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint64Array#__get + i64.const 9 + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 367 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 @@ -5208,6 +6483,83 @@ i32.add f32.load ) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + 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/MAP<~lib/typedarray/Float32Array,f32> + local.tee $1 + i32.const 0 + call $~lib/typedarray/Float32Array#__get + f32.const 1 + f32.ne + if + i32.const 0 + i32.const 1312 + i32.const 365 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + call $~lib/typedarray/Float32Array#__get + f32.const 4 + f32.ne + if + i32.const 0 + i32.const 1312 + i32.const 366 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + call $~lib/typedarray/Float32Array#__get + f32.const 9 + f32.ne + if + i32.const 0 + i32.const 1312 + i32.const 367 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 @@ -5276,17 +6628,94 @@ end end local.get $0 - local.get $1 - call $~lib/rt/pure/__retain - i32.store + local.get $1 + call $~lib/rt/pure/__retain + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $6 + i32.store offset=8 + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + 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/MAP<~lib/typedarray/Float64Array,f64> + local.tee $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 1 + f64.ne + if + i32.const 0 + i32.const 1312 + i32.const 365 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $1 - i32.store offset=4 - local.get $0 - local.get $6 - i32.store offset=8 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 4 + f64.ne + if + i32.const 0 + i32.const 1312 + i32.const 366 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 9 + f64.ne + if + i32.const 0 + i32.const 1312 + i32.const 367 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - call $~lib/rt/pure/__retain + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -5323,8 +6752,16 @@ return end local.get $1 - call $~lib/rt/tlsf/GETRIGHT - local.tee $6 + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $4 + local.set $6 + local.get $4 i32.load local.tee $4 i32.const 1 @@ -5394,95 +6831,73 @@ end local.get $3 ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> - (local $0 i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Int8Array,i8> (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) - i32.const 6 - call $~lib/typedarray/Int8Array#constructor - local.tee $8 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int8Array#__set - local.get $8 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $8 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int8Array#__set - local.get $8 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int8Array#__set - local.get $8 - i32.const 5 - i32.const 5 - call $~lib/typedarray/Int8Array#__set - local.get $8 + local.get $0 i32.load offset=8 - local.set $5 + local.set $4 call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 3 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.set $7 + local.set $2 call $~lib/rt/tlsf/maybeInitialize - local.get $5 + local.get $4 i32.const 0 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.set $4 - local.get $8 + local.set $5 + local.get $0 i32.load offset=4 - local.set $2 + local.set $6 loop $for-loop|0 - local.get $6 - local.get $5 + local.get $3 + local.get $4 i32.lt_s if - local.get $2 + local.get $3 local.get $6 i32.add i32.load8_s - local.set $3 + local.set $0 i32.const 3 global.set $~argumentsLength - local.get $3 + local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s i32.const 2 i32.gt_s if local.get $1 - local.tee $0 - i32.const 1 + local.get $5 i32.add - local.set $1 local.get $0 - local.get $4 - i32.add - local.get $3 i32.store8 + local.get $1 + i32.const 1 + i32.add + local.set $1 end - local.get $6 + local.get $3 i32.const 1 i32.add - local.set $6 + local.set $3 br $for-loop|0 end end - local.get $7 + local.get $2 call $~lib/rt/tlsf/maybeInitialize - local.get $4 + local.get $5 call $~lib/rt/tlsf/checkUsedBlock local.get $1 call $~lib/rt/tlsf/reallocateBlock @@ -5491,14 +6906,42 @@ local.tee $0 call $~lib/rt/pure/__retain i32.store - local.get $7 + local.get $2 local.get $1 i32.store offset=8 - local.get $7 + local.get $2 local.get $0 i32.store offset=4 - local.get $7 + local.get $2 call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> + (local $0 i32) + (local $1 i32) + i32.const 6 + call $~lib/typedarray/Int8Array#constructor + 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/FILTER<~lib/typedarray/Int8Array,i8> local.tee $1 i32.load offset=4 local.get $1 @@ -5563,10 +7006,24 @@ call $~lib/builtins/abort unreachable end - local.get $8 - call $~lib/rt/pure/__release + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -5575,95 +7032,71 @@ i32.const 2 i32.gt_u ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> - (local $0 i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Uint8Array,u8> (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) - i32.const 6 - call $~lib/typedarray/Uint8Array#constructor - local.tee $8 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8Array#__set - local.get $8 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $8 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8Array#__set - local.get $8 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint8Array#__set - local.get $8 - i32.const 5 - i32.const 5 - call $~lib/typedarray/Uint8Array#__set - local.get $8 + local.get $0 i32.load offset=8 - local.set $5 + local.set $4 call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 4 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.set $7 + local.set $2 call $~lib/rt/tlsf/maybeInitialize - local.get $5 + local.get $4 i32.const 0 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.set $4 - local.get $8 + local.set $5 + local.get $0 i32.load offset=4 - local.set $2 + local.set $6 loop $for-loop|0 - local.get $6 - local.get $5 + local.get $3 + local.get $4 i32.lt_s if - local.get $2 + local.get $3 local.get $6 i32.add i32.load8_u - local.set $3 + local.set $0 i32.const 3 global.set $~argumentsLength - local.get $3 + local.get $0 + i32.const 255 + i32.and i32.const 2 i32.gt_u if local.get $1 - local.tee $0 + local.get $5 + i32.add + local.get $0 + i32.store8 + local.get $1 i32.const 1 i32.add local.set $1 - local.get $0 - local.get $4 - i32.add - local.get $3 - i32.store8 end - local.get $6 + local.get $3 i32.const 1 i32.add - local.set $6 + local.set $3 br $for-loop|0 end end - local.get $7 + local.get $2 call $~lib/rt/tlsf/maybeInitialize - local.get $4 + local.get $5 call $~lib/rt/tlsf/checkUsedBlock local.get $1 call $~lib/rt/tlsf/reallocateBlock @@ -5672,14 +7105,42 @@ local.tee $0 call $~lib/rt/pure/__retain i32.store - local.get $7 + local.get $2 local.get $1 i32.store offset=8 - local.get $7 + local.get $2 local.get $0 i32.store offset=4 - local.get $7 + local.get $2 call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> + (local $0 i32) + (local $1 i32) + i32.const 6 + call $~lib/typedarray/Uint8Array#constructor + 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/FILTER<~lib/typedarray/Uint8Array,u8> local.tee $1 i32.load offset=4 local.get $1 @@ -5744,100 +7205,90 @@ call $~lib/builtins/abort unreachable end - local.get $8 - call $~lib/rt/pure/__release + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> - (local $0 i32) + (func $~lib/typedarray/FILTER<~lib/typedarray/Uint8ClampedArray,u8> (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) - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $8 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $8 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $8 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $8 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $8 - i32.const 5 - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $8 + local.get $0 i32.load offset=8 - local.set $5 + local.set $4 call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 5 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.set $7 + local.set $2 call $~lib/rt/tlsf/maybeInitialize - local.get $5 + local.get $4 i32.const 0 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.set $4 - local.get $8 + local.set $5 + local.get $0 i32.load offset=4 - local.set $2 + local.set $6 loop $for-loop|0 - local.get $6 - local.get $5 + local.get $3 + local.get $4 i32.lt_s if - local.get $2 + local.get $3 local.get $6 i32.add i32.load8_u - local.set $3 + local.set $0 i32.const 3 global.set $~argumentsLength - local.get $3 + local.get $0 + i32.const 255 + i32.and i32.const 2 i32.gt_u if local.get $1 - local.tee $0 - i32.const 1 + local.get $5 i32.add - local.set $1 local.get $0 - local.get $4 - i32.add - local.get $3 i32.store8 + local.get $1 + i32.const 1 + i32.add + local.set $1 end - local.get $6 + local.get $3 i32.const 1 i32.add - local.set $6 + local.set $3 br $for-loop|0 end end - local.get $7 + local.get $2 call $~lib/rt/tlsf/maybeInitialize - local.get $4 + local.get $5 call $~lib/rt/tlsf/checkUsedBlock local.get $1 call $~lib/rt/tlsf/reallocateBlock @@ -5846,14 +7297,42 @@ local.tee $0 call $~lib/rt/pure/__retain i32.store - local.get $7 + local.get $2 local.get $1 i32.store offset=8 - local.get $7 + local.get $2 local.get $0 i32.store offset=4 - local.get $7 + local.get $2 call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> + (local $0 i32) + (local $1 i32) + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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/FILTER<~lib/typedarray/Uint8ClampedArray,u8> local.tee $1 i32.load offset=4 local.get $1 @@ -5918,10 +7397,24 @@ call $~lib/builtins/abort unreachable end - local.get $8 - call $~lib/rt/pure/__release + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -6121,9 +7614,23 @@ unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -6319,9 +7826,23 @@ unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -6513,9 +8034,23 @@ unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -6706,10 +8241,24 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -6901,9 +8450,23 @@ unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -7095,9 +8658,23 @@ unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -7289,9 +8866,23 @@ unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -7483,9 +9074,23 @@ unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -9108,9 +10713,16 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Uint8Array#forEach (param $0 i32) (param $1 i32) + (func $~lib/typedarray/FOREACH<~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9162,32 +10774,218 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 491 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + global.get $std/typedarray/forEachSelf + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 492 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $2 + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 2704 + 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 2704 + 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 2704 + i32.const 2 + 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.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $1 + local.get $4 + i32.lt_s + if + local.get $3 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 495 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $2 + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 2704 + 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 2704 + 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 2704 + i32.const 2 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $1 + local.get $4 + i32.lt_s + if + local.get $3 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_u + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end global.get $std/typedarray/forEachCallCount + i32.const 3 i32.ne if i32.const 0 i32.const 1312 - i32.const 491 - i32.const 5 + i32.const 495 + i32.const 3 call $~lib/builtins/abort unreachable end local.get $2 - global.get $std/typedarray/forEachSelf - i32.ne + i32.const 8332 + i32.gt_u if - i32.const 0 - i32.const 1312 - i32.const 492 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount ) (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2704 @@ -9390,6 +11188,93 @@ i32.add global.set $std/typedarray/forEachCallCount ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f32) + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $2 + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 2704 + 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 2704 + 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 2704 + i32.const 2 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $1 + local.get $4 + i32.lt_s + if + local.get $3 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 495 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) local.get $0 i32.const 2704 @@ -9432,6 +11317,93 @@ i32.add global.set $std/typedarray/forEachCallCount ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f64) + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $2 + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 2704 + 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 2704 + 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 2704 + i32.const 2 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $1 + local.get $4 + i32.lt_s + if + local.get $3 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 495 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) (func $~lib/typedarray/REVERSE<~lib/typedarray/Int8Array,i8> (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -9493,12 +11465,12 @@ i32.load local.tee $1 call $~lib/typedarray/Int8Array#constructor - local.tee $4 + local.tee $3 local.set $2 local.get $1 call $~lib/typedarray/Int8Array#constructor - local.tee $5 - local.set $3 + local.tee $4 + local.set $5 loop $for-loop|0 local.get $0 local.get $1 @@ -9514,7 +11486,7 @@ i32.const 24 i32.shr_s call $~lib/typedarray/Int8Array#__set - local.get $3 + local.get $5 local.get $0 i32.const 2800 local.get $0 @@ -9533,7 +11505,15 @@ end local.get $2 call $~lib/typedarray/REVERSE<~lib/typedarray/Int8Array,i8> - call $~lib/rt/pure/__release + local.tee $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 loop $for-loop|1 @@ -9571,11 +11551,12 @@ br $for-loop|1 end end - local.get $3 + local.get $5 i32.const 4 i32.const 8 call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> local.tee $0 + local.set $1 local.get $0 call $~lib/typedarray/REVERSE<~lib/typedarray/Int8Array,i8> local.tee $0 @@ -9618,25 +11599,54 @@ unreachable end local.get $0 - i32.const 3 - call $~lib/typedarray/Int8Array#__get - i32.const 5 - i32.ne + i32.const 3 + call $~lib/typedarray/Int8Array#__get + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 532 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 8332 + i32.gt_u if - i32.const 0 - i32.const 1312 - i32.const 532 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release ) (func $~lib/typedarray/REVERSE<~lib/typedarray/Uint8Array,u8> (param $0 i32) (result i32) (local $1 i32) @@ -9709,11 +11719,9 @@ i32.add local.tee $1 i32.const 0 - i32.gt_s - local.set $2 local.get $1 i32.const 0 - local.get $2 + i32.gt_s select else local.get $1 @@ -9765,12 +11773,12 @@ i32.load local.tee $1 call $~lib/typedarray/Uint8Array#constructor - local.tee $4 + local.tee $3 local.set $2 local.get $1 call $~lib/typedarray/Uint8Array#constructor - local.tee $5 - local.set $3 + local.tee $4 + local.set $5 loop $for-loop|0 local.get $0 local.get $1 @@ -9784,7 +11792,7 @@ i32.const 255 i32.and call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $5 local.get $0 i32.const 2800 local.get $0 @@ -9801,7 +11809,15 @@ end local.get $2 call $~lib/typedarray/REVERSE<~lib/typedarray/Uint8Array,u8> - call $~lib/rt/pure/__release + local.tee $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 loop $for-loop|1 @@ -9837,10 +11853,11 @@ br $for-loop|1 end end - local.get $3 + local.get $5 i32.const 8 call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8Array,u8> local.tee $0 + local.set $1 local.get $0 call $~lib/typedarray/REVERSE<~lib/typedarray/Uint8Array,u8> local.tee $0 @@ -9895,13 +11912,42 @@ call $~lib/builtins/abort unreachable end + local.get $3 + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8ClampedArray,u8> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -9924,11 +11970,9 @@ i32.add local.tee $1 i32.const 0 - i32.gt_s - local.set $2 local.get $1 i32.const 0 - local.get $2 + i32.gt_s select else local.get $1 @@ -9980,12 +12024,12 @@ i32.load local.tee $1 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $4 + local.tee $3 local.set $2 local.get $1 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $5 - local.set $3 + local.tee $4 + local.set $5 loop $for-loop|0 local.get $0 local.get $1 @@ -9999,7 +12043,7 @@ i32.const 255 i32.and call $~lib/typedarray/Uint8ClampedArray#__set - local.get $3 + local.get $5 local.get $0 i32.const 2800 local.get $0 @@ -10016,7 +12060,15 @@ end local.get $2 call $~lib/typedarray/REVERSE<~lib/typedarray/Uint8Array,u8> - call $~lib/rt/pure/__release + local.tee $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 loop $for-loop|1 @@ -10052,10 +12104,11 @@ br $for-loop|1 end end - local.get $3 + local.get $5 i32.const 8 call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint8ClampedArray,u8> local.tee $0 + local.set $1 local.get $0 call $~lib/typedarray/REVERSE<~lib/typedarray/Uint8Array,u8> local.tee $0 @@ -10110,13 +12163,42 @@ call $~lib/builtins/abort unreachable end + local.get $3 + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/typedarray/REVERSE<~lib/typedarray/Int16Array,i16> (param $0 i32) (result i32) (local $1 i32) @@ -10255,12 +12337,12 @@ i32.load local.tee $1 call $~lib/typedarray/Int16Array#constructor - local.tee $4 + local.tee $3 local.set $2 local.get $1 call $~lib/typedarray/Int16Array#constructor - local.tee $5 - local.set $3 + local.tee $4 + local.set $5 loop $for-loop|0 local.get $0 local.get $1 @@ -10276,7 +12358,7 @@ i32.const 16 i32.shr_s call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $5 local.get $0 i32.const 2800 local.get $0 @@ -10295,7 +12377,15 @@ end local.get $2 call $~lib/typedarray/REVERSE<~lib/typedarray/Int16Array,i16> - call $~lib/rt/pure/__release + local.tee $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 loop $for-loop|1 @@ -10333,10 +12423,11 @@ br $for-loop|1 end end - local.get $3 + local.get $5 i32.const 8 call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int16Array,i16> local.tee $0 + local.set $1 local.get $0 call $~lib/typedarray/REVERSE<~lib/typedarray/Int16Array,i16> local.tee $0 @@ -10391,13 +12482,42 @@ call $~lib/builtins/abort unreachable end + local.get $3 + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/typedarray/REVERSE<~lib/typedarray/Uint16Array,u16> (param $0 i32) (result i32) (local $1 i32) @@ -10536,12 +12656,12 @@ i32.load local.tee $1 call $~lib/typedarray/Uint16Array#constructor - local.tee $4 + local.tee $3 local.set $2 local.get $1 call $~lib/typedarray/Uint16Array#constructor - local.tee $5 - local.set $3 + local.tee $4 + local.set $5 loop $for-loop|0 local.get $0 local.get $1 @@ -10555,7 +12675,7 @@ i32.const 65535 i32.and call $~lib/typedarray/Uint16Array#__set - local.get $3 + local.get $5 local.get $0 i32.const 2800 local.get $0 @@ -10572,7 +12692,15 @@ end local.get $2 call $~lib/typedarray/REVERSE<~lib/typedarray/Uint16Array,u16> - call $~lib/rt/pure/__release + local.tee $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 loop $for-loop|1 @@ -10608,10 +12736,11 @@ br $for-loop|1 end end - local.get $3 + local.get $5 i32.const 8 call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint16Array,u16> local.tee $0 + local.set $1 local.get $0 call $~lib/typedarray/REVERSE<~lib/typedarray/Uint16Array,u16> local.tee $0 @@ -10654,25 +12783,54 @@ unreachable end local.get $0 - i32.const 3 - call $~lib/typedarray/Uint16Array#__get - i32.const 5 - i32.ne + i32.const 3 + call $~lib/typedarray/Uint16Array#__get + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 532 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 8332 + i32.gt_u if - i32.const 0 - i32.const 1312 - i32.const 532 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release ) (func $~lib/typedarray/REVERSE<~lib/typedarray/Int32Array,i32> (param $0 i32) (result i32) (local $1 i32) @@ -10741,12 +12899,12 @@ i32.load local.tee $1 call $~lib/typedarray/Int32Array#constructor - local.tee $4 + local.tee $3 local.set $2 local.get $1 call $~lib/typedarray/Int32Array#constructor - local.tee $5 - local.set $3 + local.tee $4 + local.set $5 loop $for-loop|0 local.get $0 local.get $1 @@ -10758,7 +12916,7 @@ local.get $0 call $~lib/array/Array#__get call $~lib/typedarray/Int32Array#__set - local.get $3 + local.get $5 local.get $0 i32.const 2800 local.get $0 @@ -10773,7 +12931,15 @@ end local.get $2 call $~lib/typedarray/REVERSE<~lib/typedarray/Int32Array,i32> - call $~lib/rt/pure/__release + local.tee $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 loop $for-loop|1 @@ -10807,11 +12973,12 @@ br $for-loop|1 end end - local.get $3 + local.get $5 i32.const 4 i32.const 8 call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int32Array,i32> local.tee $0 + local.set $1 local.get $0 call $~lib/typedarray/REVERSE<~lib/typedarray/Int32Array,i32> local.tee $0 @@ -10866,13 +13033,42 @@ call $~lib/builtins/abort unreachable end + local.get $3 + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint32Array,u32> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -10955,12 +13151,12 @@ i32.load local.tee $1 call $~lib/typedarray/Uint32Array#constructor - local.tee $4 + local.tee $3 local.set $2 local.get $1 call $~lib/typedarray/Uint32Array#constructor - local.tee $5 - local.set $3 + local.tee $4 + local.set $5 loop $for-loop|0 local.get $0 local.get $1 @@ -10972,7 +13168,7 @@ local.get $0 call $~lib/array/Array#__get call $~lib/typedarray/Uint32Array#__set - local.get $3 + local.get $5 local.get $0 i32.const 2800 local.get $0 @@ -10987,7 +13183,15 @@ end local.get $2 call $~lib/typedarray/REVERSE<~lib/typedarray/Int32Array,i32> - call $~lib/rt/pure/__release + local.tee $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 loop $for-loop|1 @@ -11021,10 +13225,11 @@ br $for-loop|1 end end - local.get $3 + local.get $5 i32.const 8 call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint32Array,u32> local.tee $0 + local.set $1 local.get $0 call $~lib/typedarray/REVERSE<~lib/typedarray/Int32Array,i32> local.tee $0 @@ -11079,13 +13284,42 @@ call $~lib/builtins/abort unreachable end + local.get $3 + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/typedarray/REVERSE<~lib/typedarray/Int64Array,i64> (param $0 i32) (result i32) (local $1 i32) @@ -11224,12 +13458,12 @@ i32.load local.tee $1 call $~lib/typedarray/Int64Array#constructor - local.tee $4 + local.tee $3 local.set $2 local.get $1 call $~lib/typedarray/Int64Array#constructor - local.tee $5 - local.set $3 + local.tee $4 + local.set $5 loop $for-loop|0 local.get $0 local.get $1 @@ -11242,7 +13476,7 @@ call $~lib/array/Array#__get i64.extend_i32_s call $~lib/typedarray/Int64Array#__set - local.get $3 + local.get $5 local.get $0 i32.const 2800 local.get $0 @@ -11258,7 +13492,15 @@ end local.get $2 call $~lib/typedarray/REVERSE<~lib/typedarray/Int64Array,i64> - call $~lib/rt/pure/__release + local.tee $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 loop $for-loop|1 @@ -11293,10 +13535,11 @@ br $for-loop|1 end end - local.get $3 + local.get $5 i32.const 8 call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int64Array,i64> local.tee $0 + local.set $1 local.get $0 call $~lib/typedarray/REVERSE<~lib/typedarray/Int64Array,i64> local.tee $0 @@ -11351,13 +13594,42 @@ call $~lib/builtins/abort unreachable end + local.get $3 + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint64Array,u64> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -11440,12 +13712,12 @@ i32.load local.tee $1 call $~lib/typedarray/Uint64Array#constructor - local.tee $4 + local.tee $3 local.set $2 local.get $1 call $~lib/typedarray/Uint64Array#constructor - local.tee $5 - local.set $3 + local.tee $4 + local.set $5 loop $for-loop|0 local.get $0 local.get $1 @@ -11458,7 +13730,7 @@ call $~lib/array/Array#__get i64.extend_i32_s call $~lib/typedarray/Uint64Array#__set - local.get $3 + local.get $5 local.get $0 i32.const 2800 local.get $0 @@ -11474,7 +13746,15 @@ end local.get $2 call $~lib/typedarray/REVERSE<~lib/typedarray/Int64Array,i64> - call $~lib/rt/pure/__release + local.tee $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 loop $for-loop|1 @@ -11509,10 +13789,11 @@ br $for-loop|1 end end - local.get $3 + local.get $5 i32.const 8 call $~lib/typedarray/SUBARRAY<~lib/typedarray/Uint64Array,u64> local.tee $0 + local.set $1 local.get $0 call $~lib/typedarray/REVERSE<~lib/typedarray/Int64Array,i64> local.tee $0 @@ -11567,13 +13848,42 @@ call $~lib/builtins/abort unreachable end + local.get $3 + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/typedarray/REVERSE<~lib/typedarray/Float32Array,f32> (param $0 i32) (result i32) (local $1 i32) @@ -11712,12 +14022,12 @@ i32.load local.tee $1 call $~lib/typedarray/Float32Array#constructor - local.tee $4 + local.tee $3 local.set $2 local.get $1 call $~lib/typedarray/Float32Array#constructor - local.tee $5 - local.set $3 + local.tee $4 + local.set $5 loop $for-loop|0 local.get $0 local.get $1 @@ -11730,7 +14040,7 @@ call $~lib/array/Array#__get f32.convert_i32_s call $~lib/typedarray/Float32Array#__set - local.get $3 + local.get $5 local.get $0 i32.const 2800 local.get $0 @@ -11744,9 +14054,17 @@ br $for-loop|0 end end - local.get $2 - call $~lib/typedarray/REVERSE<~lib/typedarray/Float32Array,f32> - call $~lib/rt/pure/__release + local.get $2 + call $~lib/typedarray/REVERSE<~lib/typedarray/Float32Array,f32> + local.tee $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 loop $for-loop|1 @@ -11781,10 +14099,11 @@ br $for-loop|1 end end - local.get $3 + local.get $5 i32.const 8 call $~lib/typedarray/SUBARRAY<~lib/typedarray/Float32Array,f32> local.tee $0 + local.set $1 local.get $0 call $~lib/typedarray/REVERSE<~lib/typedarray/Float32Array,f32> local.tee $0 @@ -11839,13 +14158,42 @@ call $~lib/builtins/abort unreachable end + local.get $3 + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/typedarray/REVERSE<~lib/typedarray/Float64Array,f64> (param $0 i32) (result i32) (local $1 i32) @@ -11914,12 +14262,12 @@ i32.load local.tee $1 call $~lib/typedarray/Float64Array#constructor - local.tee $4 + local.tee $3 local.set $2 local.get $1 call $~lib/typedarray/Float64Array#constructor - local.tee $5 - local.set $3 + local.tee $4 + local.set $5 loop $for-loop|0 local.get $0 local.get $1 @@ -11932,7 +14280,7 @@ call $~lib/array/Array#__get f64.convert_i32_s call $~lib/typedarray/Float64Array#__set - local.get $3 + local.get $5 local.get $0 i32.const 2800 local.get $0 @@ -11948,7 +14296,15 @@ end local.get $2 call $~lib/typedarray/REVERSE<~lib/typedarray/Float64Array,f64> - call $~lib/rt/pure/__release + local.tee $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 loop $for-loop|1 @@ -11983,11 +14339,12 @@ br $for-loop|1 end end - local.get $3 + local.get $5 i32.const 4 i32.const 8 call $~lib/typedarray/SUBARRAY<~lib/typedarray/Float64Array,f64> local.tee $0 + local.set $1 local.get $0 call $~lib/typedarray/REVERSE<~lib/typedarray/Float64Array,f64> local.tee $0 @@ -12042,17 +14399,45 @@ call $~lib/builtins/abort unreachable end + local.get $3 + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/typedarray/Int8Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) block $__inlined_func$~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8> local.get $0 i32.load offset=8 @@ -12078,11 +14463,9 @@ i32.add local.tee $2 i32.const 0 - i32.gt_s - local.set $4 local.get $2 i32.const 0 - local.get $4 + i32.gt_s select local.set $2 end @@ -12201,13 +14584,13 @@ (local $3 i32) i32.const 2908 i32.load - local.tee $2 - call $~lib/typedarray/Int8Array#constructor local.tee $3 + call $~lib/typedarray/Int8Array#constructor + local.tee $2 local.set $0 loop $for-loop|0 local.get $1 - local.get $2 + local.get $3 i32.lt_s if local.get $0 @@ -12607,10 +14990,24 @@ call $~lib/builtins/abort unreachable end - local.get $3 - call $~lib/rt/pure/__release + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> (local $0 i32) @@ -12619,13 +15016,13 @@ (local $3 i32) i32.const 2908 i32.load - local.tee $2 - call $~lib/typedarray/Uint8Array#constructor local.tee $3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $2 local.set $0 loop $for-loop|0 local.get $1 - local.get $2 + local.get $3 i32.lt_s if local.get $0 @@ -13022,10 +15419,24 @@ call $~lib/builtins/abort unreachable end - local.get $3 - call $~lib/rt/pure/__release + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> (local $0 i32) @@ -13034,13 +15445,13 @@ (local $3 i32) i32.const 2908 i32.load - local.tee $2 - call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $2 local.set $0 loop $for-loop|0 local.get $1 - local.get $2 + local.get $3 i32.lt_s if local.get $0 @@ -13437,10 +15848,24 @@ call $~lib/builtins/abort unreachable end - local.get $3 - call $~lib/rt/pure/__release + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -13595,13 +16020,13 @@ (local $3 i32) i32.const 2908 i32.load - local.tee $2 - call $~lib/typedarray/Int16Array#constructor local.tee $3 + call $~lib/typedarray/Int16Array#constructor + local.tee $2 local.set $0 loop $for-loop|0 local.get $1 - local.get $2 + local.get $3 i32.lt_s if local.get $0 @@ -14000,10 +16425,24 @@ call $~lib/builtins/abort unreachable end - local.get $3 - call $~lib/rt/pure/__release + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> (local $0 i32) @@ -14012,13 +16451,13 @@ (local $3 i32) i32.const 2908 i32.load - local.tee $2 - call $~lib/typedarray/Uint16Array#constructor local.tee $3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $2 local.set $0 loop $for-loop|0 local.get $1 - local.get $2 + local.get $3 i32.lt_s if local.get $0 @@ -14415,10 +16854,24 @@ call $~lib/builtins/abort unreachable end - local.get $3 - call $~lib/rt/pure/__release + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -14569,13 +17022,13 @@ (local $3 i32) i32.const 2908 i32.load - local.tee $2 - call $~lib/typedarray/Int32Array#constructor local.tee $3 + call $~lib/typedarray/Int32Array#constructor + local.tee $2 local.set $0 loop $for-loop|0 local.get $1 - local.get $2 + local.get $3 i32.lt_s if local.get $0 @@ -14971,10 +17424,24 @@ call $~lib/builtins/abort unreachable end - local.get $3 - call $~lib/rt/pure/__release + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> (local $0 i32) @@ -14983,13 +17450,13 @@ (local $3 i32) i32.const 2908 i32.load - local.tee $2 - call $~lib/typedarray/Uint32Array#constructor local.tee $3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $2 local.set $0 loop $for-loop|0 local.get $1 - local.get $2 + local.get $3 i32.lt_s if local.get $0 @@ -15384,10 +17851,24 @@ call $~lib/builtins/abort unreachable end - local.get $3 - call $~lib/rt/pure/__release + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) @@ -15538,13 +18019,13 @@ (local $3 i32) i32.const 2908 i32.load - local.tee $2 - call $~lib/typedarray/Int64Array#constructor local.tee $3 + call $~lib/typedarray/Int64Array#constructor + local.tee $2 local.set $0 loop $for-loop|0 local.get $1 - local.get $2 + local.get $3 i32.lt_s if local.get $0 @@ -15940,10 +18421,24 @@ call $~lib/builtins/abort unreachable end - local.get $3 - call $~lib/rt/pure/__release + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> (local $0 i32) @@ -15952,13 +18447,13 @@ (local $3 i32) i32.const 2908 i32.load - local.tee $2 - call $~lib/typedarray/Uint64Array#constructor local.tee $3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $2 local.set $0 loop $for-loop|0 local.get $1 - local.get $2 + local.get $3 i32.lt_s if local.get $0 @@ -16354,10 +18849,24 @@ call $~lib/builtins/abort unreachable end - local.get $3 - call $~lib/rt/pure/__release + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) @@ -16508,13 +19017,13 @@ (local $3 i32) i32.const 2908 i32.load - local.tee $2 - call $~lib/typedarray/Float32Array#constructor local.tee $3 + call $~lib/typedarray/Float32Array#constructor + local.tee $2 local.set $0 loop $for-loop|0 local.get $1 - local.get $2 + local.get $3 i32.lt_s if local.get $0 @@ -16910,10 +19419,24 @@ call $~lib/builtins/abort unreachable end - local.get $3 - call $~lib/rt/pure/__release + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) @@ -17064,13 +19587,13 @@ (local $3 i32) i32.const 2908 i32.load - local.tee $2 - call $~lib/typedarray/Float64Array#constructor local.tee $3 + call $~lib/typedarray/Float64Array#constructor + local.tee $2 local.set $0 loop $for-loop|0 local.get $1 - local.get $2 + local.get $3 i32.lt_s if local.get $0 @@ -17467,10 +19990,24 @@ call $~lib/builtins/abort unreachable end - local.get $3 - call $~lib/rt/pure/__release + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) local.get $0 @@ -17838,7 +20375,14 @@ local.get $0 call $~lib/string/String#substring local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $1 @@ -17966,8 +20510,9 @@ (local $3 i32) i32.const 5 call $~lib/typedarray/Int8Array#constructor - local.tee $1 local.tee $0 + local.set $1 + local.get $0 i32.const 0 i32.const 1 call $~lib/typedarray/Int8Array#__set @@ -18004,13 +20549,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.load offset=4 - local.get $0 + local.get $1 i32.load offset=8 call $~lib/util/string/joinIntegerArray - local.tee $0 - local.get $0 + local.tee $3 + local.set $1 + local.get $3 i32.const 3008 call $~lib/string/String.__eq i32.eqz @@ -18023,10 +20569,32 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/util/number/utoa32 (param $0 i32) (result i32) (local $1 i32) @@ -18194,7 +20762,14 @@ local.get $0 call $~lib/string/String#substring local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $1 @@ -18250,8 +20825,9 @@ local.get $1 i32.load offset=8 call $~lib/util/string/joinIntegerArray - local.tee $1 - local.get $1 + local.tee $3 + local.set $1 + local.get $3 i32.const 3008 call $~lib/string/String.__eq i32.eqz @@ -18264,10 +20840,32 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> (local $0 i32) @@ -18320,8 +20918,9 @@ local.get $1 i32.load offset=8 call $~lib/util/string/joinIntegerArray - local.tee $1 - local.get $1 + local.tee $3 + local.set $1 + local.get $3 i32.const 3008 call $~lib/string/String.__eq i32.eqz @@ -18334,10 +20933,32 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -18493,29 +21114,130 @@ br $for-loop|0 end end - local.get $6 + local.get $6 + local.get $1 + local.get $2 + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_s + call $~lib/util/number/itoa_stream + local.get $2 + i32.add + local.tee $0 + i32.gt_s + if + local.get $1 + local.get $0 + call $~lib/string/String#substring + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + return + end + local.get $1 + ) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> + (local $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 5 + call $~lib/typedarray/Int16Array#constructor + local.tee $0 + local.set $1 + local.get $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 + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $2 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 629 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $1 - local.get $2 - local.get $0 - local.get $3 + i32.load offset=4 + local.get $1 + i32.load offset=8 i32.const 1 - i32.shl - i32.add - i32.load16_s - call $~lib/util/number/itoa_stream + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $1 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 630 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $2 - i32.add - local.tee $0 - i32.gt_s + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u if local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 8332 + i32.gt_u + if local.get $0 - call $~lib/string/String#substring - local.get $1 - call $~lib/rt/pure/__release - return + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $1 ) (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -18659,11 +21381,112 @@ local.get $0 call $~lib/string/String#substring local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $1 ) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> + (local $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 5 + call $~lib/typedarray/Uint16Array#constructor + local.tee $0 + local.set $1 + local.get $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 + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $2 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 629 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $1 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 630 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 @@ -18800,29 +21623,130 @@ br $for-loop|0 end end - local.get $6 + local.get $6 + local.get $1 + local.get $2 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + call $~lib/util/number/itoa_stream + local.get $2 + i32.add + local.tee $0 + i32.gt_s + if + local.get $1 + local.get $0 + call $~lib/string/String#substring + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + return + end + local.get $1 + ) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> + (local $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 5 + call $~lib/typedarray/Int32Array#constructor + local.tee $0 + local.set $1 + local.get $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 + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $2 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 629 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $1 - local.get $2 - local.get $0 - local.get $3 + i32.load offset=4 + local.get $1 + i32.load offset=8 i32.const 2 - i32.shl - i32.add - i32.load - call $~lib/util/number/itoa_stream + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $1 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 630 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $2 - i32.add - local.tee $0 - i32.gt_s + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u if local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 8332 + i32.gt_u + if local.get $0 - call $~lib/string/String#substring - local.get $1 - call $~lib/rt/pure/__release - return + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $1 ) (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -18958,11 +21882,112 @@ local.get $0 call $~lib/string/String#substring local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $1 ) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> + (local $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 5 + call $~lib/typedarray/Uint32Array#constructor + local.tee $0 + local.set $1 + local.get $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 + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $2 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 629 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $1 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 630 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) (func $~lib/util/number/decimalCount64High (param $0 i64) (result i32) local.get $0 i64.const 100000000000 @@ -19268,29 +22293,130 @@ br $for-loop|0 end end - local.get $6 - local.get $1 - local.get $2 + local.get $6 + local.get $1 + local.get $2 + local.get $0 + local.get $3 + i32.const 3 + i32.shl + i32.add + i64.load + call $~lib/util/number/itoa_stream + local.get $2 + i32.add + local.tee $0 + i32.gt_s + if + local.get $1 + local.get $0 + call $~lib/string/String#substring + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + return + end + local.get $1 + ) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> + (local $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 5 + call $~lib/typedarray/Int64Array#constructor + local.tee $0 + local.set $1 + local.get $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 + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $2 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 629 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $1 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 630 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - local.get $3 - i32.const 3 - i32.shl - i32.add - i64.load - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.tee $0 - i32.gt_s + i32.const 8332 + i32.gt_u if - local.get $1 local.get $0 - call $~lib/string/String#substring - local.get $1 - call $~lib/rt/pure/__release - return + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $1 ) (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -19491,11 +22617,112 @@ local.get $0 call $~lib/string/String#substring local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $1 ) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> + (local $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 5 + call $~lib/typedarray/Uint64Array#constructor + local.tee $0 + local.set $1 + local.get $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 + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $2 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 629 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $1 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 630 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) (func $~lib/util/number/umul64f (param $0 i64) (param $1 i64) (result i64) (local $2 i64) (local $3 i64) @@ -20528,11 +23755,112 @@ local.get $0 call $~lib/string/String#substring local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $1 ) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> + (local $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 5 + call $~lib/typedarray/Float32Array#constructor + local.tee $0 + local.set $1 + local.get $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 + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinFloatArray + local.tee $2 + i32.const 4112 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 626 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinFloatArray + local.tee $1 + i32.const 4112 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 627 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) (func $~lib/util/string/joinFloatArray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -20621,29 +23949,130 @@ br $for-loop|0 end end - local.get $6 + local.get $6 + local.get $1 + local.get $2 + local.get $0 + local.get $3 + i32.const 3 + i32.shl + i32.add + f64.load + call $~lib/util/number/dtoa_stream + local.get $2 + i32.add + local.tee $0 + i32.gt_s + if + local.get $1 + local.get $0 + call $~lib/string/String#substring + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + return + end + local.get $1 + ) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> + (local $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 5 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + local.set $1 + local.get $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 + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $~lib/util/string/joinFloatArray + local.tee $2 + i32.const 4112 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 626 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $1 - local.get $2 - local.get $0 - local.get $3 + i32.load offset=4 + local.get $1 + i32.load offset=8 i32.const 3 - i32.shl - i32.add - f64.load - call $~lib/util/number/dtoa_stream + i32.shr_u + call $~lib/util/string/joinFloatArray + local.tee $1 + i32.const 4112 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 627 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $2 - i32.add - local.tee $0 - i32.gt_s + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u if local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 8332 + i32.gt_u + if local.get $0 - call $~lib/string/String#substring - local.get $1 - call $~lib/rt/pure/__release - return + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $1 ) (func $~lib/arraybuffer/ArrayBuffer#constructor (param $0 i32) (result i32) (local $1 i32) @@ -20960,11 +24389,32 @@ end end local.get $6 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (local $0 i32) @@ -20975,13 +24425,13 @@ (local $5 i32) i32.const 4252 i32.load - local.tee $3 + local.tee $4 call $~lib/typedarray/Uint8Array#constructor local.tee $5 local.set $0 loop $for-loop|0 local.get $1 - local.get $3 + local.get $4 i32.lt_s if local.get $0 @@ -21021,16 +24471,16 @@ local.get $1 i32.const 0 call $~lib/typedarray/Uint8Array.wrap@varargs - local.set $4 + local.set $3 loop $for-loop|1 local.get $2 - local.get $3 + local.get $4 i32.lt_s if local.get $0 local.get $2 call $~lib/typedarray/Uint8Array#__get - local.get $4 + local.get $3 local.get $2 call $~lib/typedarray/Uint8Array#__get i32.ne @@ -21050,11 +24500,32 @@ end end local.get $5 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> (local $0 i32) @@ -21173,11 +24644,32 @@ end end local.get $6 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (local $0 i32) @@ -21191,7 +24683,7 @@ i32.load local.tee $4 call $~lib/typedarray/Int16Array#constructor - local.tee $6 + local.tee $5 local.set $1 loop $for-loop|0 local.get $0 @@ -21239,7 +24731,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $5 + local.tee $6 i32.gt_u if i32.const 1376 @@ -21249,7 +24741,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $6 i32.const 1 i32.and if @@ -21271,7 +24763,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $6 i32.store offset=8 local.get $2 local.get $0 @@ -21306,12 +24798,33 @@ br $for-loop|1 end end - local.get $6 - call $~lib/rt/pure/__release + local.get $5 + i32.const 8332 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> (local $0 i32) @@ -21325,7 +24838,7 @@ i32.load local.tee $4 call $~lib/typedarray/Uint16Array#constructor - local.tee $6 + local.tee $5 local.set $1 loop $for-loop|0 local.get $0 @@ -21371,7 +24884,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $5 + local.tee $6 i32.gt_u if i32.const 1376 @@ -21381,7 +24894,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $6 i32.const 1 i32.and if @@ -21403,7 +24916,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $6 i32.store offset=8 local.get $2 local.get $0 @@ -21438,12 +24951,33 @@ br $for-loop|1 end end - local.get $6 - call $~lib/rt/pure/__release + local.get $5 + i32.const 8332 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> (local $0 i32) @@ -21457,7 +24991,7 @@ i32.load local.tee $4 call $~lib/typedarray/Int32Array#constructor - local.tee $6 + local.tee $5 local.set $1 loop $for-loop|0 local.get $0 @@ -21501,7 +25035,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $5 + local.tee $6 i32.gt_u if i32.const 1376 @@ -21511,7 +25045,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $6 i32.const 3 i32.and if @@ -21533,7 +25067,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $6 i32.store offset=8 local.get $2 local.get $0 @@ -21568,12 +25102,33 @@ br $for-loop|1 end end - local.get $6 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + local.get $5 + i32.const 8332 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (local $0 i32) @@ -21587,7 +25142,7 @@ i32.load local.tee $4 call $~lib/typedarray/Uint32Array#constructor - local.tee $6 + local.tee $5 local.set $1 loop $for-loop|0 local.get $0 @@ -21631,7 +25186,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $5 + local.tee $6 i32.gt_u if i32.const 1376 @@ -21641,7 +25196,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $6 i32.const 3 i32.and if @@ -21663,7 +25218,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $6 i32.store offset=8 local.get $2 local.get $0 @@ -21698,12 +25253,33 @@ br $for-loop|1 end end - local.get $6 - call $~lib/rt/pure/__release + local.get $5 + i32.const 8332 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> (local $0 i32) @@ -21717,7 +25293,7 @@ i32.load local.tee $4 call $~lib/typedarray/Int64Array#constructor - local.tee $6 + local.tee $5 local.set $1 loop $for-loop|0 local.get $0 @@ -21762,7 +25338,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $5 + local.tee $6 i32.gt_u if i32.const 1376 @@ -21772,7 +25348,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $6 i32.const 7 i32.and if @@ -21794,7 +25370,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $6 i32.store offset=8 local.get $2 local.get $0 @@ -21829,12 +25405,33 @@ br $for-loop|1 end end - local.get $6 - call $~lib/rt/pure/__release + local.get $5 + i32.const 8332 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> (local $0 i32) @@ -21848,7 +25445,7 @@ i32.load local.tee $4 call $~lib/typedarray/Uint64Array#constructor - local.tee $6 + local.tee $5 local.set $1 loop $for-loop|0 local.get $0 @@ -21893,7 +25490,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $5 + local.tee $6 i32.gt_u if i32.const 1376 @@ -21903,7 +25500,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $6 i32.const 7 i32.and if @@ -21925,7 +25522,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $6 i32.store offset=8 local.get $2 local.get $0 @@ -21960,12 +25557,33 @@ br $for-loop|1 end end - local.get $6 - call $~lib/rt/pure/__release + local.get $5 + i32.const 8332 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> (local $0 i32) @@ -21979,7 +25597,7 @@ i32.load local.tee $4 call $~lib/typedarray/Float32Array#constructor - local.tee $6 + local.tee $5 local.set $1 loop $for-loop|0 local.get $0 @@ -22024,7 +25642,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $5 + local.tee $6 i32.gt_u if i32.const 1376 @@ -22034,7 +25652,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $6 i32.const 3 i32.and if @@ -22056,7 +25674,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $6 i32.store offset=8 local.get $2 local.get $0 @@ -22091,12 +25709,33 @@ br $for-loop|1 end end - local.get $6 - call $~lib/rt/pure/__release + local.get $5 + i32.const 8332 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> (local $0 i32) @@ -22110,7 +25749,7 @@ i32.load local.tee $4 call $~lib/typedarray/Float64Array#constructor - local.tee $6 + local.tee $5 local.set $1 loop $for-loop|0 local.get $0 @@ -22155,7 +25794,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $5 + local.tee $6 i32.gt_u if i32.const 1376 @@ -22165,7 +25804,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $6 i32.const 7 i32.and if @@ -22187,7 +25826,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $6 i32.store offset=8 local.get $2 local.get $0 @@ -22222,12 +25861,33 @@ br $for-loop|1 end end - local.get $6 - call $~lib/rt/pure/__release + local.get $5 + i32.const 8332 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) (local $1 i32) @@ -22344,7 +26004,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Int64Array,i64> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -22400,7 +26060,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 local.get $0 @@ -22422,7 +26082,7 @@ i32.load offset=8 call $~lib/util/memory/memmove ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Int16Array,i16> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -22478,7 +26138,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,i8> (param $0 i32) i32.const 4524 i32.load i32.const 7 @@ -22513,84 +26173,84 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 f32) - (local $9 f64) - (local $10 i32) + (local $8 i32) + (local $9 f32) + (local $10 f64) (local $11 i32) (local $12 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $3 + local.tee $4 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $3 + local.get $4 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $3 + local.get $4 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $2 + local.tee $3 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $2 + local.get $3 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $2 + local.get $3 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $2 + local.get $3 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $4 + local.tee $5 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $4 + local.get $5 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $4 + local.get $5 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Int8Array#constructor - local.tee $1 + local.tee $0 call $~lib/typedarray/Int8Array#set<~lib/array/Array> - local.get $1 + local.get $0 i32.const 10 i32.const 0 i32.const 14 i32.const 4544 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $8 call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> block $folding-inner0 i32.const 4380 i32.load i32.const 3 i32.add - local.get $1 + local.get $0 i32.load offset=8 i32.gt_s br_if $folding-inner0 - local.get $1 + local.get $0 i32.load offset=4 i32.const 3 i32.add - local.set $5 + local.set $1 i32.const 4372 i32.load local.set $6 @@ -22598,51 +26258,51 @@ i32.load local.set $7 loop $for-loop|0 - local.get $0 + local.get $2 local.get $7 i32.lt_s if - local.get $0 - local.get $5 + local.get $1 + local.get $2 i32.add local.get $6 - local.get $0 + local.get $2 i32.const 2 i32.shl i32.add f32.load - local.tee $8 - local.get $8 + local.tee $9 + local.get $9 f32.sub f32.const 0 f32.eq if (result i32) - local.get $8 + local.get $9 i32.trunc_f32_s else i32.const 0 end i32.store8 - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end - local.get $1 + local.get $0 i32.const 10 i32.const 0 i32.const 14 i32.const 4624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $2 call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $1 - local.get $3 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> - local.get $1 + local.get $0 + local.get $4 + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Int64Array,i64> + local.get $0 i32.const 10 i32.const 0 i32.const 14 @@ -22652,16 +26312,16 @@ local.tee $6 call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> i32.const 0 - local.set $0 + local.set $1 i32.const 4460 i32.load i32.const 2 i32.add - local.get $1 + local.get $0 i32.load offset=8 i32.gt_s br_if $folding-inner0 - local.get $1 + local.get $0 i32.load offset=4 i32.const 2 i32.add @@ -22673,82 +26333,145 @@ i32.load local.set $12 loop $for-loop|00 - local.get $0 + local.get $1 local.get $12 i32.lt_s if - local.get $0 + local.get $1 local.get $7 i32.add local.get $11 - local.get $0 + local.get $1 i32.const 3 i32.shl i32.add f64.load - local.tee $9 - local.get $9 + local.tee $10 + local.get $10 f64.sub f64.const 0 f64.eq if (result i32) - local.get $9 + local.get $10 i32.trunc_f64_s else i32.const 0 end i32.store8 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|00 end end - local.get $1 + local.get $0 i32.const 10 i32.const 0 i32.const 14 i32.const 4688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - local.get $2 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> - local.get $1 - local.get $4 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> - local.get $1 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + local.get $3 + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Uint8Array,u8> + local.get $0 + local.get $5 + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Int16Array,i16> + local.get $0 + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,i8> + local.get $0 i32.const 10 i32.const 0 i32.const 14 i32.const 4720 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $0 - 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 $1 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $8 + i32.const 8332 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end i32.const 1376 @@ -22833,84 +26556,84 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 f32) - (local $9 f64) - (local $10 i32) + (local $8 i32) + (local $9 f32) + (local $10 f64) (local $11 i32) (local $12 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $3 + local.tee $4 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $3 + local.get $4 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $3 + local.get $4 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $2 + local.tee $3 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $2 + local.get $3 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $2 + local.get $3 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $2 + local.get $3 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $4 + local.tee $5 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $4 + local.get $5 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $4 + local.get $5 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $0 call $~lib/typedarray/Int8Array#set<~lib/array/Array> - local.get $1 + local.get $0 i32.const 10 i32.const 0 i32.const 18 i32.const 4752 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $8 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> block $folding-inner0 i32.const 4380 i32.load i32.const 3 i32.add - local.get $1 + local.get $0 i32.load offset=8 i32.gt_s br_if $folding-inner0 - local.get $1 + local.get $0 i32.load offset=4 i32.const 3 i32.add - local.set $5 + local.set $1 i32.const 4372 i32.load local.set $6 @@ -22918,51 +26641,51 @@ i32.load local.set $7 loop $for-loop|0 - local.get $0 + local.get $2 local.get $7 i32.lt_s if - local.get $0 - local.get $5 + local.get $1 + local.get $2 i32.add local.get $6 - local.get $0 + local.get $2 i32.const 2 i32.shl i32.add f32.load - local.tee $8 - local.get $8 + local.tee $9 + local.get $9 f32.sub f32.const 0 f32.eq if (result i32) - local.get $8 + local.get $9 i32.trunc_f32_u else i32.const 0 end i32.store8 - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end - local.get $1 + local.get $0 i32.const 10 i32.const 0 i32.const 18 i32.const 4832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $2 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $1 - local.get $3 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> - local.get $1 + local.get $0 + local.get $4 + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Int64Array,i64> + local.get $0 i32.const 10 i32.const 0 i32.const 18 @@ -22972,16 +26695,16 @@ local.tee $6 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> i32.const 0 - local.set $0 + local.set $1 i32.const 4460 i32.load i32.const 2 i32.add - local.get $1 + local.get $0 i32.load offset=8 i32.gt_s br_if $folding-inner0 - local.get $1 + local.get $0 i32.load offset=4 i32.const 2 i32.add @@ -22993,82 +26716,145 @@ i32.load local.set $12 loop $for-loop|00 - local.get $0 + local.get $1 local.get $12 i32.lt_s if - local.get $0 + local.get $1 local.get $7 i32.add local.get $11 - local.get $0 + local.get $1 i32.const 3 i32.shl i32.add f64.load - local.tee $9 - local.get $9 + local.tee $10 + local.get $10 f64.sub f64.const 0 f64.eq if (result i32) - local.get $9 + local.get $10 i32.trunc_f64_u else i32.const 0 end i32.store8 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|00 end end - local.get $1 + local.get $0 i32.const 10 i32.const 0 i32.const 18 i32.const 4896 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - local.get $2 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> - local.get $1 - local.get $4 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> - local.get $1 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + local.get $3 + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Uint8Array,u8> + local.get $0 + local.get $5 + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/typedarray/Int16Array,i16> + local.get $0 + call $~lib/typedarray/SET<~lib/typedarray/Int8Array,i8,~lib/array/Array,i8> + local.get $0 i32.const 10 i32.const 0 i32.const 18 i32.const 4928 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $0 - 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 $1 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $8 + i32.const 8332 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end i32.const 1376 @@ -23320,87 +27106,85 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 f32) + (local $11 f32) + (local $12 i32) (local $13 f64) - (local $14 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $7 + local.tee $8 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $7 + local.get $8 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $7 + local.get $8 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 $8 + local.tee $9 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $8 + local.get $9 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $8 + local.get $9 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $14 - local.tee $1 - local.set $3 - block $folding-inner0 + local.tee $0 + local.set $2 + block $folding-inner1 i32.const 4316 i32.load - local.get $1 + local.get $0 i32.load offset=8 i32.gt_s - br_if $folding-inner0 - local.get $3 + br_if $folding-inner1 + local.get $2 i32.load offset=4 - local.set $9 + local.set $6 i32.const 4308 i32.load - local.set $4 + local.set $7 i32.const 4316 i32.load - local.set $5 + local.set $2 loop $for-loop|0 - local.get $0 - local.get $5 + local.get $1 + local.get $2 i32.lt_s if - local.get $0 - local.get $9 + local.get $1 + local.get $6 i32.add - local.get $4 - local.get $0 + local.get $7 + local.get $1 i32.const 2 i32.shl i32.add @@ -23419,66 +27203,64 @@ i32.or i32.and i32.store8 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - local.get $1 + local.get $0 i32.const 10 i32.const 0 i32.const 18 i32.const 4960 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $10 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - i32.const 0 - local.set $0 i32.const 4380 i32.load i32.const 3 i32.add - local.get $1 + local.get $0 i32.load offset=8 i32.gt_s - br_if $folding-inner0 - local.get $1 + br_if $folding-inner1 + local.get $0 i32.load offset=4 i32.const 3 i32.add - local.set $4 + local.set $3 i32.const 4372 i32.load - local.set $5 + local.set $6 i32.const 4380 i32.load - local.set $6 + local.set $7 loop $for-loop|00 - local.get $0 - local.get $6 + local.get $5 + local.get $7 i32.lt_s if - local.get $0 - local.get $4 + local.get $3 + local.get $5 i32.add + local.get $6 local.get $5 - local.get $0 i32.const 2 i32.shl i32.add f32.load - local.tee $12 - local.get $12 + local.tee $11 + local.get $11 f32.sub f32.const 0 f32.eq if (result i32) f32.const 0 f32.const 255 - local.get $12 + local.get $11 f32.min f32.max i32.trunc_f32_u @@ -23486,27 +27268,27 @@ i32.const 0 end i32.store8 - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|00 end end - local.get $1 + local.get $0 i32.const 10 i32.const 0 i32.const 18 i32.const 5056 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $12 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $1 - local.get $7 + local.get $0 + local.get $8 i32.const 6 call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int64Array,i64> - local.get $1 + local.get $0 i32.const 10 i32.const 0 i32.const 18 @@ -23516,36 +27298,36 @@ local.tee $5 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> i32.const 0 - local.set $0 + local.set $1 i32.const 4460 i32.load i32.const 2 i32.add - local.get $1 + local.get $0 i32.load offset=8 i32.gt_s - br_if $folding-inner0 - local.get $1 + br_if $folding-inner1 + local.get $0 i32.load offset=4 i32.const 2 i32.add - local.set $6 + local.set $3 i32.const 4452 i32.load - local.set $10 + local.set $6 i32.const 4460 i32.load - local.set $11 + local.set $7 loop $for-loop|01 - local.get $0 - local.get $11 + local.get $1 + local.get $7 i32.lt_s if - local.get $0 - local.get $6 + local.get $1 + local.get $3 i32.add - local.get $10 - local.get $0 + local.get $6 + local.get $1 i32.const 3 i32.shl i32.add @@ -23566,72 +27348,79 @@ i32.const 0 end i32.store8 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|01 end end - local.get $1 + local.get $0 i32.const 10 i32.const 0 i32.const 18 i32.const 5120 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $2 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $0 - call $~lib/rt/pure/__release local.get $2 + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 i32.load offset=8 - local.get $1 + local.get $0 i32.load offset=8 i32.gt_s - br_if $folding-inner0 - local.get $1 + br_if $folding-inner1 + local.get $0 i32.load offset=4 - local.get $2 + local.get $4 i32.load offset=4 - local.get $2 + local.get $4 i32.load offset=8 call $~lib/util/memory/memmove - local.get $1 - local.get $8 + local.get $0 + local.get $9 i32.const 4 call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int16Array,i16> i32.const 0 - local.set $0 + local.set $1 i32.const 4524 i32.load i32.const 7 i32.add - local.get $1 + local.get $0 i32.load offset=8 i32.gt_s - br_if $folding-inner0 - local.get $1 + br_if $folding-inner1 + local.get $0 i32.load offset=4 i32.const 7 i32.add local.set $6 i32.const 4516 i32.load - local.set $10 + local.set $7 i32.const 4524 i32.load - local.set $11 + local.set $2 loop $for-loop|02 - local.get $0 - local.get $11 + local.get $1 + local.get $2 i32.lt_s if - local.get $0 + local.get $1 local.get $6 i32.add - local.get $0 - local.get $10 + local.get $1 + local.get $7 i32.add i32.load8_s local.tee $3 @@ -23648,38 +27437,94 @@ i32.or i32.and i32.store8 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|02 end end - local.get $1 + local.get $0 i32.const 10 i32.const 0 i32.const 18 i32.const 5152 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $2 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $1 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release local.get $2 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $8 - call $~lib/rt/pure/__release - local.get $14 - call $~lib/rt/pure/__release - local.get $9 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $9 + i32.const 8332 + i32.gt_u + if + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $10 + i32.const 8332 + i32.gt_u + if + local.get $10 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $12 + i32.const 8332 + i32.gt_u + if + local.get $12 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end i32.const 1376 @@ -23689,7 +27534,7 @@ call $~lib/builtins/abort unreachable ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,i32> (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -23747,7 +27592,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 i32.load offset=8 i32.const 1 @@ -23774,7 +27618,7 @@ local.get $0 local.get $2 call $~lib/typedarray/Int16Array#__get - local.set $3 + local.tee $3 local.get $1 i32.load offset=4 local.get $2 @@ -23783,9 +27627,6 @@ i32.add i32.load16_s local.tee $5 - local.set $6 - local.get $3 - local.get $5 i32.ne if i32.const 5232 @@ -23794,7 +27635,7 @@ f64.convert_i32_s local.get $3 f64.convert_i32_s - local.get $6 + local.get $5 f64.convert_i32_s f64.const 0 f64.const 0 @@ -23874,7 +27715,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -23954,7 +27795,7 @@ i32.load offset=8 call $~lib/util/memory/memmove ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,i8> (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -24018,9 +27859,9 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 f32) - (local $9 f64) - (local $10 i32) + (local $8 i32) + (local $9 f32) + (local $10 f64) (local $11 i32) (local $12 i32) i32.const 3 @@ -24072,7 +27913,7 @@ i32.const 10 call $~lib/typedarray/Int16Array#constructor local.tee $1 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,i32> local.get $1 i32.const 10 i32.const 1 @@ -24080,7 +27921,7 @@ i32.const 5184 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $8 call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> block $folding-inner0 i32.const 4380 @@ -24120,13 +27961,13 @@ i32.shl i32.add f32.load - local.tee $8 - local.get $8 + local.tee $9 + local.get $9 f32.sub f32.const 0 f32.eq if (result i32) - local.get $8 + local.get $9 i32.trunc_f32_s else i32.const 0 @@ -24146,7 +27987,7 @@ i32.const 5280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $6 call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> local.get $1 local.get $3 @@ -24158,7 +27999,7 @@ i32.const 5328 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $5 call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> i32.const 0 local.set $0 @@ -24199,13 +28040,13 @@ i32.shl i32.add f64.load - local.tee $9 - local.get $9 + local.tee $10 + local.get $10 f64.sub f64.const 0 f64.eq if (result i32) - local.get $9 + local.get $10 i32.trunc_f64_s else i32.const 0 @@ -24228,15 +28069,22 @@ local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $2 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Uint8Array,u8> local.get $1 local.get $4 call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int16Array,i16> local.get $1 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,i8> local.get $1 i32.const 10 i32.const 1 @@ -24247,21 +28095,77 @@ local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $8 + i32.const 8332 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 8332 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end i32.const 1376 @@ -24276,7 +28180,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 i32.load offset=8 i32.const 1 @@ -24303,7 +28206,7 @@ local.get $0 local.get $2 call $~lib/typedarray/Uint16Array#__get - local.set $3 + local.tee $3 local.get $1 i32.load offset=4 local.get $2 @@ -24312,9 +28215,6 @@ i32.add i32.load16_u local.tee $5 - local.set $6 - local.get $3 - local.get $5 i32.ne if i32.const 5520 @@ -24323,7 +28223,7 @@ f64.convert_i32_s local.get $3 f64.convert_i32_u - local.get $6 + local.get $5 f64.convert_i32_u f64.const 0 f64.const 0 @@ -24352,9 +28252,9 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 f32) - (local $9 f64) - (local $10 i32) + (local $8 i32) + (local $9 f32) + (local $10 f64) (local $11 i32) (local $12 i32) i32.const 3 @@ -24406,7 +28306,7 @@ i32.const 10 call $~lib/typedarray/Uint16Array#constructor local.tee $1 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,i32> local.get $1 i32.const 10 i32.const 1 @@ -24414,7 +28314,7 @@ i32.const 5472 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $8 call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> block $folding-inner0 i32.const 4380 @@ -24454,13 +28354,13 @@ i32.shl i32.add f32.load - local.tee $8 - local.get $8 + local.tee $9 + local.get $9 f32.sub f32.const 0 f32.eq if (result i32) - local.get $8 + local.get $9 i32.trunc_f32_u else i32.const 0 @@ -24480,7 +28380,7 @@ i32.const 5568 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $6 call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> local.get $1 local.get $3 @@ -24492,7 +28392,7 @@ i32.const 5616 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $5 call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> i32.const 0 local.set $0 @@ -24533,13 +28433,13 @@ i32.shl i32.add f64.load - local.tee $9 - local.get $9 + local.tee $10 + local.get $10 f64.sub f64.const 0 f64.eq if (result i32) - local.get $9 + local.get $10 i32.trunc_f64_u else i32.const 0 @@ -24562,15 +28462,22 @@ local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $2 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Uint8Array,u8> local.get $1 local.get $4 call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/typedarray/Int16Array,i16> local.get $1 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> + call $~lib/typedarray/SET<~lib/typedarray/Int16Array,i16,~lib/array/Array,i8> local.get $1 i32.const 10 i32.const 1 @@ -24581,21 +28488,77 @@ local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $8 + i32.const 8332 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 8332 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end i32.const 1376 @@ -24605,7 +28568,7 @@ call $~lib/builtins/abort unreachable ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,i32> (param $0 i32) i32.const 4316 i32.load local.get $0 @@ -24761,7 +28724,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -24871,7 +28834,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,i8> (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -24936,9 +28899,9 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 f32) - (local $10 f64) - (local $11 i32) + (local $9 i32) + (local $10 f32) + (local $11 f64) (local $12 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -24988,196 +28951,259 @@ call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Int32Array#constructor - local.tee $0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> - local.get $0 + local.tee $1 + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,i32> + local.get $1 i32.const 10 i32.const 2 i32.const 15 i32.const 5760 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $11 + local.tee $9 call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> block $folding-inner0 i32.const 4380 i32.load i32.const 3 i32.add - local.get $0 + local.get $1 i32.load offset=8 i32.const 2 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 i32.const 12 i32.add local.set $5 i32.const 4372 i32.load - local.set $6 + local.set $7 i32.const 4380 i32.load - local.set $7 + local.set $8 loop $for-loop|0 - local.get $1 - local.get $7 + local.get $0 + local.get $8 i32.lt_s if local.get $5 - local.get $1 + local.get $0 i32.const 2 i32.shl - local.tee $8 + local.tee $6 i32.add local.get $6 - local.get $8 + local.get $7 i32.add f32.load - local.tee $9 - local.get $9 + local.tee $10 + local.get $10 f32.sub f32.const 0 f32.eq if (result i32) - local.get $9 + local.get $10 i32.trunc_f32_s else i32.const 0 end i32.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 $0 + local.get $1 i32.const 10 i32.const 2 i32.const 15 i32.const 5872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $6 call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - local.get $0 + local.get $1 local.get $3 call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int64Array,i64> - local.get $0 + local.get $1 i32.const 10 i32.const 2 i32.const 15 i32.const 5936 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $5 call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> i32.const 0 - local.set $1 + local.set $0 i32.const 4460 i32.load i32.const 2 i32.add - local.get $0 + local.get $1 i32.load offset=8 i32.const 2 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 i32.const 8 i32.add - local.set $7 + local.set $8 i32.const 4452 i32.load - local.set $8 + local.set $7 i32.const 4460 i32.load local.set $12 loop $for-loop|00 - local.get $1 + local.get $0 local.get $12 i32.lt_s if - local.get $7 - local.get $1 + local.get $8 + local.get $0 i32.const 2 i32.shl i32.add - local.get $8 - local.get $1 + local.get $7 + local.get $0 i32.const 3 i32.shl i32.add f64.load - local.tee $10 - local.get $10 + local.tee $11 + local.get $11 f64.sub f64.const 0 f64.eq if (result i32) - local.get $10 + local.get $11 i32.trunc_f64_s else i32.const 0 end i32.store - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|00 end end - local.get $0 + local.get $1 i32.const 10 i32.const 2 i32.const 15 i32.const 6000 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - local.get $1 - call $~lib/rt/pure/__release local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 local.get $2 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> - local.get $0 + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Uint8Array,u8> + local.get $1 local.get $4 call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int16Array,i16> - local.get $0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> - local.get $0 + local.get $1 + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,i8> + local.get $1 i32.const 10 i32.const 2 i32.const 15 i32.const 6064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - local.get $1 - call $~lib/rt/pure/__release + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $11 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $9 + i32.const 8332 + i32.gt_u + if + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 8332 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end i32.const 1376 @@ -25269,9 +29295,9 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 f32) - (local $10 f64) - (local $11 i32) + (local $9 i32) + (local $10 f32) + (local $11 f64) (local $12 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor @@ -25321,196 +29347,259 @@ call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Uint32Array#constructor - local.tee $0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> - local.get $0 + local.tee $1 + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,i32> + local.get $1 i32.const 10 i32.const 2 i32.const 21 i32.const 6128 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $11 + local.tee $9 call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> block $folding-inner0 i32.const 4380 i32.load i32.const 3 i32.add - local.get $0 + local.get $1 i32.load offset=8 i32.const 2 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 i32.const 12 i32.add local.set $5 i32.const 4372 i32.load - local.set $6 + local.set $7 i32.const 4380 i32.load - local.set $7 + local.set $8 loop $for-loop|0 - local.get $1 - local.get $7 + local.get $0 + local.get $8 i32.lt_s if local.get $5 - local.get $1 + local.get $0 i32.const 2 i32.shl - local.tee $8 + local.tee $6 i32.add local.get $6 - local.get $8 + local.get $7 i32.add f32.load - local.tee $9 - local.get $9 + local.tee $10 + local.get $10 f32.sub f32.const 0 f32.eq if (result i32) - local.get $9 + local.get $10 i32.trunc_f32_u else i32.const 0 end i32.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 $0 + local.get $1 i32.const 10 i32.const 2 i32.const 21 i32.const 6240 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $6 call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> - local.get $0 + local.get $1 local.get $3 call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int64Array,i64> - local.get $0 + local.get $1 i32.const 10 i32.const 2 i32.const 21 i32.const 6304 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $5 call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> i32.const 0 - local.set $1 + local.set $0 i32.const 4460 i32.load i32.const 2 i32.add - local.get $0 + local.get $1 i32.load offset=8 i32.const 2 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 i32.const 8 i32.add - local.set $7 + local.set $8 i32.const 4452 i32.load - local.set $8 + local.set $7 i32.const 4460 i32.load local.set $12 loop $for-loop|00 - local.get $1 + local.get $0 local.get $12 i32.lt_s if - local.get $7 - local.get $1 + local.get $8 + local.get $0 i32.const 2 i32.shl i32.add - local.get $8 - local.get $1 + local.get $7 + local.get $0 i32.const 3 i32.shl i32.add f64.load - local.tee $10 - local.get $10 + local.tee $11 + local.get $11 f64.sub f64.const 0 f64.eq if (result i32) - local.get $10 + local.get $11 i32.trunc_f64_u else i32.const 0 end i32.store - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|00 end end - local.get $0 + local.get $1 i32.const 10 i32.const 2 i32.const 21 i32.const 6368 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> - local.get $1 - call $~lib/rt/pure/__release local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 local.get $2 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> - local.get $0 + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Uint8Array,u8> + local.get $1 local.get $4 call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/typedarray/Int16Array,i16> - local.get $0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> - local.get $0 + local.get $1 + call $~lib/typedarray/SET<~lib/typedarray/Int32Array,i32,~lib/array/Array,i8> + local.get $1 i32.const 10 i32.const 2 i32.const 21 i32.const 6432 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> - local.get $1 - call $~lib/rt/pure/__release + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $11 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $9 + i32.const 8332 + i32.gt_u + if + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 8332 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end i32.const 1376 @@ -25520,7 +29609,7 @@ call $~lib/builtins/abort unreachable ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,i32> (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -25676,7 +29765,7 @@ i32.load offset=8 call $~lib/util/memory/memmove ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Uint8Array,u8> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -25786,7 +29875,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) + (func $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,i8> (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -25850,9 +29939,9 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 f32) - (local $9 f64) - (local $10 i32) + (local $8 i32) + (local $9 f32) + (local $10 f64) (local $11 i32) (local $12 i32) (local $13 i32) @@ -25904,29 +29993,29 @@ call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Int64Array#constructor - local.tee $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> - local.get $0 + local.tee $1 + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,i32> + local.get $1 i32.const 10 i32.const 3 i32.const 22 i32.const 6496 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $8 call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> block $folding-inner0 i32.const 4380 i32.load i32.const 3 i32.add - local.get $0 + local.get $1 i32.load offset=8 i32.const 3 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 i32.const 24 i32.add @@ -25938,41 +30027,41 @@ i32.load local.set $7 loop $for-loop|0 - local.get $1 + local.get $0 local.get $7 i32.lt_s if local.get $5 - local.get $1 + local.get $0 i32.const 3 i32.shl i32.add local.get $6 - local.get $1 + local.get $0 i32.const 2 i32.shl i32.add f32.load - local.tee $8 - local.get $8 + local.tee $9 + local.get $9 f32.sub f32.const 0 f32.eq if (result i64) - local.get $8 + local.get $9 i64.trunc_f32_s else i64.const 0 end i64.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 $0 + local.get $1 i32.const 10 i32.const 3 i32.const 22 @@ -25981,10 +30070,10 @@ call $~lib/rt/pure/__retain local.tee $5 call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> - local.get $0 + local.get $1 local.get $3 call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int64Array,i64> - local.get $0 + local.get $1 i32.const 10 i32.const 3 i32.const 22 @@ -25994,18 +30083,18 @@ local.tee $6 call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> i32.const 0 - local.set $1 + local.set $0 i32.const 4460 i32.load i32.const 2 i32.add - local.get $0 + local.get $1 i32.load offset=8 i32.const 3 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 i32.const 16 i32.add @@ -26017,12 +30106,12 @@ i32.load local.set $12 loop $for-loop|00 - local.get $1 + local.get $0 local.get $12 i32.lt_s if local.get $7 - local.get $1 + local.get $0 i32.const 3 i32.shl local.tee $13 @@ -26031,69 +30120,132 @@ local.get $13 i32.add f64.load - local.tee $9 - local.get $9 + local.tee $10 + local.get $10 f64.sub f64.const 0 f64.eq if (result i64) - local.get $9 + local.get $10 i64.trunc_f64_s else i64.const 0 end i64.store - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|00 end end - local.get $0 + local.get $1 i32.const 10 i32.const 3 i32.const 22 i32.const 6832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> - local.get $1 - call $~lib/rt/pure/__release local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 local.get $2 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> - local.get $0 + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Uint8Array,u8> + local.get $1 local.get $4 call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int16Array,i16> - local.get $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> - local.get $0 + local.get $1 + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,i8> + local.get $1 i32.const 10 i32.const 3 i32.const 22 i32.const 6928 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> - local.get $1 - call $~lib/rt/pure/__release + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $8 + i32.const 8332 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end i32.const 1376 @@ -26185,9 +30337,9 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 f32) - (local $9 f64) - (local $10 i32) + (local $8 i32) + (local $9 f32) + (local $10 f64) (local $11 i32) (local $12 i32) (local $13 i32) @@ -26239,29 +30391,29 @@ call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Uint64Array#constructor - local.tee $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> - local.get $0 + local.tee $1 + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,i32> + local.get $1 i32.const 10 i32.const 3 i32.const 23 i32.const 7024 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $8 call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> block $folding-inner0 i32.const 4380 i32.load i32.const 3 i32.add - local.get $0 + local.get $1 i32.load offset=8 i32.const 3 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 i32.const 24 i32.add @@ -26273,41 +30425,41 @@ i32.load local.set $7 loop $for-loop|0 - local.get $1 + local.get $0 local.get $7 i32.lt_s if local.get $5 - local.get $1 + local.get $0 i32.const 3 i32.shl i32.add local.get $6 - local.get $1 + local.get $0 i32.const 2 i32.shl i32.add f32.load - local.tee $8 - local.get $8 + local.tee $9 + local.get $9 f32.sub f32.const 0 f32.eq if (result i64) - local.get $8 + local.get $9 i64.trunc_f32_u else i64.const 0 end i64.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 $0 + local.get $1 i32.const 10 i32.const 3 i32.const 23 @@ -26316,10 +30468,10 @@ call $~lib/rt/pure/__retain local.tee $5 call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> - local.get $0 + local.get $1 local.get $3 call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int64Array,i64> - local.get $0 + local.get $1 i32.const 10 i32.const 3 i32.const 23 @@ -26329,18 +30481,18 @@ local.tee $6 call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> i32.const 0 - local.set $1 + local.set $0 i32.const 4460 i32.load i32.const 2 i32.add - local.get $0 + local.get $1 i32.load offset=8 i32.const 3 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 i32.const 16 i32.add @@ -26352,12 +30504,12 @@ i32.load local.set $12 loop $for-loop|00 - local.get $1 + local.get $0 local.get $12 i32.lt_s if local.get $7 - local.get $1 + local.get $0 i32.const 3 i32.shl local.tee $13 @@ -26366,69 +30518,132 @@ local.get $13 i32.add f64.load - local.tee $9 - local.get $9 + local.tee $10 + local.get $10 f64.sub f64.const 0 f64.eq if (result i64) - local.get $9 + local.get $10 i64.trunc_f64_u else i64.const 0 end i64.store - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|00 end end - local.get $0 + local.get $1 i32.const 10 i32.const 3 i32.const 23 i32.const 7360 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> - local.get $1 - call $~lib/rt/pure/__release local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 local.get $2 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> - local.get $0 + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Uint8Array,u8> + local.get $1 local.get $4 call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/typedarray/Int16Array,i16> - local.get $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> - local.get $0 + local.get $1 + call $~lib/typedarray/SET<~lib/typedarray/Int64Array,i64,~lib/array/Array,i8> + local.get $1 i32.const 10 i32.const 3 i32.const 23 i32.const 7456 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> - local.get $1 - call $~lib/rt/pure/__release + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $8 + i32.const 8332 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end i32.const 1376 @@ -26440,18 +30655,17 @@ ) (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 f32) + (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 f32) (local $6 f32) - (local $7 f32) local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $4 - local.set $5 - local.get $4 + local.tee $3 + local.set $4 + local.get $3 local.get $1 i32.load offset=12 i32.ne @@ -26465,13 +30679,13 @@ end loop $for-loop|0 local.get $2 - local.get $5 + local.get $4 i32.lt_s if local.get $0 local.get $2 call $~lib/typedarray/Float32Array#__get - local.set $3 + local.tee $5 local.get $1 i32.load offset=4 local.get $2 @@ -26480,18 +30694,15 @@ i32.add f32.load local.tee $6 - local.set $7 - local.get $3 - local.get $6 f32.ne if i32.const 7616 i32.const 3 local.get $2 f64.convert_i32_s - local.get $3 + local.get $5 f64.promote_f32 - local.get $7 + local.get $6 f64.promote_f32 f64.const 0 f64.const 0 @@ -26523,59 +30734,57 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $5 + local.tee $4 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $5 + local.get $4 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $5 + local.get $4 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $4 + local.tee $3 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $4 + local.get $3 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $4 + local.get $3 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $4 + local.get $3 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $6 + local.tee $5 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $6 + local.get $5 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $6 + local.get $5 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Float32Array#constructor - local.tee $11 local.tee $1 local.set $7 - block $folding-inner1 + block $folding-inner0 i32.const 4316 i32.load local.get $1 @@ -26583,7 +30792,7 @@ i32.const 2 i32.shr_u i32.gt_s - br_if $folding-inner1 + br_if $folding-inner0 local.get $7 i32.load offset=4 local.set $7 @@ -26598,18 +30807,16 @@ local.get $8 i32.lt_s if - local.get $10 + local.get $7 local.get $0 i32.const 2 i32.shl local.tee $2 i32.add - i32.load - local.set $3 local.get $2 - local.get $7 + local.get $10 i32.add - local.get $3 + i32.load f32.convert_i32_s f32.store local.get $0 @@ -26637,7 +30844,7 @@ i32.const 2 i32.shr_u i32.gt_s - br_if $folding-inner1 + br_if $folding-inner0 local.get $1 i32.load offset=4 i32.const 12 @@ -26658,7 +30865,7 @@ call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> i32.const 0 local.set $0 - local.get $5 + local.get $4 i32.load offset=8 i32.const 3 i32.shr_u @@ -26669,23 +30876,23 @@ i32.const 2 i32.shr_u i32.gt_s - br_if $folding-inner1 + br_if $folding-inner0 local.get $1 i32.load offset=4 i32.const 24 i32.add local.set $8 - local.get $5 + local.get $4 i32.load offset=4 local.set $2 - local.get $5 + local.get $4 i32.load offset=8 i32.const 3 i32.shr_u - local.set $3 + local.set $6 loop $for-loop|00 local.get $0 - local.get $3 + local.get $6 i32.lt_s if local.get $8 @@ -26719,24 +30926,24 @@ call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> i32.const 0 local.set $0 - local.get $4 + local.get $3 i32.load offset=8 local.get $1 i32.load offset=8 i32.const 2 i32.shr_u i32.gt_s - br_if $folding-inner1 + br_if $folding-inner0 local.get $1 i32.load offset=4 local.set $2 - local.get $4 + local.get $3 i32.load offset=4 - local.set $3 - local.get $4 + local.set $6 + local.get $3 i32.load offset=8 local.set $9 - loop $for-loop|001 + loop $for-loop|01 local.get $0 local.get $9 i32.lt_s @@ -26747,7 +30954,7 @@ i32.shl i32.add local.get $0 - local.get $3 + local.get $6 i32.add i32.load8_u f32.convert_i32_u @@ -26756,12 +30963,12 @@ i32.const 1 i32.add local.set $0 - br $for-loop|001 + br $for-loop|01 end end i32.const 0 local.set $0 - local.get $6 + local.get $5 i32.load offset=8 i32.const 1 i32.shr_u @@ -26772,16 +30979,16 @@ i32.const 2 i32.shr_u i32.gt_s - br_if $folding-inner1 + br_if $folding-inner0 local.get $1 i32.load offset=4 i32.const 16 i32.add local.set $2 - local.get $6 + local.get $5 i32.load offset=4 - local.set $3 - local.get $6 + local.set $6 + local.get $5 i32.load offset=8 i32.const 1 i32.shr_u @@ -26796,7 +31003,7 @@ i32.const 2 i32.shl i32.add - local.get $3 + local.get $6 local.get $0 i32.const 1 i32.shl @@ -26822,7 +31029,7 @@ i32.const 2 i32.shr_u i32.gt_s - br_if $folding-inner1 + br_if $folding-inner0 local.get $1 i32.load offset=4 i32.const 28 @@ -26830,11 +31037,11 @@ local.set $2 i32.const 4516 i32.load - local.set $3 + local.set $6 i32.const 4524 i32.load local.set $9 - loop $for-loop|01 + loop $for-loop|03 local.get $0 local.get $9 i32.lt_s @@ -26845,7 +31052,7 @@ i32.shl i32.add local.get $0 - local.get $3 + local.get $6 i32.add i32.load8_s f32.convert_i32_s @@ -26854,34 +31061,90 @@ i32.const 1 i32.add local.set $0 - br $for-loop|01 + br $for-loop|03 end end - local.get $1 - i32.const 10 - i32.const 2 - i32.const 16 - i32.const 7792 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $1 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $1 - call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 2 + i32.const 16 + i32.const 7792 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end 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 $11 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $7 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $10 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $10 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $8 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end i32.const 1376 @@ -26893,18 +31156,17 @@ ) (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 f64) + (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 f64) (local $6 f64) - (local $7 f64) local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.tee $4 - local.set $5 - local.get $4 + local.tee $3 + local.set $4 + local.get $3 local.get $1 i32.load offset=12 i32.ne @@ -26918,13 +31180,13 @@ end loop $for-loop|0 local.get $2 - local.get $5 + local.get $4 i32.lt_s if local.get $0 local.get $2 call $~lib/typedarray/Float64Array#__get - local.set $3 + local.tee $5 local.get $1 i32.load offset=4 local.get $2 @@ -26933,17 +31195,14 @@ i32.add f64.load local.tee $6 - local.set $7 - local.get $3 - local.get $6 f64.ne if i32.const 7952 i32.const 3 local.get $2 f64.convert_i32_s - local.get $3 - local.get $7 + local.get $5 + local.get $6 f64.const 0 f64.const 0 call $~lib/builtins/trace @@ -26974,18 +31233,17 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $7 + local.tee $5 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $7 + local.get $5 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $7 + local.get $5 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set @@ -27009,24 +31267,23 @@ call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $8 + local.tee $6 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $8 + local.get $6 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $8 + local.get $6 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Float64Array#constructor - local.tee $11 local.tee $1 local.set $9 - block $folding-inner1 + block $folding-inner0 i32.const 4316 i32.load local.get $1 @@ -27034,7 +31291,7 @@ i32.const 3 i32.shr_u i32.gt_s - br_if $folding-inner1 + br_if $folding-inner0 local.get $9 i32.load offset=4 local.set $9 @@ -27089,7 +31346,7 @@ i32.const 3 i32.shr_u i32.gt_s - br_if $folding-inner1 + br_if $folding-inner0 local.get $1 i32.load offset=4 i32.const 24 @@ -27137,7 +31394,7 @@ call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> i32.const 0 local.set $0 - local.get $7 + local.get $5 i32.load offset=8 i32.const 3 i32.shr_u @@ -27148,33 +31405,33 @@ i32.const 3 i32.shr_u i32.gt_s - br_if $folding-inner1 + br_if $folding-inner0 local.get $1 i32.load offset=4 i32.const 48 i32.add local.set $4 - local.get $7 + local.get $5 i32.load offset=4 local.set $2 - local.get $7 + local.get $5 i32.load offset=8 i32.const 3 i32.shr_u - local.set $5 + local.set $7 loop $for-loop|01 local.get $0 - local.get $5 + local.get $7 i32.lt_s if local.get $4 local.get $0 i32.const 3 i32.shl - local.tee $6 + local.tee $8 i32.add local.get $2 - local.get $6 + local.get $8 i32.add i64.load f64.convert_i64_s @@ -27204,19 +31461,19 @@ i32.const 3 i32.shr_u i32.gt_s - br_if $folding-inner1 + br_if $folding-inner0 local.get $1 i32.load offset=4 local.set $2 local.get $3 i32.load offset=4 - local.set $5 + local.set $7 local.get $3 i32.load offset=8 - local.set $6 - loop $for-loop|012 + local.set $8 + loop $for-loop|02 local.get $0 - local.get $6 + local.get $8 i32.lt_s if local.get $2 @@ -27225,7 +31482,7 @@ i32.shl i32.add local.get $0 - local.get $5 + local.get $7 i32.add i32.load8_u f64.convert_i32_u @@ -27234,12 +31491,12 @@ i32.const 1 i32.add local.set $0 - br $for-loop|012 + br $for-loop|02 end end i32.const 0 local.set $0 - local.get $8 + local.get $6 i32.load offset=8 i32.const 1 i32.shr_u @@ -27250,23 +31507,23 @@ i32.const 3 i32.shr_u i32.gt_s - br_if $folding-inner1 + br_if $folding-inner0 local.get $1 i32.load offset=4 i32.const 32 i32.add local.set $2 - local.get $8 + local.get $6 i32.load offset=4 - local.set $5 - local.get $8 + local.set $7 + local.get $6 i32.load offset=8 i32.const 1 i32.shr_u - local.set $6 + local.set $8 loop $for-loop|03 local.get $0 - local.get $6 + local.get $8 i32.lt_s if local.get $2 @@ -27274,7 +31531,7 @@ i32.const 3 i32.shl i32.add - local.get $5 + local.get $7 local.get $0 i32.const 1 i32.shl @@ -27300,7 +31557,7 @@ i32.const 3 i32.shr_u i32.gt_s - br_if $folding-inner1 + br_if $folding-inner0 local.get $1 i32.load offset=4 i32.const 56 @@ -27308,13 +31565,13 @@ local.set $2 i32.const 4516 i32.load - local.set $5 + local.set $7 i32.const 4524 i32.load - local.set $6 - loop $for-loop|02 + local.set $8 + loop $for-loop|04 local.get $0 - local.get $6 + local.get $8 i32.lt_s if local.get $2 @@ -27323,7 +31580,7 @@ i32.shl i32.add local.get $0 - local.get $5 + local.get $7 i32.add i32.load8_s f64.convert_i32_s @@ -27332,7 +31589,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|02 + br $for-loop|04 end end local.get $1 @@ -27342,24 +31599,80 @@ i32.const 8192 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - local.get $1 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 8332 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release - local.get $11 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 + i32.const 8332 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $9 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $10 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $10 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end i32.const 1376 @@ -27385,21 +31698,20 @@ (local $12 i32) (local $13 i32) (local $14 i32) - (local $15 f32) - (local $16 i32) + (local $15 i32) + (local $16 f64) (local $17 i32) (local $18 i32) (local $19 i32) - (local $20 f64) - (local $21 i32) + (local $20 f32) + (local $21 f64) (local $22 i32) - (local $23 f32) - (local $24 f64) + (local $23 i32) + (local $24 i32) (local $25 i32) (local $26 i32) (local $27 i32) (local $28 i32) - (local $29 i32) i32.const 0 call $std/typedarray/testInstantiate i32.const 5 @@ -27502,7 +31814,14 @@ call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int32Array,i32> local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.load offset=8 i32.const 2 @@ -27558,7 +31877,14 @@ unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 8 call $~lib/typedarray/Float64Array#constructor local.tee $0 @@ -27599,7 +31925,14 @@ call $~lib/typedarray/SUBARRAY<~lib/typedarray/Float64Array,f64> local.set $1 local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 i32.load offset=8 i32.const 3 @@ -27646,59 +31979,66 @@ block $__inlined_func$~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64> local.get $1 call $~lib/rt/pure/__retain - local.tee $28 + local.tee $27 i32.load offset=8 i32.const 3 i32.shr_u - local.tee $29 + local.tee $28 i32.const 1 i32.le_s br_if $__inlined_func$~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64> - local.get $28 + local.get $27 i32.load offset=4 local.set $0 - local.get $29 + local.get $28 i32.const 2 i32.eq if local.get $0 f64.load offset=8 - local.set $24 + local.set $21 local.get $0 f64.load - local.set $20 + local.set $16 i32.const 2 global.set $~argumentsLength - local.get $24 - local.get $20 + local.get $21 + local.get $16 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if local.get $0 - local.get $20 + local.get $16 f64.store offset=8 local.get $0 - local.get $24 + local.get $21 f64.store end br $__inlined_func$~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64> end - local.get $29 + local.get $28 i32.const 256 i32.lt_s if local.get $0 - local.get $29 + local.get $28 call $~lib/util/sort/insertionSort else local.get $0 - local.get $29 + local.get $28 call $~lib/util/sort/weakHeapSort end end - local.get $28 - call $~lib/rt/pure/__release + local.get $27 + i32.const 8332 + i32.gt_u + if + local.get $27 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get @@ -27741,7 +32081,14 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $1 @@ -27794,7 +32141,14 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 5 call $~lib/typedarray/Int8Array#constructor local.tee $1 @@ -27822,7 +32176,17 @@ i32.const 1 i32.const 3 call $~lib/typedarray/FILL<~lib/typedarray/Int8Array,i8> - call $~lib/rt/pure/__release + local.tee $0 + local.set $28 + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $28 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 i32.const 5 i32.const 0 @@ -27830,7 +32194,7 @@ i32.const 1504 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $29 + local.tee $28 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -27846,7 +32210,17 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/FILL<~lib/typedarray/Int8Array,i8> - call $~lib/rt/pure/__release + local.tee $0 + local.set $27 + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $27 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 i32.const 5 i32.const 0 @@ -27854,7 +32228,7 @@ i32.const 1584 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $28 + local.tee $27 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -27870,7 +32244,17 @@ i32.const 0 i32.const -3 call $~lib/typedarray/FILL<~lib/typedarray/Int8Array,i8> - call $~lib/rt/pure/__release + local.tee $0 + local.set $26 + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $26 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 i32.const 5 i32.const 0 @@ -27878,7 +32262,7 @@ i32.const 1616 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $26 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -27894,7 +32278,17 @@ i32.const -2 i32.const 2147483647 call $~lib/typedarray/FILL<~lib/typedarray/Int8Array,i8> - call $~lib/rt/pure/__release + local.tee $0 + local.set $24 + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $24 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 i32.const 5 i32.const 0 @@ -27902,7 +32296,7 @@ i32.const 1648 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $24 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -27918,7 +32312,17 @@ i32.const 1 i32.const 0 call $~lib/typedarray/FILL<~lib/typedarray/Int8Array,i8> - call $~lib/rt/pure/__release + local.tee $0 + local.set $25 + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $25 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 i32.const 5 i32.const 0 @@ -27946,7 +32350,17 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/FILL<~lib/typedarray/Int8Array,i8> - call $~lib/rt/pure/__release + local.tee $23 + local.set $22 + local.get $23 + i32.const 8332 + i32.gt_u + if + local.get $22 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.load offset=8 i32.const 3 @@ -27993,7 +32407,7 @@ i32.const 1712 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $23 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -28011,7 +32425,7 @@ i32.const 1744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $21 + local.tee $22 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -28023,23 +32437,86 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $28 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $28 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $27 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $27 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $26 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $26 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $24 + i32.const 8332 + i32.gt_u + if + local.get $24 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $25 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $25 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $23 + i32.const 8332 + i32.gt_u + if + local.get $23 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $22 - call $~lib/rt/pure/__release - local.get $21 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $22 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 5 call $~lib/typedarray/Int32Array#constructor local.tee $1 @@ -28067,7 +32544,17 @@ i32.const 1 i32.const 3 call $~lib/typedarray/FILL<~lib/typedarray/Int32Array,i32> - call $~lib/rt/pure/__release + local.tee $0 + local.set $28 + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $28 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 i32.const 5 i32.const 2 @@ -28075,7 +32562,7 @@ i32.const 1776 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $29 + local.tee $28 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -28091,7 +32578,17 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/FILL<~lib/typedarray/Int32Array,i32> - call $~lib/rt/pure/__release + local.tee $0 + local.set $27 + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $27 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 i32.const 5 i32.const 2 @@ -28099,7 +32596,7 @@ i32.const 1824 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $28 + local.tee $27 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -28115,7 +32612,17 @@ i32.const 0 i32.const -3 call $~lib/typedarray/FILL<~lib/typedarray/Int32Array,i32> - call $~lib/rt/pure/__release + local.tee $0 + local.set $26 + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $26 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 i32.const 5 i32.const 2 @@ -28123,7 +32630,7 @@ i32.const 1872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $26 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -28139,7 +32646,17 @@ i32.const -2 i32.const 2147483647 call $~lib/typedarray/FILL<~lib/typedarray/Int32Array,i32> - call $~lib/rt/pure/__release + local.tee $0 + local.set $24 + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $24 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 i32.const 5 i32.const 2 @@ -28147,7 +32664,7 @@ i32.const 1920 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $24 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -28163,7 +32680,17 @@ i32.const 1 i32.const 0 call $~lib/typedarray/FILL<~lib/typedarray/Int32Array,i32> - call $~lib/rt/pure/__release + local.tee $0 + local.set $25 + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $25 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 i32.const 5 i32.const 2 @@ -28191,7 +32718,17 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/FILL<~lib/typedarray/Int32Array,i32> - call $~lib/rt/pure/__release + local.tee $23 + local.set $22 + local.get $23 + i32.const 8332 + i32.gt_u + if + local.get $22 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.load offset=8 i32.const 2 @@ -28240,7 +32777,7 @@ i32.const 2016 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $23 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -28258,35 +32795,98 @@ i32.const 2048 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $21 + local.tee $22 call $std/typedarray/isInt32ArrayEqual i32.eqz if - i32.const 0 - i32.const 1312 - i32.const 201 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.const 0 + i32.const 1312 + i32.const 201 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $28 + i32.const 8332 + i32.gt_u + if + local.get $28 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $27 + i32.const 8332 + i32.gt_u + if + local.get $27 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $26 + i32.const 8332 + i32.gt_u + if + local.get $26 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $24 + i32.const 8332 + i32.gt_u + if + local.get $24 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $25 + i32.const 8332 + i32.gt_u + if + local.get $25 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $23 + i32.const 8332 + i32.gt_u + if + local.get $23 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $1 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $28 - call $~lib/rt/pure/__release - local.get $27 - call $~lib/rt/pure/__release - local.get $26 - call $~lib/rt/pure/__release - local.get $25 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release local.get $22 - call $~lib/rt/pure/__release - local.get $21 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $22 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 6 call $~lib/typedarray/Int8Array#constructor local.tee $1 @@ -28373,7 +32973,7 @@ i32.const 1 i32.const 5 call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> - local.tee $29 + local.tee $28 i32.const 0 call $~lib/typedarray/Int8Array#__get i32.const 3 @@ -28386,7 +32986,7 @@ call $~lib/builtins/abort unreachable end - local.get $29 + local.get $28 i32.load offset=8 i32.const 4 i32.ne @@ -28398,9 +32998,9 @@ call $~lib/builtins/abort unreachable end - local.get $29 + local.get $28 i32.load offset=4 - local.get $29 + local.get $28 i32.load i32.sub i32.const 2 @@ -28413,7 +33013,7 @@ call $~lib/builtins/abort unreachable end - local.get $29 + local.get $28 i32.load offset=8 i32.const 4 i32.ne @@ -28425,11 +33025,11 @@ call $~lib/builtins/abort unreachable end - local.get $29 + local.get $28 i32.const 1 i32.const 4 call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int8Array,i8> - local.tee $28 + local.tee $27 i32.const 0 call $~lib/typedarray/Int8Array#__get i32.const 4 @@ -28442,7 +33042,7 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $27 i32.load offset=8 i32.const 3 i32.ne @@ -28454,9 +33054,9 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $27 i32.load offset=4 - local.get $28 + local.get $27 i32.load i32.sub i32.const 3 @@ -28469,7 +33069,7 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $27 i32.load offset=8 i32.const 3 i32.ne @@ -28482,53 +33082,81 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $28 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $28 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $27 + i32.const 8332 + i32.gt_u + if + local.get $27 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 5 call $~lib/typedarray/Int32Array#constructor - local.tee $1 + local.tee $0 i32.const 0 i32.const 1 call $~lib/typedarray/Int32Array#__set - local.get $1 + local.get $0 i32.const 1 i32.const 2 call $~lib/typedarray/Int32Array#__set - local.get $1 + local.get $0 i32.const 2 i32.const 3 call $~lib/typedarray/Int32Array#__set - local.get $1 + local.get $0 i32.const 3 i32.const 4 call $~lib/typedarray/Int32Array#__set - local.get $1 + local.get $0 i32.const 4 i32.const 5 call $~lib/typedarray/Int32Array#__set - local.get $1 + local.get $0 i32.const 0 i32.const 2147483647 call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.set $29 - local.get $1 + local.set $28 + local.get $0 i32.const 0 i32.const 3 i32.const 2147483647 call $~lib/typedarray/COPY_WITHIN<~lib/typedarray/Int32Array,i32> - local.tee $28 + local.tee $27 i32.const 5 i32.const 2 i32.const 15 i32.const 2096 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $26 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -28539,19 +33167,26 @@ call $~lib/builtins/abort unreachable end - local.get $29 + local.get $28 i32.const 0 i32.const 2147483647 call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $1 local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 i32.const 1 i32.const 3 i32.const 2147483647 call $~lib/typedarray/COPY_WITHIN<~lib/typedarray/Int32Array,i32> - local.tee $26 + local.tee $24 i32.const 5 i32.const 2 i32.const 15 @@ -28569,25 +33204,32 @@ call $~lib/builtins/abort unreachable end - local.get $29 + local.get $28 i32.const 0 i32.const 2147483647 call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.get $0 - call $~lib/rt/pure/__release - local.tee $0 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $1 i32.const 1 i32.const 2 i32.const 2147483647 call $~lib/typedarray/COPY_WITHIN<~lib/typedarray/Int32Array,i32> - local.tee $22 + local.tee $23 i32.const 5 i32.const 2 i32.const 15 i32.const 2192 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $21 + local.tee $22 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -28598,13 +33240,20 @@ call $~lib/builtins/abort unreachable end - local.get $29 + local.get $28 i32.const 0 i32.const 2147483647 call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.get $0 - call $~lib/rt/pure/__release - local.tee $0 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $1 i32.const 2 i32.const 2 i32.const 2147483647 @@ -28627,13 +33276,20 @@ call $~lib/builtins/abort unreachable end - local.get $29 + local.get $28 i32.const 0 i32.const 2147483647 call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.get $0 - call $~lib/rt/pure/__release - local.tee $0 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $1 i32.const 0 i32.const 3 i32.const 4 @@ -28645,7 +33301,7 @@ i32.const 2288 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $15 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -28656,13 +33312,20 @@ call $~lib/builtins/abort unreachable end - local.get $29 + local.get $28 i32.const 0 i32.const 2147483647 call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.get $0 - call $~lib/rt/pure/__release - local.tee $0 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $1 i32.const 1 i32.const 3 i32.const 4 @@ -28685,13 +33348,20 @@ call $~lib/builtins/abort unreachable end - local.get $29 + local.get $28 i32.const 0 i32.const 2147483647 call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.get $0 - call $~lib/rt/pure/__release - local.tee $0 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $1 i32.const 1 i32.const 2 i32.const 4 @@ -28714,13 +33384,20 @@ call $~lib/builtins/abort unreachable end - local.get $29 + local.get $28 i32.const 0 i32.const 2147483647 call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.get $0 - call $~lib/rt/pure/__release - local.tee $0 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $1 i32.const 0 i32.const -2 i32.const 2147483647 @@ -28743,13 +33420,20 @@ call $~lib/builtins/abort unreachable end - local.get $29 + local.get $28 i32.const 0 i32.const 2147483647 call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.get $0 - call $~lib/rt/pure/__release - local.tee $0 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $1 i32.const 0 i32.const -2 i32.const -1 @@ -28772,13 +33456,20 @@ call $~lib/builtins/abort unreachable end - local.get $29 + local.get $28 i32.const 0 i32.const 2147483647 call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.get $0 - call $~lib/rt/pure/__release - local.tee $0 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $1 i32.const -4 i32.const -3 i32.const -2 @@ -28801,14 +33492,20 @@ call $~lib/builtins/abort unreachable end - local.get $29 + local.get $28 i32.const 0 i32.const 2147483647 call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.set $1 - local.get $0 - call $~lib/rt/pure/__release local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $1 i32.const -4 i32.const -3 i32.const -1 @@ -28831,13 +33528,20 @@ call $~lib/builtins/abort unreachable end - local.get $29 + local.get $28 i32.const 0 i32.const 2147483647 call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const -4 i32.const -3 @@ -28861,58 +33565,240 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $28 - call $~lib/rt/pure/__release - local.get $27 - call $~lib/rt/pure/__release + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $28 + i32.const 8332 + i32.gt_u + if + local.get $28 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $27 + i32.const 8332 + i32.gt_u + if + local.get $27 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $26 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $26 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $24 + i32.const 8332 + i32.gt_u + if + local.get $24 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $25 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $25 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $23 + i32.const 8332 + i32.gt_u + if + local.get $23 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $22 - call $~lib/rt/pure/__release - local.get $21 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $22 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $19 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $19 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $18 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $18 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $17 - call $~lib/rt/pure/__release - local.get $16 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $17 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $15 + i32.const 8332 + i32.gt_u + if + local.get $15 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $14 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $14 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $13 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $13 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $12 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $12 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $11 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $11 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $10 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $10 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $9 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $8 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $7 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 5 call $~lib/typedarray/Int32Array#constructor local.tee $1 @@ -28939,7 +33825,7 @@ i32.const 1 i32.const 4 call $~lib/typedarray/SUBARRAY<~lib/typedarray/Int32Array,i32> - local.tee $29 + local.tee $28 i32.load offset=8 i32.const 2 i32.shr_u @@ -28953,9 +33839,9 @@ call $~lib/builtins/abort unreachable end - local.get $29 + local.get $28 i32.load offset=4 - local.get $29 + local.get $28 i32.load i32.sub i32.const 4 @@ -28968,7 +33854,7 @@ call $~lib/builtins/abort unreachable end - local.get $29 + local.get $28 i32.load offset=8 i32.const 12 i32.ne @@ -29049,11 +33935,11 @@ call $~lib/builtins/abort unreachable end - local.get $29 + local.get $28 i32.const 1 i32.const 2 call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.tee $28 + local.tee $27 i32.const 0 call $~lib/typedarray/Int32Array#__get i32.const 3 @@ -29066,7 +33952,7 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $27 i32.load offset=8 i32.const 2 i32.shr_u @@ -29080,9 +33966,9 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $27 i32.load offset=4 - local.get $28 + local.get $27 i32.load i32.sub if @@ -29093,7 +33979,7 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $27 i32.load offset=8 i32.const 4 i32.ne @@ -29110,7 +33996,7 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/SLICE<~lib/typedarray/Int32Array,i32> - local.tee $27 + local.tee $26 i32.eq if i32.const 0 @@ -29120,7 +34006,7 @@ call $~lib/builtins/abort unreachable end - local.get $27 + local.get $26 i32.load offset=8 i32.const 2 i32.shr_u @@ -29137,9 +34023,9 @@ call $~lib/builtins/abort unreachable end - local.get $27 + local.get $26 i32.load offset=4 - local.get $27 + local.get $26 i32.load i32.sub local.get $1 @@ -29156,7 +34042,7 @@ call $~lib/builtins/abort unreachable end - local.get $27 + local.get $26 i32.load offset=8 local.get $1 i32.load offset=8 @@ -29170,3644 +34056,2594 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $28 - call $~lib/rt/pure/__release + i32.const 8332 + i32.gt_u + if + local.get $28 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $27 - call $~lib/rt/pure/__release - i32.const 0 - local.set $1 + i32.const 8332 + i32.gt_u + if + local.get $27 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $26 + i32.const 8332 + i32.gt_u + if + local.get $26 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 + i32.const 0 + local.set $28 i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $29 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Int8Array#__set - local.get $29 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Int8Array#__set - local.get $29 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Int8Array#__set - local.get $29 + local.get $1 i32.load offset=4 - local.set $28 - local.get $29 + local.set $27 + local.get $1 i32.load offset=8 - local.set $27 + local.set $26 loop $for-loop|0 - local.get $1 - local.get $27 + local.get $0 + local.get $26 i32.lt_s if - local.get $1 - local.get $28 + local.get $0 + local.get $27 i32.add i32.load8_s - local.set $26 i32.const 4 global.set $~argumentsLength - local.get $0 - local.get $26 + local.get $28 i32.add - local.set $0 - local.get $1 + local.set $28 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end - block $folding-inner24 - block $folding-inner23 - block $folding-inner22 - block $folding-inner21 - block $folding-inner20 - block $folding-inner19 - block $folding-inner3 - block $folding-inner2 - block $folding-inner18 - block $folding-inner17 - block $folding-inner16 - block $folding-inner15 - block $folding-inner7 - block $folding-inner6 - block $folding-inner5 - block $folding-inner4 - block $folding-inner0 - local.get $0 - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $29 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - 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 - 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 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - 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 4 - 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 - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $29 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $29 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $29 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - i32.const 0 - local.set $0 - i32.const 0 - local.set $1 - local.get $29 - i32.load offset=4 - local.set $28 - local.get $29 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $27 - loop $for-loop|00 - local.get $0 - local.get $27 - i32.lt_s - if - local.get $28 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.set $26 - i32.const 4 - global.set $~argumentsLength - local.get $1 - local.get $26 - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|00 - end - end - local.get $1 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $29 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $29 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $29 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $29 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - i32.const 0 - local.set $0 - i32.const 0 - local.set $1 - local.get $29 - i32.load offset=4 - local.set $28 - local.get $29 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $27 - loop $for-loop|01 - local.get $0 - local.get $27 - i32.lt_s - if - local.get $28 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.set $26 - i32.const 4 - global.set $~argumentsLength - local.get $1 - local.get $26 - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|01 - end - end - local.get $1 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $29 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - 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 - local.get $1 - i32.const 7 - call $~lib/typedarray/REDUCE<~lib/typedarray/Int32Array,i32,i32> - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - 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 - local.get $1 - i32.const 8 - call $~lib/typedarray/REDUCE<~lib/typedarray/Int32Array,i32,i32> - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - 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 - local.get $1 - i32.const 9 - call $~lib/typedarray/REDUCE<~lib/typedarray/Int64Array,i64,i64> - i64.const 6 - i64.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - 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 - local.get $1 - i32.const 10 - call $~lib/typedarray/REDUCE<~lib/typedarray/Int64Array,i64,i64> - i64.const 6 - i64.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - 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 - i32.load offset=4 - local.set $29 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $28 - loop $for-loop|02 - local.get $0 - local.get $28 - i32.lt_s - if - local.get $29 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $15 - i32.const 4 - global.set $~argumentsLength - local.get $23 - local.get $15 - f32.add - local.set $23 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|02 - end - end - local.get $23 - f32.const 6 - f32.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - 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 - f64.const 0 - local.set $24 - local.get $1 - i32.load offset=4 - local.set $29 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $28 - loop $for-loop|03 - local.get $0 - local.get $28 - i32.lt_s - if - local.get $29 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $20 - i32.const 4 - global.set $~argumentsLength - local.get $24 - local.get $20 - f64.add - local.set $24 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|03 - end - end - local.get $24 - f64.const 6 - f64.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - local.set $0 - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $29 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int8Array#__set - local.get $29 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $29 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int8Array#__set - local.get $29 - i32.load offset=4 - local.set $28 - local.get $29 - i32.load offset=8 - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|004 - local.get $1 - i32.const 0 - i32.ge_s - if - local.get $1 - local.get $28 - i32.add - i32.load8_s - local.set $27 - i32.const 4 - global.set $~argumentsLength - local.get $0 - local.get $27 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|004 - end - end - local.get $0 - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner4 - local.get $29 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - 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 14 - call $~lib/typedarray/Uint8Array#reduceRight - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner4 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - 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 15 - call $~lib/typedarray/Uint8Array#reduceRight - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner4 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $29 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $29 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $29 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - i32.const 0 - local.set $0 - local.get $29 - i32.load offset=4 - local.set $28 - local.get $29 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|05 - local.get $1 - i32.const 0 - i32.ge_s - if - local.get $28 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.set $27 - i32.const 4 - global.set $~argumentsLength - local.get $0 - local.get $27 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|05 - end - end - local.get $0 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner4 - local.get $29 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $29 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $29 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $29 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - i32.const 0 - local.set $0 - local.get $29 - i32.load offset=4 - local.set $28 - local.get $29 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|06 - local.get $1 - i32.const 0 - i32.ge_s - if - local.get $28 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.set $27 - i32.const 4 - global.set $~argumentsLength - local.get $0 - local.get $27 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|06 - end - end - local.get $0 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner4 - local.get $29 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - local.set $0 - local.get $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 - block $folding-inner1 - local.get $1 - i32.const 18 - call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int32Array,i32,i32> - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - 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 - local.get $1 - i32.const 19 - call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int32Array,i32,i32> - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - 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 - local.get $1 - i32.const 20 - call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int64Array,i64,i64> - i64.const 6 - i64.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - 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 - local.get $1 - i32.const 21 - call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int64Array,i64,i64> - i64.const 6 - i64.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - 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 - f32.const 0 - local.set $23 - local.get $0 - i32.load offset=4 - local.set $29 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|07 - local.get $1 - i32.const 0 - i32.ge_s - if - local.get $29 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $15 - i32.const 4 - global.set $~argumentsLength - local.get $23 - local.get $15 - f32.add - local.set $23 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|07 - end - end - local.get $23 - f32.const 6 - f32.ne - br_if $folding-inner4 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - 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 - f64.const 0 - local.set $24 - local.get $0 - i32.load offset=4 - local.set $29 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|08 - local.get $1 - i32.const 0 - i32.ge_s - if - local.get $29 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $20 - i32.const 4 - global.set $~argumentsLength - local.get $24 - local.get $20 - f64.add - local.set $24 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|08 - end - end - local.get $24 - f64.const 6 - f64.ne - br_if $folding-inner4 - local.get $0 - call $~lib/rt/pure/__release - call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - 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 - local.get $1 - call $~lib/typedarray/MAP<~lib/typedarray/Int16Array,i16> - local.tee $0 - i32.const 0 - call $~lib/typedarray/Int16Array#__get - i32.const 1 - i32.ne - br_if $folding-inner5 - local.get $0 - i32.const 1 - call $~lib/typedarray/Int16Array#__get - i32.const 4 - i32.ne - br_if $folding-inner6 - local.get $0 - i32.const 2 - call $~lib/typedarray/Int16Array#__get - i32.const 9 - i32.ne - br_if $folding-inner7 - 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 - 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 - local.get $1 - call $~lib/typedarray/MAP<~lib/typedarray/Uint16Array,u16> - local.tee $0 - i32.const 0 - call $~lib/typedarray/Uint16Array#__get - i32.const 1 - i32.ne - br_if $folding-inner5 - local.get $0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__get - i32.const 4 - i32.ne - br_if $folding-inner6 - local.get $0 - i32.const 2 - call $~lib/typedarray/Uint16Array#__get - i32.const 9 - i32.ne - br_if $folding-inner7 - 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 - 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 - local.get $1 - call $~lib/typedarray/MAP<~lib/typedarray/Int32Array,i32> - local.tee $0 - i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 1 - i32.ne - br_if $folding-inner5 - local.get $0 - i32.const 1 - call $~lib/typedarray/Int32Array#__get - i32.const 4 - i32.ne - br_if $folding-inner6 - local.get $0 - i32.const 2 - call $~lib/typedarray/Int32Array#__get - i32.const 9 - i32.ne - br_if $folding-inner7 - 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 - 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 - local.get $1 - call $~lib/typedarray/MAP<~lib/typedarray/Uint32Array,u32> - local.tee $0 - i32.const 0 - call $~lib/typedarray/Uint32Array#__get - i32.const 1 - i32.ne - br_if $folding-inner5 - local.get $0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__get - i32.const 4 - i32.ne - br_if $folding-inner6 - local.get $0 - i32.const 2 - call $~lib/typedarray/Uint32Array#__get - i32.const 9 - i32.ne - br_if $folding-inner7 - 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 - 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 - local.get $1 - call $~lib/typedarray/MAP<~lib/typedarray/Int64Array,i64> - local.tee $0 - i32.const 0 - call $~lib/typedarray/Int64Array#__get - i64.const 1 - i64.ne - br_if $folding-inner5 - local.get $0 - i32.const 1 - call $~lib/typedarray/Int64Array#__get - i64.const 4 - i64.ne - br_if $folding-inner6 - local.get $0 - i32.const 2 - call $~lib/typedarray/Int64Array#__get - i64.const 9 - i64.ne - br_if $folding-inner7 - 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 - 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 - local.get $1 - call $~lib/typedarray/MAP<~lib/typedarray/Uint64Array,u64> - local.tee $0 - i32.const 0 - call $~lib/typedarray/Uint64Array#__get - i64.const 1 - i64.ne - br_if $folding-inner5 - local.get $0 - i32.const 1 - call $~lib/typedarray/Uint64Array#__get - i64.const 4 - i64.ne - br_if $folding-inner6 - local.get $0 - i32.const 2 - call $~lib/typedarray/Uint64Array#__get - i64.const 9 - i64.ne - br_if $folding-inner7 - 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 - 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 - local.get $1 - call $~lib/typedarray/MAP<~lib/typedarray/Float32Array,f32> - local.tee $0 - i32.const 0 - call $~lib/typedarray/Float32Array#__get - f32.const 1 - f32.ne - br_if $folding-inner5 - local.get $0 - i32.const 1 - call $~lib/typedarray/Float32Array#__get - f32.const 4 - f32.ne - br_if $folding-inner6 - local.get $0 - i32.const 2 - call $~lib/typedarray/Float32Array#__get - f32.const 9 - f32.ne - br_if $folding-inner7 - 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 - 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 - local.get $1 - call $~lib/typedarray/MAP<~lib/typedarray/Float64Array,f64> - local.tee $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 1 - f64.ne - br_if $folding-inner5 - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 4 - f64.ne - br_if $folding-inner6 - local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 9 - f64.ne - br_if $folding-inner7 - 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 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 46 - call $~lib/typedarray/Int8Array#some - i32.eqz - br_if $folding-inner2 - local.get $1 - i32.const 47 - call $~lib/typedarray/Int8Array#some - br_if $folding-inner3 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 48 - call $~lib/typedarray/Uint8Array#some - i32.eqz - br_if $folding-inner2 - local.get $1 - i32.const 49 - call $~lib/typedarray/Uint8Array#some - br_if $folding-inner3 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 50 - call $~lib/typedarray/Uint8Array#some - i32.eqz - br_if $folding-inner2 - local.get $1 - i32.const 51 - call $~lib/typedarray/Uint8Array#some - br_if $folding-inner3 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 52 - call $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16> - i32.eqz - br_if $folding-inner2 - i32.const 53 - call $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16> - br_if $folding-inner3 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 54 - call $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16> - i32.eqz - br_if $folding-inner2 - i32.const 55 - call $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16> - br_if $folding-inner3 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 56 - call $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> - i32.eqz - br_if $folding-inner2 - i32.const 57 - call $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> - br_if $folding-inner3 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 58 - call $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> - i32.eqz - br_if $folding-inner2 - i32.const 59 - call $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> - br_if $folding-inner3 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 60 - call $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> - i32.eqz - br_if $folding-inner2 - i32.const 61 - call $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> - br_if $folding-inner3 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 62 - call $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> - i32.eqz - br_if $folding-inner2 - i32.const 63 - call $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> - br_if $folding-inner3 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 1 - f32.const 4 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 2 - f32.const 6 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 64 - call $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32> - i32.eqz - br_if $folding-inner2 - i32.const 65 - call $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32> - br_if $folding-inner3 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - f64.const 6 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 66 - call $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64> - i32.eqz - br_if $folding-inner2 - i32.const 67 - call $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64> - br_if $folding-inner3 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - 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 68 - call $~lib/typedarray/Int8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner19 - local.get $1 - i32.const 69 - call $~lib/typedarray/Int8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner20 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - 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 70 - call $~lib/typedarray/Uint8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner19 - local.get $1 - i32.const 71 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner20 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - 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 72 - call $~lib/typedarray/Uint8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner19 - local.get $1 - i32.const 73 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner20 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - local.get $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 - local.get $1 - i32.const 74 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16> - i32.const 1 - i32.ne - br_if $folding-inner19 - i32.const 75 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16> - i32.const -1 - i32.ne - br_if $folding-inner20 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - local.get $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 - local.get $1 - i32.const 76 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16> - i32.const 1 - i32.ne - br_if $folding-inner19 - i32.const 77 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16> - i32.const -1 - i32.ne - br_if $folding-inner20 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - local.get $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 - local.get $1 - i32.const 78 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> - i32.const 1 - i32.ne - br_if $folding-inner19 - i32.const 79 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> - i32.const -1 - i32.ne - br_if $folding-inner20 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - local.get $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 - local.get $1 - i32.const 80 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> - i32.const 1 - i32.ne - br_if $folding-inner19 - i32.const 81 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> - i32.const -1 - i32.ne - br_if $folding-inner20 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - local.get $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 - local.get $1 - i32.const 82 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> - i32.const 1 - i32.ne - br_if $folding-inner19 - i32.const 83 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> - i32.const -1 - i32.ne - br_if $folding-inner20 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - local.get $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 - local.get $1 - i32.const 84 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> - i32.const 1 - i32.ne - br_if $folding-inner19 - i32.const 85 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> - i32.const -1 - i32.ne - br_if $folding-inner20 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - local.get $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 - local.get $1 - i32.const 86 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32> - i32.const 1 - i32.ne - br_if $folding-inner19 - i32.const 87 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32> - i32.const -1 - i32.ne - br_if $folding-inner20 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - local.get $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 - local.get $1 - i32.const 88 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64> - i32.const 1 - i32.ne - br_if $folding-inner19 - i32.const 89 - call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64> - i32.const -1 - i32.ne - br_if $folding-inner20 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 90 - call $~lib/typedarray/Int8Array#every - i32.eqz - br_if $folding-inner21 - local.get $1 - i32.const 91 - call $~lib/typedarray/Int8Array#every - br_if $folding-inner22 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 92 - call $~lib/typedarray/Uint8Array#every - i32.eqz - br_if $folding-inner21 - local.get $1 - i32.const 93 - call $~lib/typedarray/Uint8Array#every - br_if $folding-inner22 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 94 - call $~lib/typedarray/Uint8Array#every - i32.eqz - br_if $folding-inner21 - local.get $1 - i32.const 95 - call $~lib/typedarray/Uint8Array#every - br_if $folding-inner22 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 96 - call $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16> - i32.eqz - br_if $folding-inner21 - i32.const 97 - call $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16> - br_if $folding-inner22 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 98 - call $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16> - i32.eqz - br_if $folding-inner21 - i32.const 99 - call $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16> - br_if $folding-inner22 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 100 - call $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> - i32.eqz - br_if $folding-inner21 - i32.const 101 - call $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> - br_if $folding-inner22 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 102 - call $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> - i32.eqz - br_if $folding-inner21 - i32.const 103 - call $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> - br_if $folding-inner22 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 104 - call $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> - i32.eqz - br_if $folding-inner21 - i32.const 105 - call $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> - br_if $folding-inner22 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 106 - call $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> - i32.eqz - br_if $folding-inner21 - i32.const 107 - call $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> - br_if $folding-inner22 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 1 - f32.const 4 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 2 - f32.const 6 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 108 - call $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32> - i32.eqz - br_if $folding-inner21 - i32.const 109 - call $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32> - br_if $folding-inner22 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - local.get $1 - i32.const 0 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - f64.const 6 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 110 - call $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64> - i32.eqz - br_if $folding-inner21 - i32.const 111 - call $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64> - br_if $folding-inner22 - local.get $1 - call $~lib/rt/pure/__release - call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 113 - call $~lib/typedarray/Uint8Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner23 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 114 - call $~lib/typedarray/Uint8Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner23 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 2704 - 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 2704 - 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 2704 - 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 - i32.load offset=4 - local.set $29 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $28 - loop $for-loop|09 - local.get $1 - local.get $28 - i32.lt_s - if - local.get $29 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_s - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|09 - end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner23 - 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 $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 2704 - 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 2704 - 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 2704 - 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 - i32.load offset=4 - local.set $29 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $28 - loop $for-loop|010 - local.get $1 - local.get $28 - i32.lt_s - if - local.get $29 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_u - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|010 - end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner23 - 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 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 117 - call $~lib/typedarray/FOREACH<~lib/typedarray/Int32Array,i32> - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner23 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 118 - call $~lib/typedarray/FOREACH<~lib/typedarray/Int32Array,i32> - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner23 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 119 - call $~lib/typedarray/FOREACH<~lib/typedarray/Int64Array,i64> - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner23 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 120 - call $~lib/typedarray/FOREACH<~lib/typedarray/Int64Array,i64> - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner23 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - i32.const 0 - local.set $0 - local.get $1 - i32.load offset=4 - local.set $29 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $28 - loop $for-loop|011 - local.get $0 - local.get $28 - i32.lt_s - if - local.get $29 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - i32.const 3 - global.set $~argumentsLength - local.get $0 - local.get $1 - call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|011 - end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner23 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - i32.const 0 - local.set $0 - local.get $1 - i32.load offset=4 - local.set $29 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $28 - loop $for-loop|012 - local.get $0 - local.get $28 - i32.lt_s - if - local.get $29 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - i32.const 3 - global.set $~argumentsLength - local.get $0 - local.get $1 - call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|012 - end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner23 - local.get $1 - 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 $29 - i32.const 0 - f64.const nan:0x8000000000000 - call $~lib/typedarray/Float64Array#__set - local.get $29 - f64.const nan:0x8000000000000 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 607 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - block $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64> (result i32) - i32.const 0 - local.set $1 - i32.const 0 - local.get $29 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $28 - if (result i32) - i32.const 0 - local.get $28 - i32.ge_s - else - i32.const 1 - end - br_if $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64> - drop - local.get $29 - i32.load offset=4 - local.set $26 - loop $while-continue|0 - local.get $1 - local.get $28 - i32.lt_s - if - i32.const 1 - local.get $26 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $24 - f64.const nan:0x8000000000000 - f64.eq - if (result i32) - i32.const 1 - else - local.get $24 - local.get $24 - f64.ne - end - br_if $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64> - drop - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - i32.const 0 - end - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 608 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - i32.const 0 - f32.const nan:0x400000 - call $~lib/typedarray/Float32Array#__set - local.get $1 - f32.const nan:0x400000 - i32.const 0 - call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 613 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - block $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32> (result i32) - i32.const 0 - local.set $0 - i32.const 0 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $27 - if (result i32) - i32.const 0 - local.get $27 - i32.ge_s - else - i32.const 1 - end - br_if $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32> - drop - local.get $1 - i32.load offset=4 - local.set $25 - loop $while-continue|013 - local.get $0 - local.get $27 - i32.lt_s - if - i32.const 1 - local.get $25 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $23 - f32.const nan:0x400000 - f32.eq - if (result i32) - i32.const 1 - else - local.get $23 - local.get $23 - f32.ne - end - br_if $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32> - drop - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $while-continue|013 - end - end - i32.const 0 - end - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 614 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> - i32.const 5 - call $~lib/typedarray/Int16Array#constructor - 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 - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - call $~lib/util/string/joinIntegerArray - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner15 - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - call $~lib/util/string/joinIntegerArray - local.tee $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint16Array#constructor - 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 - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - call $~lib/util/string/joinIntegerArray - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner15 - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - call $~lib/util/string/joinIntegerArray - local.tee $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int32Array#constructor - 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 - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - call $~lib/util/string/joinIntegerArray - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner15 - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - call $~lib/util/string/joinIntegerArray - local.tee $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint32Array#constructor - 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 - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - call $~lib/util/string/joinIntegerArray - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner15 - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - call $~lib/util/string/joinIntegerArray - local.tee $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int64Array#constructor - 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 - local.get $1 - i32.const 3 - i64.const 4 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 4 - i64.const 5 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - call $~lib/util/string/joinIntegerArray - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner15 - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - call $~lib/util/string/joinIntegerArray - local.tee $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint64Array#constructor - 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 - local.get $1 - i32.const 3 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 4 - i64.const 5 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - call $~lib/util/string/joinIntegerArray - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner15 - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - call $~lib/util/string/joinIntegerArray - local.tee $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Float32Array#constructor - 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 - local.get $1 - i32.const 3 - f32.const 4 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 4 - f32.const 5 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - call $~lib/util/string/joinFloatArray - local.tee $0 - i32.const 4112 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - call $~lib/util/string/joinFloatArray - local.tee $29 - i32.const 4112 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner18 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Float64Array#constructor - 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 - local.get $1 - i32.const 3 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 4 - f64.const 5 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - call $~lib/util/string/joinFloatArray - local.tee $0 - i32.const 4112 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - call $~lib/util/string/joinFloatArray - local.tee $29 - i32.const 4112 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner18 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - i32.const 2 - global.set $~argumentsLength - local.get $1 - i32.const 0 - call $~lib/typedarray/Uint8Array.wrap@varargs - local.tee $29 - i32.load offset=8 - if - i32.const 0 - i32.const 1312 - i32.const 691 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 2 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 2 - global.set $~argumentsLength - local.get $0 - i32.const 2 - call $~lib/typedarray/Uint8Array.wrap@varargs - local.set $1 - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - i32.load offset=8 - if - i32.const 0 - i32.const 1312 - i32.const 695 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - 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 $1 - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $29 - i32.const 0 - f32.const 400 - call $~lib/typedarray/Float32Array#__set - local.get $29 - i32.const 1 - f32.const nan:0x400000 - call $~lib/typedarray/Float32Array#__set - local.get $29 - i32.const 2 - f32.const inf - call $~lib/typedarray/Float32Array#__set - i32.const 4 - call $~lib/typedarray/Int64Array#constructor - local.tee $28 - i32.const 0 - i64.const -10 - call $~lib/typedarray/Int64Array#__set - local.get $28 - i32.const 1 - i64.const 100 - call $~lib/typedarray/Int64Array#__set - local.get $28 - i32.const 2 - i64.const 10 - call $~lib/typedarray/Int64Array#__set - local.get $28 - i32.const 3 - i64.const 300 - call $~lib/typedarray/Int64Array#__set - i32.const 2 - call $~lib/typedarray/Int32Array#constructor - local.tee $27 - i32.const 0 - i32.const 300 - call $~lib/typedarray/Int32Array#__set - local.get $27 - i32.const 1 - i32.const -1 - call $~lib/typedarray/Int32Array#__set - i32.const 0 - local.set $0 - local.get $29 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.add - local.get $1 - i32.load offset=8 - i32.gt_s - br_if $folding-inner24 - local.get $1 - i32.load offset=4 - i32.const 1 - i32.add - local.set $25 - local.get $29 - i32.load offset=4 - local.set $22 - local.get $29 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $21 - loop $for-loop|022 - local.get $0 - local.get $21 - i32.lt_s - if - local.get $0 - local.get $25 - i32.add - local.get $22 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $23 - local.get $23 - f32.sub - f32.const 0 - f32.eq - if (result i32) - f32.const 0 - f32.const 255 - local.get $23 - 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|022 - end - end - local.get $1 - local.get $28 - i32.const 4 - call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int64Array,i64> - i32.const 0 - local.set $0 - local.get $27 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 8 - i32.add - local.get $1 - i32.load offset=8 - i32.gt_s - br_if $folding-inner24 - local.get $1 - i32.load offset=4 - i32.const 8 - i32.add - local.set $25 - local.get $27 - i32.load offset=4 - local.set $22 - local.get $27 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $21 - loop $for-loop|023 - local.get $0 - local.get $21 - i32.lt_s - if - local.get $0 - local.get $25 - i32.add - local.get $22 - local.get $0 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $26 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $26 - i32.const 255 - local.get $26 - 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|023 - end - end - local.get $1 - i32.const 10 - i32.const 0 - i32.const 18 - i32.const 8288 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $22 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - i32.const 4 - call $~lib/typedarray/Uint32Array#constructor - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.const 300 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2 - i32.const 100 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 3 - i32.const -1 - call $~lib/typedarray/Uint32Array#__set - i32.const 4 - call $~lib/typedarray/Int16Array#constructor - local.tee $26 - i32.const 0 - i32.const -10 - call $~lib/typedarray/Int16Array#__set - local.get $26 - i32.const 1 - i32.const 100 - call $~lib/typedarray/Int16Array#__set - local.get $26 - i32.const 2 - i32.const 10 - call $~lib/typedarray/Int16Array#__set - local.get $26 - i32.const 3 - i32.const 300 - call $~lib/typedarray/Int16Array#__set - i32.const 0 - local.set $25 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.get $1 - i32.load offset=8 - i32.gt_s - br_if $folding-inner24 - local.get $1 - i32.load offset=4 - local.set $21 - local.get $0 - i32.load offset=4 - local.set $19 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $18 - loop $for-loop|024 - local.get $25 - local.get $18 - i32.lt_s - if - i32.const 255 - local.get $19 - local.get $25 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $17 - i32.lt_u - local.set $16 - local.get $21 - local.get $25 - i32.add - i32.const 255 - local.get $17 - local.get $16 - select - i32.store8 - local.get $25 - i32.const 1 - i32.add - local.set $25 - br $for-loop|024 - end - end - local.get $1 - local.get $26 - i32.const 5 - call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int16Array,i16> - local.get $1 - i32.const 10 - i32.const 0 - i32.const 18 - i32.const 8320 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $25 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $1 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $28 - call $~lib/rt/pure/__release - local.get $27 - call $~lib/rt/pure/__release - local.get $22 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $26 - call $~lib/rt/pure/__release - local.get $25 - call $~lib/rt/pure/__release - return - end - br $folding-inner4 - end - i32.const 0 - i32.const 1312 - i32.const 323 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - i32.const 1312 - i32.const 344 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - i32.const 1312 - i32.const 365 + block $folding-inner0 + local.get $28 + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + 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 + 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 + local.get $1 + i32.const 3 + call $~lib/typedarray/Uint8Array#reduce + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 4 + call $~lib/typedarray/Uint8Array#reduce + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + 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 + local.get $1 + i32.const 7 + call $~lib/typedarray/REDUCE<~lib/typedarray/Int32Array,i32,i32> + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + 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 + local.get $1 + i32.const 8 + call $~lib/typedarray/REDUCE<~lib/typedarray/Int32Array,i32,i32> + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + 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 + local.get $1 + i32.const 9 + call $~lib/typedarray/REDUCE<~lib/typedarray/Int64Array,i64,i64> + i64.const 6 + i64.ne + br_if $folding-inner0 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + 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 + local.get $1 + i32.const 10 + call $~lib/typedarray/REDUCE<~lib/typedarray/Int64Array,i64,i64> + i64.const 6 + i64.ne + br_if $folding-inner0 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> + call $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + 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 14 + call $~lib/typedarray/Uint8Array#reduceRight + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner3 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 15 + call $~lib/typedarray/Uint8Array#reduceRight + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner3 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + 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 + block $folding-inner1 + local.get $1 + i32.const 18 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int32Array,i32,i32> + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + 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 + local.get $1 + i32.const 19 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int32Array,i32,i32> + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + 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 + local.get $1 + i32.const 20 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int64Array,i64,i64> + i64.const 6 + i64.ne + br_if $folding-inner1 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + 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 + local.get $1 + i32.const 21 + call $~lib/typedarray/REDUCE_RIGHT<~lib/typedarray/Int64Array,i64,i64> + i64.const 6 + i64.ne + br_if $folding-inner1 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> + call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> + 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 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 46 + call $~lib/typedarray/Int8Array#some + i32.eqz + br_if $folding-inner4 + i32.const 47 + call $~lib/typedarray/Int8Array#some + br_if $folding-inner5 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 48 + call $~lib/typedarray/Uint8Array#some + i32.eqz + br_if $folding-inner4 + i32.const 49 + call $~lib/typedarray/Uint8Array#some + br_if $folding-inner5 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 50 + call $~lib/typedarray/Uint8Array#some + i32.eqz + br_if $folding-inner4 + i32.const 51 + call $~lib/typedarray/Uint8Array#some + br_if $folding-inner5 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 52 + call $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16> + i32.eqz + br_if $folding-inner4 + i32.const 53 + call $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16> + br_if $folding-inner5 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 54 + call $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16> + i32.eqz + br_if $folding-inner4 + i32.const 55 + call $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16> + br_if $folding-inner5 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 56 + call $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> + i32.eqz + br_if $folding-inner4 + i32.const 57 + call $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> + br_if $folding-inner5 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 58 + call $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> + i32.eqz + br_if $folding-inner4 + i32.const 59 + call $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32> + br_if $folding-inner5 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 60 + call $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> + i32.eqz + br_if $folding-inner4 + i32.const 61 + call $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> + br_if $folding-inner5 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 62 + call $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> + i32.eqz + br_if $folding-inner4 + i32.const 63 + call $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64> + br_if $folding-inner5 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 1 + f32.const 4 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 2 + f32.const 6 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 64 + call $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32> + i32.eqz + br_if $folding-inner4 + i32.const 65 + call $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32> + br_if $folding-inner5 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + f64.const 4 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + f64.const 6 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 66 + call $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64> + i32.eqz + br_if $folding-inner4 + i32.const 67 + call $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64> + br_if $folding-inner5 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + local.get $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 68 + call $~lib/typedarray/Int8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner6 + i32.const 69 + call $~lib/typedarray/Int8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner7 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + local.get $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 70 + call $~lib/typedarray/Uint8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner6 + i32.const 71 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner7 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + local.get $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 72 + call $~lib/typedarray/Uint8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner6 + i32.const 73 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner7 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 74 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16> + i32.const 1 + i32.ne + br_if $folding-inner6 + i32.const 75 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16> + i32.const -1 + i32.ne + br_if $folding-inner7 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 76 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16> + i32.const 1 + i32.ne + br_if $folding-inner6 + i32.const 77 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16> + i32.const -1 + i32.ne + br_if $folding-inner7 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 78 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> + i32.const 1 + i32.ne + br_if $folding-inner6 + i32.const 79 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> + i32.const -1 + i32.ne + br_if $folding-inner7 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 80 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> + i32.const 1 + i32.ne + br_if $folding-inner6 + i32.const 81 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32> + i32.const -1 + i32.ne + br_if $folding-inner7 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 82 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> + i32.const 1 + i32.ne + br_if $folding-inner6 + i32.const 83 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> + i32.const -1 + i32.ne + br_if $folding-inner7 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 84 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> + i32.const 1 + i32.ne + br_if $folding-inner6 + i32.const 85 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64> + i32.const -1 + i32.ne + br_if $folding-inner7 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 86 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32> + i32.const 1 + i32.ne + br_if $folding-inner6 + i32.const 87 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32> + i32.const -1 + i32.ne + br_if $folding-inner7 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + local.get $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 + local.get $1 + i32.const 88 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64> + i32.const 1 + i32.ne + br_if $folding-inner6 + i32.const 89 + call $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64> + i32.const -1 + i32.ne + br_if $folding-inner7 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 90 + call $~lib/typedarray/Int8Array#every + i32.eqz + br_if $folding-inner8 + i32.const 91 + call $~lib/typedarray/Int8Array#every + br_if $folding-inner9 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 92 + call $~lib/typedarray/Uint8Array#every + i32.eqz + br_if $folding-inner8 + i32.const 93 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner9 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 94 + call $~lib/typedarray/Uint8Array#every + i32.eqz + br_if $folding-inner8 + i32.const 95 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner9 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 96 + call $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16> + i32.eqz + br_if $folding-inner8 + i32.const 97 + call $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16> + br_if $folding-inner9 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 98 + call $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16> + i32.eqz + br_if $folding-inner8 + i32.const 99 + call $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16> + br_if $folding-inner9 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 100 + call $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> + i32.eqz + br_if $folding-inner8 + i32.const 101 + call $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> + br_if $folding-inner9 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 102 + call $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> + i32.eqz + br_if $folding-inner8 + i32.const 103 + call $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32> + br_if $folding-inner9 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 104 + call $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> + i32.eqz + br_if $folding-inner8 + i32.const 105 + call $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> + br_if $folding-inner9 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 106 + call $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> + i32.eqz + br_if $folding-inner8 + i32.const 107 + call $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64> + br_if $folding-inner9 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 1 + f32.const 4 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 2 + f32.const 6 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 108 + call $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32> + i32.eqz + br_if $folding-inner8 + i32.const 109 + call $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32> + br_if $folding-inner9 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + local.get $1 + i32.const 0 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + f64.const 4 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + f64.const 6 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 110 + call $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64> + i32.eqz + br_if $folding-inner8 + i32.const 111 + call $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64> + br_if $folding-inner9 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + i32.const 2 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 113 + call $~lib/typedarray/FOREACH<~lib/typedarray/Uint8Array,u8> + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner10 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 2 + i32.const 2704 + i32.const 2 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 114 + call $~lib/typedarray/FOREACH<~lib/typedarray/Uint8Array,u8> + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner10 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 117 + call $~lib/typedarray/FOREACH<~lib/typedarray/Int32Array,i32> + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner10 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 118 + call $~lib/typedarray/FOREACH<~lib/typedarray/Int32Array,i32> + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner10 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + i32.const 2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 119 + call $~lib/typedarray/FOREACH<~lib/typedarray/Int64Array,i64> + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner10 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + i32.const 2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 120 + call $~lib/typedarray/FOREACH<~lib/typedarray/Int64Array,i64> + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner10 + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> + 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 $1 + i32.const 0 + f64.const nan:0x8000000000000 + call $~lib/typedarray/Float64Array#__set + local.get $1 + f64.const nan:0x8000000000000 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 607 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + block $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64> (result i32) + i32.const 0 + local.set $0 + i32.const 0 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $27 + if (result i32) + i32.const 0 + local.get $27 + i32.ge_s + else + i32.const 1 + end + br_if $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64> + drop + local.get $1 + i32.load offset=4 + local.set $24 + loop $while-continue|0 + local.get $0 + local.get $27 + i32.lt_s + if + i32.const 1 + local.get $24 + local.get $0 i32.const 3 - call $~lib/builtins/abort - unreachable + i32.shl + i32.add + f64.load + local.tee $21 + f64.const nan:0x8000000000000 + f64.eq + if (result i32) + i32.const 1 + else + local.get $21 + local.get $21 + f64.ne + end + br_if $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64> + drop + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $while-continue|0 end + end + i32.const 0 + end + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 608 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + call $~lib/typedarray/Float32Array#constructor + local.tee $0 + i32.const 0 + f32.const nan:0x400000 + call $~lib/typedarray/Float32Array#__set + local.get $0 + f32.const nan:0x400000 + i32.const 0 + call $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32> + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 613 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + block $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32> (result i32) + i32.const 0 + local.set $28 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $26 + if (result i32) i32.const 0 - i32.const 1312 - i32.const 366 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $26 + i32.ge_s + else + i32.const 1 + end + br_if $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32> + drop + local.get $0 + i32.load offset=4 + local.set $25 + loop $while-continue|00 + local.get $28 + local.get $26 + i32.lt_s + if + i32.const 1 + local.get $25 + local.get $28 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $20 + f32.const nan:0x400000 + f32.eq + if (result i32) + i32.const 1 + else + local.get $20 + local.get $20 + f32.ne + end + br_if $__inlined_func$~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32> + drop + local.get $28 + i32.const 1 + i32.add + local.set $28 + br $while-continue|00 + end end i32.const 0 + end + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 614 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> + 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 $28 + i32.load offset=8 + if + i32.const 0 + i32.const 1312 + 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 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 2 + global.set $~argumentsLength + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint8Array.wrap@varargs + local.set $0 + local.get $28 + i32.const 8332 + i32.gt_u + if + local.get $28 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.load offset=8 + if + i32.const 0 i32.const 1312 - i32.const 367 + i32.const 695 i32.const 3 call $~lib/builtins/abort unreachable end + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + 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 $1 + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $28 + i32.const 0 + f32.const 400 + call $~lib/typedarray/Float32Array#__set + local.get $28 + i32.const 1 + f32.const nan:0x400000 + call $~lib/typedarray/Float32Array#__set + local.get $28 + i32.const 2 + f32.const inf + call $~lib/typedarray/Float32Array#__set + i32.const 4 + call $~lib/typedarray/Int64Array#constructor + local.tee $27 + i32.const 0 + i64.const -10 + call $~lib/typedarray/Int64Array#__set + local.get $27 + i32.const 1 + i64.const 100 + call $~lib/typedarray/Int64Array#__set + local.get $27 + i32.const 2 + i64.const 10 + call $~lib/typedarray/Int64Array#__set + local.get $27 + i32.const 3 + i64.const 300 + call $~lib/typedarray/Int64Array#__set + i32.const 2 + call $~lib/typedarray/Int32Array#constructor + local.tee $26 + i32.const 0 + i32.const 300 + call $~lib/typedarray/Int32Array#__set + local.get $26 + i32.const 1 + i32.const -1 + call $~lib/typedarray/Int32Array#__set + i32.const 0 + local.set $0 + local.get $28 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.add + local.get $1 + i32.load offset=8 + i32.gt_s + br_if $folding-inner11 + local.get $1 + i32.load offset=4 + i32.const 1 + i32.add + local.set $25 + local.get $28 + i32.load offset=4 + local.set $23 + local.get $28 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $22 + loop $for-loop|00 + local.get $0 + local.get $22 + i32.lt_s + if + local.get $0 + local.get $25 + i32.add + local.get $23 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $20 + local.get $20 + f32.sub + f32.const 0 + f32.eq + if (result i32) + f32.const 0 + f32.const 255 + local.get $20 + 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 $1 + local.get $27 + i32.const 4 + call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int64Array,i64> i32.const 0 - i32.const 1312 - i32.const 629 + local.set $0 + local.get $26 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 8 + i32.add + local.get $1 + i32.load offset=8 + i32.gt_s + br_if $folding-inner11 + local.get $1 + i32.load offset=4 + i32.const 8 + i32.add + local.set $25 + local.get $26 + i32.load offset=4 + local.set $23 + local.get $26 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $22 + loop $for-loop|01 + local.get $0 + local.get $22 + i32.lt_s + if + local.get $0 + local.get $25 + i32.add + local.get $23 + local.get $0 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $24 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $24 + i32.const 255 + local.get $24 + 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|01 + end + end + local.get $1 + i32.const 10 + i32.const 0 + i32.const 18 + i32.const 8288 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $23 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + i32.const 4 + call $~lib/typedarray/Uint32Array#constructor + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 1 + i32.const 300 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 2 + i32.const 100 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 3 + i32.const -1 + call $~lib/typedarray/Uint32Array#__set + i32.const 4 + call $~lib/typedarray/Int16Array#constructor + local.tee $24 + i32.const 0 + i32.const -10 + call $~lib/typedarray/Int16Array#__set + local.get $24 + i32.const 1 + i32.const 100 + call $~lib/typedarray/Int16Array#__set + local.get $24 + i32.const 2 + i32.const 10 + call $~lib/typedarray/Int16Array#__set + local.get $24 + i32.const 3 + i32.const 300 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $25 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.get $1 + i32.load offset=8 + i32.gt_s + br_if $folding-inner11 + local.get $1 + i32.load offset=4 + local.set $22 + local.get $0 + i32.load offset=4 + local.set $19 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $18 + loop $for-loop|02 + local.get $25 + local.get $18 + i32.lt_s + if + local.get $22 + local.get $25 + i32.add + i32.const 255 + local.get $19 + local.get $25 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $17 + i32.const 255 + local.get $17 + i32.lt_u + select + i32.store8 + local.get $25 + i32.const 1 + i32.add + local.set $25 + br $for-loop|02 + end + end + local.get $1 + local.get $24 i32.const 5 - call $~lib/builtins/abort - unreachable + call $~lib/typedarray/SET<~lib/typedarray/Uint8ClampedArray,u8,~lib/typedarray/Int16Array,i16> + local.get $1 + i32.const 10 + i32.const 0 + i32.const 18 + i32.const 8320 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $25 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + local.get $1 + i32.const 8332 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $28 + i32.const 8332 + i32.gt_u + if + local.get $28 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $27 + i32.const 8332 + i32.gt_u + if + local.get $27 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $26 + i32.const 8332 + i32.gt_u + if + local.get $26 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $23 + i32.const 8332 + i32.gt_u + if + local.get $23 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 8332 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $24 + i32.const 8332 + i32.gt_u + if + local.get $24 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $25 + i32.const 8332 + i32.gt_u + if + local.get $25 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + return end - i32.const 0 - i32.const 1312 - i32.const 630 - i32.const 5 - call $~lib/builtins/abort - unreachable end i32.const 0 i32.const 1312 - i32.const 626 - i32.const 5 + i32.const 344 + i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 627 - i32.const 5 + i32.const 415 + i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 415 + i32.const 417 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 417 + i32.const 438 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 438 + i32.const 440 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 440 + i32.const 461 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 461 + i32.const 463 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 463 + i32.const 495 i32.const 3 call $~lib/builtins/abort unreachable end - i32.const 0 - i32.const 1312 - i32.const 495 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 1737 + i32.const 47 call $~lib/builtins/abort unreachable end - i32.const 1376 - i32.const 1440 - i32.const 1737 - i32.const 47 + i32.const 0 + i32.const 1312 + i32.const 323 + i32.const 3 call $~lib/builtins/abort unreachable ) diff --git a/tests/compiler/switch.optimized.wat b/tests/compiler/switch.optimized.wat index 03c10321f8..8289af051f 100644 --- a/tests/compiler/switch.optimized.wat +++ b/tests/compiler/switch.optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_=>_i32 (func (param i32) (result 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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -60,26 +60,6 @@ end i32.const 0 ) - (func $switch/doSwitchBreakCase (param $0 i32) (result i32) - local.get $0 - i32.const 1 - i32.ne - if - i32.const 2 - return - end - i32.const 1 - ) - (func $switch/doSwitchBreakDefault (param $0 i32) (result i32) - local.get $0 - i32.const 1 - i32.eq - if - i32.const 1 - return - end - i32.const 2 - ) (func $start:switch i32.const 0 call $switch/doSwitch @@ -249,150 +229,6 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - call $switch/doSwitchBreakCase - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 51 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - call $switch/doSwitchBreakCase - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 52 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 2 - call $switch/doSwitchBreakCase - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 53 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - call $switch/doSwitchBreakDefault - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 62 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - call $switch/doSwitchBreakDefault - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 63 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 2 - call $switch/doSwitchBreakDefault - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 64 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - call $switch/doSwitchBreakCase - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 73 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - call $switch/doSwitchBreakCase - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 74 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 2 - call $switch/doSwitchBreakCase - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 75 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - call $switch/doSwitchBreakDefault - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 84 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - call $switch/doSwitchBreakDefault - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 85 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 2 - call $switch/doSwitchBreakDefault - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 86 - i32.const 1 - call $~lib/builtins/abort - unreachable - end ) (func $~start call $start:switch diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index bd29c156da..3f087519af 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -1,7 +1,7 @@ (module + (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) @@ -124,16 +124,6 @@ local.get $3 i32.store offset=96 ) - (func $~lib/rt/tlsf/GETRIGHT (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - ) (func $~lib/rt/tlsf/GETHEAD (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $2 @@ -331,7 +321,13 @@ unreachable end local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.tee $6 @@ -363,7 +359,13 @@ local.tee $3 i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add local.tee $5 i32.load local.set $6 @@ -831,18 +833,15 @@ local.tee $1 i32.eqz if + i32.const 16 memory.size - local.tee $3 + local.tee $2 i32.const 16 i32.shl - local.set $1 - local.get $3 i32.const 16 + i32.sub local.get $0 i32.load offset=1568 - local.get $1 - i32.const 16 - i32.sub i32.ne i32.shl i32.const 65551 @@ -851,18 +850,18 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - i32.gt_s local.set $1 - local.get $3 local.get $2 local.get $1 + local.get $2 + local.get $1 + i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -871,7 +870,7 @@ end end local.get $0 - local.get $3 + local.get $2 i32.const 16 i32.shl memory.size @@ -956,9 +955,20 @@ i32.and i32.store local.get $1 - call $~lib/rt/tlsf/GETRIGHT + i32.const 16 + i32.add + local.tee $0 local.get $1 - call $~lib/rt/tlsf/GETRIGHT + 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 @@ -1019,7 +1029,172 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (param $0 i32) + (func $while/testRef + (local $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.set $1 + loop $while-continue|0 + local.get $1 + if + local.get $2 + i32.const 1 + i32.add + local.tee $2 + i32.const 10 + i32.eq + if + i32.const 0 + local.set $0 + local.get $1 + if + local.get $1 + i32.const 1216 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + else + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.set $0 + local.get $1 + i32.const 1216 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $0 + local.set $1 + br $while-continue|0 + end + end + local.get $2 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 1040 + i32.const 151 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + if + i32.const 0 + i32.const 1040 + i32.const 152 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $while/ran + local.get $1 + i32.const 1216 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $while/testRefAutorelease + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.set $0 + loop $while-continue|0 + block $while-break|0 + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $1 + local.get $1 + i32.const 1216 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + if + local.get $2 + i32.const 1 + i32.add + local.tee $2 + i32.const 10 + i32.eq + if + local.get $0 + if + local.get $0 + i32.const 1216 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + i32.const 0 + local.set $0 + br $while-break|0 + end + br $while-continue|0 + end + end + end + local.get $2 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 1040 + i32.const 171 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + if + i32.const 0 + i32.const 1040 + i32.const 172 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $while/ran local.get $0 i32.const 1216 i32.gt_u @@ -1038,22 +1213,22 @@ i32.const 0 global.set $while/ran i32.const 10 - local.set $1 + local.set $0 loop $while-continue|0 - local.get $1 + local.get $0 if - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $1 - local.get $0 + local.set $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|0 end end - local.get $1 + local.get $0 if i32.const 0 i32.const 1040 @@ -1062,7 +1237,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 10 i32.ne if @@ -1091,25 +1266,25 @@ i32.const 0 global.set $while/ran i32.const 1 - local.set $1 + local.set $0 loop $while-continue|00 - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.sub - local.set $1 - local.get $0 + local.set $0 + local.get $1 if (result i32) - local.get $2 + local.get $3 i32.const 1 i32.add - local.tee $2 + local.tee $3 else i32.const 0 end br_if $while-continue|00 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -1120,7 +1295,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 1 i32.ne if @@ -1136,15 +1311,15 @@ i32.const 0 global.set $while/ran loop $while-continue|01 - local.get $3 + local.get $2 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 10 i32.ne br_if $while-continue|01 end - local.get $3 + local.get $2 i32.const 10 i32.ne if @@ -1158,17 +1333,17 @@ i32.const 1 global.set $while/ran i32.const 0 - local.set $3 + local.set $2 loop $while-continue|002 - local.get $3 + local.get $2 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 10 i32.ne br_if $while-continue|002 end - local.get $3 + local.get $2 i32.const 10 i32.ne if @@ -1194,18 +1369,18 @@ i32.const 0 global.set $while/ran i32.const 10 - local.set $3 + local.set $2 loop $while-continue|04 - local.get $3 + local.get $2 if - local.get $3 + local.get $2 i32.const 1 i32.sub - local.set $3 + local.set $2 br $while-continue|04 end end - local.get $3 + local.get $2 if i32.const 0 i32.const 1040 @@ -1219,30 +1394,30 @@ i32.const 0 global.set $while/ran i32.const 10 - local.set $1 - i32.const 10 local.set $0 + i32.const 10 + local.set $1 loop $while-continue|03 - local.get $1 + local.get $0 if loop $while-continue|1 - local.get $0 + local.get $1 if - local.get $0 + local.get $1 i32.const 1 i32.sub - local.set $0 + local.set $1 br $while-continue|1 end end - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|03 end end - local.get $1 + local.get $0 if i32.const 0 i32.const 1040 @@ -1251,7 +1426,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 if i32.const 0 i32.const 1040 @@ -1264,70 +1439,7 @@ global.set $while/ran i32.const 0 global.set $while/ran - i32.const 0 - local.set $3 - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.set $1 - loop $while-continue|02 - local.get $1 - if - local.get $3 - i32.const 1 - i32.add - local.tee $3 - i32.const 10 - i32.eq - if - i32.const 0 - local.set $0 - local.get $1 - if - local.get $1 - call $~lib/rt/pure/__release - end - else - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release - end - local.get $0 - local.set $1 - br $while-continue|02 - end - end - local.get $3 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 151 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - if - i32.const 0 - i32.const 1040 - i32.const 152 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $while/ran - local.get $1 - call $~lib/rt/pure/__release + call $while/testRef global.get $while/ran i32.eqz if @@ -1340,69 +1452,7 @@ end i32.const 0 global.set $while/ran - i32.const 0 - local.set $3 - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.set $1 - loop $while-continue|05 - block $while-break|0 - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $2 - call $~lib/rt/pure/__release - local.get $2 - if - local.get $3 - i32.const 1 - i32.add - local.tee $3 - i32.const 10 - i32.eq - if - local.get $1 - if - local.get $1 - call $~lib/rt/pure/__release - end - i32.const 0 - local.set $1 - br $while-break|0 - end - br $while-continue|05 - end - end - end - local.get $3 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 171 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - if - i32.const 0 - i32.const 1040 - i32.const 172 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $while/ran - local.get $1 - call $~lib/rt/pure/__release + call $while/testRefAutorelease global.get $while/ran i32.eqz if @@ -1416,12 +1466,12 @@ i32.const 0 global.set $while/ran i32.const 0 - local.set $3 + local.set $2 loop $while-continue|06 - local.get $3 + local.get $2 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 1 i32.lt_s br_if $while-continue|06 @@ -1431,12 +1481,12 @@ i32.const 0 global.set $while/ran i32.const 0 - local.set $3 + local.set $2 loop $while-continue|08 - local.get $3 + local.get $2 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 1 i32.lt_s br_if $while-continue|08