diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 27ff361e30..a020fdb775 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -3,7 +3,7 @@ import { BLOCK_MAXSIZE } from "./rt/common"; import { Runtime } from "shared/runtime"; import { COMPARATOR, SORT } from "./util/sort"; -import { REVERSE } from "./util/bytes"; +import { REVERSE, FILL } from "./util/bytes"; import { joinBooleanArray, joinIntegerArray, joinFloatArray, joinStringArray, joinReferenceArray } from "./util/string"; import { idof, isArray as builtin_isArray } from "./builtins"; import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_ILLEGALGENTYPE, E_EMPTYARRAY, E_HOLEYARRAY } from "./util/error"; @@ -154,56 +154,12 @@ export class Array { return value; } - fill(value: T, start: i32 = 0, end: i32 = i32.MAX_VALUE): this { - var ptr = this.dataStart; - var len = this.length_; - start = start < 0 ? max(len + start, 0) : min(start, len); - end = end < 0 ? max(len + end, 0) : min(end, len); + fill(value: T, start: i32 = 0, end: i32 = i32.MAX_VALUE): Array { if (isManaged()) { - for (; start < end; ++start) { - store(ptr + (start << alignof()), changetype(value)); - __link(changetype(this), changetype(value), true); - } - } else if (sizeof() == 1) { - if (start < end) { - memory.fill( - ptr + start, - u8(value), - (end - start) - ); - } + FILL(this.dataStart, this.length_, changetype(value), start, end); + __link(changetype(this), changetype(value), false); } else { - if (ASC_SHRINK_LEVEL <= 1) { - if (isInteger()) { - // @ts-ignore - if (value == 0 | value == -1) { - if (start < end) { - memory.fill( - ptr + (start << alignof()), - u8(value), - (end - start) << alignof() - ); - } - return this; - } - } else if (isFloat()) { - // for floating non-negative zeros we can use fast memory.fill - if ((sizeof() == 4 && reinterpret(f32(value)) == 0) || - (sizeof() == 8 && reinterpret(f64(value)) == 0)) { - if (start < end) { - memory.fill( - ptr + (start << alignof()), - 0, - (end - start) << alignof() - ); - } - return this; - } - } - } - for (; start < end; ++start) { - store(ptr + (start << alignof()), value); - } + FILL(this.dataStart, this.length_, value, start, end); } return this; } @@ -295,7 +251,7 @@ export class Array { return out; } - copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): this { + copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): Array { var ptr = this.dataStart; var len = this.length_; @@ -466,12 +422,12 @@ export class Array { return result; } - reverse(): this { + reverse(): Array { REVERSE(this.dataStart, this.length_); return this; } - sort(comparator: (a: T, b: T) => i32 = COMPARATOR()): this { + sort(comparator: (a: T, b: T) => i32 = COMPARATOR()): Array { SORT(this.dataStart, this.length_, comparator); return this; } diff --git a/std/assembly/staticarray.ts b/std/assembly/staticarray.ts index b8029ea923..6820cbf726 100644 --- a/std/assembly/staticarray.ts +++ b/std/assembly/staticarray.ts @@ -3,7 +3,7 @@ import { OBJECT, BLOCK_MAXSIZE, TOTAL_OVERHEAD } from "./rt/common"; import { Runtime } from "shared/runtime"; import { COMPARATOR, SORT } from "./util/sort"; -import { REVERSE } from "./util/bytes"; +import { REVERSE, FILL } from "./util/bytes"; import { idof } from "./builtins"; import { Array } from "./array"; import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_HOLEYARRAY } from "./util/error"; @@ -141,61 +141,17 @@ export class StaticArray { } } - fill(value: T, start: i32 = 0, end: i32 = i32.MAX_VALUE): this { - var ptr = changetype(this); - var len = this.length; - start = start < 0 ? max(len + start, 0) : min(start, len); - end = end < 0 ? max(len + end, 0) : min(end, len); + fill(value: T, start: i32 = 0, end: i32 = i32.MAX_VALUE): StaticArray { if (isManaged()) { - for (; start < end; ++start) { - store(ptr + (start << alignof()), changetype(value)); - __link(changetype(this), changetype(value), true); - } - } else if (sizeof() == 1) { - if (start < end) { - memory.fill( - ptr + start, - u8(value), - (end - start) - ); - } + FILL(changetype(this), this.length, changetype(value), start, end); + __link(changetype(this), changetype(value), false); } else { - if (ASC_SHRINK_LEVEL <= 1) { - if (isInteger()) { - // @ts-ignore - if (value == 0 | value == -1) { - if (start < end) { - memory.fill( - ptr + (start << alignof()), - u8(value), - (end - start) << alignof() - ); - } - return this; - } - } else if (isFloat()) { - // for floating non-negative zeros we can use fast memory.fill - if ((sizeof() == 4 && reinterpret(f32(value)) == 0) || - (sizeof() == 8 && reinterpret(f64(value)) == 0)) { - if (start < end) { - memory.fill( - ptr + (start << alignof()), - 0, - (end - start) << alignof() - ); - } - return this; - } - } - } - for (; start < end; ++start) { - store(ptr + (start << alignof()), value); - } + FILL(changetype(this), this.length, value, start, end); } return this; } - copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): this { + copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): StaticArray { var ptr = changetype(this); var len = this.length; @@ -386,7 +342,7 @@ export class StaticArray { return false; } - sort(comparator: (a: T, b: T) => i32 = COMPARATOR()): this { + sort(comparator: (a: T, b: T) => i32 = COMPARATOR()): StaticArray { SORT(changetype(this), this.length, comparator); return this; } @@ -403,7 +359,7 @@ export class StaticArray { return unreachable(); } - reverse(): this { + reverse(): StaticArray { REVERSE(changetype(this), this.length); return this; } diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index eae32f5db3..c5a90819f5 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -1,7 +1,7 @@ import { COMPARATOR, SORT } from "./util/sort"; import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_NOTIMPLEMENTED } from "./util/error"; import { joinIntegerArray, joinFloatArray } from "./util/string"; -import { REVERSE } from "./util/bytes"; +import { REVERSE, FILL } from "./util/bytes"; import { idof } from "./builtins"; import { ArrayBufferView } from "./arraybuffer"; @@ -62,7 +62,8 @@ export class Int8Array extends ArrayBufferView { } fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int8Array { - return FILL(this, value, start, end); + FILL(this.dataStart, this.length, u8(value), start, end); + return this; } sort(comparator: (a: i8, b: i8) => i32 = COMPARATOR()): Int8Array { @@ -124,7 +125,7 @@ export class Int8Array extends ArrayBufferView { FOREACH(this, fn); } - reverse(): this { + reverse(): Int8Array { REVERSE(this.dataStart, this.length); return this; } @@ -203,7 +204,8 @@ export class Uint8Array extends ArrayBufferView { } fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8Array { - return FILL(this, value, start, end); + FILL(this.dataStart, this.length, u8(value), start, end); + return this; } sort(comparator: (a: u8, b: u8) => i32 = COMPARATOR()): Uint8Array { @@ -265,7 +267,7 @@ export class Uint8Array extends ArrayBufferView { FOREACH(this, fn); } - reverse(): this { + reverse(): Uint8Array { REVERSE(this.dataStart, this.length); return this; } @@ -343,8 +345,10 @@ export class Uint8ClampedArray extends ArrayBufferView { return LAST_INDEX_OF(this, searchElement, fromIndex); } - fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8ClampedArray { - return FILL(this, value, start, end); + fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8ClampedArray { + value = ~(value >> 31) & (((255 - value) >> 31) | value); + FILL(this.dataStart, this.length, u8(value), start, end); + return this; } sort(comparator: (a: u8, b: u8) => i32 = COMPARATOR()): Uint8ClampedArray { @@ -406,7 +410,7 @@ export class Uint8ClampedArray extends ArrayBufferView { FOREACH(this, fn); } - reverse(): this { + reverse(): Uint8ClampedArray { REVERSE(this.dataStart, this.length); return this; } @@ -485,7 +489,8 @@ export class Int16Array extends ArrayBufferView { } fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int16Array { - return FILL(this, value, start, end); + FILL(this.dataStart, this.length, u16(value), start, end); + return this; } sort(comparator: (a: i16, b: i16) => i32 = COMPARATOR()): Int16Array { @@ -547,7 +552,7 @@ export class Int16Array extends ArrayBufferView { FOREACH(this, fn); } - reverse(): this { + reverse(): Int16Array { REVERSE(this.dataStart, this.length); return this; } @@ -626,7 +631,8 @@ export class Uint16Array extends ArrayBufferView { } fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint16Array { - return FILL(this, value, start, end); + FILL(this.dataStart, this.length, u16(value), start, end); + return this; } sort(comparator: (a: u16, b: u16) => i32 = COMPARATOR()): Uint16Array { @@ -688,7 +694,7 @@ export class Uint16Array extends ArrayBufferView { FOREACH(this, fn); } - reverse(): this { + reverse(): Uint16Array { REVERSE(this.dataStart, this.length); return this; } @@ -767,7 +773,8 @@ export class Int32Array extends ArrayBufferView { } fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int32Array { - return FILL(this, value, start, end); + FILL(this.dataStart, this.length, u32(value), start, end); + return this; } sort(comparator: (a: i32, b: i32) => i32 = COMPARATOR()): Int32Array { @@ -829,7 +836,7 @@ export class Int32Array extends ArrayBufferView { FOREACH(this, fn); } - reverse(): this { + reverse(): Int32Array { REVERSE(this.dataStart, this.length); return this; } @@ -908,7 +915,8 @@ export class Uint32Array extends ArrayBufferView { } fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint32Array { - return FILL(this, value, start, end); + FILL(this.dataStart, this.length, value, start, end); + return this; } sort(comparator: (a: u32, b: u32) => i32 = COMPARATOR()): Uint32Array { @@ -970,7 +978,7 @@ export class Uint32Array extends ArrayBufferView { FOREACH(this, fn); } - reverse(): this { + reverse(): Uint32Array { REVERSE(this.dataStart, this.length); return this; } @@ -1049,7 +1057,8 @@ export class Int64Array extends ArrayBufferView { } fill(value: i64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int64Array { - return FILL(this, value, start, end); + FILL(this.dataStart, this.length, u64(value), start, end); + return this; } sort(comparator: (a: i64, b: i64) => i32 = COMPARATOR()): Int64Array { @@ -1111,7 +1120,7 @@ export class Int64Array extends ArrayBufferView { FOREACH(this, fn); } - reverse(): this { + reverse(): Int64Array { REVERSE(this.dataStart, this.length); return this; } @@ -1190,7 +1199,8 @@ export class Uint64Array extends ArrayBufferView { } fill(value: u64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint64Array { - return FILL(this, value, start, end); + FILL(this.dataStart, this.length, value, start, end); + return this; } sort(comparator: (a: u64, b: u64) => i32 = COMPARATOR()): Uint64Array { @@ -1252,7 +1262,7 @@ export class Uint64Array extends ArrayBufferView { FOREACH(this, fn); } - reverse(): this { + reverse(): Uint64Array { REVERSE(this.dataStart, this.length); return this; } @@ -1331,7 +1341,8 @@ export class Float32Array extends ArrayBufferView { } fill(value: f32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Float32Array { - return FILL(this, value, start, end); + FILL(this.dataStart, this.length, value, start, end); + return this; } sort(comparator: (a: f32, b: f32) => i32 = COMPARATOR()): Float32Array { @@ -1393,7 +1404,7 @@ export class Float32Array extends ArrayBufferView { FOREACH(this, fn); } - reverse(): this { + reverse(): Float32Array { REVERSE(this.dataStart, this.length); return this; } @@ -1472,7 +1483,8 @@ export class Float64Array extends ArrayBufferView { } fill(value: f64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Float64Array { - return FILL(this, value, start, end); + FILL(this.dataStart, this.length, value, start, end); + return this; } sort(comparator: (a: f64, b: f64) => i32 = COMPARATOR()): Float64Array { @@ -1534,7 +1546,7 @@ export class Float64Array extends ArrayBufferView { FOREACH(this, fn); } - reverse(): this { + reverse(): Float64Array { REVERSE(this.dataStart, this.length); return this; } @@ -1556,56 +1568,6 @@ export class Float64Array extends ArrayBufferView { } } -// @ts-ignore: decorator -@inline -function FILL( - array: TArray, - value: native, - start: i32, - end: i32 -): TArray { - var ptr = array.dataStart; - var len = array.length; - start = start < 0 ? max(len + start, 0) : min(start, len); - end = end < 0 ? max(len + end, 0) : min(end, len); - if (sizeof() == 1) { - if (start < end) memory.fill(ptr + start, value, (end - start)); - } else { - if (ASC_SHRINK_LEVEL <= 1) { - if (isInteger()) { - // @ts-ignore - if (value == 0 | value == -1) { - if (start < end) { - memory.fill( - ptr + (start << alignof()), - u8(value), - (end - start) << alignof() - ); - } - return array; - } - } else if (isFloat()) { - // for floating non-negative zeros we can use fast memory.fill - if ((sizeof() == 4 && reinterpret(f32(value)) == 0) || - (sizeof() == 8 && reinterpret(f64(value)) == 0)) { - if (start < end) { - memory.fill( - ptr + (start << alignof()), - 0, - (end - start) << alignof() - ); - } - return array; - } - } - } - for (; start < end; ++start) { - store(ptr + (start << alignof()), value); - } - } - return array; -} - // @ts-ignore: decorator @inline function SLICE( diff --git a/std/assembly/util/bytes.ts b/std/assembly/util/bytes.ts index 1d4752786f..016672149a 100644 --- a/std/assembly/util/bytes.ts +++ b/std/assembly/util/bytes.ts @@ -52,3 +52,56 @@ export function REVERSE(ptr: usize, len: usize): void { } } } + +export function FILL( + ptr: usize, + len: usize, + value: T, + start: isize, + end: isize +): void { + start = start < 0 ? max(len + start, 0) : min(start, len); + end = end < 0 ? max(len + end, 0) : min(end, len); + + if (sizeof() == 1) { + if (start < end) { + memory.fill( + ptr + start, + u8(value), + (end - start) + ); + } + } else { + if (ASC_SHRINK_LEVEL <= 1) { + if (isInteger()) { + // @ts-ignore + if (value == 0 | value == -1) { + if (start < end) { + memory.fill( + ptr + (start << alignof()), + u8(value), + (end - start) << alignof() + ); + } + return; + } + } else if (isFloat()) { + // for floating non-negative zeros we can use fast memory.fill + if ((sizeof() == 4 && reinterpret(f32(value)) == 0) || + (sizeof() == 8 && reinterpret(f64(value)) == 0)) { + if (start < end) { + memory.fill( + ptr + (start << alignof()), + 0, + (end - start) << alignof() + ); + } + return; + } + } + } + for (; start < end; ++start) { + store(ptr + (start << alignof()), value); + } + } +} diff --git a/tests/compiler/bindings/esm.debug.wat b/tests/compiler/bindings/esm.debug.wat index 6452a6ab74..56988bda2a 100644 --- a/tests/compiler/bindings/esm.debug.wat +++ b/tests/compiler/bindings/esm.debug.wat @@ -2348,7 +2348,7 @@ if i32.const 528 i32.const 768 - i32.const 448 + i32.const 452 i32.const 64 call $~lib/builtins/abort unreachable @@ -2371,7 +2371,7 @@ if i32.const 528 i32.const 768 - i32.const 1164 + i32.const 1173 i32.const 64 call $~lib/builtins/abort unreachable @@ -2395,7 +2395,7 @@ if i32.const 528 i32.const 768 - i32.const 1294 + i32.const 1304 i32.const 64 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/bindings/esm.release.wat b/tests/compiler/bindings/esm.release.wat index d46f201b4b..26b9adac80 100644 --- a/tests/compiler/bindings/esm.release.wat +++ b/tests/compiler/bindings/esm.release.wat @@ -1701,7 +1701,7 @@ if i32.const 1552 i32.const 1792 - i32.const 1164 + i32.const 1173 i32.const 64 call $~lib/builtins/abort unreachable @@ -2678,7 +2678,7 @@ if i32.const 1552 i32.const 1792 - i32.const 448 + i32.const 452 i32.const 64 call $~lib/builtins/abort unreachable @@ -2726,7 +2726,7 @@ if i32.const 1552 i32.const 1792 - i32.const 1294 + i32.const 1304 i32.const 64 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/bindings/raw.debug.wat b/tests/compiler/bindings/raw.debug.wat index e846c0e2db..7c23f4afbb 100644 --- a/tests/compiler/bindings/raw.debug.wat +++ b/tests/compiler/bindings/raw.debug.wat @@ -2351,7 +2351,7 @@ if i32.const 528 i32.const 768 - i32.const 448 + i32.const 452 i32.const 64 call $~lib/builtins/abort unreachable @@ -2374,7 +2374,7 @@ if i32.const 528 i32.const 768 - i32.const 1164 + i32.const 1173 i32.const 64 call $~lib/builtins/abort unreachable @@ -2398,7 +2398,7 @@ if i32.const 528 i32.const 768 - i32.const 1294 + i32.const 1304 i32.const 64 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/bindings/raw.release.wat b/tests/compiler/bindings/raw.release.wat index 92ff37695f..4dbc23bff9 100644 --- a/tests/compiler/bindings/raw.release.wat +++ b/tests/compiler/bindings/raw.release.wat @@ -1701,7 +1701,7 @@ if i32.const 1552 i32.const 1792 - i32.const 1164 + i32.const 1173 i32.const 64 call $~lib/builtins/abort unreachable @@ -2678,7 +2678,7 @@ if i32.const 1552 i32.const 1792 - i32.const 448 + i32.const 452 i32.const 64 call $~lib/builtins/abort unreachable @@ -2726,7 +2726,7 @@ if i32.const 1552 i32.const 1792 - i32.const 1294 + i32.const 1304 i32.const 64 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/resolve-elementaccess.debug.wat b/tests/compiler/resolve-elementaccess.debug.wat index 7f06fe5d04..3648f91ad1 100644 --- a/tests/compiler/resolve-elementaccess.debug.wat +++ b/tests/compiler/resolve-elementaccess.debug.wat @@ -2254,7 +2254,7 @@ if i32.const 336 i32.const 544 - i32.const 1305 + i32.const 1315 i32.const 64 call $~lib/builtins/abort unreachable @@ -2278,7 +2278,7 @@ if i32.const 336 i32.const 544 - i32.const 1294 + i32.const 1304 i32.const 64 call $~lib/builtins/abort unreachable @@ -3905,7 +3905,7 @@ if i32.const 336 i32.const 544 - i32.const 177 + i32.const 178 i32.const 45 call $~lib/builtins/abort unreachable @@ -3925,7 +3925,7 @@ if i32.const 336 i32.const 544 - i32.const 166 + i32.const 167 i32.const 45 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/resolve-elementaccess.release.wat b/tests/compiler/resolve-elementaccess.release.wat index 42b1535f70..0cb924d1b7 100644 --- a/tests/compiler/resolve-elementaccess.release.wat +++ b/tests/compiler/resolve-elementaccess.release.wat @@ -1582,7 +1582,7 @@ if i32.const 1360 i32.const 1568 - i32.const 1305 + i32.const 1315 i32.const 64 call $~lib/builtins/abort unreachable @@ -1606,7 +1606,7 @@ if i32.const 1360 i32.const 1568 - i32.const 1294 + i32.const 1304 i32.const 64 call $~lib/builtins/abort unreachable @@ -2970,7 +2970,7 @@ if i32.const 1360 i32.const 1568 - i32.const 177 + i32.const 178 i32.const 45 call $~lib/builtins/abort unreachable @@ -2990,7 +2990,7 @@ if i32.const 1360 i32.const 1568 - i32.const 166 + i32.const 167 i32.const 45 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std-wasi/crypto.debug.wat b/tests/compiler/std-wasi/crypto.debug.wat index d19ce0b32a..5d310e4418 100644 --- a/tests/compiler/std-wasi/crypto.debug.wat +++ b/tests/compiler/std-wasi/crypto.debug.wat @@ -4420,7 +4420,7 @@ if i32.const 448 i32.const 656 - i32.const 166 + i32.const 167 i32.const 45 call $~lib/wasi/index/abort unreachable @@ -4920,7 +4920,7 @@ if i32.const 448 i32.const 656 - i32.const 1898 + i32.const 1860 i32.const 5 call $~lib/wasi/index/abort unreachable @@ -4939,7 +4939,7 @@ if i32.const 144 i32.const 656 - i32.const 1903 + i32.const 1865 i32.const 9 call $~lib/wasi/index/abort unreachable @@ -4951,7 +4951,7 @@ else i32.const 144 i32.const 656 - i32.const 1907 + i32.const 1869 i32.const 7 call $~lib/wasi/index/abort unreachable @@ -4969,7 +4969,7 @@ if i32.const 144 i32.const 656 - i32.const 1912 + i32.const 1874 i32.const 7 call $~lib/wasi/index/abort unreachable diff --git a/tests/compiler/std-wasi/crypto.release.wat b/tests/compiler/std-wasi/crypto.release.wat index 752aa3c76f..65bd1f9059 100644 --- a/tests/compiler/std-wasi/crypto.release.wat +++ b/tests/compiler/std-wasi/crypto.release.wat @@ -3303,7 +3303,7 @@ if i32.const 1472 i32.const 1680 - i32.const 166 + i32.const 167 i32.const 45 call $~lib/wasi/index/abort unreachable @@ -3704,7 +3704,7 @@ if i32.const 1472 i32.const 1680 - i32.const 1898 + i32.const 1860 i32.const 5 call $~lib/wasi/index/abort unreachable @@ -3723,7 +3723,7 @@ else i32.const 1168 i32.const 1680 - i32.const 1907 + i32.const 1869 i32.const 7 call $~lib/wasi/index/abort unreachable @@ -3738,7 +3738,7 @@ if i32.const 1168 i32.const 1680 - i32.const 1912 + i32.const 1874 i32.const 7 call $~lib/wasi/index/abort unreachable diff --git a/tests/compiler/std/array.debug.wat b/tests/compiler/std/array.debug.wat index a925fa103f..7ad6c5c890 100644 --- a/tests/compiler/std/array.debug.wat +++ b/tests/compiler/std/array.debug.wat @@ -5,9 +5,9 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) + (type $i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32))) (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) - (type $i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32))) (type $i32_i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32 i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) @@ -23,6 +23,7 @@ (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $none_=>_i32 (func (result i32))) + (type $i32_i32_f32_i32_i32_=>_none (func (param i32 i32 f32 i32 i32))) (type $i32_f32_i32_i32_=>_i32 (func (param i32 f32 i32 i32) (result i32))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i64_=>_none (func (param i64))) @@ -2639,86 +2640,88 @@ end local.get $3 ) - (func $~lib/array/Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) + (func $~lib/util/bytes/FILL (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - local.get $0 - i32.load offset=4 - local.set $4 - local.get $0 - i32.load offset=12 - local.set $5 - local.get $2 + local.get $3 i32.const 0 i32.lt_s if (result i32) - local.get $5 - local.get $2 + local.get $1 + local.get $3 i32.add - local.tee $6 + local.tee $5 i32.const 0 - local.tee $7 + local.tee $6 + local.get $5 local.get $6 - local.get $7 - i32.gt_s + i32.gt_u select else - local.get $2 - local.tee $7 - local.get $5 + local.get $3 local.tee $6 - local.get $7 + local.get $1 + local.tee $5 local.get $6 + local.get $5 i32.lt_s select end - local.set $2 - local.get $3 + local.set $3 + local.get $4 i32.const 0 i32.lt_s if (result i32) - local.get $5 - local.get $3 + local.get $1 + local.get $4 i32.add - local.tee $6 + local.tee $5 i32.const 0 - local.tee $7 + local.tee $6 + local.get $5 local.get $6 - local.get $7 - i32.gt_s + i32.gt_u select else - local.get $3 - local.tee $7 - local.get $5 + local.get $4 local.tee $6 - local.get $7 + local.get $1 + local.tee $5 local.get $6 + local.get $5 i32.lt_s select end - local.set $3 - i32.const 0 - drop + local.set $4 i32.const 1 i32.const 1 i32.eq drop - local.get $2 local.get $3 + local.get $4 i32.lt_s if - local.get $4 - local.get $2 - i32.add - local.get $1 + local.get $0 local.get $3 + i32.add local.get $2 + local.get $4 + local.get $3 i32.sub memory.fill end + ) + (func $~lib/array/Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + i32.const 0 + drop + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=12 + local.get $1 + local.get $2 + local.get $3 + call $~lib/util/bytes/FILL local.get $0 ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) @@ -2807,69 +2810,59 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) + (func $~lib/util/bytes/FILL (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - local.get $0 - i32.load offset=4 - local.set $4 - local.get $0 - i32.load offset=12 - local.set $5 - local.get $2 + local.get $3 i32.const 0 i32.lt_s if (result i32) - local.get $5 - local.get $2 + local.get $1 + local.get $3 i32.add - local.tee $6 + local.tee $5 i32.const 0 - local.tee $7 + local.tee $6 + local.get $5 local.get $6 - local.get $7 - i32.gt_s + i32.gt_u select else - local.get $2 - local.tee $7 - local.get $5 + local.get $3 local.tee $6 - local.get $7 + local.get $1 + local.tee $5 local.get $6 + local.get $5 i32.lt_s select end - local.set $2 - local.get $3 + local.set $3 + local.get $4 i32.const 0 i32.lt_s if (result i32) - local.get $5 - local.get $3 + local.get $1 + local.get $4 i32.add - local.tee $6 + local.tee $5 i32.const 0 - local.tee $7 + local.tee $6 + local.get $5 local.get $6 - local.get $7 - i32.gt_s + i32.gt_u select else - local.get $3 - local.tee $7 - local.get $5 + local.get $4 local.tee $6 - local.get $7 + local.get $1 + local.tee $5 local.get $6 + local.get $5 i32.lt_s select end - local.set $3 - i32.const 0 - drop + local.set $4 i32.const 4 i32.const 1 i32.eq @@ -2880,55 +2873,66 @@ drop i32.const 1 drop - local.get $1 + local.get $2 i32.const 0 i32.eq - local.get $1 + local.get $2 i32.const -1 i32.eq i32.or if - local.get $2 local.get $3 + local.get $4 i32.lt_s if - local.get $4 - local.get $2 + local.get $0 + local.get $3 i32.const 2 i32.shl i32.add - local.get $1 - local.get $3 local.get $2 + local.get $4 + local.get $3 i32.sub i32.const 2 i32.shl memory.fill end - local.get $0 return end loop $for-loop|0 - local.get $2 local.get $3 + local.get $4 i32.lt_s - local.set $7 - local.get $7 + local.set $6 + local.get $6 if - local.get $4 - local.get $2 + local.get $0 + local.get $3 i32.const 2 i32.shl i32.add - local.get $1 - i32.store local.get $2 + i32.store + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end + ) + (func $~lib/array/Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + i32.const 0 + drop + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=12 + local.get $1 + local.get $2 + local.get $3 + call $~lib/util/bytes/FILL local.get $0 ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) @@ -3017,69 +3021,59 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (param $0 i32) (param $1 f32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) + (func $~lib/util/bytes/FILL (param $0 i32) (param $1 i32) (param $2 f32) (param $3 i32) (param $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - local.get $0 - i32.load offset=4 - local.set $4 - local.get $0 - i32.load offset=12 - local.set $5 - local.get $2 + local.get $3 i32.const 0 i32.lt_s if (result i32) - local.get $5 - local.get $2 + local.get $1 + local.get $3 i32.add - local.tee $6 + local.tee $5 i32.const 0 - local.tee $7 + local.tee $6 + local.get $5 local.get $6 - local.get $7 - i32.gt_s + i32.gt_u select else - local.get $2 - local.tee $7 - local.get $5 + local.get $3 local.tee $6 - local.get $7 + local.get $1 + local.tee $5 local.get $6 + local.get $5 i32.lt_s select end - local.set $2 - local.get $3 + local.set $3 + local.get $4 i32.const 0 i32.lt_s if (result i32) - local.get $5 - local.get $3 + local.get $1 + local.get $4 i32.add - local.tee $6 + local.tee $5 i32.const 0 - local.tee $7 + local.tee $6 + local.get $5 local.get $6 - local.get $7 - i32.gt_s + i32.gt_u select else - local.get $3 - local.tee $7 - local.get $5 + local.get $4 local.tee $6 - local.get $7 + local.get $1 + local.tee $5 local.get $6 + local.get $5 i32.lt_s select end - local.set $3 - i32.const 0 - drop + local.set $4 i32.const 4 i32.const 1 i32.eq @@ -3092,7 +3086,7 @@ drop i32.const 1 drop - local.get $1 + local.get $2 i32.reinterpret_f32 i32.const 0 i32.eq @@ -3104,47 +3098,58 @@ i32.eq end if - local.get $2 local.get $3 + local.get $4 i32.lt_s if - local.get $4 - local.get $2 + local.get $0 + local.get $3 i32.const 2 i32.shl i32.add i32.const 0 + local.get $4 local.get $3 - local.get $2 i32.sub i32.const 2 i32.shl memory.fill end - local.get $0 return end loop $for-loop|0 - local.get $2 local.get $3 + local.get $4 i32.lt_s - local.set $7 - local.get $7 + local.set $6 + local.get $6 if - local.get $4 - local.get $2 + local.get $0 + local.get $3 i32.const 2 i32.shl i32.add - local.get $1 - f32.store local.get $2 + f32.store + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end + ) + (func $~lib/array/Array#fill (param $0 i32) (param $1 f32) (param $2 i32) (param $3 i32) (result i32) + i32.const 0 + drop + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=12 + local.get $1 + local.get $2 + local.get $3 + call $~lib/util/bytes/FILL local.get $0 ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) @@ -3501,7 +3506,7 @@ if i32.const 1616 i32.const 80 - i32.const 319 + i32.const 275 i32.const 18 call $~lib/builtins/abort unreachable @@ -3829,7 +3834,7 @@ if i32.const 1616 i32.const 80 - i32.const 378 + i32.const 334 i32.const 18 call $~lib/builtins/abort unreachable @@ -32246,7 +32251,7 @@ if i32.const 32 i32.const 80 - i32.const 272 + i32.const 228 i32.const 60 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/array.release.wat b/tests/compiler/std/array.release.wat index 02a578b075..161da1ab52 100644 --- a/tests/compiler/std/array.release.wat +++ b/tests/compiler/std/array.release.wat @@ -2214,99 +2214,85 @@ ) (func $~lib/array/Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) + (local $5 i32) local.get $0 i32.load offset=4 - local.set $4 + local.set $5 local.get $0 i32.load offset=12 - local.set $0 + local.tee $4 + local.get $2 + i32.add + local.get $2 + local.get $4 + local.get $2 + local.get $4 + i32.lt_s + select local.get $2 i32.const 0 i32.lt_s - if (result i32) - local.get $0 - local.get $2 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - else - local.get $2 - local.get $0 - local.get $0 - local.get $2 - i32.gt_s - select - end - local.set $2 + select + local.set $0 + local.get $3 + local.get $4 + i32.add + local.get $3 + local.get $4 + local.get $3 + local.get $4 + i32.lt_s + select local.get $3 i32.const 0 i32.lt_s - if (result i32) - local.get $0 - local.get $3 - i32.add - local.tee $0 - i32.const 0 - local.get $0 - i32.const 0 - i32.gt_s - select - else - local.get $3 - local.get $0 - local.get $0 - local.get $3 - i32.gt_s - select - end - local.set $0 - local.get $1 - i32.eqz - local.get $1 - i32.const -1 - i32.eq - i32.or - if - local.get $0 - local.get $2 - i32.gt_s + select + local.set $2 + block $__inlined_func$~lib/util/bytes/FILL + local.get $1 + i32.eqz + local.get $1 + i32.const -1 + i32.eq + i32.or if - local.get $4 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $1 local.get $0 local.get $2 - i32.sub - i32.const 2 - i32.shl - memory.fill + i32.lt_s + if + local.get $5 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $1 + local.get $2 + local.get $0 + i32.sub + i32.const 2 + i32.shl + memory.fill + end + br $__inlined_func$~lib/util/bytes/FILL end - return - end - loop $for-loop|0 - local.get $0 - local.get $2 - i32.gt_s - if - local.get $4 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $1 - i32.store + loop $for-loop|0 + local.get $0 local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + i32.lt_s + if + local.get $5 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end end end ) @@ -2378,96 +2364,82 @@ ) (func $~lib/array/Array#fill (param $0 i32) (param $1 f32) (param $2 i32) (param $3 i32) (local $4 i32) + (local $5 i32) local.get $0 i32.load offset=4 - local.set $4 + local.set $5 local.get $0 i32.load offset=12 - local.set $0 + local.tee $4 + local.get $2 + i32.add + local.get $2 + local.get $4 + local.get $2 + local.get $4 + i32.lt_s + select local.get $2 i32.const 0 i32.lt_s - if (result i32) - local.get $0 - local.get $2 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - else - local.get $2 - local.get $0 - local.get $0 - local.get $2 - i32.gt_s - select - end - local.set $2 + select + local.set $0 + local.get $3 + local.get $4 + i32.add + local.get $3 + local.get $4 + local.get $3 + local.get $4 + i32.lt_s + select local.get $3 i32.const 0 i32.lt_s - if (result i32) - local.get $0 - local.get $3 - i32.add - local.tee $0 - i32.const 0 - local.get $0 - i32.const 0 - i32.gt_s - select - else - local.get $3 - local.get $0 - local.get $0 - local.get $3 - i32.gt_s - select - end - local.set $0 - local.get $1 - i32.reinterpret_f32 - i32.eqz - if - local.get $0 - local.get $2 - i32.gt_s + select + local.set $2 + block $__inlined_func$~lib/util/bytes/FILL + local.get $1 + i32.reinterpret_f32 + i32.eqz if - local.get $4 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.const 0 local.get $0 local.get $2 - i32.sub - i32.const 2 - i32.shl - memory.fill + i32.lt_s + if + local.get $5 + local.get $0 + i32.const 2 + i32.shl + i32.add + i32.const 0 + local.get $2 + local.get $0 + i32.sub + i32.const 2 + i32.shl + memory.fill + end + br $__inlined_func$~lib/util/bytes/FILL end - return - end - loop $for-loop|0 - local.get $0 - local.get $2 - i32.gt_s - if - local.get $4 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $1 - f32.store + loop $for-loop|0 + local.get $0 local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + i32.lt_s + if + local.get $5 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $1 + f32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end end end ) @@ -2746,7 +2718,7 @@ if i32.const 2640 i32.const 1104 - i32.const 319 + i32.const 275 i32.const 18 call $~lib/builtins/abort unreachable @@ -13377,12 +13349,6 @@ i32.const 3 i32.sub local.tee $9 - i32.const 0 - local.get $9 - i32.const 0 - i32.gt_s - select - local.tee $9 i32.lt_s if local.get $8 @@ -13423,15 +13389,10 @@ local.tee $9 i32.const 2 i32.sub - local.tee $10 - i32.const 0 + local.set $10 + local.get $9 local.get $10 - i32.const 0 i32.gt_s - select - local.tee $10 - local.get $9 - i32.lt_s if local.get $8 local.get $10 @@ -15393,7 +15354,7 @@ if i32.const 2640 i32.const 1104 - i32.const 378 + i32.const 334 i32.const 18 call $~lib/builtins/abort unreachable @@ -27271,7 +27232,7 @@ if i32.const 1056 i32.const 1104 - i32.const 272 + i32.const 228 i32.const 60 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/dataview.debug.wat b/tests/compiler/std/dataview.debug.wat index 2117355056..28ef36db72 100644 --- a/tests/compiler/std/dataview.debug.wat +++ b/tests/compiler/std/dataview.debug.wat @@ -2223,7 +2223,7 @@ if i32.const 336 i32.const 544 - i32.const 177 + i32.const 178 i32.const 45 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/dataview.release.wat b/tests/compiler/std/dataview.release.wat index 44177e1cae..98f533fd5b 100644 --- a/tests/compiler/std/dataview.release.wat +++ b/tests/compiler/std/dataview.release.wat @@ -1524,7 +1524,7 @@ if i32.const 1360 i32.const 1568 - i32.const 177 + i32.const 178 i32.const 45 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/staticarray.debug.wat b/tests/compiler/std/staticarray.debug.wat index 78be5d76e9..a1d25ce99a 100644 --- a/tests/compiler/std/staticarray.debug.wat +++ b/tests/compiler/std/staticarray.debug.wat @@ -10,9 +10,9 @@ (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))) + (type $i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) - (type $i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32))) (type $i32_i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (global $std/staticarray/arr1 i32 (i32.const 32)) @@ -2908,68 +2908,59 @@ call $~lib/util/string/joinStringArray return ) - (func $~lib/staticarray/StaticArray#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) + (func $~lib/util/bytes/FILL (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - local.get $0 - local.set $4 - local.get $0 - call $~lib/staticarray/StaticArray#get:length - local.set $5 - local.get $2 + local.get $3 i32.const 0 i32.lt_s if (result i32) - local.get $5 - local.get $2 + local.get $1 + local.get $3 i32.add - local.tee $6 + local.tee $5 i32.const 0 - local.tee $7 + local.tee $6 + local.get $5 local.get $6 - local.get $7 - i32.gt_s + i32.gt_u select else - local.get $2 - local.tee $7 - local.get $5 + local.get $3 local.tee $6 - local.get $7 + local.get $1 + local.tee $5 local.get $6 + local.get $5 i32.lt_s select end - local.set $2 - local.get $3 + local.set $3 + local.get $4 i32.const 0 i32.lt_s if (result i32) - local.get $5 - local.get $3 + local.get $1 + local.get $4 i32.add - local.tee $6 + local.tee $5 i32.const 0 - local.tee $7 + local.tee $6 + local.get $5 local.get $6 - local.get $7 - i32.gt_s + i32.gt_u select else - local.get $3 - local.tee $7 - local.get $5 + local.get $4 local.tee $6 - local.get $7 + local.get $1 + local.tee $5 local.get $6 + local.get $5 i32.lt_s select end - local.set $3 - i32.const 0 - drop + local.set $4 i32.const 4 i32.const 1 i32.eq @@ -2980,55 +2971,65 @@ drop i32.const 1 drop - local.get $1 + local.get $2 i32.const 0 i32.eq - local.get $1 + local.get $2 i32.const -1 i32.eq i32.or if - local.get $2 local.get $3 + local.get $4 i32.lt_s if - local.get $4 - local.get $2 + local.get $0 + local.get $3 i32.const 2 i32.shl i32.add - local.get $1 - local.get $3 local.get $2 + local.get $4 + local.get $3 i32.sub i32.const 2 i32.shl memory.fill end - local.get $0 return end loop $for-loop|0 - local.get $2 local.get $3 + local.get $4 i32.lt_s - local.set $7 - local.get $7 + local.set $6 + local.get $6 if - local.get $4 - local.get $2 + local.get $0 + local.get $3 i32.const 2 i32.shl i32.add - local.get $1 - i32.store local.get $2 + i32.store + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end + ) + (func $~lib/staticarray/StaticArray#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + i32.const 0 + drop + local.get $0 + local.get $0 + call $~lib/staticarray/StaticArray#get:length + local.get $1 + local.get $2 + local.get $3 + call $~lib/util/bytes/FILL local.get $0 ) (func $~lib/util/bytes/REVERSE (param $0 i32) (param $1 i32) @@ -7722,7 +7723,7 @@ if i32.const 656 i32.const 128 - i32.const 261 + i32.const 217 i32.const 60 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/staticarray.release.wat b/tests/compiler/std/staticarray.release.wat index 4923e6b180..3b7f3a0f7f 100644 --- a/tests/compiler/std/staticarray.release.wat +++ b/tests/compiler/std/staticarray.release.wat @@ -5120,7 +5120,7 @@ local.tee $0 local.get $0 i32.const 3 - i32.gt_u + i32.gt_s select local.tee $2 i32.const 2 @@ -6749,7 +6749,7 @@ if i32.const 1680 i32.const 1152 - i32.const 261 + i32.const 217 i32.const 60 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/typedarray.debug.wat b/tests/compiler/std/typedarray.debug.wat index 103567e5ee..8e417660d5 100644 --- a/tests/compiler/std/typedarray.debug.wat +++ b/tests/compiler/std/typedarray.debug.wat @@ -10,9 +10,9 @@ (type $i64_i64_=>_i32 (func (param i64 i64) (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_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) - (type $i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32))) (type $i32_i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32 i32))) (type $i32_=>_none (func (param i32))) (type $i64_i64_i32_i32_=>_i64 (func (param i64 i64 i32 i32) (result i64))) @@ -3192,7 +3192,7 @@ if i32.const 336 i32.const 608 - i32.const 741 + i32.const 747 i32.const 64 call $~lib/builtins/abort unreachable @@ -3216,7 +3216,7 @@ if i32.const 336 i32.const 608 - i32.const 730 + i32.const 736 i32.const 64 call $~lib/builtins/abort unreachable @@ -3239,7 +3239,7 @@ if i32.const 336 i32.const 608 - i32.const 1446 + i32.const 1457 i32.const 64 call $~lib/builtins/abort unreachable @@ -4258,7 +4258,7 @@ if i32.const 336 i32.const 608 - i32.const 1435 + i32.const 1446 i32.const 64 call $~lib/builtins/abort unreachable @@ -4279,7 +4279,7 @@ if i32.const 336 i32.const 608 - i32.const 318 + i32.const 320 i32.const 45 call $~lib/builtins/abort unreachable @@ -4311,7 +4311,7 @@ if i32.const 336 i32.const 608 - i32.const 307 + i32.const 309 i32.const 45 call $~lib/builtins/abort unreachable @@ -4342,75 +4342,55 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Int8Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) + (func $~lib/util/bytes/FILL (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $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 - local.set $7 - local.get $1 - local.set $6 - local.get $2 - local.set $5 local.get $3 - local.set $4 - local.get $7 - i32.load offset=4 - local.set $8 - local.get $7 - call $~lib/typedarray/Int8Array#get:length - local.set $9 - local.get $5 i32.const 0 i32.lt_s if (result i32) - local.get $9 - local.get $5 + local.get $1 + local.get $3 i32.add - local.tee $10 + local.tee $5 i32.const 0 - local.tee $11 - local.get $10 - local.get $11 - i32.gt_s + local.tee $6 + local.get $5 + local.get $6 + i32.gt_u select else + local.get $3 + local.tee $6 + local.get $1 + local.tee $5 + local.get $6 local.get $5 - local.tee $11 - local.get $9 - local.tee $10 - local.get $11 - local.get $10 i32.lt_s select end - local.set $5 + local.set $3 local.get $4 i32.const 0 i32.lt_s if (result i32) - local.get $9 + local.get $1 local.get $4 i32.add - local.tee $10 + local.tee $5 i32.const 0 - local.tee $11 - local.get $10 - local.get $11 - i32.gt_s + local.tee $6 + local.get $5 + local.get $6 + i32.gt_u select else local.get $4 - local.tee $11 - local.get $9 - local.tee $10 - local.get $11 - local.get $10 + local.tee $6 + local.get $1 + local.tee $5 + local.get $6 + local.get $5 i32.lt_s select end @@ -4419,20 +4399,30 @@ i32.const 1 i32.eq drop - local.get $5 + local.get $3 local.get $4 i32.lt_s if - local.get $8 - local.get $5 + local.get $0 + local.get $3 i32.add - local.get $6 + local.get $2 local.get $4 - local.get $5 + local.get $3 i32.sub memory.fill end - local.get $7 + ) + (func $~lib/typedarray/Int8Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + call $~lib/typedarray/Int8Array#get:length + local.get $1 + local.get $2 + local.get $3 + call $~lib/util/bytes/FILL + local.get $0 ) (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -4543,142 +4533,129 @@ end i32.const 1 ) - (func $~lib/typedarray/Int32Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) + (func $~lib/util/bytes/FILL (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - block $~lib/typedarray/FILL<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) - local.get $0 - local.set $7 + local.get $3 + i32.const 0 + i32.lt_s + if (result i32) local.get $1 - local.set $6 - local.get $2 - local.set $5 local.get $3 - local.set $4 - local.get $7 - i32.load offset=4 - local.set $8 - local.get $7 - call $~lib/typedarray/Int32Array#get:length - local.set $9 - local.get $5 + i32.add + local.tee $5 i32.const 0 + local.tee $6 + local.get $5 + local.get $6 + i32.gt_u + select + else + local.get $3 + local.tee $6 + local.get $1 + local.tee $5 + local.get $6 + local.get $5 i32.lt_s - if (result i32) - local.get $9 - local.get $5 - i32.add - local.tee $10 - i32.const 0 - local.tee $11 - local.get $10 - local.get $11 - i32.gt_s - select - else - local.get $5 - local.tee $11 - local.get $9 - local.tee $10 - local.get $11 - local.get $10 - i32.lt_s - select - end - local.set $5 + select + end + local.set $3 + local.get $4 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 local.get $4 + i32.add + local.tee $5 i32.const 0 + local.tee $6 + local.get $5 + local.get $6 + i32.gt_u + select + else + local.get $4 + local.tee $6 + local.get $1 + local.tee $5 + local.get $6 + local.get $5 i32.lt_s - if (result i32) - local.get $9 - local.get $4 + select + end + local.set $4 + i32.const 4 + i32.const 1 + i32.eq + drop + i32.const 0 + i32.const 1 + i32.le_s + drop + i32.const 1 + drop + local.get $2 + i32.const 0 + i32.eq + local.get $2 + i32.const -1 + i32.eq + i32.or + if + local.get $3 + local.get $4 + i32.lt_s + if + local.get $0 + local.get $3 + i32.const 2 + i32.shl i32.add - local.tee $10 - i32.const 0 - local.tee $11 - local.get $10 - local.get $11 - i32.gt_s - select - else + local.get $2 local.get $4 - local.tee $11 - local.get $9 - local.tee $10 - local.get $11 - local.get $10 - i32.lt_s - select + local.get $3 + i32.sub + i32.const 2 + i32.shl + memory.fill end - local.set $4 - i32.const 4 - i32.const 1 - i32.eq - drop - i32.const 0 - i32.const 1 - i32.le_s - drop - i32.const 1 - drop - local.get $6 - i32.const 0 - i32.eq + return + end + loop $for-loop|0 + local.get $3 + local.get $4 + i32.lt_s + local.set $6 local.get $6 - i32.const -1 - i32.eq - i32.or if - local.get $5 - local.get $4 - i32.lt_s - if - local.get $8 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - local.get $4 - local.get $5 - i32.sub - i32.const 2 - i32.shl - memory.fill - end - local.get $7 - br $~lib/typedarray/FILL<~lib/typedarray/Int32Array,i32>|inlined.0 - end - loop $for-loop|0 - local.get $5 - local.get $4 - i32.lt_s - local.set $11 - local.get $11 - if - local.get $8 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - local.get $7 end ) + (func $~lib/typedarray/Int32Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + call $~lib/typedarray/Int32Array#get:length + local.get $1 + local.get $2 + local.get $3 + call $~lib/util/bytes/FILL + local.get $0 + ) (func $~lib/array/Array#get:length (param $0 i32) (result i32) local.get $0 i32.load offset=12 @@ -4959,7 +4936,7 @@ if i32.const 336 i32.const 608 - i32.const 177 + i32.const 178 i32.const 45 call $~lib/builtins/abort unreachable @@ -5097,7 +5074,7 @@ if i32.const 336 i32.const 608 - i32.const 459 + i32.const 463 i32.const 64 call $~lib/builtins/abort unreachable @@ -5179,7 +5156,7 @@ if i32.const 336 i32.const 608 - i32.const 600 + i32.const 605 i32.const 64 call $~lib/builtins/abort unreachable @@ -5319,7 +5296,7 @@ if i32.const 336 i32.const 608 - i32.const 882 + i32.const 889 i32.const 64 call $~lib/builtins/abort unreachable @@ -5401,7 +5378,7 @@ if i32.const 336 i32.const 608 - i32.const 1023 + i32.const 1031 i32.const 64 call $~lib/builtins/abort unreachable @@ -5483,7 +5460,7 @@ if i32.const 336 i32.const 608 - i32.const 1164 + i32.const 1173 i32.const 64 call $~lib/builtins/abort unreachable @@ -5565,7 +5542,7 @@ if i32.const 336 i32.const 608 - i32.const 1305 + i32.const 1315 i32.const 64 call $~lib/builtins/abort unreachable @@ -5821,7 +5798,7 @@ if i32.const 336 i32.const 608 - i32.const 189 + i32.const 190 i32.const 33 call $~lib/builtins/abort unreachable @@ -5927,7 +5904,7 @@ if i32.const 336 i32.const 608 - i32.const 330 + i32.const 332 i32.const 33 call $~lib/builtins/abort unreachable @@ -6035,7 +6012,7 @@ if i32.const 336 i32.const 608 - i32.const 471 + i32.const 475 i32.const 33 call $~lib/builtins/abort unreachable @@ -6145,7 +6122,7 @@ if i32.const 336 i32.const 608 - i32.const 612 + i32.const 617 i32.const 33 call $~lib/builtins/abort unreachable @@ -6255,7 +6232,7 @@ if i32.const 336 i32.const 608 - i32.const 753 + i32.const 759 i32.const 33 call $~lib/builtins/abort unreachable @@ -6365,7 +6342,7 @@ if i32.const 336 i32.const 608 - i32.const 894 + i32.const 901 i32.const 33 call $~lib/builtins/abort unreachable @@ -6475,7 +6452,7 @@ if i32.const 336 i32.const 608 - i32.const 1035 + i32.const 1043 i32.const 33 call $~lib/builtins/abort unreachable @@ -6585,7 +6562,7 @@ if i32.const 336 i32.const 608 - i32.const 1176 + i32.const 1185 i32.const 33 call $~lib/builtins/abort unreachable @@ -6695,7 +6672,7 @@ if i32.const 336 i32.const 608 - i32.const 1317 + i32.const 1327 i32.const 33 call $~lib/builtins/abort unreachable @@ -6805,7 +6782,7 @@ if i32.const 336 i32.const 608 - i32.const 1458 + i32.const 1469 i32.const 33 call $~lib/builtins/abort unreachable @@ -7538,7 +7515,7 @@ if i32.const 336 i32.const 608 - i32.const 166 + i32.const 167 i32.const 45 call $~lib/builtins/abort unreachable @@ -7569,7 +7546,7 @@ if i32.const 336 i32.const 608 - i32.const 448 + i32.const 452 i32.const 64 call $~lib/builtins/abort unreachable @@ -7597,7 +7574,7 @@ if i32.const 336 i32.const 608 - i32.const 589 + i32.const 594 i32.const 64 call $~lib/builtins/abort unreachable @@ -7630,7 +7607,7 @@ if i32.const 336 i32.const 608 - i32.const 871 + i32.const 878 i32.const 64 call $~lib/builtins/abort unreachable @@ -7658,7 +7635,7 @@ if i32.const 336 i32.const 608 - i32.const 1012 + i32.const 1020 i32.const 64 call $~lib/builtins/abort unreachable @@ -7686,7 +7663,7 @@ if i32.const 336 i32.const 608 - i32.const 1153 + i32.const 1162 i32.const 64 call $~lib/builtins/abort unreachable @@ -7714,7 +7691,7 @@ if i32.const 336 i32.const 608 - i32.const 1294 + i32.const 1304 i32.const 64 call $~lib/builtins/abort unreachable @@ -23239,7 +23216,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -23254,7 +23231,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -23355,7 +23332,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -23370,7 +23347,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -23461,7 +23438,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -23476,7 +23453,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -23561,7 +23538,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -23576,7 +23553,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -23662,7 +23639,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -23677,7 +23654,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -23720,7 +23697,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -23735,7 +23712,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -23810,7 +23787,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -23825,7 +23802,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -23868,7 +23845,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -23883,7 +23860,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -23984,7 +23961,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -23999,7 +23976,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -24090,7 +24067,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -24105,7 +24082,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -24186,7 +24163,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -24201,7 +24178,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -24287,7 +24264,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -24302,7 +24279,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -24345,7 +24322,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -24360,7 +24337,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -24435,7 +24412,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -24450,7 +24427,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -24494,7 +24471,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -24509,7 +24486,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -24616,7 +24593,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -24631,7 +24608,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -24726,7 +24703,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -24741,7 +24718,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -24845,7 +24822,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -24860,7 +24837,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -24949,7 +24926,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -24964,7 +24941,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -25008,7 +24985,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -25023,7 +25000,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -25123,7 +25100,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -25138,7 +25115,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -25236,7 +25213,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -25251,7 +25228,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -25354,7 +25331,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -25369,7 +25346,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -25460,7 +25437,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -25475,7 +25452,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -25556,7 +25533,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -25571,7 +25548,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -25662,7 +25639,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -25677,7 +25654,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -25752,7 +25729,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -25767,7 +25744,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -25810,7 +25787,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -25825,7 +25802,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -25905,7 +25882,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -25920,7 +25897,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -26023,7 +26000,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -26038,7 +26015,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -26129,7 +26106,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -26144,7 +26121,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -26225,7 +26202,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -26240,7 +26217,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -26331,7 +26308,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -26346,7 +26323,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -26421,7 +26398,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -26436,7 +26413,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -26479,7 +26456,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -26494,7 +26471,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -26569,7 +26546,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -26584,7 +26561,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -26646,7 +26623,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -26661,7 +26638,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -26752,7 +26729,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -26767,7 +26744,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -26848,7 +26825,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -26863,7 +26840,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -26954,7 +26931,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -26969,7 +26946,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -27049,7 +27026,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -27064,7 +27041,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -27144,7 +27121,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -27159,7 +27136,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -27234,7 +27211,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -27249,7 +27226,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -27315,7 +27292,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -27330,7 +27307,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -27421,7 +27398,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -27436,7 +27413,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -27517,7 +27494,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -27532,7 +27509,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -27623,7 +27600,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -27638,7 +27615,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -27718,7 +27695,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -27733,7 +27710,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -27813,7 +27790,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -27828,7 +27805,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -27908,7 +27885,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -27923,7 +27900,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -28026,7 +28003,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -28041,7 +28018,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -28127,7 +28104,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -28142,7 +28119,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -28186,7 +28163,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -28201,7 +28178,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -28292,7 +28269,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -28307,7 +28284,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -28387,7 +28364,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -28402,7 +28379,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -28482,7 +28459,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -28497,7 +28474,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -28577,7 +28554,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -28592,7 +28569,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -28695,7 +28672,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -28710,7 +28687,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -28796,7 +28773,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -28811,7 +28788,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -28855,7 +28832,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -28870,7 +28847,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -28961,7 +28938,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -28976,7 +28953,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -29056,7 +29033,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -29071,7 +29048,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -29151,7 +29128,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -29166,7 +29143,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -29246,7 +29223,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -29261,7 +29238,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -29356,7 +29333,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -29371,7 +29348,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -29414,7 +29391,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -29429,7 +29406,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -29511,7 +29488,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -29526,7 +29503,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -29608,7 +29585,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -29623,7 +29600,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -29705,7 +29682,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -29720,7 +29697,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -29802,7 +29779,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -29817,7 +29794,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -29917,7 +29894,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -29932,7 +29909,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -30015,7 +29992,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -30030,7 +30007,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -30112,7 +30089,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -30127,7 +30104,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -30209,7 +30186,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -30224,7 +30201,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -30306,7 +30283,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -30321,7 +30298,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -30404,7 +30381,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -30419,7 +30396,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -30514,7 +30491,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -30529,7 +30506,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -30631,7 +30608,7 @@ if i32.const 336 i32.const 608 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -30646,7 +30623,7 @@ if i32.const 336 i32.const 608 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -68291,7 +68268,7 @@ if i32.const 336 i32.const 608 - i32.const 1898 + i32.const 1860 i32.const 5 call $~lib/builtins/abort unreachable @@ -68310,7 +68287,7 @@ if i32.const 32 i32.const 608 - i32.const 1903 + i32.const 1865 i32.const 9 call $~lib/builtins/abort unreachable @@ -68322,7 +68299,7 @@ else i32.const 32 i32.const 608 - i32.const 1907 + i32.const 1869 i32.const 7 call $~lib/builtins/abort unreachable @@ -68340,7 +68317,7 @@ if i32.const 32 i32.const 608 - i32.const 1912 + i32.const 1874 i32.const 7 call $~lib/builtins/abort unreachable @@ -68509,7 +68486,7 @@ if i32.const 336 i32.const 608 - i32.const 1898 + i32.const 1860 i32.const 5 call $~lib/builtins/abort unreachable @@ -68528,7 +68505,7 @@ if i32.const 32 i32.const 608 - i32.const 1903 + i32.const 1865 i32.const 9 call $~lib/builtins/abort unreachable @@ -68540,7 +68517,7 @@ else i32.const 32 i32.const 608 - i32.const 1907 + i32.const 1869 i32.const 7 call $~lib/builtins/abort unreachable @@ -68558,7 +68535,7 @@ if i32.const 32 i32.const 608 - i32.const 1912 + i32.const 1874 i32.const 7 call $~lib/builtins/abort unreachable @@ -68628,7 +68605,7 @@ if i32.const 336 i32.const 608 - i32.const 1898 + i32.const 1860 i32.const 5 call $~lib/builtins/abort unreachable @@ -68647,7 +68624,7 @@ if i32.const 32 i32.const 608 - i32.const 1903 + i32.const 1865 i32.const 9 call $~lib/builtins/abort unreachable @@ -68659,7 +68636,7 @@ else i32.const 32 i32.const 608 - i32.const 1907 + i32.const 1869 i32.const 7 call $~lib/builtins/abort unreachable @@ -68677,7 +68654,7 @@ if i32.const 32 i32.const 608 - i32.const 1912 + i32.const 1874 i32.const 7 call $~lib/builtins/abort unreachable @@ -68747,7 +68724,7 @@ if i32.const 336 i32.const 608 - i32.const 1898 + i32.const 1860 i32.const 5 call $~lib/builtins/abort unreachable @@ -68766,7 +68743,7 @@ if i32.const 32 i32.const 608 - i32.const 1903 + i32.const 1865 i32.const 9 call $~lib/builtins/abort unreachable @@ -68778,7 +68755,7 @@ else i32.const 32 i32.const 608 - i32.const 1907 + i32.const 1869 i32.const 7 call $~lib/builtins/abort unreachable @@ -68796,7 +68773,7 @@ if i32.const 32 i32.const 608 - i32.const 1912 + i32.const 1874 i32.const 7 call $~lib/builtins/abort unreachable @@ -68866,7 +68843,7 @@ if i32.const 336 i32.const 608 - i32.const 1898 + i32.const 1860 i32.const 5 call $~lib/builtins/abort unreachable @@ -68885,7 +68862,7 @@ if i32.const 32 i32.const 608 - i32.const 1903 + i32.const 1865 i32.const 9 call $~lib/builtins/abort unreachable @@ -68897,7 +68874,7 @@ else i32.const 32 i32.const 608 - i32.const 1907 + i32.const 1869 i32.const 7 call $~lib/builtins/abort unreachable @@ -68915,7 +68892,7 @@ if i32.const 32 i32.const 608 - i32.const 1912 + i32.const 1874 i32.const 7 call $~lib/builtins/abort unreachable @@ -68985,7 +68962,7 @@ if i32.const 336 i32.const 608 - i32.const 1898 + i32.const 1860 i32.const 5 call $~lib/builtins/abort unreachable @@ -69004,7 +68981,7 @@ if i32.const 32 i32.const 608 - i32.const 1903 + i32.const 1865 i32.const 9 call $~lib/builtins/abort unreachable @@ -69016,7 +68993,7 @@ else i32.const 32 i32.const 608 - i32.const 1907 + i32.const 1869 i32.const 7 call $~lib/builtins/abort unreachable @@ -69034,7 +69011,7 @@ if i32.const 32 i32.const 608 - i32.const 1912 + i32.const 1874 i32.const 7 call $~lib/builtins/abort unreachable @@ -69104,7 +69081,7 @@ if i32.const 336 i32.const 608 - i32.const 1898 + i32.const 1860 i32.const 5 call $~lib/builtins/abort unreachable @@ -69123,7 +69100,7 @@ if i32.const 32 i32.const 608 - i32.const 1903 + i32.const 1865 i32.const 9 call $~lib/builtins/abort unreachable @@ -69135,7 +69112,7 @@ else i32.const 32 i32.const 608 - i32.const 1907 + i32.const 1869 i32.const 7 call $~lib/builtins/abort unreachable @@ -69153,7 +69130,7 @@ if i32.const 32 i32.const 608 - i32.const 1912 + i32.const 1874 i32.const 7 call $~lib/builtins/abort unreachable @@ -69223,7 +69200,7 @@ if i32.const 336 i32.const 608 - i32.const 1898 + i32.const 1860 i32.const 5 call $~lib/builtins/abort unreachable @@ -69242,7 +69219,7 @@ if i32.const 32 i32.const 608 - i32.const 1903 + i32.const 1865 i32.const 9 call $~lib/builtins/abort unreachable @@ -69254,7 +69231,7 @@ else i32.const 32 i32.const 608 - i32.const 1907 + i32.const 1869 i32.const 7 call $~lib/builtins/abort unreachable @@ -69272,7 +69249,7 @@ if i32.const 32 i32.const 608 - i32.const 1912 + i32.const 1874 i32.const 7 call $~lib/builtins/abort unreachable @@ -69342,7 +69319,7 @@ if i32.const 336 i32.const 608 - i32.const 1898 + i32.const 1860 i32.const 5 call $~lib/builtins/abort unreachable @@ -69361,7 +69338,7 @@ if i32.const 32 i32.const 608 - i32.const 1903 + i32.const 1865 i32.const 9 call $~lib/builtins/abort unreachable @@ -69373,7 +69350,7 @@ else i32.const 32 i32.const 608 - i32.const 1907 + i32.const 1869 i32.const 7 call $~lib/builtins/abort unreachable @@ -69391,7 +69368,7 @@ if i32.const 32 i32.const 608 - i32.const 1912 + i32.const 1874 i32.const 7 call $~lib/builtins/abort unreachable @@ -69461,7 +69438,7 @@ if i32.const 336 i32.const 608 - i32.const 1898 + i32.const 1860 i32.const 5 call $~lib/builtins/abort unreachable @@ -69480,7 +69457,7 @@ if i32.const 32 i32.const 608 - i32.const 1903 + i32.const 1865 i32.const 9 call $~lib/builtins/abort unreachable @@ -69492,7 +69469,7 @@ else i32.const 32 i32.const 608 - i32.const 1907 + i32.const 1869 i32.const 7 call $~lib/builtins/abort unreachable @@ -69510,7 +69487,7 @@ if i32.const 32 i32.const 608 - i32.const 1912 + i32.const 1874 i32.const 7 call $~lib/builtins/abort unreachable @@ -69580,7 +69557,7 @@ if i32.const 336 i32.const 608 - i32.const 1898 + i32.const 1860 i32.const 5 call $~lib/builtins/abort unreachable @@ -69599,7 +69576,7 @@ if i32.const 32 i32.const 608 - i32.const 1903 + i32.const 1865 i32.const 9 call $~lib/builtins/abort unreachable @@ -69611,7 +69588,7 @@ else i32.const 32 i32.const 608 - i32.const 1907 + i32.const 1869 i32.const 7 call $~lib/builtins/abort unreachable @@ -69629,7 +69606,7 @@ if i32.const 32 i32.const 608 - i32.const 1912 + i32.const 1874 i32.const 7 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/std/typedarray.release.wat b/tests/compiler/std/typedarray.release.wat index 8dfa871504..62632863f6 100644 --- a/tests/compiler/std/typedarray.release.wat +++ b/tests/compiler/std/typedarray.release.wat @@ -2701,7 +2701,7 @@ if i32.const 1360 i32.const 1632 - i32.const 741 + i32.const 747 i32.const 64 call $~lib/builtins/abort unreachable @@ -2725,7 +2725,7 @@ if i32.const 1360 i32.const 1632 - i32.const 730 + i32.const 736 i32.const 64 call $~lib/builtins/abort unreachable @@ -2748,7 +2748,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1446 + i32.const 1457 i32.const 64 call $~lib/builtins/abort unreachable @@ -3610,7 +3610,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1435 + i32.const 1446 i32.const 64 call $~lib/builtins/abort unreachable @@ -3631,7 +3631,7 @@ if i32.const 1360 i32.const 1632 - i32.const 318 + i32.const 320 i32.const 45 call $~lib/builtins/abort unreachable @@ -3663,7 +3663,7 @@ if i32.const 1360 i32.const 1632 - i32.const 307 + i32.const 309 i32.const 45 call $~lib/builtins/abort unreachable @@ -3771,103 +3771,84 @@ (func $~lib/typedarray/Int32Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) - block $~lib/typedarray/FILL<~lib/typedarray/Int32Array,i32>|inlined.0 + local.get $0 + i32.load offset=4 + local.set $5 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $4 + local.get $2 + i32.add + local.get $2 + local.get $4 + local.get $2 + local.get $4 + i32.lt_s + select + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $0 + local.get $3 + local.get $4 + i32.add + local.get $3 + local.get $4 + local.get $3 + local.get $4 + i32.lt_s + select + local.get $3 + i32.const 0 + i32.lt_s + select + local.set $2 + block $__inlined_func$~lib/util/bytes/FILL local.get $1 - local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $0 - local.get $2 - i32.const 0 - i32.lt_s - if (result i32) - local.get $0 - local.get $2 - i32.add - local.tee $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - else - local.get $2 - local.get $0 - local.get $0 - local.get $2 - i32.gt_s - select - end - local.set $1 - local.get $3 - i32.const 0 - i32.lt_s - if (result i32) - local.get $0 - local.get $3 - i32.add - local.tee $0 - i32.const 0 - local.get $0 - i32.const 0 - i32.gt_s - select - else - local.get $3 - local.get $0 - local.get $0 - local.get $3 - i32.gt_s - select - end - local.set $0 - local.get $4 i32.eqz - local.get $4 + local.get $1 i32.const -1 i32.eq i32.or if local.get $0 - local.get $1 - i32.gt_s + local.get $2 + i32.lt_s if local.get $5 - local.get $1 + local.get $0 i32.const 2 i32.shl i32.add - local.get $4 - local.get $0 local.get $1 + local.get $2 + local.get $0 i32.sub i32.const 2 i32.shl memory.fill end - br $~lib/typedarray/FILL<~lib/typedarray/Int32Array,i32>|inlined.0 + br $__inlined_func$~lib/util/bytes/FILL end loop $for-loop|0 local.get $0 - local.get $1 - i32.gt_s + local.get $2 + i32.lt_s if local.get $5 - local.get $1 + local.get $0 i32.const 2 i32.shl i32.add - local.get $4 - i32.store local.get $1 + i32.store + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -4056,7 +4037,7 @@ if i32.const 1360 i32.const 1632 - i32.const 177 + i32.const 178 i32.const 45 call $~lib/builtins/abort unreachable @@ -4078,7 +4059,7 @@ if i32.const 1360 i32.const 1632 - i32.const 459 + i32.const 463 i32.const 64 call $~lib/builtins/abort unreachable @@ -4102,7 +4083,7 @@ if i32.const 1360 i32.const 1632 - i32.const 600 + i32.const 605 i32.const 64 call $~lib/builtins/abort unreachable @@ -4126,7 +4107,7 @@ if i32.const 1360 i32.const 1632 - i32.const 882 + i32.const 889 i32.const 64 call $~lib/builtins/abort unreachable @@ -4150,7 +4131,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1023 + i32.const 1031 i32.const 64 call $~lib/builtins/abort unreachable @@ -4179,7 +4160,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1164 + i32.const 1173 i32.const 64 call $~lib/builtins/abort unreachable @@ -4203,7 +4184,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1305 + i32.const 1315 i32.const 64 call $~lib/builtins/abort unreachable @@ -4274,7 +4255,7 @@ if i32.const 1360 i32.const 1632 - i32.const 189 + i32.const 190 i32.const 33 call $~lib/builtins/abort unreachable @@ -4303,7 +4284,7 @@ if i32.const 1360 i32.const 1632 - i32.const 330 + i32.const 332 i32.const 33 call $~lib/builtins/abort unreachable @@ -4334,7 +4315,7 @@ if i32.const 1360 i32.const 1632 - i32.const 471 + i32.const 475 i32.const 33 call $~lib/builtins/abort unreachable @@ -4367,7 +4348,7 @@ if i32.const 1360 i32.const 1632 - i32.const 612 + i32.const 617 i32.const 33 call $~lib/builtins/abort unreachable @@ -4400,7 +4381,7 @@ if i32.const 1360 i32.const 1632 - i32.const 753 + i32.const 759 i32.const 33 call $~lib/builtins/abort unreachable @@ -4433,7 +4414,7 @@ if i32.const 1360 i32.const 1632 - i32.const 894 + i32.const 901 i32.const 33 call $~lib/builtins/abort unreachable @@ -4466,7 +4447,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1035 + i32.const 1043 i32.const 33 call $~lib/builtins/abort unreachable @@ -4499,7 +4480,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1176 + i32.const 1185 i32.const 33 call $~lib/builtins/abort unreachable @@ -4532,7 +4513,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1317 + i32.const 1327 i32.const 33 call $~lib/builtins/abort unreachable @@ -4565,7 +4546,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1458 + i32.const 1469 i32.const 33 call $~lib/builtins/abort unreachable @@ -4591,7 +4572,7 @@ if i32.const 1360 i32.const 1632 - i32.const 166 + i32.const 167 i32.const 45 call $~lib/builtins/abort unreachable @@ -4612,7 +4593,7 @@ if i32.const 1360 i32.const 1632 - i32.const 448 + i32.const 452 i32.const 64 call $~lib/builtins/abort unreachable @@ -4635,7 +4616,7 @@ if i32.const 1360 i32.const 1632 - i32.const 589 + i32.const 594 i32.const 64 call $~lib/builtins/abort unreachable @@ -4658,7 +4639,7 @@ if i32.const 1360 i32.const 1632 - i32.const 871 + i32.const 878 i32.const 64 call $~lib/builtins/abort unreachable @@ -4686,7 +4667,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1012 + i32.const 1020 i32.const 64 call $~lib/builtins/abort unreachable @@ -4709,7 +4690,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1153 + i32.const 1162 i32.const 64 call $~lib/builtins/abort unreachable @@ -4737,7 +4718,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1294 + i32.const 1304 i32.const 64 call $~lib/builtins/abort unreachable @@ -26389,7 +26370,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1898 + i32.const 1860 i32.const 5 call $~lib/builtins/abort unreachable @@ -26408,7 +26389,7 @@ else i32.const 1056 i32.const 1632 - i32.const 1907 + i32.const 1869 i32.const 7 call $~lib/builtins/abort unreachable @@ -26423,7 +26404,7 @@ if i32.const 1056 i32.const 1632 - i32.const 1912 + i32.const 1874 i32.const 7 call $~lib/builtins/abort unreachable @@ -26470,7 +26451,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -26522,7 +26503,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -26572,7 +26553,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -26600,7 +26581,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -26652,7 +26633,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -26677,7 +26658,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -26694,7 +26675,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -26761,7 +26742,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -26778,7 +26759,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -26846,7 +26827,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -26902,7 +26883,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -26958,7 +26939,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -27010,7 +26991,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -27041,7 +27022,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -27087,7 +27068,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1936 + i32.const 1898 i32.const 19 call $~lib/builtins/abort unreachable @@ -27104,7 +27085,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -27138,7 +27119,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -27194,7 +27175,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -27248,7 +27229,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -27307,7 +27288,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -27360,7 +27341,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -27414,7 +27395,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -27442,7 +27423,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -27496,7 +27477,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -27555,7 +27536,7 @@ if i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -38376,7 +38357,7 @@ end i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -38757,7 +38738,7 @@ end i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -39251,7 +39232,7 @@ end i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -39645,7 +39626,7 @@ end i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -40039,7 +40020,7 @@ end i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -40436,7 +40417,7 @@ end i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -40833,7 +40814,7 @@ end i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -41228,7 +41209,7 @@ end i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -41623,7 +41604,7 @@ end i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -42114,7 +42095,7 @@ end i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -42648,7 +42629,7 @@ end i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable @@ -43233,12 +43214,6 @@ i32.const 3 i32.sub local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.tee $2 i32.lt_s if local.get $3 @@ -43280,12 +43255,6 @@ i32.const 2 i32.sub local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.tee $2 local.get $3 i32.lt_s if @@ -61851,14 +61820,14 @@ end i32.const 1056 i32.const 1632 - i32.const 1903 + i32.const 1865 i32.const 9 call $~lib/builtins/abort unreachable end i32.const 1360 i32.const 1632 - i32.const 1937 + i32.const 1899 i32.const 47 call $~lib/builtins/abort unreachable