diff --git a/lib/loader/index.js b/lib/loader/index.js index ae3e8fb590..0fd7770b91 100644 --- a/lib/loader/index.js +++ b/lib/loader/index.js @@ -12,20 +12,21 @@ const ARRAYBUFFERVIEW_ID = 2; // Runtime type information const ARRAYBUFFERVIEW = 1 << 0; const ARRAY = 1 << 1; -const SET = 1 << 2; -const MAP = 1 << 3; -const VAL_ALIGN_OFFSET = 5; +const STATICARRAY = 1 << 2; +const SET = 1 << 3; +const MAP = 1 << 4; +const VAL_ALIGN_OFFSET = 6; const VAL_ALIGN = 1 << VAL_ALIGN_OFFSET; -const VAL_SIGNED = 1 << 10; -const VAL_FLOAT = 1 << 11; -const VAL_NULLABLE = 1 << 12; -const VAL_MANAGED = 1 << 13; -const KEY_ALIGN_OFFSET = 14; +const VAL_SIGNED = 1 << 11; +const VAL_FLOAT = 1 << 12; +const VAL_NULLABLE = 1 << 13; +const VAL_MANAGED = 1 << 14; +const KEY_ALIGN_OFFSET = 15; const KEY_ALIGN = 1 << KEY_ALIGN_OFFSET; -const KEY_SIGNED = 1 << 19; -const KEY_FLOAT = 1 << 20; -const KEY_NULLABLE = 1 << 21; -const KEY_MANAGED = 1 << 22; +const KEY_SIGNED = 1 << 20; +const KEY_FLOAT = 1 << 21; +const KEY_NULLABLE = 1 << 22; +const KEY_MANAGED = 1 << 23; // Array(BufferView) layout const ARRAYBUFFERVIEW_BUFFER_OFFSET = 0; @@ -162,23 +163,29 @@ function postInstantiate(extendedExports, instance) { /** Allocates a new array in the module's memory and returns its retained pointer. */ function __allocArray(id, values) { const info = getInfo(id); - if (!(info & (ARRAYBUFFERVIEW | ARRAY))) throw Error("not an array: " + id + ", flags= " + info); + if (!(info & (ARRAYBUFFERVIEW | ARRAY | STATICARRAY))) throw Error("not an array: " + id + ", flags= " + info); const align = getValueAlign(info); const length = values.length; - const buf = alloc(length << align, ARRAYBUFFER_ID); - const arr = alloc(info & ARRAY ? ARRAY_SIZE : ARRAYBUFFERVIEW_SIZE, id); - const U32 = new Uint32Array(memory.buffer); - U32[arr + ARRAYBUFFERVIEW_BUFFER_OFFSET >>> 2] = retain(buf); - U32[arr + ARRAYBUFFERVIEW_DATASTART_OFFSET >>> 2] = buf; - U32[arr + ARRAYBUFFERVIEW_DATALENGTH_OFFSET >>> 2] = length << align; - if (info & ARRAY) U32[arr + ARRAY_LENGTH_OFFSET >>> 2] = length; + const buf = alloc(length << align, info & STATICARRAY ? id : ARRAYBUFFER_ID); + let result; + if (info & STATICARRAY) { + result = buf; + } else { + const arr = alloc(info & ARRAY ? ARRAY_SIZE : ARRAYBUFFERVIEW_SIZE, id); + const U32 = new Uint32Array(memory.buffer); + U32[arr + ARRAYBUFFERVIEW_BUFFER_OFFSET >>> 2] = retain(buf); + U32[arr + ARRAYBUFFERVIEW_DATASTART_OFFSET >>> 2] = buf; + U32[arr + ARRAYBUFFERVIEW_DATALENGTH_OFFSET >>> 2] = length << align; + if (info & ARRAY) U32[arr + ARRAY_LENGTH_OFFSET >>> 2] = length; + result = arr; + } const view = getView(align, info & VAL_SIGNED, info & VAL_FLOAT); if (info & VAL_MANAGED) { for (let i = 0; i < length; ++i) view[(buf >>> align) + i] = retain(values[i]); } else { view.set(values, buf >>> align); } - return arr; + return result; } extendedExports.__allocArray = __allocArray; @@ -188,9 +195,11 @@ function postInstantiate(extendedExports, instance) { const U32 = new Uint32Array(memory.buffer); const id = U32[arr + ID_OFFSET >>> 2]; const info = getInfo(id); - if (!(info & (ARRAYBUFFERVIEW | ARRAY))) throw Error("not an array: " + id + ", flags=" + info); + if (!(info & (ARRAYBUFFERVIEW | ARRAY | STATICARRAY))) throw Error("not an array: " + id + ", flags=" + info); const align = getValueAlign(info); - let buf = U32[arr + ARRAYBUFFERVIEW_DATASTART_OFFSET >>> 2]; + let buf = info & STATICARRAY + ? arr + : U32[arr + ARRAYBUFFERVIEW_DATASTART_OFFSET >>> 2]; const length = info & ARRAY ? U32[arr + ARRAY_LENGTH_OFFSET >>> 2] : U32[buf + SIZE_OFFSET >>> 2] >>> align; @@ -233,30 +242,31 @@ function postInstantiate(extendedExports, instance) { return new Type(buffer, bufPtr, U32[bufPtr + SIZE_OFFSET >>> 2] >>> alignLog2); } - extendedExports.__getInt8Array = getTypedArray.bind(null, Int8Array, 0); - extendedExports.__getInt8ArrayView = getTypedArrayView.bind(null, Int8Array, 0); - extendedExports.__getUint8Array = getTypedArray.bind(null, Uint8Array, 0); - extendedExports.__getUint8ArrayView = getTypedArrayView.bind(null, Uint8Array, 0); - extendedExports.__getUint8ClampedArray = getTypedArray.bind(null, Uint8ClampedArray, 0); - extendedExports.__getUint8ClampedArrayView = getTypedArrayView.bind(null, Uint8ClampedArray, 0); - extendedExports.__getInt16Array = getTypedArray.bind(null, Int16Array, 1); - extendedExports.__getInt16ArrayView = getTypedArrayView.bind(null, Int16Array, 1); - extendedExports.__getUint16Array = getTypedArray.bind(null, Uint16Array, 1); - extendedExports.__getUint16ArrayView = getTypedArrayView.bind(null, Uint16Array, 1); - extendedExports.__getInt32Array = getTypedArray.bind(null, Int32Array, 2); - extendedExports.__getInt32ArrayView = getTypedArrayView.bind(null, Int32Array, 2); - extendedExports.__getUint32Array = getTypedArray.bind(null, Uint32Array, 2); - extendedExports.__getUint32ArrayView = getTypedArrayView.bind(null, Uint32Array, 2); + /** Attach a set of get TypedArray and View functions to the exports. */ + function attachTypedArrayFunctions(ctor, name, align) { + extendedExports["__get" + name] = getTypedArray.bind(null, ctor, align); + extendedExports["__get" + name + "View"] = getTypedArrayView.bind(null, ctor, align); + } + + [ + Int8Array, + Uint8Array, + Uint8ClampedArray, + Int16Array, + Uint16Array, + Int32Array, + Uint32Array, + Float32Array, + Float64Array + ].forEach(ctor => { + attachTypedArrayFunctions(ctor, ctor.name, 31 - Math.clz32(ctor.BYTES_PER_ELEMENT)); + }); + if (BIGINT) { - extendedExports.__getInt64Array = getTypedArray.bind(null, BigInt64Array, 3); - extendedExports.__getInt64ArrayView = getTypedArrayView.bind(null, BigInt64Array, 3); - extendedExports.__getUint64Array = getTypedArray.bind(null, BigUint64Array, 3); - extendedExports.__getUint64ArrayView = getTypedArrayView.bind(null, BigUint64Array, 3); + [BigUint64Array, BigInt64Array].forEach(ctor => { + attachTypedArrayFunctions(ctor, ctor.name.slice(3), 3); + }); } - extendedExports.__getFloat32Array = getTypedArray.bind(null, Float32Array, 2); - extendedExports.__getFloat32ArrayView = getTypedArrayView.bind(null, Float32Array, 2); - extendedExports.__getFloat64Array = getTypedArray.bind(null, Float64Array, 3); - extendedExports.__getFloat64ArrayView = getTypedArrayView.bind(null, Float64Array, 3); /** Tests whether an object is an instance of the class represented by the specified base id. */ function __instanceof(ptr, baseId) { diff --git a/lib/loader/tests/assembly/index.ts b/lib/loader/tests/assembly/index.ts index 8282b3fd3a..af9801e6af 100644 --- a/lib/loader/tests/assembly/index.ts +++ b/lib/loader/tests/assembly/index.ts @@ -45,6 +45,12 @@ export function sum(arr: Int32Array): i32 { return v; } +export function sumStatic(arr: StaticArray): i32 { + var v = 0; + for (let i = 0, k = arr.length; i < k; ++i) v += arr[i]; + return v; +} + export function changeLength(arr: Array, length: i32): void { arr.length = length; } @@ -70,6 +76,11 @@ export const INT32ARRAY_ID = idof(); export const UINT32ARRAY_ID = idof(); export const FLOAT32ARRAY_ID = idof(); export const ARRAYI32_ID = idof>(); +export const STATICARRAYI32_ID = idof>(); +export const STATICARRAYU32_ID = idof>(); +export const STATICARRAYU8_ID = idof>(); +export const STATICARRAYI16_ID = idof>(); +export const STATICARRAYF32_ID = idof>(); export function newFloat32Array(size: i32): Float32Array { return new Float32Array(size); diff --git a/lib/loader/tests/assembly/tsconfig.json b/lib/loader/tests/assembly/tsconfig.json new file mode 100644 index 0000000000..2686355684 --- /dev/null +++ b/lib/loader/tests/assembly/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../../../../std/assembly.json", + "include": [ + "./**/*.ts" + ] +} \ No newline at end of file diff --git a/lib/loader/tests/index.js b/lib/loader/tests/index.js index 8dee745204..4cf52ca03a 100644 --- a/lib/loader/tests/index.js +++ b/lib/loader/tests/index.js @@ -53,6 +53,26 @@ function test(file) { try { exports.__release(ref); assert(false); } catch (e) {}; } + // should be able to allocate a typed array + { + var arr = [1, 2, 3, 4, 5, 0x80000000 | 0]; + let ref = exports.__retain(exports.__allocArray(exports.STATICARRAYI32_ID, arr)); + assert(exports.__instanceof(ref, exports.STATICARRAYI32_ID)); + + // should be able to get the values of an array + assert.deepEqual(exports.__getArray(ref), arr); + + // should be able to get a view on an array + assert.deepEqual(exports.__getArrayView(ref), new Int32Array(arr)); + + // should be able to sum up its values + assert.strictEqual(exports.sumStatic(ref), arr.reduce((a, b) => (a + b) | 0, 0) | 0); + + // should be able to release no longer needed references + exports.__release(ref); + try { exports.__release(ref); assert(false); } catch (e) {}; + } + /* { let arrU8Arr = new Uint8Array([0, 1, 2]); @@ -80,31 +100,68 @@ function test(file) { // should be able to distinguish between signed and unsigned { - let arr = new Uint8Array([0, 255, 127]); + let values = [0, 255, 127]; + let arr = new Uint8Array(values); let ref = exports.__retain(exports.__allocArray(exports.UINT8ARRAY_ID, arr)); assert(exports.__instanceof(ref, exports.UINT8ARRAY_ID)); assert.deepEqual(exports.__getUint8Array(ref), arr); + assert.deepEqual(exports.__getUint8ArrayView(ref), arr); + assert.deepEqual(exports.__getArray(ref), values); + exports.__release(ref); + try { exports.__release(ref); assert(false); } catch (e) {}; + } + + // should be able to distinguish between signed and unsigned for static array layout + { + let arr = [0, 255, 127]; + let ref = exports.__retain(exports.__allocArray(exports.STATICARRAYU8_ID, arr)); + assert(exports.__instanceof(ref, exports.STATICARRAYU8_ID)); + assert.deepEqual(exports.__getArray(ref), arr); exports.__release(ref); try { exports.__release(ref); assert(false); } catch (e) {}; } // should be able to distinguish between signed and unsigned { - let arr = new Int16Array([0, 0xFFFF, -0x00FF]); + let values = [0, 0xFFFF, -0x00FF]; + let arr = new Int16Array(values); let ref = exports.__retain(exports.__allocArray(exports.INT16ARRAY_ID, arr)); assert(exports.__instanceof(ref, exports.INT16ARRAY_ID)); assert.deepEqual(exports.__getInt16Array(ref), arr); + assert.deepEqual(exports.__getInt16ArrayView(ref), arr); + assert.deepEqual(exports.__getArray(ref), [0, -1, -255]); + exports.__release(ref); + try { exports.__release(ref); assert(false); } catch (e) {}; + } + + // should be able to distinguish between signed and unsigned for static array layout + { + let arr = [0, 0xFFFF, -0x00FF]; + let ref = exports.__retain(exports.__allocArray(exports.STATICARRAYI16_ID, arr)); + assert(exports.__instanceof(ref, exports.STATICARRAYI16_ID)); + assert.deepEqual(exports.__getArray(ref), [0, -1, -255]); exports.__release(ref); try { exports.__release(ref); assert(false); } catch (e) {}; } // should be able to distinguish between signed and unsigned { - let arr = [1, -1 >>> 0, 0x80000000]; + let values = [1, -1 >>> 0, 0x80000000]; + let arr = new Uint32Array(values); let ref = exports.__retain(exports.__allocArray(exports.UINT32ARRAY_ID, arr)); assert(exports.__instanceof(ref, exports.UINT32ARRAY_ID)); - assert.deepEqual(exports.__getUint32Array(ref), new Uint32Array(arr)); - assert.deepEqual(exports.__getUint32ArrayView(ref), new Uint32Array(arr)); + assert.deepEqual(exports.__getUint32Array(ref), arr); + assert.deepEqual(exports.__getUint32ArrayView(ref), arr); + assert.deepEqual(exports.__getArray(ref), values); + exports.__release(ref); + try { exports.__release(ref); assert(false); } catch (e) {}; + } + + // should be able to distinguish between signed and unsigned with static array layout + { + let arr = [1, -1 >>> 0, 0x80000000]; + let ref = exports.__retain(exports.__allocArray(exports.STATICARRAYU32_ID, arr)); + assert(exports.__instanceof(ref, exports.STATICARRAYU32_ID)); assert.deepEqual(exports.__getArray(ref), arr); exports.__release(ref); try { exports.__release(ref); assert(false); } catch (e) {}; @@ -112,11 +169,22 @@ function test(file) { // should be able to distinguish between integer and float { - let arr = [0.0, 1.5, 2.5]; + let values = [0.0, 1.5, 2.5]; + let arr = new Float32Array(values) let ref = exports.__retain(exports.__allocArray(exports.FLOAT32ARRAY_ID, arr)); assert(exports.__instanceof(ref, exports.FLOAT32ARRAY_ID)); - assert.deepEqual(exports.__getFloat32Array(ref), new Float32Array(arr)); - assert.deepEqual(exports.__getFloat32ArrayView(ref), new Float32Array(arr)); + assert.deepEqual(exports.__getFloat32Array(ref), arr); + assert.deepEqual(exports.__getFloat32ArrayView(ref), arr); + assert.deepEqual(exports.__getArray(ref), values); + exports.__release(ref); + try { exports.__release(ref); assert(false); } catch (e) {}; + } + + // should be able to distinguish between integer and float static arrays + { + let arr = [0.0, 1.5, 2.5]; + let ref = exports.__retain(exports.__allocArray(exports.STATICARRAYF32_ID, arr)); + assert(exports.__instanceof(ref, exports.STATICARRAYF32_ID)); assert.deepEqual(exports.__getArray(ref), arr); exports.__release(ref); try { exports.__release(ref); assert(false); } catch (e) {}; diff --git a/src/builtins.ts b/src/builtins.ts index 8800a8c4c9..671ba4221c 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -7899,6 +7899,7 @@ export function compileRTTI(compiler: Compiler): void { var arrayPrototype = program.arrayPrototype; var setPrototype = program.setPrototype; var mapPrototype = program.mapPrototype; + var staticArrayPrototype = program.staticArrayPrototype; var lastId = 0; // TODO: for (let [instanceId, instance] of managedClasses) { for (let _keys = Map_keys(managedClasses), i = 0, k = _keys.length; i < k; ++i) { @@ -7926,6 +7927,10 @@ export function compileRTTI(compiler: Compiler): void { flags |= TypeinfoFlags.MAP; flags |= TypeinfoFlags.KEY_ALIGN_0 * typeToRuntimeFlags(typeArguments[0]); flags |= TypeinfoFlags.VALUE_ALIGN_0 * typeToRuntimeFlags(typeArguments[1]); + } else if (instance.extends(staticArrayPrototype)) { + let valueType = instance.getArrayValueType(); + flags |= TypeinfoFlags.STATICARRAY; + flags |= TypeinfoFlags.VALUE_ALIGN_0 * typeToRuntimeFlags(valueType); } writeI32(flags, data, off); off += 4; instance.rttiFlags = flags; diff --git a/src/program.ts b/src/program.ts index 6612ae778c..ae14cb2945 100644 --- a/src/program.ts +++ b/src/program.ts @@ -3758,6 +3758,10 @@ export class Class extends TypedElement { if (this.extends(arrayPrototype)) { return this.getTypeArgumentsTo(arrayPrototype)![0]; } + var staticArrayPrototype = program.staticArrayPrototype; + if (this.extends(staticArrayPrototype)) { + return this.getTypeArgumentsTo(staticArrayPrototype)![0]; + } var abvInstance = program.arrayBufferViewInstance; while (current.base !== abvInstance) { current = assert(current.base); diff --git a/std/assembly/shared/typeinfo.ts b/std/assembly/shared/typeinfo.ts index ef8b9feda0..eee22a614c 100644 --- a/std/assembly/shared/typeinfo.ts +++ b/std/assembly/shared/typeinfo.ts @@ -29,46 +29,48 @@ export const enum TypeinfoFlags { ARRAYBUFFERVIEW = 1 << 0, /** Type is an `Array`. */ ARRAY = 1 << 1, + /** Type is a `StaticArray`. */ + STATICARRAY = 1 << 2, /** Type is a `Set`. */ - SET = 1 << 2, + SET = 1 << 3, /** Type is a `Map`. */ - MAP = 1 << 3, + MAP = 1 << 4, /** Type is inherently acyclic. */ - ACYCLIC = 1 << 4, + ACYCLIC = 1 << 5, /** Value alignment of 1 byte. */ - VALUE_ALIGN_0 = 1 << 5, + VALUE_ALIGN_0 = 1 << 6, /** Value alignment of 2 bytes. */ - VALUE_ALIGN_1 = 1 << 6, + VALUE_ALIGN_1 = 1 << 7, /** Value alignment of 4 bytes. */ - VALUE_ALIGN_2 = 1 << 7, + VALUE_ALIGN_2 = 1 << 8, /** Value alignment of 8 bytes. */ - VALUE_ALIGN_3 = 1 << 8, + VALUE_ALIGN_3 = 1 << 9, /** Value alignment of 16 bytes. */ - VALUE_ALIGN_4 = 1 << 9, + VALUE_ALIGN_4 = 1 << 10, /** Value is a signed type. */ - VALUE_SIGNED = 1 << 10, + VALUE_SIGNED = 1 << 11, /** Value is a float type. */ - VALUE_FLOAT = 1 << 11, + VALUE_FLOAT = 1 << 12, /** Value type is nullable. */ - VALUE_NULLABLE = 1 << 12, + VALUE_NULLABLE = 1 << 13, /** Value type is managed. */ - VALUE_MANAGED = 1 << 13, + VALUE_MANAGED = 1 << 14, /** Key alignment of 1 byte. */ - KEY_ALIGN_0 = 1 << 14, + KEY_ALIGN_0 = 1 << 15, /** Key alignment of 2 bytes. */ - KEY_ALIGN_1 = 1 << 15, + KEY_ALIGN_1 = 1 << 16, /** Key alignment of 4 bytes. */ - KEY_ALIGN_2 = 1 << 16, + KEY_ALIGN_2 = 1 << 17, /** Key alignment of 8 bytes. */ - KEY_ALIGN_3 = 1 << 17, + KEY_ALIGN_3 = 1 << 18, /** Key alignment of 16 bytes. */ - KEY_ALIGN_4 = 1 << 18, + KEY_ALIGN_4 = 1 << 19, /** Key is a signed type. */ - KEY_SIGNED = 1 << 19, + KEY_SIGNED = 1 << 20, /** Key is a float type. */ - KEY_FLOAT = 1 << 20, + KEY_FLOAT = 1 << 21, /** Key type is nullable. */ - KEY_NULLABLE = 1 << 21, + KEY_NULLABLE = 1 << 22, /** Key type is managed. */ - KEY_MANAGED = 1 << 22 + KEY_MANAGED = 1 << 23 } diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index f9a8d7efc4..7e2d29dae8 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -21,8 +21,8 @@ (data (i32.const 1328) "\1a\00\00\00\01\00\00\00\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 1376) "$\00\00\00\01\00\00\00\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") (data (i32.const 1440) "\14\00\00\00\01\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") - (data (i32.const 1488) "\t\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10") - (data (i32.const 1544) "\04\00\00\00\92 \00\00\00\00\00\00\92 ") + (data (i32.const 1488) "\t\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 ") + (data (i32.const 1544) "\04\00\00\00\"A\00\00\00\00\00\00\"A") (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (global $~lib/rt/pure/ROOTS (mut i32) (i32.const 0)) @@ -1997,7 +1997,7 @@ i32.const 1492 i32.add i32.load - i32.const 16 + i32.const 32 i32.and if local.get $0 diff --git a/tests/compiler/extends-baseaggregate.untouched.wat b/tests/compiler/extends-baseaggregate.untouched.wat index 041260bdca..748dfacc52 100644 --- a/tests/compiler/extends-baseaggregate.untouched.wat +++ b/tests/compiler/extends-baseaggregate.untouched.wat @@ -21,7 +21,7 @@ (data (i32.const 320) "\1a\00\00\00\01\00\00\00\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") (data (i32.const 368) "$\00\00\00\01\00\00\00\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e\00") (data (i32.const 432) "\14\00\00\00\01\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s\00") - (data (i32.const 480) "\t\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\92 \00\00\00\00\00\00\92 \00\00\00\00\00\00") + (data (i32.const 480) "\t\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\"A\00\00\00\00\00\00\"A\00\00\00\00\00\00") (table $0 1 funcref) (global $extends-baseaggregate/poolB i32 (i32.const 48)) (global $extends-baseaggregate/poolA i32 (i32.const 96)) @@ -3687,7 +3687,7 @@ local.get $0 i32.load offset=8 call $~lib/rt/__typeinfo - i32.const 16 + i32.const 32 i32.and i32.eqz if diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index 71c1d8a110..f60a73e8c5 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -17,7 +17,7 @@ (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") (data (i32.const 1072) "(\00\00\00\01\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") (data (i32.const 1136) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s") - (data (i32.const 1184) "\05\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10") + (data (i32.const 1184) "\05\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\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/rt/__rtti_base i32 (i32.const 1184)) diff --git a/tests/compiler/implicit-getter-setter.untouched.wat b/tests/compiler/implicit-getter-setter.untouched.wat index 3e3c3e9aac..6361d7c5ad 100644 --- a/tests/compiler/implicit-getter-setter.untouched.wat +++ b/tests/compiler/implicit-getter-setter.untouched.wat @@ -17,7 +17,7 @@ (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") (data (i32.const 64) "(\00\00\00\01\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00") (data (i32.const 128) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s\00") - (data (i32.const 176) "\05\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00") + (data (i32.const 176) "\05\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) diff --git a/tests/compiler/instanceof-class.optimized.wat b/tests/compiler/instanceof-class.optimized.wat index 4ca755603c..8bf8ca31f4 100644 --- a/tests/compiler/instanceof-class.optimized.wat +++ b/tests/compiler/instanceof-class.optimized.wat @@ -6,7 +6,7 @@ (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\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00-\00c\00l\00a\00s\00s\00.\00t\00s") - (data (i32.const 1088) "\07\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\04\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\05") + (data (i32.const 1088) "\07\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\04\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\05") (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (global $instanceof-class/a (mut i32) (i32.const 0)) diff --git a/tests/compiler/instanceof-class.untouched.wat b/tests/compiler/instanceof-class.untouched.wat index 8842167ca2..369241be41 100644 --- a/tests/compiler/instanceof-class.untouched.wat +++ b/tests/compiler/instanceof-class.untouched.wat @@ -7,7 +7,7 @@ (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 16) "&\00\00\00\01\00\00\00\01\00\00\00&\00\00\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00-\00c\00l\00a\00s\00s\00.\00t\00s\00") - (data (i32.const 80) "\07\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\04\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\05\00\00\00") + (data (i32.const 80) "\07\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\04\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\05\00\00\00") (table $0 1 funcref) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index 7248943b5a..3ce9674d03 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -17,7 +17,7 @@ (data (i32.const 1072) "(\00\00\00\01\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") (data (i32.const 1136) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s") (data (i32.const 1184) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00m\00a\00n\00a\00g\00e\00d\00-\00c\00a\00s\00t\00.\00t\00s") - (data (i32.const 1232) "\05\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\04\00\00\00\10") + (data (i32.const 1232) "\05\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\04\00\00\00 ") (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (global $~started (mut i32) (i32.const 0)) diff --git a/tests/compiler/managed-cast.untouched.wat b/tests/compiler/managed-cast.untouched.wat index 836da371d6..61c9b2f3b3 100644 --- a/tests/compiler/managed-cast.untouched.wat +++ b/tests/compiler/managed-cast.untouched.wat @@ -18,7 +18,7 @@ (data (i32.const 64) "(\00\00\00\01\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00") (data (i32.const 128) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s\00") (data (i32.const 176) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00m\00a\00n\00a\00g\00e\00d\00-\00c\00a\00s\00t\00.\00t\00s\00") - (data (i32.const 224) "\05\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\04\00\00\00\10\00\00\00\00\00\00\00") + (data (i32.const 224) "\05\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\04\00\00\00 \00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index 46f27d4a77..6ef8f54466 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -13,7 +13,7 @@ (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") (data (i32.const 1072) "(\00\00\00\01\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") (data (i32.const 1136) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s") - (data (i32.const 1184) "\04\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10") + (data (i32.const 1184) "\04\00\00\00 \00\00\00\00\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/rt/__rtti_base i32 (i32.const 1184)) diff --git a/tests/compiler/rc/rereturn.untouched.wat b/tests/compiler/rc/rereturn.untouched.wat index 4e08db2081..bd03a0cf56 100644 --- a/tests/compiler/rc/rereturn.untouched.wat +++ b/tests/compiler/rc/rereturn.untouched.wat @@ -13,7 +13,7 @@ (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") (data (i32.const 64) "(\00\00\00\01\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00") (data (i32.const 128) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s\00") - (data (i32.const 176) "\04\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00") + (data (i32.const 176) "\04\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 93396ae63a..e28ef70cec 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -26,7 +26,7 @@ (data (i32.const 2368) "(\00\00\00\01\00\00\00\05\00\00\00(\00\00\00\01\00\00\00\n\00\00\00d\00\00\00\e8\03\00\00\10\'\00\00\a0\86\01\00@B\0f\00\80\96\98\00\00\e1\f5\05\00\ca\9a;") (data (i32.const 2436) "\01\00\00\00\01") (data (i32.const 2448) "\06\00\00\00\01\00\00\00\01\00\00\00\06\00\00\001\00.\000") - (data (i32.const 2480) "\06\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10") + (data (i32.const 2480) "\06\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00$\02\00\00\00\00\00\00\a4\08\00\00\00\00\00\00$\01") (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)) diff --git a/tests/compiler/resolve-ternary.untouched.wat b/tests/compiler/resolve-ternary.untouched.wat index 99ff6aff19..62e4265933 100644 --- a/tests/compiler/resolve-ternary.untouched.wat +++ b/tests/compiler/resolve-ternary.untouched.wat @@ -31,7 +31,7 @@ (data (i32.const 1776) "(\00\00\00\01\00\00\00\03\00\00\00(\00\00\00\01\00\00\00\n\00\00\00d\00\00\00\e8\03\00\00\10\'\00\00\a0\86\01\00@B\0f\00\80\96\98\00\00\e1\f5\05\00\ca\9a;") (data (i32.const 1840) "\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00") (data (i32.const 1856) "\06\00\00\00\01\00\00\00\01\00\00\00\06\00\00\001\00.\000\00") - (data (i32.const 1888) "\06\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00") + (data (i32.const 1888) "\06\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00$\01\00\00\00\00\00\00$\02\00\00\00\00\00\00\a4\08\00\00\00\00\00\00") (table $0 5 funcref) (elem (i32.const 1) $start:resolve-ternary~anonymous|0 $start:resolve-ternary~anonymous|1 $resolve-ternary/g1 $resolve-ternary/g2) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index 21b3bae899..258951c272 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -28,7 +28,7 @@ (data (i32.const 1440) "\02\00\00\00\01\00\00\00\01\00\00\00\02\00\00\00d") (data (i32.const 1472) "$\00\00\00\01\00\00\00\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") (data (i32.const 1536) "\14\00\00\00\01\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s") - (data (i32.const 1584) "\08\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\92\04\00\00\00\00\00\00\92 \00\00\00\00\00\00\92 ") + (data (i32.const 1584) "\08\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\"\t\00\00\00\00\00\00\"A\00\00\00\00\00\00\"A") (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (global $~lib/rt/pure/ROOTS (mut i32) (i32.const 0)) @@ -2422,7 +2422,7 @@ i32.const 1588 i32.add i32.load - i32.const 16 + i32.const 32 i32.and if local.get $0 diff --git a/tests/compiler/retain-release-sanity.untouched.wat b/tests/compiler/retain-release-sanity.untouched.wat index 32efaec640..5a830cace2 100644 --- a/tests/compiler/retain-release-sanity.untouched.wat +++ b/tests/compiler/retain-release-sanity.untouched.wat @@ -28,7 +28,7 @@ (data (i32.const 432) "\02\00\00\00\01\00\00\00\01\00\00\00\02\00\00\00d\00") (data (i32.const 464) "$\00\00\00\01\00\00\00\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e\00") (data (i32.const 528) "\14\00\00\00\01\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s\00") - (data (i32.const 576) "\08\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\92\04\00\00\00\00\00\00\92 \00\00\00\00\00\00\92 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 576) "\08\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00\"\t\00\00\00\00\00\00\"A\00\00\00\00\00\00\"A\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) @@ -4301,7 +4301,7 @@ local.get $0 i32.load offset=8 call $~lib/rt/__typeinfo - i32.const 16 + i32.const 32 i32.and i32.eqz if diff --git a/tests/compiler/rt/instanceof.optimized.wat b/tests/compiler/rt/instanceof.optimized.wat index 6fdfe4733f..084d04f9e5 100644 --- a/tests/compiler/rt/instanceof.optimized.wat +++ b/tests/compiler/rt/instanceof.optimized.wat @@ -6,7 +6,7 @@ (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\00r\00t\00/\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s") - (data (i32.const 1072) "\06\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\03\00\00\00\10\00\00\00\04") + (data (i32.const 1072) "\06\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\03\00\00\00 \00\00\00\04") (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (global $rt/instanceof/animal (mut i32) (i32.const 0)) diff --git a/tests/compiler/rt/instanceof.untouched.wat b/tests/compiler/rt/instanceof.untouched.wat index 85010be4e0..a78bd575da 100644 --- a/tests/compiler/rt/instanceof.untouched.wat +++ b/tests/compiler/rt/instanceof.untouched.wat @@ -7,7 +7,7 @@ (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 16) " \00\00\00\01\00\00\00\01\00\00\00 \00\00\00r\00t\00/\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s\00") - (data (i32.const 64) "\06\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\03\00\00\00\10\00\00\00\04\00\00\00") + (data (i32.const 64) "\06\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\03\00\00\00 \00\00\00\04\00\00\00") (table $0 1 funcref) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) diff --git a/tests/compiler/rt/stub-realloc.optimized.wat b/tests/compiler/rt/stub-realloc.optimized.wat index da88f5da63..e612ad2b14 100644 --- a/tests/compiler/rt/stub-realloc.optimized.wat +++ b/tests/compiler/rt/stub-realloc.optimized.wat @@ -9,7 +9,7 @@ (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/\00s\00t\00u\00b\00.\00t\00s") (data (i32.const 1072) "$\00\00\00\01\00\00\00\01\00\00\00$\00\00\00r\00t\00/\00s\00t\00u\00b\00-\00r\00e\00a\00l\00l\00o\00c\00.\00t\00s") - (data (i32.const 1136) "\03\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10") + (data (i32.const 1136) "\03\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 ") (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (global $rt/stub-realloc/ptr (mut i32) (i32.const 0)) diff --git a/tests/compiler/rt/stub-realloc.untouched.wat b/tests/compiler/rt/stub-realloc.untouched.wat index a128cd0ca5..787b72f032 100644 --- a/tests/compiler/rt/stub-realloc.untouched.wat +++ b/tests/compiler/rt/stub-realloc.untouched.wat @@ -9,7 +9,7 @@ (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/\00s\00t\00u\00b\00.\00t\00s\00") (data (i32.const 64) "$\00\00\00\01\00\00\00\01\00\00\00$\00\00\00r\00t\00/\00s\00t\00u\00b\00-\00r\00e\00a\00l\00l\00o\00c\00.\00t\00s\00") - (data (i32.const 128) "\03\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00") + (data (i32.const 128) "\03\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index 07ac9819af..fa44519cef 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -13,7 +13,7 @@ (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") (data (i32.const 1072) "(\00\00\00\01\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") (data (i32.const 1136) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s") - (data (i32.const 1184) "\03\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10") + (data (i32.const 1184) "\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/rt/__rtti_base i32 (i32.const 1184)) diff --git a/tests/compiler/runtime-full.untouched.wat b/tests/compiler/runtime-full.untouched.wat index e075c508f1..4af08cab7f 100644 --- a/tests/compiler/runtime-full.untouched.wat +++ b/tests/compiler/runtime-full.untouched.wat @@ -13,7 +13,7 @@ (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") (data (i32.const 64) "(\00\00\00\01\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e\00") (data (i32.const 128) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s\00") - (data (i32.const 176) "\03\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00") + (data (i32.const 176) "\03\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) diff --git a/tests/compiler/runtime-stub.optimized.wat b/tests/compiler/runtime-stub.optimized.wat index d97ae347d4..91138b93c1 100644 --- a/tests/compiler/runtime-stub.optimized.wat +++ b/tests/compiler/runtime-stub.optimized.wat @@ -4,7 +4,7 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 1) - (data (i32.const 1024) "\03\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10") + (data (i32.const 1024) "\03\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 ") (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (global $~lib/rt/__rtti_base i32 (i32.const 1024)) diff --git a/tests/compiler/runtime-stub.untouched.wat b/tests/compiler/runtime-stub.untouched.wat index 75c880414a..096e2a638d 100644 --- a/tests/compiler/runtime-stub.untouched.wat +++ b/tests/compiler/runtime-stub.untouched.wat @@ -4,7 +4,7 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 1) - (data (i32.const 16) "\03\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00") + (data (i32.const 16) "\03\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00 \00\00\00\00\00\00\00") (table $0 1 funcref) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) (global $~lib/rt/stub/offset (mut i32) (i32.const 0))