From 27f19055108024329c56d48bfcd772e2f9184fc7 Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 31 Mar 2019 21:58:42 +0200 Subject: [PATCH] runtime integration and flag --- cli/asc.js | 32 + cli/asc.json | 12 + src/compiler.ts | 7 +- std/assembly/allocator/tlsf.ts | 32 +- std/assembly/collector/itcm.ts | 10 + std/assembly/runtime.ts | 4 + std/runtime/README.md | 38 + std/runtime/arena.ts | 1 + std/runtime/default.ts | 2 + std/runtime/none.ts | 0 std/runtime/tsconfig.json | 6 + tests/compiler/abi.json | 5 + tests/compiler/asc-constants.json | 5 + tests/compiler/assert-nonnull.json | 5 + ...mized.wat => assert-nonnull.optimized.wat} | 56 +- ...{nonNullAssertion.ts => assert-nonnull.ts} | 2 - ...uched.wat => assert-nonnull.untouched.wat} | 70 +- tests/compiler/assert.json | 5 + tests/compiler/basic-nullable.json | 5 + tests/compiler/binary.json | 5 + tests/compiler/bool.json | 5 + tests/compiler/builtins.json | 5 + tests/compiler/call-inferred.json | 5 + tests/compiler/call-optional.json | 5 + tests/compiler/call-super.json | 5 + tests/compiler/call-super.optimized.wat | 36 +- tests/compiler/call-super.ts | 2 - tests/compiler/call-super.untouched.wat | 38 +- tests/compiler/class-extends.json | 1 + tests/compiler/class-extends.optimized.wat | 2 + tests/compiler/class-extends.untouched.wat | 2 + tests/compiler/class-overloading.json | 5 + tests/compiler/class.json | 1 + tests/compiler/class.optimized.wat | 17 +- tests/compiler/class.untouched.wat | 33 +- tests/compiler/closure.json | 1 + tests/compiler/closure.optimized.wat | 2 + tests/compiler/closure.untouched.wat | 2 + tests/compiler/comma.json | 5 + tests/compiler/constructor.json | 1 + tests/compiler/constructor.optimized.wat | 1610 ++++++++++- tests/compiler/constructor.ts | 2 - tests/compiler/constructor.untouched.wat | 2075 +++++++++++++- tests/compiler/declare.json | 5 + tests/compiler/do.json | 5 + tests/compiler/empty.json | 5 + tests/compiler/enum.json | 5 + tests/compiler/export.json | 5 + tests/compiler/exports.json | 5 + tests/compiler/exports.optimized.wat | 4 +- tests/compiler/exports.untouched.wat | 6 +- tests/compiler/external.json | 5 + tests/compiler/for.json | 5 + tests/compiler/function-expression.json | 5 + tests/compiler/function-types.json | 5 + tests/compiler/function.json | 5 + tests/compiler/gc.json | 5 + tests/compiler/gc.optimized.wat | 24 +- tests/compiler/gc.ts | 1 - tests/compiler/gc.untouched.wat | 28 +- tests/compiler/gc/global-assign.json | 5 + tests/compiler/gc/global-assign.optimized.wat | 18 +- tests/compiler/gc/global-assign.ts | 1 - tests/compiler/gc/global-assign.untouched.wat | 20 +- tests/compiler/gc/global-init.json | 5 + tests/compiler/gc/global-init.optimized.wat | 18 +- tests/compiler/gc/global-init.ts | 1 - tests/compiler/gc/global-init.untouched.wat | 20 +- tests/compiler/gc/itcm/trace.json | 5 + tests/compiler/gc/itcm/trace.optimized.wat | 14 +- tests/compiler/gc/itcm/trace.ts | 2 - tests/compiler/gc/itcm/trace.untouched.wat | 26 +- tests/compiler/gc/rc/global-assign.json | 5 + .../gc/rc/global-assign.optimized.wat | 22 +- tests/compiler/gc/rc/global-assign.ts | 1 - .../gc/rc/global-assign.untouched.wat | 24 +- tests/compiler/gc/rc/global-init.json | 5 + .../compiler/gc/rc/global-init.optimized.wat | 12 +- tests/compiler/gc/rc/global-init.ts | 1 - .../compiler/gc/rc/global-init.untouched.wat | 14 +- tests/compiler/getter-call.json | 5 + tests/compiler/getter-call.optimized.wat | 4 +- tests/compiler/getter-call.untouched.wat | 6 +- tests/compiler/getter-setter.json | 5 + tests/compiler/i64-polyfill.json | 5 + tests/compiler/if.json | 5 + tests/compiler/import.json | 5 + tests/compiler/infer-type.json | 5 + tests/compiler/inlining-blocklocals.json | 5 + tests/compiler/inlining-recursive.json | 5 + tests/compiler/inlining.json | 5 + tests/compiler/inlining.optimized.wat | 4 +- tests/compiler/inlining.untouched.wat | 6 +- tests/compiler/instanceof.json | 5 + tests/compiler/limits.json | 5 + tests/compiler/literals.json | 5 + tests/compiler/logical.json | 5 + tests/compiler/main.json | 5 + tests/compiler/mandelbrot.json | 5 + tests/compiler/many-locals.json | 5 + tests/compiler/memcpy.json | 5 + tests/compiler/memmove.json | 5 + tests/compiler/memset.json | 5 + tests/compiler/merge.json | 5 + tests/compiler/named-export-default.json | 5 + tests/compiler/named-import-default.json | 5 + tests/compiler/namespace.json | 5 + tests/compiler/new-without-allocator.json | 5 + tests/compiler/number.json | 5 + tests/compiler/number.optimized.wat | 86 +- tests/compiler/number.ts | 2 - tests/compiler/number.untouched.wat | 118 +- tests/compiler/optional-typeparameters.json | 5 + .../optional-typeparameters.optimized.wat | 4 +- .../optional-typeparameters.untouched.wat | 6 +- tests/compiler/overflow.json | 5 + tests/compiler/portable-conversions.json | 5 + tests/compiler/recursive.json | 5 + tests/compiler/reexport.json | 5 + tests/compiler/rereexport.json | 5 + tests/compiler/resolve-nested.json | 5 + tests/compiler/retain-i32.json | 5 + tests/compiler/runtime-arena.json | 5 + tests/compiler/runtime-arena.optimized.wat | 11 + tests/compiler/runtime-arena.ts | 0 tests/compiler/runtime-arena.untouched.wat | 11 + tests/compiler/runtime-default.json | 5 + tests/compiler/runtime-default.optimized.wat | 13 + tests/compiler/runtime-default.ts | 0 tests/compiler/runtime-default.untouched.wat | 13 + tests/compiler/runtime-none.json | 5 + tests/compiler/runtime-none.optimized.wat | 11 + tests/compiler/runtime-none.ts | 0 tests/compiler/runtime-none.untouched.wat | 11 + tests/compiler/scoped.json | 5 + tests/compiler/simd.json | 3 + tests/compiler/static-this.json | 5 + tests/compiler/std/allocator_arena.json | 5 + tests/compiler/std/array-access.json | 5 + tests/compiler/std/array-access.untouched.wat | 1 - tests/compiler/std/array-literal.json | 5 + .../compiler/std/array-literal.optimized.wat | 138 +- tests/compiler/std/array-literal.ts | 1 - .../compiler/std/array-literal.untouched.wat | 152 +- tests/compiler/std/array.json | 5 + tests/compiler/std/array.optimized.wat | 606 ++-- tests/compiler/std/array.ts | 1 - tests/compiler/std/array.untouched.wat | 608 ++-- tests/compiler/std/arraybuffer.json | 5 + tests/compiler/std/arraybuffer.optimized.wat | 34 +- tests/compiler/std/arraybuffer.ts | 2 - tests/compiler/std/arraybuffer.untouched.wat | 48 +- tests/compiler/std/dataview.json | 5 + tests/compiler/std/dataview.optimized.wat | 200 +- tests/compiler/std/dataview.ts | 2 - tests/compiler/std/dataview.untouched.wat | 204 +- tests/compiler/std/date.json | 5 + tests/compiler/std/date.optimized.wat | 16 +- tests/compiler/std/date.ts | 2 - tests/compiler/std/date.untouched.wat | 18 +- tests/compiler/std/gc-array.optimized.wat | 1904 ------------ tests/compiler/std/gc-array.untouched.wat | 2540 ----------------- tests/compiler/std/gc-basics.optimized.wat | 481 ---- tests/compiler/std/gc-object.optimized.wat | 437 --- tests/compiler/std/hash.json | 5 + tests/compiler/std/hash.untouched.wat | 1 - tests/compiler/std/libm.json | 5 + tests/compiler/std/map.json | 5 + tests/compiler/std/map.optimized.wat | 364 +-- tests/compiler/std/map.ts | 1 - tests/compiler/std/map.untouched.wat | 366 +-- tests/compiler/std/math.json | 5 + tests/compiler/std/math.untouched.wat | 2 - tests/compiler/std/mod.json | 5 + tests/compiler/std/new.json | 5 + tests/compiler/std/new.optimized.wat | 4 +- tests/compiler/std/new.ts | 2 - tests/compiler/std/new.untouched.wat | 6 +- tests/compiler/std/object-literal.json | 5 + .../{ => std}/object-literal.optimized.wat | 93 +- tests/compiler/{ => std}/object-literal.ts | 2 +- .../{ => std}/object-literal.untouched.wat | 108 +- tests/compiler/std/operator-overloading.json | 5 + .../std/operator-overloading.optimized.wat | 70 +- tests/compiler/std/operator-overloading.ts | 2 - .../std/operator-overloading.untouched.wat | 72 +- tests/compiler/std/pointer.json | 5 + tests/compiler/std/polyfills.json | 5 + tests/compiler/std/runtime.json | 5 + tests/compiler/std/runtime.optimized.wat | 232 +- tests/compiler/std/runtime.untouched.wat | 367 ++- tests/compiler/std/set.json | 5 + tests/compiler/std/set.optimized.wat | 284 +- tests/compiler/std/set.ts | 1 - tests/compiler/std/set.untouched.wat | 286 +- tests/compiler/std/simd.json | 5 + tests/compiler/std/static-array.json | 5 + tests/compiler/std/static-array.optimized.wat | 34 +- tests/compiler/std/static-array.ts | 2 - tests/compiler/std/static-array.untouched.wat | 36 +- tests/compiler/std/string-utf8.json | 5 + tests/compiler/std/string-utf8.optimized.wat | 40 +- tests/compiler/std/string-utf8.ts | 2 - tests/compiler/std/string-utf8.untouched.wat | 42 +- tests/compiler/std/string.json | 5 + tests/compiler/std/string.optimized.wat | 514 ++-- tests/compiler/std/string.ts | 1 - tests/compiler/std/string.untouched.wat | 550 ++-- tests/compiler/std/symbol.json | 5 + tests/compiler/std/symbol.optimized.wat | 24 +- tests/compiler/std/symbol.ts | 2 - tests/compiler/std/symbol.untouched.wat | 28 +- tests/compiler/std/trace.json | 5 + tests/compiler/std/typedarray.json | 5 + tests/compiler/std/typedarray.optimized.wat | 636 ++--- tests/compiler/std/typedarray.ts | 1 - tests/compiler/std/typedarray.untouched.wat | 636 ++--- tests/compiler/switch.json | 5 + tests/compiler/ternary.json | 5 + tests/compiler/threads.json | 1 + tests/compiler/typealias.json | 5 + tests/compiler/unary.json | 5 + tests/compiler/void.json | 5 + tests/compiler/while.json | 5 + tests/compiler/wildcard-export.json | 5 + 225 files changed, 8010 insertions(+), 9365 deletions(-) create mode 100644 std/runtime/README.md create mode 100644 std/runtime/arena.ts create mode 100644 std/runtime/default.ts create mode 100644 std/runtime/none.ts create mode 100644 std/runtime/tsconfig.json create mode 100644 tests/compiler/abi.json create mode 100644 tests/compiler/asc-constants.json create mode 100644 tests/compiler/assert-nonnull.json rename tests/compiler/{nonNullAssertion.optimized.wat => assert-nonnull.optimized.wat} (56%) rename tests/compiler/{nonNullAssertion.ts => assert-nonnull.ts} (97%) rename tests/compiler/{nonNullAssertion.untouched.wat => assert-nonnull.untouched.wat} (58%) create mode 100644 tests/compiler/assert.json create mode 100644 tests/compiler/basic-nullable.json create mode 100644 tests/compiler/binary.json create mode 100644 tests/compiler/bool.json create mode 100644 tests/compiler/builtins.json create mode 100644 tests/compiler/call-inferred.json create mode 100644 tests/compiler/call-optional.json create mode 100644 tests/compiler/call-super.json create mode 100644 tests/compiler/class-extends.json create mode 100644 tests/compiler/class-overloading.json create mode 100644 tests/compiler/class.json create mode 100644 tests/compiler/closure.json create mode 100644 tests/compiler/comma.json create mode 100644 tests/compiler/constructor.json create mode 100644 tests/compiler/declare.json create mode 100644 tests/compiler/do.json create mode 100644 tests/compiler/empty.json create mode 100644 tests/compiler/enum.json create mode 100644 tests/compiler/export.json create mode 100644 tests/compiler/exports.json create mode 100644 tests/compiler/external.json create mode 100644 tests/compiler/for.json create mode 100644 tests/compiler/function-expression.json create mode 100644 tests/compiler/function-types.json create mode 100644 tests/compiler/function.json create mode 100644 tests/compiler/gc.json create mode 100644 tests/compiler/gc/global-assign.json create mode 100644 tests/compiler/gc/global-init.json create mode 100644 tests/compiler/gc/itcm/trace.json create mode 100644 tests/compiler/gc/rc/global-assign.json create mode 100644 tests/compiler/gc/rc/global-init.json create mode 100644 tests/compiler/getter-call.json create mode 100644 tests/compiler/getter-setter.json create mode 100644 tests/compiler/i64-polyfill.json create mode 100644 tests/compiler/if.json create mode 100644 tests/compiler/import.json create mode 100644 tests/compiler/infer-type.json create mode 100644 tests/compiler/inlining-blocklocals.json create mode 100644 tests/compiler/inlining-recursive.json create mode 100644 tests/compiler/inlining.json create mode 100644 tests/compiler/instanceof.json create mode 100644 tests/compiler/limits.json create mode 100644 tests/compiler/literals.json create mode 100644 tests/compiler/logical.json create mode 100644 tests/compiler/main.json create mode 100644 tests/compiler/mandelbrot.json create mode 100644 tests/compiler/many-locals.json create mode 100644 tests/compiler/memcpy.json create mode 100644 tests/compiler/memmove.json create mode 100644 tests/compiler/memset.json create mode 100644 tests/compiler/merge.json create mode 100644 tests/compiler/named-export-default.json create mode 100644 tests/compiler/named-import-default.json create mode 100644 tests/compiler/namespace.json create mode 100644 tests/compiler/new-without-allocator.json create mode 100644 tests/compiler/number.json create mode 100644 tests/compiler/optional-typeparameters.json create mode 100644 tests/compiler/overflow.json create mode 100644 tests/compiler/portable-conversions.json create mode 100644 tests/compiler/recursive.json create mode 100644 tests/compiler/reexport.json create mode 100644 tests/compiler/rereexport.json create mode 100644 tests/compiler/resolve-nested.json create mode 100644 tests/compiler/retain-i32.json create mode 100644 tests/compiler/runtime-arena.json create mode 100644 tests/compiler/runtime-arena.optimized.wat create mode 100644 tests/compiler/runtime-arena.ts create mode 100644 tests/compiler/runtime-arena.untouched.wat create mode 100644 tests/compiler/runtime-default.json create mode 100644 tests/compiler/runtime-default.optimized.wat create mode 100644 tests/compiler/runtime-default.ts create mode 100644 tests/compiler/runtime-default.untouched.wat create mode 100644 tests/compiler/runtime-none.json create mode 100644 tests/compiler/runtime-none.optimized.wat create mode 100644 tests/compiler/runtime-none.ts create mode 100644 tests/compiler/runtime-none.untouched.wat create mode 100644 tests/compiler/scoped.json create mode 100644 tests/compiler/static-this.json create mode 100644 tests/compiler/std/allocator_arena.json create mode 100644 tests/compiler/std/array-access.json create mode 100644 tests/compiler/std/array-literal.json create mode 100644 tests/compiler/std/array.json create mode 100644 tests/compiler/std/arraybuffer.json create mode 100644 tests/compiler/std/dataview.json create mode 100644 tests/compiler/std/date.json delete mode 100644 tests/compiler/std/gc-array.optimized.wat delete mode 100644 tests/compiler/std/gc-array.untouched.wat delete mode 100644 tests/compiler/std/gc-basics.optimized.wat delete mode 100644 tests/compiler/std/gc-object.optimized.wat create mode 100644 tests/compiler/std/hash.json create mode 100644 tests/compiler/std/libm.json create mode 100644 tests/compiler/std/map.json create mode 100644 tests/compiler/std/math.json create mode 100644 tests/compiler/std/mod.json create mode 100644 tests/compiler/std/new.json create mode 100644 tests/compiler/std/object-literal.json rename tests/compiler/{ => std}/object-literal.optimized.wat (69%) rename tests/compiler/{ => std}/object-literal.ts (93%) rename tests/compiler/{ => std}/object-literal.untouched.wat (67%) create mode 100644 tests/compiler/std/operator-overloading.json create mode 100644 tests/compiler/std/pointer.json create mode 100644 tests/compiler/std/polyfills.json create mode 100644 tests/compiler/std/runtime.json create mode 100644 tests/compiler/std/set.json create mode 100644 tests/compiler/std/simd.json create mode 100644 tests/compiler/std/static-array.json create mode 100644 tests/compiler/std/string-utf8.json create mode 100644 tests/compiler/std/string.json create mode 100644 tests/compiler/std/symbol.json create mode 100644 tests/compiler/std/trace.json create mode 100644 tests/compiler/std/typedarray.json create mode 100644 tests/compiler/switch.json create mode 100644 tests/compiler/ternary.json create mode 100644 tests/compiler/typealias.json create mode 100644 tests/compiler/unary.json create mode 100644 tests/compiler/void.json create mode 100644 tests/compiler/while.json create mode 100644 tests/compiler/wildcard-export.json diff --git a/cli/asc.js b/cli/asc.js index 0c745a39..eda2e339 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -82,6 +82,15 @@ exports.libraryFiles = exports.isBundle ? BUNDLE_LIBRARY : (() => { // set up if return bundled; })(); +/** Bundled runtime templates. */ +exports.runtimeTemplates = exports.isBundle ? BUNDLE_RUNTIME : (() => { + const rtDir = path.join(__dirname, "..", "std", "runtime"); + const rtFiles = require("glob").sync("**/!(*.d).ts", { cwd: rtDir }); + const bundled = {}; + rtFiles.forEach(file => bundled[file.replace(/\.ts$/, "")] = fs.readFileSync(path.join(rtDir, file), "utf8" )); + return bundled; +})(); + /** Bundled definition files. */ exports.definitionFiles = exports.isBundle ? BUNDLE_DEFINITIONS : (() => { // set up if not a bundle const stdDir = path.join(__dirname, "..", "std"); @@ -387,11 +396,34 @@ exports.main = function main(argv, options, callback) { stats.parseTime += measure(() => { parser = assemblyscript.parseFile(sourceText, sourcePath, true, parser); }); + } + + // Include runtime template + { + let templateName = String(args.runtime); + let templateText = exports.runtimeTemplates[templateName]; + if (templateText == null) { + templateText = readFile(templateName + ".ts", baseDir); + if (templateText == null) { + return callback(Error("Runtime template '" + templateName + " not found.")); + } + } + stats.parseCount++; + stats.parseTime += measure(() => { + parser = assemblyscript.parseFile(templateText, templateName, true, parser); + }); + } + + // Parse entry files + { let code = parseBacklog(); if (code) return code; } + // Call afterParse transform hook applyTransform("afterParse", parser); + + // Parse additional files, if any { let code = parseBacklog(); if (code) return code; diff --git a/cli/asc.json b/cli/asc.json index 523d2416..f5adcac2 100644 --- a/cli/asc.json +++ b/cli/asc.json @@ -81,6 +81,18 @@ ], "type": "s" }, + "runtime": { + "description": [ + "Specifies the runtime template to include in the program.", + "", + " default TLSF memory allocator and ITCM garbage collector.", + " arena Just the arena memory allocator. No free/GC.", + " none No allocator/GC or compose your own.", + "" + ], + "type": "s", + "default": "default" + }, "debug": { "description": "Enables debug information in emitted binaries.", "type": "b", diff --git a/src/compiler.ts b/src/compiler.ts index 4374121a..41d643a3 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -8374,9 +8374,9 @@ export class Compiler extends DiagnosticEmitter { var module = this.module; var options = this.options; + var usizeType = options.usizeType; var nativeSizeType = options.nativeSizeType; var nativeSizeSize = options.usizeType.byteSize; - // var signatureStr = Signature.makeSignatureString([ Type.u32 ], Type.void, options.usizeType); var body = new Array(); // nothing to mark if 'this' is null (should not happen) @@ -8398,6 +8398,9 @@ export class Compiler extends DiagnosticEmitter { assert(functionIndex < functionTable.length); assert(functionTable[functionIndex] == functionName); + var fnSig = Signature.makeSignatureString([ usizeType ], Type.void); + this.ensureFunctionType([ usizeType ], Type.void); + // if the class extends a base class, call its hook first var baseInstance = classInstance.base; if (baseInstance) { @@ -8441,7 +8444,7 @@ export class Compiler extends DiagnosticEmitter { module.createGetLocal(1, NativeType.I32), [ module.createGetLocal(2, nativeSizeType) - ], "FUNCSIG$vi" + ], fnSig ), module.createCall(functionTable[fieldClassId], [ module.createGetLocal(2, nativeSizeType), diff --git a/std/assembly/allocator/tlsf.ts b/std/assembly/allocator/tlsf.ts index 8d7b0f2b..dd08a736 100644 --- a/std/assembly/allocator/tlsf.ts +++ b/std/assembly/allocator/tlsf.ts @@ -14,12 +14,24 @@ import { AL_BITS, AL_SIZE, AL_MASK } from "../util/allocator"; import { HEAP_BASE, memory } from "../memory"; +// @ts-ignore: decorator +@lazy const SL_BITS: u32 = 5; + +// @ts-ignore: decorator +@lazy const SL_SIZE: usize = 1 << SL_BITS; +// @ts-ignore: decorator +@lazy const SB_BITS: usize = (SL_BITS + AL_BITS); + +// @ts-ignore: decorator +@lazy const SB_SIZE: usize = 1 << SB_BITS; +// @ts-ignore: decorator +@lazy const FL_BITS: u32 = (sizeof() == sizeof() ? 30 // ^= up to 1GB per block : 32 // ^= up to 4GB per block @@ -42,10 +54,18 @@ const FL_BITS: u32 = (sizeof() == sizeof() // F: FREE, L: LEFT_FREE /** Tag indicating that this block is free. */ +// @ts-ignore: decorator +@lazy const FREE: usize = 1 << 0; + /** Tag indicating that this block's left block is free. */ +// @ts-ignore: decorator +@lazy const LEFT_FREE: usize = 1 << 1; + /** Mask to obtain all tags. */ +// @ts-ignore: decorator +@lazy const TAGS: usize = FREE | LEFT_FREE; /** Block structure. */ @@ -55,6 +75,7 @@ const TAGS: usize = FREE | LEFT_FREE; info: usize; /** End offset of the {@link Block#info} field. User data starts here. */ + @lazy static readonly INFO: usize = (sizeof() + AL_MASK) & ~AL_MASK; /** Previous free block, if any. Only valid if free. */ @@ -63,9 +84,11 @@ const TAGS: usize = FREE | LEFT_FREE; next: Block | null; /** Minimum size of a block, excluding {@link Block#info}. */ + @lazy static readonly MIN_SIZE: usize = (3 * sizeof() + AL_MASK) & ~AL_MASK;// prev + next + jump /** Maximum size of a used block, excluding {@link Block#info}. */ + @lazy static readonly MAX_SIZE: usize = 1 << (FL_BITS + SB_BITS); /** Gets this block's left (free) block in memory. */ @@ -111,7 +134,7 @@ const TAGS: usize = FREE | LEFT_FREE; // └───────────────────────────────────────────────────────────────┘ SIZE ┘ // S: Small blocks map, P: Possibly padded if 64-bit -assert((1 << SL_BITS) <= 32); // second level must fit into 32 bits +// assert((1 << SL_BITS) <= 32); // second level must fit into 32 bits /** Root structure. */ @unmanaged class Root { @@ -120,6 +143,7 @@ assert((1 << SL_BITS) <= 32); // second level must fit into 32 bits flMap: usize = 0; /** Start offset of second level maps. */ + @lazy private static readonly SL_START: usize = sizeof(); // Using *one* SL map per *FL bit* @@ -137,11 +161,13 @@ assert((1 << SL_BITS) <= 32); // second level must fit into 32 bits } /** End offset of second level maps. */ + @lazy private static readonly SL_END: usize = Root.SL_START + FL_BITS * 4; // Using *number bits per SL* heads per *FL bit* /** Start offset of FL/SL heads. */ + @lazy private static readonly HL_START: usize = (Root.SL_END + AL_MASK) & ~AL_MASK; /** Gets the head of the specified first and second level index. */ @@ -164,6 +190,7 @@ assert((1 << SL_BITS) <= 32); // second level must fit into 32 bits } /** End offset of FL/SL heads. */ + @lazy private static readonly HL_END: usize = ( Root.HL_START + FL_BITS * SL_SIZE * sizeof() ); @@ -172,6 +199,7 @@ assert((1 << SL_BITS) <= 32); // second level must fit into 32 bits set tailRef(value: usize) { store(0, value, Root.HL_END); } /** Total size of the {@link Root} structure. */ + @lazy static readonly SIZE: usize = Root.HL_END + sizeof(); /** Inserts a previously used block back into the free list. */ @@ -424,6 +452,8 @@ function fls(word: T): T { } /** Reference to the initialized {@link Root} structure, once initialized. */ +// @ts-ignore: decorator +@lazy var ROOT: Root = changetype(0); /** Allocates a chunk of memory. */ diff --git a/std/assembly/collector/itcm.ts b/std/assembly/collector/itcm.ts index 0b6bcf38..5669e32a 100644 --- a/std/assembly/collector/itcm.ts +++ b/std/assembly/collector/itcm.ts @@ -19,13 +19,23 @@ const enum State { } /** Current collector state. */ +// @ts-ignore: decorator +@lazy var state = State.INIT; /** Current white color value. */ +// @ts-ignore: decorator +@lazy var white = 0; // From and to spaces +// @ts-ignore: decorator +@lazy var fromSpace: ManagedObjectList; +// @ts-ignore: decorator +@lazy var toSpace: ManagedObjectList; +// @ts-ignore: decorator +@lazy var iter: ManagedObject; // ╒═══════════════ Managed object layout (32-bit) ════════════════╕ diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts index 722016fa..152aab2b 100644 --- a/std/assembly/runtime.ts +++ b/std/assembly/runtime.ts @@ -27,11 +27,15 @@ import { Array } from "./array"; } /** Common runtime header size. */ +// @ts-ignore: decorator +@lazy export const HEADER_SIZE: usize = isDefined(__ref_collect) ? (offsetof
( ) + AL_MASK) & ~AL_MASK // full header if GC is present : (offsetof
("reserved1") + AL_MASK) & ~AL_MASK; // half header if GC is absent /** Common runtime header magic. Used to assert registered/unregistered status. */ +// @ts-ignore: decorator +@lazy export const HEADER_MAGIC: u32 = 0xA55E4B17; /** Gets the computed unique class id of a class type. */ diff --git a/std/runtime/README.md b/std/runtime/README.md new file mode 100644 index 00000000..97a02d1e --- /dev/null +++ b/std/runtime/README.md @@ -0,0 +1,38 @@ +AssemblyScript runtimes +======================= + +Default +------- + +``` +$> asc ... +``` + +The [default runtime](./default.ts) adds proper support for dynamic memory management and garbage collection to your program. + +* [TLSF memory allocator](../assembly/allocator/tlsf.ts) +* [ITCM garbage collector](../assembly/collector/itcm.ts) + +Arena +----- + +``` +$> asc ... --runtime arena +``` + +The [arena runtime](./arena.ts) is just enough to make most language features work, but doesn't have sophisticated support for freeing memory. Useful when prototyping or for simple one-shot modules in that it produces very small modules with minimal overhead. + +* [Arena memory allocator](../assembly/allocator/arena.ts) with `memory.reset()` +* No garbage collector + +None +----------------- + +``` +$> asc ... --runtime none +``` + +[No runtime](./none.ts) features at all. Useful for building low-level modules that do not require language features like managed classes, or if you'd like to compose your own runtime by including a custom memory allocator and garbage collector. + +* No memory allocator +* No garbage collector diff --git a/std/runtime/arena.ts b/std/runtime/arena.ts new file mode 100644 index 00000000..9a31c7a4 --- /dev/null +++ b/std/runtime/arena.ts @@ -0,0 +1 @@ +import "allocator/arena"; diff --git a/std/runtime/default.ts b/std/runtime/default.ts new file mode 100644 index 00000000..22cbcdaf --- /dev/null +++ b/std/runtime/default.ts @@ -0,0 +1,2 @@ +import "allocator/tlsf"; +import "collector/itcm"; diff --git a/std/runtime/none.ts b/std/runtime/none.ts new file mode 100644 index 00000000..e69de29b diff --git a/std/runtime/tsconfig.json b/std/runtime/tsconfig.json new file mode 100644 index 00000000..e48ae586 --- /dev/null +++ b/std/runtime/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../assembly.json", + "include": [ + "./**/*.ts" + ] +} diff --git a/tests/compiler/abi.json b/tests/compiler/abi.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/abi.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/asc-constants.json b/tests/compiler/asc-constants.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/asc-constants.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/assert-nonnull.json b/tests/compiler/assert-nonnull.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/assert-nonnull.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/nonNullAssertion.optimized.wat b/tests/compiler/assert-nonnull.optimized.wat similarity index 56% rename from tests/compiler/nonNullAssertion.optimized.wat rename to tests/compiler/assert-nonnull.optimized.wat index d2027bcc..8f3e2851 100644 --- a/tests/compiler/nonNullAssertion.optimized.wat +++ b/tests/compiler/assert-nonnull.optimized.wat @@ -11,19 +11,19 @@ (global $~lib/argc (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) - (export "testVar" (func $nonNullAssertion/testVar)) - (export "testObj" (func $nonNullAssertion/testObj)) - (export "testProp" (func $nonNullAssertion/testProp)) - (export "testArr" (func $nonNullAssertion/testArr)) - (export "testElem" (func $nonNullAssertion/testElem)) - (export "testAll" (func $nonNullAssertion/testAll)) - (export "testAll2" (func $nonNullAssertion/testAll)) - (export "testFn" (func $nonNullAssertion/testFn)) - (export "testFn2" (func $nonNullAssertion/testFn2)) - (export "testRet" (func $nonNullAssertion/testRet)) - (export "testObjFn" (func $nonNullAssertion/testObjFn)) - (export "testObjRet" (func $nonNullAssertion/testObjRet)) - (func $nonNullAssertion/testVar (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (export "testVar" (func $assert-nonnull/testVar)) + (export "testObj" (func $assert-nonnull/testObj)) + (export "testProp" (func $assert-nonnull/testProp)) + (export "testArr" (func $assert-nonnull/testArr)) + (export "testElem" (func $assert-nonnull/testElem)) + (export "testAll" (func $assert-nonnull/testAll)) + (export "testAll2" (func $assert-nonnull/testAll)) + (export "testFn" (func $assert-nonnull/testFn)) + (export "testFn2" (func $assert-nonnull/testFn2)) + (export "testRet" (func $assert-nonnull/testRet)) + (export "testObjFn" (func $assert-nonnull/testObjFn)) + (export "testObjRet" (func $assert-nonnull/testObjRet)) + (func $assert-nonnull/testVar (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -31,7 +31,7 @@ end local.get $0 ) - (func $nonNullAssertion/testObj (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testObj (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -40,7 +40,7 @@ local.get $0 i32.load ) - (func $nonNullAssertion/testProp (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testProp (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load local.tee $0 @@ -50,7 +50,7 @@ end local.get $0 ) - (func $~lib/array/Array#__get (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#__get (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load offset=12 @@ -81,16 +81,16 @@ i32.load offset=4 i32.load ) - (func $nonNullAssertion/testArr (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testArr (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if unreachable end local.get $0 - call $~lib/array/Array#__get + call $~lib/array/Array#__get ) - (func $~lib/array/Array#__get (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#__get (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load offset=8 @@ -109,9 +109,9 @@ i32.load offset=4 i32.load ) - (func $nonNullAssertion/testElem (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testElem (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/array/Array#__get + call $~lib/array/Array#__get local.tee $0 i32.eqz if @@ -119,14 +119,14 @@ end local.get $0 ) - (func $nonNullAssertion/testAll (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testAll (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if unreachable end local.get $0 - call $~lib/array/Array#__get + call $~lib/array/Array#__get local.tee $0 i32.eqz if @@ -141,13 +141,13 @@ end local.get $0 ) - (func $nonNullAssertion/testFn (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testFn (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testFn2 (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testFn2 (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -158,7 +158,7 @@ local.get $0 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testRet (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testRet (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 @@ -170,14 +170,14 @@ end local.get $0 ) - (func $nonNullAssertion/testObjFn (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testObjFn (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 i32.load offset=4 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testObjRet (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testObjRet (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 diff --git a/tests/compiler/nonNullAssertion.ts b/tests/compiler/assert-nonnull.ts similarity index 97% rename from tests/compiler/nonNullAssertion.ts rename to tests/compiler/assert-nonnull.ts index 6e4eed6d..b50dcb9a 100644 --- a/tests/compiler/nonNullAssertion.ts +++ b/tests/compiler/assert-nonnull.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; - export function testVar(n: Error | null): Error { return n!; } diff --git a/tests/compiler/nonNullAssertion.untouched.wat b/tests/compiler/assert-nonnull.untouched.wat similarity index 58% rename from tests/compiler/nonNullAssertion.untouched.wat rename to tests/compiler/assert-nonnull.untouched.wat index 6dba00a1..e855d4fc 100644 --- a/tests/compiler/nonNullAssertion.untouched.wat +++ b/tests/compiler/assert-nonnull.untouched.wat @@ -9,25 +9,23 @@ (data (i32.const 8) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) (export "table" (table $0)) - (export "testVar" (func $nonNullAssertion/testVar)) - (export "testObj" (func $nonNullAssertion/testObj)) - (export "testProp" (func $nonNullAssertion/testProp)) - (export "testArr" (func $nonNullAssertion/testArr)) - (export "testElem" (func $nonNullAssertion/testElem)) - (export "testAll" (func $nonNullAssertion/testAll)) - (export "testAll2" (func $nonNullAssertion/testAll2)) - (export "testFn" (func $nonNullAssertion/testFn)) - (export "testFn2" (func $nonNullAssertion/testFn2)) - (export "testRet" (func $nonNullAssertion/testRet)) - (export "testObjFn" (func $nonNullAssertion/testObjFn)) - (export "testObjRet" (func $nonNullAssertion/testObjRet)) - (func $nonNullAssertion/testVar (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (export "testVar" (func $assert-nonnull/testVar)) + (export "testObj" (func $assert-nonnull/testObj)) + (export "testProp" (func $assert-nonnull/testProp)) + (export "testArr" (func $assert-nonnull/testArr)) + (export "testElem" (func $assert-nonnull/testElem)) + (export "testAll" (func $assert-nonnull/testAll)) + (export "testAll2" (func $assert-nonnull/testAll2)) + (export "testFn" (func $assert-nonnull/testFn)) + (export "testFn2" (func $assert-nonnull/testFn2)) + (export "testRet" (func $assert-nonnull/testRet)) + (export "testObjFn" (func $assert-nonnull/testObjFn)) + (export "testObjRet" (func $assert-nonnull/testObjRet)) + (func $assert-nonnull/testVar (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 local.tee $1 @@ -37,7 +35,7 @@ unreachable end ) - (func $nonNullAssertion/testObj (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testObj (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 local.tee $1 @@ -48,7 +46,7 @@ end i32.load ) - (func $nonNullAssertion/testProp (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testProp (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -59,7 +57,7 @@ unreachable end ) - (func $~lib/array/Array#__unchecked_get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -68,7 +66,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -97,9 +95,9 @@ end local.get $0 local.get $1 - call $~lib/array/Array#__unchecked_get + call $~lib/array/Array#__unchecked_get ) - (func $nonNullAssertion/testArr (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testArr (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 local.tee $1 @@ -109,9 +107,9 @@ unreachable end i32.const 0 - call $~lib/array/Array#__get + call $~lib/array/Array#__get ) - (func $~lib/array/Array#__unchecked_get (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -120,7 +118,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -137,13 +135,13 @@ end local.get $0 local.get $1 - call $~lib/array/Array#__unchecked_get + call $~lib/array/Array#__unchecked_get ) - (func $nonNullAssertion/testElem (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testElem (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 0 - call $~lib/array/Array#__get + call $~lib/array/Array#__get local.tee $1 if (result i32) local.get $1 @@ -151,7 +149,7 @@ unreachable end ) - (func $nonNullAssertion/testAll (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testAll (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 local.tee $1 @@ -161,7 +159,7 @@ unreachable end i32.const 0 - call $~lib/array/Array#__get + call $~lib/array/Array#__get local.tee $1 if (result i32) local.get $1 @@ -176,7 +174,7 @@ unreachable end ) - (func $nonNullAssertion/testAll2 (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testAll2 (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 local.tee $1 @@ -186,7 +184,7 @@ unreachable end i32.const 0 - call $~lib/array/Array#__get + call $~lib/array/Array#__get local.tee $1 if (result i32) local.get $1 @@ -201,13 +199,13 @@ unreachable end ) - (func $nonNullAssertion/testFn (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testFn (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testFn2 (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testFn2 (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -223,7 +221,7 @@ local.get $2 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testRet (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testRet (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) i32.const 0 @@ -238,14 +236,14 @@ unreachable end ) - (func $nonNullAssertion/testObjFn (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testObjFn (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 i32.load offset=4 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testObjRet (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assert-nonnull/testObjRet (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) block (result i32) i32.const 0 diff --git a/tests/compiler/assert.json b/tests/compiler/assert.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/assert.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/basic-nullable.json b/tests/compiler/basic-nullable.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/basic-nullable.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/binary.json b/tests/compiler/binary.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/binary.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/bool.json b/tests/compiler/bool.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/bool.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/builtins.json b/tests/compiler/builtins.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/builtins.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/call-inferred.json b/tests/compiler/call-inferred.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/call-inferred.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/call-optional.json b/tests/compiler/call-optional.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/call-optional.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/call-super.json b/tests/compiler/call-super.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/call-super.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index eeb5d1ad..43fea1ad 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -106,7 +106,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -121,7 +121,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -151,7 +151,7 @@ if i32.const 0 i32.const 56 - i32.const 8 + i32.const 6 i32.const 4 call $~lib/env/abort unreachable @@ -175,7 +175,7 @@ if i32.const 0 i32.const 56 - i32.const 17 + i32.const 15 i32.const 4 call $~lib/env/abort unreachable @@ -187,7 +187,7 @@ if i32.const 0 i32.const 56 - i32.const 18 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -204,7 +204,7 @@ if i32.const 0 i32.const 56 - i32.const 24 + i32.const 22 i32.const 2 call $~lib/env/abort unreachable @@ -216,7 +216,7 @@ if i32.const 0 i32.const 56 - i32.const 25 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -250,7 +250,7 @@ if i32.const 0 i32.const 56 - i32.const 40 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -262,7 +262,7 @@ if i32.const 0 i32.const 56 - i32.const 41 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -279,7 +279,7 @@ if i32.const 0 i32.const 56 - i32.const 47 + i32.const 45 i32.const 2 call $~lib/env/abort unreachable @@ -291,7 +291,7 @@ if i32.const 0 i32.const 56 - i32.const 48 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -317,7 +317,7 @@ if i32.const 0 i32.const 56 - i32.const 58 + i32.const 56 i32.const 4 call $~lib/env/abort unreachable @@ -341,7 +341,7 @@ if i32.const 0 i32.const 56 - i32.const 68 + i32.const 66 i32.const 2 call $~lib/env/abort unreachable @@ -353,7 +353,7 @@ if i32.const 0 i32.const 56 - i32.const 69 + i32.const 67 i32.const 2 call $~lib/env/abort unreachable @@ -394,7 +394,7 @@ if i32.const 0 i32.const 56 - i32.const 86 + i32.const 84 i32.const 2 call $~lib/env/abort unreachable @@ -406,7 +406,7 @@ if i32.const 0 i32.const 56 - i32.const 87 + i32.const 85 i32.const 2 call $~lib/env/abort unreachable @@ -447,7 +447,7 @@ if i32.const 0 i32.const 56 - i32.const 106 + i32.const 104 i32.const 2 call $~lib/env/abort unreachable @@ -459,7 +459,7 @@ if i32.const 0 i32.const 56 - i32.const 107 + i32.const 105 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/call-super.ts b/tests/compiler/call-super.ts index 4145cbce..aaa5a107 100644 --- a/tests/compiler/call-super.ts +++ b/tests/compiler/call-super.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; - // both constructors present class A { diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index 444e8425..b5175c2d 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -10,9 +10,9 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 84)) (export "memory" (memory $0)) @@ -139,7 +139,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -156,7 +156,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -189,7 +189,7 @@ if i32.const 0 i32.const 56 - i32.const 8 + i32.const 6 i32.const 4 call $~lib/env/abort unreachable @@ -219,7 +219,7 @@ if i32.const 0 i32.const 56 - i32.const 17 + i32.const 15 i32.const 4 call $~lib/env/abort unreachable @@ -232,7 +232,7 @@ if i32.const 0 i32.const 56 - i32.const 18 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -252,7 +252,7 @@ if i32.const 0 i32.const 56 - i32.const 24 + i32.const 22 i32.const 2 call $~lib/env/abort unreachable @@ -265,7 +265,7 @@ if i32.const 0 i32.const 56 - i32.const 25 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -309,7 +309,7 @@ if i32.const 0 i32.const 56 - i32.const 40 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -322,7 +322,7 @@ if i32.const 0 i32.const 56 - i32.const 41 + i32.const 39 i32.const 4 call $~lib/env/abort unreachable @@ -342,7 +342,7 @@ if i32.const 0 i32.const 56 - i32.const 47 + i32.const 45 i32.const 2 call $~lib/env/abort unreachable @@ -355,7 +355,7 @@ if i32.const 0 i32.const 56 - i32.const 48 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -384,7 +384,7 @@ if i32.const 0 i32.const 56 - i32.const 58 + i32.const 56 i32.const 4 call $~lib/env/abort unreachable @@ -422,7 +422,7 @@ if i32.const 0 i32.const 56 - i32.const 68 + i32.const 66 i32.const 2 call $~lib/env/abort unreachable @@ -435,7 +435,7 @@ if i32.const 0 i32.const 56 - i32.const 69 + i32.const 67 i32.const 2 call $~lib/env/abort unreachable @@ -487,7 +487,7 @@ if i32.const 0 i32.const 56 - i32.const 86 + i32.const 84 i32.const 2 call $~lib/env/abort unreachable @@ -500,7 +500,7 @@ if i32.const 0 i32.const 56 - i32.const 87 + i32.const 85 i32.const 2 call $~lib/env/abort unreachable @@ -552,7 +552,7 @@ if i32.const 0 i32.const 56 - i32.const 106 + i32.const 104 i32.const 2 call $~lib/env/abort unreachable @@ -565,7 +565,7 @@ if i32.const 0 i32.const 56 - i32.const 107 + i32.const 105 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/class-extends.json b/tests/compiler/class-extends.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/tests/compiler/class-extends.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/compiler/class-extends.optimized.wat b/tests/compiler/class-extends.optimized.wat index 6f25e5d3..d75befae 100644 --- a/tests/compiler/class-extends.optimized.wat +++ b/tests/compiler/class-extends.optimized.wat @@ -4,9 +4,11 @@ (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $class-extends/test)) + (export ".capabilities" (global $~lib/capabilities)) (func $class-extends/test (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load diff --git a/tests/compiler/class-extends.untouched.wat b/tests/compiler/class-extends.untouched.wat index 52e5585c..98594ca2 100644 --- a/tests/compiler/class-extends.untouched.wat +++ b/tests/compiler/class-extends.untouched.wat @@ -5,9 +5,11 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $class-extends/test)) + (export ".capabilities" (global $~lib/capabilities)) (func $class-extends/test (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load diff --git a/tests/compiler/class-overloading.json b/tests/compiler/class-overloading.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/class-overloading.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/class.json b/tests/compiler/class.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/tests/compiler/class.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index 7531e170..ffdd0ac9 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -1,14 +1,21 @@ (module + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\10\00\00\00c\00l\00a\00s\00s\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $start) + (data (i32.const 8) "\01\00\00\00\10") + (data (i32.const 24) "c\00l\00a\00s\00s\00.\00t\00s") + (table $0 2 funcref) + (elem (i32.const 0) $start $~lib/string/String~iterate) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $class/test)) - (func $class/test (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (export ".capabilities" (global $~lib/capabilities)) + (func $~lib/string/String~iterate (; 0 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $class/test (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load drop @@ -29,7 +36,7 @@ i32.store8 offset=6 local.get $0 ) - (func $start (; 1 ;) (type $FUNCSIG$v) + (func $start (; 2 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/class.untouched.wat b/tests/compiler/class.untouched.wat index bd5155a7..cbfea5a1 100644 --- a/tests/compiler/class.untouched.wat +++ b/tests/compiler/class.untouched.wat @@ -1,5 +1,7 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$fff (func (param f32 f32) (result f32))) (type $FUNCSIG$v (func)) @@ -8,23 +10,28 @@ (type $FUNCSIG$fiff (func (param i32 f32 f32) (result f32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\10\00\00\00c\00l\00a\00s\00s\00.\00t\00s\00") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00c\00l\00a\00s\00s\00.\00t\00s\00") + (table $0 2 funcref) + (elem (i32.const 0) $null $~lib/string/String~iterate) (global $class/Animal.ONE (mut i32) (i32.const 1)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $class/test)) + (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $class/Animal.add (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $class/Animal.add (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.add global.get $class/Animal.ONE i32.add ) - (func $class/Animal.sub (; 2 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $class/Animal.sub (; 3 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 f32.sub @@ -32,14 +39,14 @@ f32.convert_i32_s f32.add ) - (func $start:class (; 3 ;) (type $FUNCSIG$v) + (func $start:class (; 4 ;) (type $FUNCSIG$v) i32.const 4 i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 16 + i32.const 24 i32.const 13 i32.const 0 call $~lib/env/abort @@ -56,14 +63,14 @@ call $class/Animal.sub drop ) - (func $class/Animal#instanceAdd (; 4 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $class/Animal#instanceAdd (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 local.get $2 i32.add global.get $class/Animal.ONE i32.add ) - (func $class/Animal#instanceSub (; 5 ;) (type $FUNCSIG$fiff) (param $0 i32) (param $1 f32) (param $2 f32) (result f32) + (func $class/Animal#instanceSub (; 6 ;) (type $FUNCSIG$fiff) (param $0 i32) (param $1 f32) (param $2 f32) (result f32) local.get $1 local.get $2 f32.sub @@ -71,7 +78,7 @@ f32.convert_i32_s f32.add ) - (func $class/test (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $class/test (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -116,9 +123,9 @@ local.set $2 local.get $2 ) - (func $start (; 7 ;) (type $FUNCSIG$v) + (func $start (; 8 ;) (type $FUNCSIG$v) call $start:class ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 9 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/closure.json b/tests/compiler/closure.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/tests/compiler/closure.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/compiler/closure.optimized.wat b/tests/compiler/closure.optimized.wat index 587c7142..13be3a5f 100644 --- a/tests/compiler/closure.optimized.wat +++ b/tests/compiler/closure.optimized.wat @@ -3,8 +3,10 @@ (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) (func $null (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/closure.untouched.wat b/tests/compiler/closure.untouched.wat index 4560a6a1..413ff0e8 100644 --- a/tests/compiler/closure.untouched.wat +++ b/tests/compiler/closure.untouched.wat @@ -4,8 +4,10 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) (func $null (; 0 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/comma.json b/tests/compiler/comma.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/comma.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/constructor.json b/tests/compiler/constructor.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/tests/compiler/constructor.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index ce967eb7..6990d26b 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -1,16 +1,31 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$v (func)) + (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (data (i32.const 8) "\01\00\00\00,") + (data (i32.const 24) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 72) "\01\00\00\00\1e") + (data (i32.const 88) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 120) "\01\00\00\00\12") + (data (i32.const 136) " \00 \00 \00 \00 \00i\00t\00e\00r") + (table $0 14 funcref) + (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/string/String~iterate $~lib/collector/itcm/step~anonymous|0 $~lib/collector/itcm/step~anonymous|1 $~lib/collector/itcm/step~anonymous|0 $~lib/string/String~iterate $~lib/string/String~iterate $~lib/string/String~iterate $~lib/string/String~iterate $~lib/string/String~iterate $~lib/string/String~iterate $~lib/string/String~iterate $~lib/string/String~iterate) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $constructor/emptyCtor (mut i32) (i32.const 0)) (global $constructor/emptyCtorWithFieldInit (mut i32) (i32.const 0)) (global $constructor/emptyCtorWithFieldNoInit (mut i32) (i32.const 0)) @@ -22,43 +37,1072 @@ (global $constructor/ctorConditionallyReturns (mut i32) (i32.const 0)) (global $constructor/ctorAllocates (mut i32) (i32.const 0)) (global $constructor/ctorConditionallyAllocates (mut i32) (i32.const 0)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 159 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/allocator/tlsf/Root#setHead (; 4 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 184 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 32 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 185 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 5 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/allocator/tlsf/Block#get:right (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + i32.const -4 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 104 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 8 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 105 + i32.const 11 + call $~lib/env/abort + unreachable + end + local.get $0 + ) + (func $~lib/allocator/tlsf/fls (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 447 + i32.const 2 + call $~lib/env/abort + unreachable + end + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $~lib/allocator/tlsf/Root#getHead (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 175 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 32 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 176 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 5 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + local.get $0 + i32.add + i32.load offset=96 + ) + (func $~lib/allocator/tlsf/Root#getSLMap (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + i32.const 22 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 153 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.get $0 + i32.add + i32.load offset=4 + ) + (func $~lib/allocator/tlsf/Root#remove (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.tee $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 277 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const -4 + i32.and + local.tee $3 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $3 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 279 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + i32.const 256 + i32.lt_u + if (result i32) + local.get $3 + i32.const 8 + i32.div_u + local.set $4 + i32.const 0 + else + local.get $3 + local.get $3 + call $~lib/allocator/tlsf/fls + local.tee $2 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $4 + local.get $2 + i32.const 7 + i32.sub + end + local.set $2 + local.get $1 + i32.load offset=8 + local.set $3 + local.get $1 + i32.load offset=4 + local.tee $5 + if + local.get $5 + local.get $3 + i32.store offset=8 + end + local.get $3 + if + local.get $3 + local.get $5 + i32.store offset=4 + end + local.get $0 + local.get $2 + local.get $4 + call $~lib/allocator/tlsf/Root#getHead + local.get $1 + i32.eq + if + local.get $0 + local.get $2 + local.get $4 + local.get $3 + call $~lib/allocator/tlsf/Root#setHead + local.get $3 + i32.eqz + if + local.get $0 + local.get $2 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $4 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $1 + call $~lib/allocator/tlsf/Root#setSLMap + local.get $1 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $2 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/allocator/tlsf/Block#get:left (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + i32.const 2 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 96 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 4 + i32.sub + i32.load + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 97 + i32.const 11 + call $~lib/env/abort + unreachable + end + local.get $0 + ) + (func $~lib/allocator/tlsf/Root#setJump (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + i32.load + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 353 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/Block#get:right + local.get $1 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 354 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + i32.const 2 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 355 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 4 + i32.sub + local.get $0 + i32.store + ) + (func $~lib/allocator/tlsf/Root#insert (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 208 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.tee $3 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 210 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + i32.const -4 + i32.and + local.tee $4 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $4 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 212 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 216 + i32.const 23 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.load + local.tee $4 + i32.const 1 + i32.and + if + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $4 + i32.const -4 + i32.and + i32.const 8 + i32.add + local.get $3 + i32.add + local.tee $3 + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $2 + i32.load + local.set $4 + end + local.get $3 + i32.const 2 + i32.and + if + local.get $1 + call $~lib/allocator/tlsf/Block#get:left + local.tee $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 230 + i32.const 24 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.tee $5 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 232 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $3 + i32.const -4 + i32.and + i32.const 8 + i32.add + local.get $5 + i32.add + local.tee $3 + i32.store + end + local.get $2 + local.get $4 + i32.const 2 + i32.or + i32.store + local.get $1 + local.get $2 + call $~lib/allocator/tlsf/Root#setJump + local.get $3 + i32.const -4 + i32.and + local.tee $3 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $3 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 245 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $3 + i32.const 256 + i32.lt_u + if (result i32) + local.get $3 + i32.const 8 + i32.div_u + local.set $3 + i32.const 0 + else + local.get $3 + local.get $3 + call $~lib/allocator/tlsf/fls + local.tee $2 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $3 + local.get $2 + i32.const 7 + i32.sub + end + local.tee $2 + local.get $3 + call $~lib/allocator/tlsf/Root#getHead + local.set $4 + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + local.get $4 + i32.store offset=8 + local.get $4 + if + local.get $4 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $2 + local.get $3 + local.get $1 + call $~lib/allocator/tlsf/Root#setHead + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $2 + i32.shl + i32.or + i32.store + local.get $0 + local.get $2 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $3 + i32.shl + i32.or + call $~lib/allocator/tlsf/Root#setSLMap + ) + (func $~lib/allocator/tlsf/Root#addMemory (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + local.get $2 + i32.gt_u + if + i32.const 0 + i32.const 24 + i32.const 396 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 397 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 398 + i32.const 4 + call $~lib/env/abort + unreachable + end + i32.const 2912 + i32.load + local.tee $3 + if + local.get $1 + local.get $3 + i32.const 4 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 24 + i32.const 403 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 8 + i32.sub + local.get $3 + i32.eq + if + local.get $3 + i32.load + local.set $4 + local.get $1 + i32.const 8 + i32.sub + local.set $1 + end + else + local.get $1 + local.get $0 + i32.const 2916 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 24 + i32.const 412 + i32.const 6 + call $~lib/env/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.tee $2 + i32.const 32 + i32.lt_u + if + return + end + local.get $1 + local.get $4 + i32.const 2 + i32.and + local.get $2 + i32.const 16 + i32.sub + i32.const 1 + i32.or + i32.or + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.tee $2 + i32.const 2 + i32.store + i32.const 2912 + local.get $2 + i32.store + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#insert + ) + (func $~lib/allocator/tlsf/ffs (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 441 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/Root#search (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.const 16 + i32.ge_u + local.tee $2 + if + local.get $1 + i32.const 1073741824 + i32.lt_u + local.set $2 + end + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 315 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 256 + i32.lt_u + if (result i32) + i32.const 0 + local.set $2 + local.get $1 + i32.const 8 + i32.div_u + else + local.get $1 + call $~lib/allocator/tlsf/fls + local.tee $3 + i32.const 7 + i32.sub + local.set $2 + local.get $1 + local.get $3 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.tee $1 + i32.const 31 + i32.lt_u + if (result i32) + local.get $1 + i32.const 1 + i32.add + else + local.get $2 + i32.const 1 + i32.add + local.set $2 + i32.const 0 + end + end + local.set $1 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const -1 + local.get $1 + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + else + local.get $0 + i32.load + i32.const -1 + local.get $2 + i32.const 1 + i32.add + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/ffs + local.tee $2 + call $~lib/allocator/tlsf/Root#getSLMap + local.tee $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 342 + i32.const 16 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + else + i32.const 0 + end + end + ) + (func $~lib/allocator/tlsf/Root#use (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $1 + i32.load + local.tee $4 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 367 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 16 + i32.ge_u + local.tee $3 + if + local.get $2 + i32.const 1073741824 + i32.lt_u + local.set $3 + end + local.get $3 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 368 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 369 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $4 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $3 + i32.const 24 + i32.ge_u + if + local.get $1 + local.get $4 + i32.const 2 + i32.and + local.get $2 + i32.or + i32.store + local.get $1 + i32.const 8 + i32.add + local.get $2 + i32.add + local.tee $2 + local.get $3 + i32.const 8 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#insert + else + local.get $1 + local.get $4 + i32.const -2 + i32.and + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 387 + i32.const 25 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $0 + i32.load + i32.const -3 + i32.and + i32.store + end + local.get $1 + i32.const 8 + i32.add + ) + (func $~lib/allocator/tlsf/__mem_allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + global.get $~lib/allocator/tlsf/ROOT + local.tee $2 + i32.eqz + if + i32.const 1 + current_memory + local.tee $1 + i32.gt_s + local.tee $2 + if (result i32) + i32.const 1 + local.get $1 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + local.get $2 + end + if + unreachable + end + i32.const 160 + local.set $2 + i32.const 160 + global.set $~lib/allocator/tlsf/ROOT + i32.const 2912 + i32.const 0 + i32.store + i32.const 160 + i32.const 0 + i32.store + i32.const 0 + local.set $1 + loop $repeat|0 + local.get $1 + i32.const 22 + i32.lt_u + if + i32.const 160 + local.get $1 + i32.const 0 + call $~lib/allocator/tlsf/Root#setSLMap + i32.const 0 + local.set $3 + loop $repeat|1 + local.get $3 + i32.const 32 + i32.lt_u + if + i32.const 160 + local.get $1 + local.get $3 + i32.const 0 + call $~lib/allocator/tlsf/Root#setHead + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $repeat|1 + end + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|0 + end + end + i32.const 160 + i32.const 3080 + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + end local.get $0 i32.const 1073741824 i32.gt_u if unreachable end - global.get $~lib/allocator/arena/offset - local.tee $1 + local.get $2 local.get $0 - i32.const 1 - local.get $0 - i32.const 1 - i32.gt_u - select - i32.add i32.const 7 i32.add i32.const -8 i32.and local.tee $0 - current_memory - local.tee $2 i32.const 16 - i32.shl + local.get $0 + i32.const 16 i32.gt_u + select + local.tee $1 + call $~lib/allocator/tlsf/Root#search + local.tee $0 + i32.eqz if - local.get $2 - local.get $0 + current_memory + local.tee $0 local.get $1 - i32.sub i32.const 65535 i32.add i32.const -65536 @@ -66,7 +1110,7 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $2 + local.get $0 local.get $3 i32.gt_s select @@ -82,22 +1126,58 @@ unreachable end end + local.get $2 + local.get $0 + i32.const 16 + i32.shl + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + local.get $2 + local.get $1 + call $~lib/allocator/tlsf/Root#search + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 502 + i32.const 12 + call $~lib/env/abort + unreachable + end end local.get $0 - global.set $~lib/allocator/arena/offset + i32.load + i32.const -4 + i32.and local.get $1 + i32.lt_u + if + i32.const 0 + i32.const 24 + i32.const 505 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#use ) - (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 local.get $0 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub i32.shl - call $~lib/allocator/arena/__mem_allocate + call $~lib/allocator/tlsf/__mem_allocate local.tee $1 i32.const -1520547049 i32.store @@ -105,24 +1185,335 @@ local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 16 i32.add ) - (func $~lib/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/collector/itcm/ManagedObjectList#push (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 - i32.const 48 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $0 + i32.or + i32.store offset=8 + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.and + local.get $1 + i32.or + i32.store offset=8 + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/collector/itcm/iter + local.get $0 + i32.eq + if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + local.tee $2 + local.get $0 + i32.load offset=12 + local.tee $1 + i32.store offset=12 + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $2 + i32.or + i32.store offset=8 + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/step~anonymous|0 (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/collector/itcm/step~anonymous|1 (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 136 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/allocator/tlsf/__mem_free (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.tee $1 + if + local.get $0 + i32.const 8 + i32.sub + local.tee $2 + i32.load + local.tee $3 + i32.const 1 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + i32.const 1 + i32.or + i32.store + local.get $1 + local.get $0 + i32.const 8 + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/collector/itcm/step (; 24 ;) (type $FUNCSIG$v) + (local $0 i32) + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + global.get $~lib/collector/itcm/state + local.tee $0 + if + local.get $0 + i32.const 1 + i32.sub + br_table $case1|0 $case2|0 $case3|0 $break|0 + end + i32.const 16 + call $~lib/allocator/tlsf/__mem_allocate + global.set $~lib/collector/itcm/fromSpace + global.get $~lib/collector/itcm/fromSpace + local.tee $0 + i32.const -1 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + i32.const 16 + call $~lib/allocator/tlsf/__mem_allocate + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/toSpace + local.tee $0 + i32.const -1 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/iter + i32.const 1 + global.set $~lib/collector/itcm/state + end + i32.const 3 + call $~iterateRoots + i32.const 2 + global.set $~lib/collector/itcm/state + br $break|0 + end + global.get $~lib/collector/itcm/iter + i32.load offset=8 + i32.const -4 + i32.and + local.tee $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/collector/itcm/white + i32.eqz + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.or + i32.store offset=8 + local.get $0 + i32.const 16 + i32.add + i32.const 4 + local.get $0 + i32.load + call_indirect (type $FUNCSIG$vii) + else + i32.const 5 + call $~iterateRoots + global.get $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/iter + i32.load offset=8 + i32.const -4 + i32.and + i32.eq + if + global.get $~lib/collector/itcm/fromSpace + local.set $0 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/fromSpace + local.get $0 + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/white + i32.eqz + global.set $~lib/collector/itcm/white + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + global.set $~lib/collector/itcm/iter + i32.const 3 + global.set $~lib/collector/itcm/state + end + end + br $break|0 + end + global.get $~lib/collector/itcm/iter + local.tee $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + global.set $~lib/collector/itcm/iter + local.get $0 + i32.const 156 + i32.ge_u + if + local.get $0 + call $~lib/allocator/tlsf/__mem_free + end + else + global.get $~lib/collector/itcm/toSpace + local.tee $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + i32.const 1 + global.set $~lib/collector/itcm/state + end + end + ) + (func $~lib/collector/itcm/__ref_register (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + call $~lib/collector/itcm/step + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + global.get $~lib/collector/itcm/white + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + i32.or + i32.store offset=8 + global.get $~lib/collector/itcm/fromSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + ) + (func $~lib/runtime/register (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 156 i32.le_u if i32.const 0 - i32.const 16 - i32.const 149 + i32.const 88 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub local.tee $2 i32.load @@ -130,8 +1521,8 @@ i32.ne if i32.const 0 - i32.const 16 - i32.const 151 + i32.const 88 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -139,16 +1530,20 @@ local.get $2 local.get $1 i32.store + block + local.get $0 + call $~lib/collector/itcm/__ref_register + end local.get $0 ) - (func $constructor/CtorConditionallyAllocates#constructor (; 4 ;) (type $FUNCSIG$i) (result i32) + (func $constructor/CtorConditionallyAllocates#constructor (; 27 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) block (result i32) global.get $constructor/b if i32.const 0 call $~lib/runtime/allocate - i32.const 10 + i32.const 13 call $~lib/runtime/register local.set $0 end @@ -158,55 +1553,28 @@ if i32.const 0 call $~lib/runtime/allocate - i32.const 10 + i32.const 13 call $~lib/runtime/register local.set $0 end local.get $0 ) - (func $start:constructor (; 5 ;) (type $FUNCSIG$v) + (func $start:constructor (; 28 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 48 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset i32.const 0 call $~lib/runtime/allocate - i32.const 1 + i32.const 2 call $~lib/runtime/register global.set $constructor/emptyCtor i32.const 4 call $~lib/runtime/allocate - i32.const 3 - call $~lib/runtime/register - local.tee $0 - i32.const 1 - i32.store - local.get $0 - global.set $constructor/emptyCtorWithFieldInit - i32.const 4 - call $~lib/runtime/allocate - i32.const 4 - call $~lib/runtime/register - local.tee $0 - i32.const 0 - i32.store - local.get $0 - global.set $constructor/emptyCtorWithFieldNoInit - i32.const 0 - call $~lib/runtime/allocate - i32.const 5 - call $~lib/runtime/register - global.set $constructor/none - i32.const 4 - call $~lib/runtime/allocate i32.const 6 call $~lib/runtime/register local.tee $0 i32.const 1 i32.store local.get $0 - global.set $constructor/justFieldInit + global.set $constructor/emptyCtorWithFieldInit i32.const 4 call $~lib/runtime/allocate i32.const 7 @@ -215,35 +1583,131 @@ i32.const 0 i32.store local.get $0 + global.set $constructor/emptyCtorWithFieldNoInit + i32.const 0 + call $~lib/runtime/allocate + i32.const 8 + call $~lib/runtime/register + global.set $constructor/none + i32.const 4 + call $~lib/runtime/allocate + i32.const 9 + call $~lib/runtime/register + local.tee $0 + i32.const 1 + i32.store + local.get $0 + global.set $constructor/justFieldInit + i32.const 4 + call $~lib/runtime/allocate + i32.const 10 + call $~lib/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 global.set $constructor/justFieldNoInit i32.const 0 - call $~lib/allocator/arena/__mem_allocate + call $~lib/allocator/tlsf/__mem_allocate global.set $constructor/ctorReturns block $__inlined_func$constructor/CtorConditionallyReturns#constructor (result i32) global.get $constructor/b if i32.const 0 - call $~lib/allocator/arena/__mem_allocate + call $~lib/allocator/tlsf/__mem_allocate br $__inlined_func$constructor/CtorConditionallyReturns#constructor end i32.const 0 call $~lib/runtime/allocate - i32.const 8 + i32.const 11 call $~lib/runtime/register end global.set $constructor/ctorConditionallyReturns i32.const 0 call $~lib/runtime/allocate - i32.const 9 + i32.const 12 call $~lib/runtime/register global.set $constructor/ctorAllocates call $constructor/CtorConditionallyAllocates#constructor global.set $constructor/ctorConditionallyAllocates ) - (func $start (; 6 ;) (type $FUNCSIG$v) + (func $start (; 29 ;) (type $FUNCSIG$v) call $start:constructor ) - (func $null (; 7 ;) (type $FUNCSIG$v) + (func $null (; 30 ;) (type $FUNCSIG$v) nop ) + (func $~iterateRoots (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + global.get $constructor/emptyCtor + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/emptyCtorWithFieldInit + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/emptyCtorWithFieldNoInit + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/none + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/justFieldInit + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/justFieldNoInit + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/ctorReturns + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/ctorConditionallyReturns + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/ctorAllocates + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/ctorConditionallyAllocates + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + ) ) diff --git a/tests/compiler/constructor.ts b/tests/compiler/constructor.ts index c039c677..89ee7be4 100644 --- a/tests/compiler/constructor.ts +++ b/tests/compiler/constructor.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; - // trailing conditional allocate class EmptyCtor { constructor() {} diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index b4538719..c43d2cb4 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -1,18 +1,46 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$v (func)) + (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\02\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (table $0 1 funcref) - (elem (i32.const 0) $null) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (data (i32.const 8) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") + (data (i32.const 72) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 120) "\01\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00i\00t\00e\00r\00") + (table $0 14 funcref) + (elem (i32.const 0) $null $~lib/string/String~iterate $constructor/EmptyCtor~iterate $~lib/collector/itcm/step~anonymous|0 $~lib/collector/itcm/step~anonymous|1 $~lib/collector/itcm/step~anonymous|2 $constructor/EmptyCtorWithFieldInit~iterate $constructor/EmptyCtorWithFieldNoInit~iterate $constructor/None~iterate $constructor/JustFieldInit~iterate $constructor/JustFieldNoInit~iterate $constructor/CtorConditionallyReturns~iterate $constructor/CtorAllocates~iterate $constructor/CtorConditionallyAllocates~iterate) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) + (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) + (global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8)) + (global $~lib/allocator/tlsf/FL_BITS i32 (i32.const 22)) + (global $~lib/allocator/tlsf/Root.SL_END i32 (i32.const 92)) + (global $~lib/allocator/tlsf/Root.HL_START i32 (i32.const 96)) + (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) + (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) + (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) + (global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8)) + (global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16)) + (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) + (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) + (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) + (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) + (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $constructor/emptyCtor (mut i32) (i32.const 0)) (global $constructor/emptyCtorWithFieldInit (mut i32) (i32.const 0)) (global $constructor/emptyCtorWithFieldNoInit (mut i32) (i32.const 0)) @@ -24,11 +52,13 @@ (global $constructor/ctorConditionallyReturns (mut i32) (i32.const 0)) (global $constructor/ctorAllocates (mut i32) (i32.const 0)) (global $constructor/ctorConditionallyAllocates (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 156)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -40,49 +70,1159 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 0 + local.get $1 + i32.store offset=2912 + ) + (func $~lib/string/String~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 159 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 4 + i32.mul + i32.add + local.get $2 + i32.store offset=4 + ) + (func $~lib/allocator/tlsf/Root#setHead (; 6 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 184 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 185 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.mul + local.get $2 + i32.add + i32.const 4 + i32.mul + i32.add + local.get $3 + i32.store offset=96 + ) + (func $~lib/allocator/tlsf/Root#get:tailRef (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + i32.load offset=2912 + ) + (func $~lib/allocator/tlsf/Block#get:right (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 104 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + local.tee $1 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 105 + i32.const 11 + call $~lib/env/abort + unreachable + else + local.get $1 + end + ) + (func $~lib/allocator/tlsf/fls (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 447 + i32.const 2 + call $~lib/env/abort + unreachable + end + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $~lib/allocator/tlsf/Root#getHead (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 175 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 176 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.mul + local.get $2 + i32.add + i32.const 4 + i32.mul + i32.add + i32.load offset=96 + ) + (func $~lib/allocator/tlsf/Root#getSLMap (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 153 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 4 + i32.mul + i32.add + i32.load offset=4 + ) + (func $~lib/allocator/tlsf/Root#remove (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + i32.load + local.set $2 + local.get $2 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 277 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 279 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $5 + local.get $3 + i32.const 8 + i32.div_u + local.set $6 + else + local.get $3 + call $~lib/allocator/tlsf/fls + local.set $5 + local.get $3 + local.get $5 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $6 + local.get $5 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $5 + end + local.get $1 + i32.load offset=4 + local.set $7 + local.get $1 + i32.load offset=8 + local.set $8 + local.get $7 + if + local.get $7 + local.get $8 + i32.store offset=8 + end + local.get $8 + if + local.get $8 + local.get $7 + i32.store offset=4 + end + local.get $1 + local.get $0 + local.get $5 + local.get $6 + call $~lib/allocator/tlsf/Root#getHead + i32.eq + if + local.get $0 + local.get $5 + local.get $6 + local.get $8 + call $~lib/allocator/tlsf/Root#setHead + local.get $8 + i32.eqz + if + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#getSLMap + local.set $4 + local.get $0 + local.get $5 + local.get $4 + i32.const 1 + local.get $6 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $4 + call $~lib/allocator/tlsf/Root#setSLMap + local.get $4 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $5 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/allocator/tlsf/Block#get:left (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 96 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 4 + i32.sub + i32.load + local.tee $1 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 97 + i32.const 11 + call $~lib/env/abort + unreachable + else + local.get $1 + end + ) + (func $~lib/allocator/tlsf/Root#setJump (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.load + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 353 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.get $2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 354 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 355 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 4 + i32.sub + local.get $1 + i32.store + ) + (func $~lib/allocator/tlsf/Root#insert (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 208 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + local.set $2 + local.get $2 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 210 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.tee $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 212 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 216 + i32.const 23 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $5 + local.get $5 + i32.load + local.set $6 + local.get $6 + global.get $~lib/allocator/tlsf/FREE + i32.and + if + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $2 + global.get $~lib/allocator/tlsf/Block.INFO + local.get $6 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $2 + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.set $5 + local.get $5 + i32.load + local.set $6 + end + local.get $2 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + if + local.get $1 + call $~lib/allocator/tlsf/Block#get:left + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 230 + i32.const 24 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $4 + local.get $4 + i32.load + local.set $7 + local.get $7 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 232 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $4 + call $~lib/allocator/tlsf/Root#remove + local.get $4 + local.get $7 + global.get $~lib/allocator/tlsf/Block.INFO + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $7 + i32.store + local.get $4 + local.set $1 + local.get $7 + local.set $2 + end + local.get $5 + local.get $6 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.or + i32.store + local.get $0 + local.get $1 + local.get $5 + call $~lib/allocator/tlsf/Root#setJump + local.get $2 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $7 + if (result i32) + local.get $3 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $7 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 245 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $3 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $8 + local.get $3 + i32.const 8 + i32.div_u + local.set $9 + else + local.get $3 + call $~lib/allocator/tlsf/fls + local.set $8 + local.get $3 + local.get $8 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $9 + local.get $8 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $8 + end + local.get $0 + local.get $8 + local.get $9 + call $~lib/allocator/tlsf/Root#getHead + local.set $10 + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + local.get $10 + i32.store offset=8 + local.get $10 + if + local.get $10 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $8 + local.get $9 + local.get $1 + call $~lib/allocator/tlsf/Root#setHead + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $8 + i32.shl + i32.or + i32.store + local.get $0 + local.get $8 + local.get $0 + local.get $8 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 1 + local.get $9 + i32.shl + i32.or + call $~lib/allocator/tlsf/Root#setSLMap + ) + (func $~lib/allocator/tlsf/Root#addMemory (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + local.get $2 + i32.le_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 396 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 397 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 398 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/Root#get:tailRef + local.set $3 + i32.const 0 + local.set $4 + local.get $3 + if + local.get $1 + local.get $3 + i32.const 4 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 403 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.get $3 + i32.eq + if + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $1 + local.get $3 + i32.load + local.set $4 + end + else + local.get $1 + local.get $0 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 412 + i32.const 6 + call $~lib/env/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.set $5 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.add + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + i32.lt_u + if + i32.const 0 + return + end + local.get $5 + i32.const 2 + global.get $~lib/allocator/tlsf/Block.INFO + i32.mul + i32.sub + local.set $6 + local.get $1 + local.set $7 + local.get $7 + local.get $6 + global.get $~lib/allocator/tlsf/FREE + i32.or + local.get $4 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.or + i32.store + local.get $7 + i32.const 0 + i32.store offset=4 + local.get $7 + i32.const 0 + i32.store offset=8 + local.get $1 + local.get $5 + i32.add + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $8 + local.get $8 + i32.const 0 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.or + i32.store + local.get $0 + local.get $8 + call $~lib/allocator/tlsf/Root#set:tailRef + local.get $0 + local.get $7 + call $~lib/allocator/tlsf/Root#insert + i32.const 1 + ) + (func $~lib/allocator/tlsf/ffs (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 441 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/ffs (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 441 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/Root#search (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + local.get $1 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $2 + if (result i32) + local.get $1 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $2 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 315 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $1 + global.get $~lib/allocator/tlsf/SB_SIZE + i32.lt_u + if + i32.const 0 + local.set $3 + local.get $1 + i32.const 8 + i32.div_u + local.set $4 + else + local.get $1 + call $~lib/allocator/tlsf/fls + local.set $3 + local.get $1 + local.get $3 + global.get $~lib/allocator/tlsf/SL_BITS + i32.sub + i32.shr_u + i32.const 1 + global.get $~lib/allocator/tlsf/SL_BITS + i32.shl + i32.xor + local.set $4 + local.get $3 + global.get $~lib/allocator/tlsf/SB_BITS + i32.const 1 + i32.sub + i32.sub + local.set $3 + local.get $4 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 1 + i32.sub + i32.lt_u + if + local.get $4 + i32.const 1 + i32.add + local.set $4 + else + local.get $3 + i32.const 1 + i32.add + local.set $3 + i32.const 0 + local.set $4 + end + end + local.get $0 + local.get $3 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 0 + i32.const -1 + i32.xor + local.get $4 + i32.shl + i32.and + local.set $5 + local.get $5 + i32.eqz + if + local.get $0 + i32.load + i32.const 0 + i32.const -1 + i32.xor + local.get $3 + i32.const 1 + i32.add + i32.shl + i32.and + local.set $2 + local.get $2 + i32.eqz + if + i32.const 0 + local.set $6 + else + local.get $2 + call $~lib/allocator/tlsf/ffs + local.set $3 + local.get $0 + local.get $3 + call $~lib/allocator/tlsf/Root#getSLMap + local.tee $7 + if (result i32) + local.get $7 + else + i32.const 0 + i32.const 24 + i32.const 342 + i32.const 16 + call $~lib/env/abort + unreachable + end + local.set $5 + local.get $0 + local.get $3 + local.get $5 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + local.set $6 + end + else + local.get $0 + local.get $3 + local.get $5 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + local.set $6 + end + local.get $6 + ) + (func $~lib/allocator/tlsf/Root#use (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 367 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.ge_u + local.tee $4 + if (result i32) + local.get $2 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.lt_u + else + local.get $4 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 368 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $2 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 369 + i32.const 4 + call $~lib/env/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $3 + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.sub + local.set $5 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.add + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.and + i32.or + i32.store + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + local.get $2 + i32.add + local.set $4 + local.get $4 + local.get $5 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + global.get $~lib/allocator/tlsf/FREE + i32.or + i32.store + local.get $0 + local.get $4 + call $~lib/allocator/tlsf/Root#insert + else + local.get $1 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.const -1 + i32.xor + i32.and + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $4 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 387 + i32.const 25 + call $~lib/env/abort + unreachable + else + local.get $4 + end + local.set $4 + local.get $4 + local.get $4 + i32.load + global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const -1 + i32.xor + i32.and + i32.store + end + local.get $1 + global.get $~lib/allocator/tlsf/Block.INFO + i32.add + ) + (func $~lib/allocator/tlsf/__mem_allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset + (local $7 i32) + global.get $~lib/allocator/tlsf/ROOT local.set $1 local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u + i32.eqz if - local.get $4 - local.get $1 - i32.sub + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.set $2 + current_memory + local.set $3 + local.get $2 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add i32.const 65535 i32.add i32.const 65535 @@ -91,22 +1231,151 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $5 - local.tee $3 - local.get $2 - local.tee $6 + local.set $4 + local.get $4 local.get $3 - local.get $6 + i32.gt_s + local.tee $5 + if (result i32) + local.get $4 + local.get $3 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + local.get $5 + end + if + unreachable + end + local.get $2 + local.tee $1 + global.set $~lib/allocator/tlsf/ROOT + local.get $1 + i32.const 0 + call $~lib/allocator/tlsf/Root#set:tailRef + local.get $1 + i32.const 0 + i32.store + block $break|0 + i32.const 0 + local.set $5 + loop $repeat|0 + local.get $5 + global.get $~lib/allocator/tlsf/FL_BITS + i32.lt_u + i32.eqz + br_if $break|0 + block + local.get $1 + local.get $5 + i32.const 0 + call $~lib/allocator/tlsf/Root#setSLMap + block $break|1 + i32.const 0 + local.set $6 + loop $repeat|1 + local.get $6 + global.get $~lib/allocator/tlsf/SL_SIZE + i32.lt_u + i32.eqz + br_if $break|1 + local.get $1 + local.get $5 + local.get $6 + i32.const 0 + call $~lib/allocator/tlsf/Root#setHead + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $repeat|1 + unreachable + end + unreachable + end + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $repeat|0 + unreachable + end + unreachable + end + local.get $1 + local.get $2 + global.get $~lib/allocator/tlsf/Root.SIZE + i32.add + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + current_memory + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop + end + local.get $0 + global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.gt_u + if + unreachable + end + local.get $0 + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + local.tee $4 + global.get $~lib/allocator/tlsf/Block.MIN_SIZE + local.tee $3 + local.get $4 + local.get $3 + i32.gt_u + select + local.set $0 + local.get $1 + local.get $0 + call $~lib/allocator/tlsf/Root#search + local.set $7 + local.get $7 + i32.eqz + if + current_memory + local.set $4 + local.get $0 + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $3 + local.get $4 + local.tee $2 + local.get $3 + local.tee $5 + local.get $2 + local.get $5 i32.gt_s select - local.set $3 - local.get $3 + local.set $2 + local.get $2 grow_memory i32.const 0 i32.lt_s if - local.get $2 + local.get $3 grow_memory i32.const 0 i32.lt_s @@ -114,17 +1383,62 @@ unreachable end end + current_memory + local.set $5 + local.get $1 + local.get $4 + i32.const 16 + i32.shl + local.get $5 + i32.const 16 + i32.shl + call $~lib/allocator/tlsf/Root#addMemory + drop + local.get $1 + local.get $0 + call $~lib/allocator/tlsf/Root#search + local.tee $6 + i32.eqz + if (result i32) + i32.const 0 + i32.const 24 + i32.const 502 + i32.const 12 + call $~lib/env/abort + unreachable + else + local.get $6 + end + local.set $7 end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 - ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $7 + i32.load + global.get $~lib/allocator/tlsf/TAGS + i32.const -1 + i32.xor + i32.and local.get $0 - call $~lib/allocator/arena/__mem_allocate + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 505 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $1 + local.get $7 + local.get $0 + call $~lib/allocator/tlsf/Root#use + ) + (func $~lib/memory/memory.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_allocate return ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -137,10 +1451,409 @@ local.get $0 i32.store offset=4 local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $constructor/EmptyCtor~iterate (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + ) + (func $~lib/collector/itcm/ManagedObject#get:color (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.and + ) + (func $~lib/collector/itcm/ManagedObject#get:next (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + ) + (func $~lib/collector/itcm/ManagedObject#set:next (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.and + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/ManagedObject#unlink (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + call $~lib/collector/itcm/ManagedObject#get:next + local.set $1 + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + ) + (func $~lib/collector/itcm/ManagedObjectList#push (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.set $2 + local.get $1 + local.get $0 + call $~lib/collector/itcm/ManagedObject#set:next + local.get $1 + local.get $2 + i32.store offset=12 + local.get $2 + local.get $1 + call $~lib/collector/itcm/ManagedObject#set:next + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/collector/itcm/iter + i32.eq + if + local.get $0 + i32.load offset=12 + global.set $~lib/collector/itcm/iter + end + local.get $0 + call $~lib/collector/itcm/ManagedObject#unlink + global.get $~lib/collector/itcm/toSpace + local.get $0 + call $~lib/collector/itcm/ManagedObjectList#push + local.get $0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/step~anonymous|0 (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + block $~lib/collector/itcm/refToObj|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/collector/itcm/ManagedObject#set:color (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $1 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/step~anonymous|1 (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 136 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/env/trace + block $~lib/collector/itcm/refToObj|inlined.1 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/collector/itcm/step~anonymous|2 (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + block $~lib/collector/itcm/refToObj|inlined.2 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + if + local.get $2 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/allocator/tlsf/__mem_free (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + if + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + local.set $2 + local.get $2 + i32.load + local.set $3 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 518 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $3 + global.get $~lib/allocator/tlsf/FREE + i32.or + i32.store + local.get $1 + local.get $0 + global.get $~lib/allocator/tlsf/Block.INFO + i32.sub + call $~lib/allocator/tlsf/Root#insert + end + end + ) + (func $~lib/memory/memory.free (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $~lib/collector/itcm/step (; 38 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + block $break|0 + block $case3|0 + block $case2|0 + block $case1|0 + block $case0|0 + global.get $~lib/collector/itcm/state + local.set $1 + local.get $1 + i32.const 0 + i32.eq + br_if $case0|0 + local.get $1 + i32.const 1 + i32.eq + br_if $case1|0 + local.get $1 + i32.const 2 + i32.eq + br_if $case2|0 + local.get $1 + i32.const 3 + i32.eq + br_if $case3|0 + br $break|0 + end + block + global.get $~lib/runtime/HEADER_SIZE + call $~lib/memory/memory.allocate + global.set $~lib/collector/itcm/fromSpace + global.get $~lib/collector/itcm/fromSpace + i32.const -1 + i32.store + global.get $~lib/collector/itcm/fromSpace + i32.const 0 + i32.store offset=4 + global.get $~lib/collector/itcm/fromSpace + call $~lib/collector/itcm/ManagedObjectList#clear + global.get $~lib/runtime/HEADER_SIZE + call $~lib/memory/memory.allocate + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/toSpace + i32.const -1 + i32.store + global.get $~lib/collector/itcm/toSpace + i32.const 0 + i32.store offset=4 + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/iter + i32.const 1 + global.set $~lib/collector/itcm/state + end + end + block + i32.const 3 + call $~iterateRoots + i32.const 2 + global.set $~lib/collector/itcm/state + br $break|0 + unreachable + end + unreachable + end + block + global.get $~lib/collector/itcm/iter + call $~lib/collector/itcm/ManagedObject#get:next + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/collector/itcm/white + i32.eqz + call $~lib/collector/itcm/ManagedObject#set:color + block $~lib/collector/itcm/objToRef|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add + end + i32.const 4 + local.get $0 + i32.load + call_indirect (type $FUNCSIG$vii) + else + i32.const 5 + call $~iterateRoots + global.get $~lib/collector/itcm/iter + call $~lib/collector/itcm/ManagedObject#get:next + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.eq + if + global.get $~lib/collector/itcm/fromSpace + local.set $1 + global.get $~lib/collector/itcm/toSpace + global.set $~lib/collector/itcm/fromSpace + local.get $1 + global.set $~lib/collector/itcm/toSpace + global.get $~lib/collector/itcm/white + i32.eqz + global.set $~lib/collector/itcm/white + local.get $1 + call $~lib/collector/itcm/ManagedObject#get:next + global.set $~lib/collector/itcm/iter + i32.const 3 + global.set $~lib/collector/itcm/state + end + end + br $break|0 + unreachable + end + unreachable + end + block + global.get $~lib/collector/itcm/iter + local.set $0 + local.get $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + local.get $0 + call $~lib/collector/itcm/ManagedObject#get:next + global.set $~lib/collector/itcm/iter + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.ge_u + if + local.get $0 + call $~lib/memory/memory.free + end + else + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + i32.const 1 + global.set $~lib/collector/itcm/state + end + br $break|0 + unreachable + end + unreachable + end + ) + (func $~lib/collector/itcm/__ref_register (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/collector/itcm/step + block $~lib/collector/itcm/refToObj|inlined.3 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + end + local.set $2 + local.get $2 + global.get $~lib/collector/itcm/white + call $~lib/collector/itcm/ManagedObject#set:color + global.get $~lib/collector/itcm/fromSpace + local.get $2 + call $~lib/collector/itcm/ManagedObjectList#push + ) + (func $~lib/runtime/register (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -148,8 +1861,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 149 + i32.const 88 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -165,8 +1878,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 151 + i32.const 88 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -175,62 +1888,25 @@ local.get $1 i32.store local.get $0 + call $~lib/collector/itcm/__ref_register + local.get $0 ) - (func $constructor/EmptyCtor#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtor#constructor (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 call $~lib/runtime/allocate - i32.const 1 + i32.const 2 call $~lib/runtime/register local.set $0 end local.get $0 ) - (func $constructor/EmptyCtorWithFieldInit#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 4 - call $~lib/runtime/allocate - i32.const 3 - call $~lib/runtime/register - local.set $0 - end - local.get $0 - i32.const 1 - i32.store - local.get $0 + (func $constructor/EmptyCtorWithFieldInit~iterate (; 42 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) ) - (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 4 - call $~lib/runtime/allocate - i32.const 4 - call $~lib/runtime/register - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - ) - (func $constructor/None#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - call $~lib/runtime/allocate - i32.const 5 - call $~lib/runtime/register - local.set $0 - end - local.get $0 - ) - (func $constructor/JustFieldInit#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtorWithFieldInit#constructor (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -245,7 +1921,10 @@ i32.store local.get $0 ) - (func $constructor/JustFieldNoInit#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtorWithFieldNoInit~iterate (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -260,17 +1939,9 @@ i32.store local.get $0 ) - (func $constructor/CtorReturns#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 - call $~lib/memory/memory.allocate + (func $constructor/None~iterate (; 46 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) ) - (func $constructor/CtorConditionallyReturns#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - global.get $constructor/b - if - i32.const 0 - call $~lib/memory/memory.allocate - return - end + (func $constructor/None#constructor (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -282,14 +1953,78 @@ end local.get $0 ) - (func $constructor/CtorAllocates#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/JustFieldInit~iterate (; 48 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $constructor/JustFieldInit#constructor (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 4 + call $~lib/runtime/allocate + i32.const 9 + call $~lib/runtime/register + local.set $0 + end + local.get $0 + i32.const 1 + i32.store + local.get $0 + ) + (func $constructor/JustFieldNoInit~iterate (; 50 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $constructor/JustFieldNoInit#constructor (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 4 + call $~lib/runtime/allocate + i32.const 10 + call $~lib/runtime/register + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + ) + (func $constructor/CtorReturns#constructor (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + call $~lib/memory/memory.allocate + ) + (func $constructor/CtorConditionallyReturns~iterate (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $constructor/CtorConditionallyReturns#constructor (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + global.get $constructor/b + if + i32.const 0 + call $~lib/memory/memory.allocate + return + end + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/runtime/allocate + i32.const 11 + call $~lib/runtime/register + local.set $0 + end + local.get $0 + ) + (func $constructor/CtorAllocates~iterate (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $constructor/CtorAllocates#constructor (; 56 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 0 call $~lib/runtime/allocate - i32.const 9 + i32.const 12 call $~lib/runtime/register local.set $0 end @@ -298,7 +2033,10 @@ drop local.get $0 ) - (func $constructor/CtorConditionallyAllocates#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorConditionallyAllocates~iterate (; 57 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $constructor/CtorConditionallyAllocates#constructor (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) global.get $constructor/b if block (result i32) @@ -307,7 +2045,7 @@ if i32.const 0 call $~lib/runtime/allocate - i32.const 10 + i32.const 13 call $~lib/runtime/register local.set $0 end @@ -320,23 +2058,13 @@ if i32.const 0 call $~lib/runtime/allocate - i32.const 10 + i32.const 13 call $~lib/runtime/register local.set $0 end local.get $0 ) - (func $start:constructor (; 16 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset + (func $start:constructor (; 59 ;) (type $FUNCSIG$v) i32.const 0 call $constructor/EmptyCtor#constructor global.set $constructor/emptyCtor @@ -368,9 +2096,82 @@ call $constructor/CtorConditionallyAllocates#constructor global.set $constructor/ctorConditionallyAllocates ) - (func $start (; 17 ;) (type $FUNCSIG$v) + (func $start (; 60 ;) (type $FUNCSIG$v) call $start:constructor ) - (func $null (; 18 ;) (type $FUNCSIG$v) + (func $null (; 61 ;) (type $FUNCSIG$v) + ) + (func $~iterateRoots (; 62 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + global.get $constructor/emptyCtor + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/emptyCtorWithFieldInit + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/emptyCtorWithFieldNoInit + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/none + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/justFieldInit + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/justFieldNoInit + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/ctorReturns + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/ctorConditionallyReturns + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/ctorAllocates + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end + global.get $constructor/ctorConditionallyAllocates + local.tee $1 + if + local.get $1 + local.get $0 + call_indirect (type $FUNCSIG$vi) + end ) ) diff --git a/tests/compiler/declare.json b/tests/compiler/declare.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/declare.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/do.json b/tests/compiler/do.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/do.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/empty.json b/tests/compiler/empty.json new file mode 100644 index 00000000..453cb077 --- /dev/null +++ b/tests/compiler/empty.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} diff --git a/tests/compiler/enum.json b/tests/compiler/enum.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/enum.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/export.json b/tests/compiler/export.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/export.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/exports.json b/tests/compiler/exports.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/exports.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index da271697..b2e7924f 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -146,7 +146,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -161,7 +161,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index e943f9a6..96704ef4 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -19,9 +19,9 @@ (global $exports/vehicles.Car.TIRES i32 (i32.const 4)) (global $exports/outer.inner.a i32 (i32.const 42)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) (global $~lib/argc (mut i32) (i32.const 0)) @@ -192,7 +192,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -209,7 +209,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/external.json b/tests/compiler/external.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/external.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/for.json b/tests/compiler/for.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/for.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/function-expression.json b/tests/compiler/function-expression.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/function-expression.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/function-types.json b/tests/compiler/function-types.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/function-types.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/function.json b/tests/compiler/function.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/function.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/gc.json b/tests/compiler/gc.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/gc.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/gc.optimized.wat b/tests/compiler/gc.optimized.wat index 736d770d..730674c6 100644 --- a/tests/compiler/gc.optimized.wat +++ b/tests/compiler/gc.optimized.wat @@ -1,10 +1,10 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$i (func (result i32))) @@ -168,7 +168,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -183,7 +183,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -1019,7 +1019,7 @@ if i32.const 0 i32.const 112 - i32.const 18 + i32.const 17 i32.const 2 call $~lib/env/abort unreachable @@ -1030,7 +1030,7 @@ if i32.const 0 i32.const 112 - i32.const 19 + i32.const 18 i32.const 2 call $~lib/env/abort unreachable @@ -1041,7 +1041,7 @@ if i32.const 0 i32.const 112 - i32.const 20 + i32.const 19 i32.const 2 call $~lib/env/abort unreachable @@ -1060,7 +1060,7 @@ if i32.const 0 i32.const 112 - i32.const 27 + i32.const 26 i32.const 2 call $~lib/env/abort unreachable @@ -1073,7 +1073,7 @@ if i32.const 0 i32.const 112 - i32.const 28 + i32.const 27 i32.const 2 call $~lib/env/abort unreachable @@ -1084,7 +1084,7 @@ if i32.const 0 i32.const 112 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -1102,7 +1102,7 @@ if i32.const 0 i32.const 112 - i32.const 36 + i32.const 35 i32.const 2 call $~lib/env/abort unreachable @@ -1113,7 +1113,7 @@ if i32.const 0 i32.const 112 - i32.const 37 + i32.const 36 i32.const 2 call $~lib/env/abort unreachable @@ -1126,7 +1126,7 @@ if i32.const 0 i32.const 112 - i32.const 38 + i32.const 37 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc.ts b/tests/compiler/gc.ts index af6cb670..32d06673 100644 --- a/tests/compiler/gc.ts +++ b/tests/compiler/gc.ts @@ -1,4 +1,3 @@ -import "allocator/arena"; import { link_count, unlink_count, collect_count } from "./gc/_dummy"; export { gc }; diff --git a/tests/compiler/gc.untouched.wat b/tests/compiler/gc.untouched.wat index eaa10833..e41cb420 100644 --- a/tests/compiler/gc.untouched.wat +++ b/tests/compiler/gc.untouched.wat @@ -1,10 +1,10 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) @@ -30,9 +30,9 @@ (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) (global $gc/_dummy/unlink_parentRef (mut i32) (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/gc/gc.implemented i32 (i32.const 1)) (global $~lib/argc (mut i32) (i32.const 0)) @@ -198,7 +198,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -215,7 +215,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -1212,7 +1212,7 @@ if i32.const 0 i32.const 112 - i32.const 10 + i32.const 9 i32.const 2 call $~lib/env/abort unreachable @@ -1234,7 +1234,7 @@ if i32.const 0 i32.const 112 - i32.const 18 + i32.const 17 i32.const 2 call $~lib/env/abort unreachable @@ -1246,7 +1246,7 @@ if i32.const 0 i32.const 112 - i32.const 19 + i32.const 18 i32.const 2 call $~lib/env/abort unreachable @@ -1258,7 +1258,7 @@ if i32.const 0 i32.const 112 - i32.const 20 + i32.const 19 i32.const 2 call $~lib/env/abort unreachable @@ -1278,7 +1278,7 @@ if i32.const 0 i32.const 112 - i32.const 27 + i32.const 26 i32.const 2 call $~lib/env/abort unreachable @@ -1292,7 +1292,7 @@ if i32.const 0 i32.const 112 - i32.const 28 + i32.const 27 i32.const 2 call $~lib/env/abort unreachable @@ -1304,7 +1304,7 @@ if i32.const 0 i32.const 112 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -1323,7 +1323,7 @@ if i32.const 0 i32.const 112 - i32.const 36 + i32.const 35 i32.const 2 call $~lib/env/abort unreachable @@ -1335,7 +1335,7 @@ if i32.const 0 i32.const 112 - i32.const 37 + i32.const 36 i32.const 2 call $~lib/env/abort unreachable @@ -1349,7 +1349,7 @@ if i32.const 0 i32.const 112 - i32.const 38 + i32.const 37 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-assign.json b/tests/compiler/gc/global-assign.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/gc/global-assign.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/gc/global-assign.optimized.wat b/tests/compiler/gc/global-assign.optimized.wat index a1dab65e..ddb3eb33 100644 --- a/tests/compiler/gc/global-assign.optimized.wat +++ b/tests/compiler/gc/global-assign.optimized.wat @@ -1,8 +1,8 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) @@ -141,7 +141,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -156,7 +156,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -184,7 +184,7 @@ if i32.const 0 i32.const 112 - i32.const 12 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -193,7 +193,7 @@ if i32.const 0 i32.const 112 - i32.const 13 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -202,7 +202,7 @@ if i32.const 0 i32.const 112 - i32.const 14 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -216,7 +216,7 @@ if i32.const 0 i32.const 112 - i32.const 19 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -225,7 +225,7 @@ if i32.const 0 i32.const 112 - i32.const 20 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable @@ -234,7 +234,7 @@ if i32.const 0 i32.const 112 - i32.const 21 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-assign.ts b/tests/compiler/gc/global-assign.ts index 3240387d..06b3cf7d 100644 --- a/tests/compiler/gc/global-assign.ts +++ b/tests/compiler/gc/global-assign.ts @@ -1,4 +1,3 @@ -import "allocator/arena"; import { register_count, link_count, unlink_count } from "./_dummy"; @start export function main(): void {} diff --git a/tests/compiler/gc/global-assign.untouched.wat b/tests/compiler/gc/global-assign.untouched.wat index ae8392c5..3855c7c7 100644 --- a/tests/compiler/gc/global-assign.untouched.wat +++ b/tests/compiler/gc/global-assign.untouched.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -24,9 +24,9 @@ (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) (global $gc/_dummy/unlink_parentRef (mut i32) (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $gc/global-assign/global (mut i32) (i32.const 0)) (global $gc/global-assign/globalRef (mut i32) (i32.const 0)) @@ -186,7 +186,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -203,7 +203,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -250,7 +250,7 @@ if i32.const 0 i32.const 112 - i32.const 12 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -262,7 +262,7 @@ if i32.const 0 i32.const 112 - i32.const 13 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -274,7 +274,7 @@ if i32.const 0 i32.const 112 - i32.const 14 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -289,7 +289,7 @@ if i32.const 0 i32.const 112 - i32.const 19 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -301,7 +301,7 @@ if i32.const 0 i32.const 112 - i32.const 20 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable @@ -313,7 +313,7 @@ if i32.const 0 i32.const 112 - i32.const 21 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-init.json b/tests/compiler/gc/global-init.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/gc/global-init.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/gc/global-init.optimized.wat b/tests/compiler/gc/global-init.optimized.wat index 9aea1b6d..19f0472c 100644 --- a/tests/compiler/gc/global-init.optimized.wat +++ b/tests/compiler/gc/global-init.optimized.wat @@ -1,8 +1,8 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) @@ -140,7 +140,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -155,7 +155,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -181,7 +181,7 @@ if i32.const 0 i32.const 112 - i32.const 11 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -190,7 +190,7 @@ if i32.const 0 i32.const 112 - i32.const 12 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -199,7 +199,7 @@ if i32.const 0 i32.const 112 - i32.const 13 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -213,7 +213,7 @@ if i32.const 0 i32.const 112 - i32.const 16 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -222,7 +222,7 @@ if i32.const 0 i32.const 112 - i32.const 17 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -231,7 +231,7 @@ if i32.const 0 i32.const 112 - i32.const 18 + i32.const 17 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/global-init.ts b/tests/compiler/gc/global-init.ts index 9f89bc7a..d4857d00 100644 --- a/tests/compiler/gc/global-init.ts +++ b/tests/compiler/gc/global-init.ts @@ -1,4 +1,3 @@ -import "allocator/arena"; import { register_count, link_count, unlink_count } from "./_dummy"; @start export function main(): void {} diff --git a/tests/compiler/gc/global-init.untouched.wat b/tests/compiler/gc/global-init.untouched.wat index 0a87e6c9..c25cf7eb 100644 --- a/tests/compiler/gc/global-init.untouched.wat +++ b/tests/compiler/gc/global-init.untouched.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -24,9 +24,9 @@ (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) (global $gc/_dummy/unlink_parentRef (mut i32) (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $gc/global-init/global (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) @@ -185,7 +185,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -202,7 +202,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -247,7 +247,7 @@ if i32.const 0 i32.const 112 - i32.const 11 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -259,7 +259,7 @@ if i32.const 0 i32.const 112 - i32.const 12 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -271,7 +271,7 @@ if i32.const 0 i32.const 112 - i32.const 13 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -286,7 +286,7 @@ if i32.const 0 i32.const 112 - i32.const 16 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -298,7 +298,7 @@ if i32.const 0 i32.const 112 - i32.const 17 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -310,7 +310,7 @@ if i32.const 0 i32.const 112 - i32.const 18 + i32.const 17 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/itcm/trace.json b/tests/compiler/gc/itcm/trace.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/gc/itcm/trace.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/gc/itcm/trace.optimized.wat b/tests/compiler/gc/itcm/trace.optimized.wat index f7d36542..3d64b6aa 100644 --- a/tests/compiler/gc/itcm/trace.optimized.wat +++ b/tests/compiler/gc/itcm/trace.optimized.wat @@ -1,10 +1,10 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -67,12 +67,12 @@ (table $0 10 funcref) (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/collector/itcm/step~anonymous|0 $~lib/collector/itcm/step~anonymous|1 $~lib/collector/itcm/step~anonymous|0 $gc/itcm/trace/Ref~iterate $~lib/string/String~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) (global $gc/itcm/trace/ref (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) (global $gc/itcm/trace/arr (mut i32) (i32.const 0)) @@ -683,7 +683,7 @@ if i32.const 0 i32.const 1056 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -698,7 +698,7 @@ if i32.const 0 i32.const 1056 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -2170,7 +2170,7 @@ if i32.const 0 i32.const 1056 - i32.const 113 + i32.const 117 i32.const 8 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/itcm/trace.ts b/tests/compiler/gc/itcm/trace.ts index 8c0e2699..88e87f75 100644 --- a/tests/compiler/gc/itcm/trace.ts +++ b/tests/compiler/gc/itcm/trace.ts @@ -1,6 +1,4 @@ @global const GC_TRACE = true; - -import "allocator/arena"; import "collector/itcm"; import { HEADER_SIZE } from "runtime"; diff --git a/tests/compiler/gc/itcm/trace.untouched.wat b/tests/compiler/gc/itcm/trace.untouched.wat index b33feda9..6a84fd72 100644 --- a/tests/compiler/gc/itcm/trace.untouched.wat +++ b/tests/compiler/gc/itcm/trace.untouched.wat @@ -1,10 +1,10 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) @@ -42,15 +42,15 @@ (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/collector/itcm/step~anonymous|0 $~lib/collector/itcm/step~anonymous|1 $~lib/collector/itcm/step~anonymous|2 $gc/itcm/trace/Ref~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) (global $gc/itcm/trace/GC_TRACE i32 (i32.const 1)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) (global $~lib/gc/gc.implemented i32 (i32.const 1)) + (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) + (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $gc/itcm/trace/ref (mut i32) (i32.const 0)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) @@ -825,7 +825,7 @@ if i32.const 0 i32.const 1056 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -842,7 +842,7 @@ if i32.const 0 i32.const 1056 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -1235,7 +1235,7 @@ if i32.const 0 i32.const 1056 - i32.const 232 + i32.const 236 i32.const 57 call $~lib/env/abort unreachable @@ -2867,7 +2867,7 @@ if i32.const 0 i32.const 1056 - i32.const 113 + i32.const 117 i32.const 8 call $~lib/env/abort unreachable @@ -3039,7 +3039,7 @@ if i32.const 0 i32.const 24 - i32.const 8 + i32.const 6 i32.const 0 call $~lib/env/abort unreachable @@ -3049,7 +3049,7 @@ if i32.const 0 i32.const 24 - i32.const 9 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-assign.json b/tests/compiler/gc/rc/global-assign.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/gc/rc/global-assign.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/gc/rc/global-assign.optimized.wat b/tests/compiler/gc/rc/global-assign.optimized.wat index 7cc9b1e9..92f2f955 100644 --- a/tests/compiler/gc/rc/global-assign.optimized.wat +++ b/tests/compiler/gc/rc/global-assign.optimized.wat @@ -143,7 +143,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -225,7 +225,7 @@ if i32.const 0 i32.const 152 - i32.const 12 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -236,7 +236,7 @@ if i32.const 0 i32.const 152 - i32.const 13 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -247,7 +247,7 @@ if i32.const 0 i32.const 152 - i32.const 14 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -256,7 +256,7 @@ if i32.const 0 i32.const 152 - i32.const 15 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -285,7 +285,7 @@ if i32.const 0 i32.const 152 - i32.const 20 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable @@ -296,7 +296,7 @@ if i32.const 0 i32.const 152 - i32.const 21 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -307,7 +307,7 @@ if i32.const 0 i32.const 152 - i32.const 22 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -318,7 +318,7 @@ if i32.const 0 i32.const 152 - i32.const 23 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -329,7 +329,7 @@ if i32.const 0 i32.const 152 - i32.const 24 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-assign.ts b/tests/compiler/gc/rc/global-assign.ts index 6fb0bb40..8102b2cf 100644 --- a/tests/compiler/gc/rc/global-assign.ts +++ b/tests/compiler/gc/rc/global-assign.ts @@ -1,4 +1,3 @@ -import "allocator/arena"; import { register_count, retain_count, retain_ref, release_count, release_ref } from "./_dummy"; @start export function main(): void {} diff --git a/tests/compiler/gc/rc/global-assign.untouched.wat b/tests/compiler/gc/rc/global-assign.untouched.wat index 2a42677d..70952dc5 100644 --- a/tests/compiler/gc/rc/global-assign.untouched.wat +++ b/tests/compiler/gc/rc/global-assign.untouched.wat @@ -23,9 +23,9 @@ (global $gc/rc/_dummy/release_count (mut i32) (i32.const 0)) (global $gc/rc/_dummy/release_ref (mut i32) (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $gc/rc/global-assign/global (mut i32) (i32.const 0)) (global $gc/rc/global-assign/globalRef (mut i32) (i32.const 0)) @@ -180,7 +180,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -197,7 +197,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -286,7 +286,7 @@ if i32.const 0 i32.const 152 - i32.const 12 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -298,7 +298,7 @@ if i32.const 0 i32.const 152 - i32.const 13 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -310,7 +310,7 @@ if i32.const 0 i32.const 152 - i32.const 14 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -322,7 +322,7 @@ if i32.const 0 i32.const 152 - i32.const 15 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -353,7 +353,7 @@ if i32.const 0 i32.const 152 - i32.const 20 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable @@ -365,7 +365,7 @@ if i32.const 0 i32.const 152 - i32.const 21 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -377,7 +377,7 @@ if i32.const 0 i32.const 152 - i32.const 22 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -389,7 +389,7 @@ if i32.const 0 i32.const 152 - i32.const 23 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -401,7 +401,7 @@ if i32.const 0 i32.const 152 - i32.const 24 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-init.json b/tests/compiler/gc/rc/global-init.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/gc/rc/global-init.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/gc/rc/global-init.optimized.wat b/tests/compiler/gc/rc/global-init.optimized.wat index baa5f0cc..9d4e47c4 100644 --- a/tests/compiler/gc/rc/global-init.optimized.wat +++ b/tests/compiler/gc/rc/global-init.optimized.wat @@ -139,7 +139,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -154,7 +154,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -201,7 +201,7 @@ if i32.const 0 i32.const 152 - i32.const 11 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -212,7 +212,7 @@ if i32.const 0 i32.const 152 - i32.const 12 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -223,7 +223,7 @@ if i32.const 0 i32.const 152 - i32.const 13 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -232,7 +232,7 @@ if i32.const 0 i32.const 152 - i32.const 14 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/gc/rc/global-init.ts b/tests/compiler/gc/rc/global-init.ts index 46c36ba5..faa6a1e0 100644 --- a/tests/compiler/gc/rc/global-init.ts +++ b/tests/compiler/gc/rc/global-init.ts @@ -1,4 +1,3 @@ -import "allocator/arena"; import { register_count, retain_count, retain_ref, release_count } from "./_dummy"; @start export function main(): void {} diff --git a/tests/compiler/gc/rc/global-init.untouched.wat b/tests/compiler/gc/rc/global-init.untouched.wat index 9b020422..e36d384b 100644 --- a/tests/compiler/gc/rc/global-init.untouched.wat +++ b/tests/compiler/gc/rc/global-init.untouched.wat @@ -22,9 +22,9 @@ (global $gc/rc/_dummy/release_count (mut i32) (i32.const 0)) (global $gc/rc/_dummy/release_ref (mut i32) (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $gc/rc/global-init/global (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) @@ -178,7 +178,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -195,7 +195,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -264,7 +264,7 @@ if i32.const 0 i32.const 152 - i32.const 11 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -276,7 +276,7 @@ if i32.const 0 i32.const 152 - i32.const 12 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -288,7 +288,7 @@ if i32.const 0 i32.const 152 - i32.const 13 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -300,7 +300,7 @@ if i32.const 0 i32.const 152 - i32.const 14 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.json b/tests/compiler/getter-call.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/getter-call.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 7e5d3604..63396690 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -85,7 +85,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index ddc0e13f..3bc9afc1 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -10,9 +10,9 @@ (table $0 2 funcref) (elem (i32.const 0) $null $getter-call/C#get:x~anonymous|0) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) @@ -141,7 +141,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-setter.json b/tests/compiler/getter-setter.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/getter-setter.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/i64-polyfill.json b/tests/compiler/i64-polyfill.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/i64-polyfill.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/if.json b/tests/compiler/if.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/if.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/import.json b/tests/compiler/import.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/import.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/infer-type.json b/tests/compiler/infer-type.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/infer-type.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/inlining-blocklocals.json b/tests/compiler/inlining-blocklocals.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/inlining-blocklocals.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/inlining-recursive.json b/tests/compiler/inlining-recursive.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/inlining-recursive.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/inlining.json b/tests/compiler/inlining.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/inlining.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index 6168f869..59d17ecf 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 48 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -146,7 +146,7 @@ if i32.const 0 i32.const 48 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index d23f392c..dd25148d 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -13,9 +13,9 @@ (global $inlining/constantGlobal i32 (i32.const 1)) (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 80)) (export "memory" (memory $0)) @@ -405,7 +405,7 @@ if i32.const 0 i32.const 48 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -422,7 +422,7 @@ if i32.const 0 i32.const 48 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/instanceof.json b/tests/compiler/instanceof.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/instanceof.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/limits.json b/tests/compiler/limits.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/limits.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/literals.json b/tests/compiler/literals.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/literals.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/logical.json b/tests/compiler/logical.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/logical.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/main.json b/tests/compiler/main.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/main.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/mandelbrot.json b/tests/compiler/mandelbrot.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/mandelbrot.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/many-locals.json b/tests/compiler/many-locals.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/many-locals.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/memcpy.json b/tests/compiler/memcpy.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/memcpy.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/memmove.json b/tests/compiler/memmove.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/memmove.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/memset.json b/tests/compiler/memset.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/memset.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/merge.json b/tests/compiler/merge.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/merge.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/named-export-default.json b/tests/compiler/named-export-default.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/named-export-default.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/named-import-default.json b/tests/compiler/named-import-default.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/named-import-default.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/namespace.json b/tests/compiler/namespace.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/namespace.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/new-without-allocator.json b/tests/compiler/new-without-allocator.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/new-without-allocator.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/number.json b/tests/compiler/number.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/number.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 89aa7586..2b849b70 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -303,7 +303,7 @@ if i32.const 0 i32.const 464 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -318,7 +318,7 @@ if i32.const 0 i32.const 464 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -2451,7 +2451,7 @@ if i32.const 0 i32.const 464 - i32.const 173 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -2465,7 +2465,7 @@ if i32.const 0 i32.const 464 - i32.const 175 + i32.const 179 i32.const 4 call $~lib/env/abort unreachable @@ -2486,7 +2486,7 @@ if i32.const 0 i32.const 520 - i32.const 7 + i32.const 5 i32.const 0 call $~lib/env/abort unreachable @@ -2509,7 +2509,7 @@ if i32.const 0 i32.const 520 - i32.const 9 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable @@ -2522,7 +2522,7 @@ if i32.const 0 i32.const 520 - i32.const 10 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable @@ -2535,7 +2535,7 @@ if i32.const 0 i32.const 520 - i32.const 12 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -2548,7 +2548,7 @@ if i32.const 0 i32.const 520 - i32.const 13 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -2563,6 +2563,36 @@ i32.const 1760 call $~lib/string/String.__eq i32.eqz + if + i32.const 0 + i32.const 520 + i32.const 12 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $number/a + i32.const 1 + i32.sub + local.tee $0 + global.set $number/a + local.get $0 + call $~lib/util/number/itoa32 + i32.const 504 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 520 + i32.const 13 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 1776 + i32.const 1776 + call $~lib/string/String.__eq + i32.eqz if i32.const 0 i32.const 520 @@ -2571,14 +2601,8 @@ call $~lib/env/abort unreachable end - global.get $number/a - i32.const 1 - i32.sub - local.tee $0 - global.set $number/a - local.get $0 - call $~lib/util/number/itoa32 - i32.const 504 + i32.const 1792 + i32.const 1792 call $~lib/string/String.__eq i32.eqz if @@ -2589,30 +2613,6 @@ call $~lib/env/abort unreachable end - i32.const 1776 - i32.const 1776 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 520 - i32.const 16 - i32.const 0 - call $~lib/env/abort - unreachable - end - i32.const 1792 - i32.const 1792 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 520 - i32.const 17 - i32.const 0 - call $~lib/env/abort - unreachable - end global.get $number/a local.tee $0 i32.const 1 @@ -2626,7 +2626,7 @@ if i32.const 0 i32.const 520 - i32.const 20 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -2644,7 +2644,7 @@ if i32.const 0 i32.const 520 - i32.const 21 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/number.ts b/tests/compiler/number.ts index 853dcb12..cf7c76db 100644 --- a/tests/compiler/number.ts +++ b/tests/compiler/number.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; - // basic class bindings // variable diff --git a/tests/compiler/number.untouched.wat b/tests/compiler/number.untouched.wat index 3032067b..5b44b8a6 100644 --- a/tests/compiler/number.untouched.wat +++ b/tests/compiler/number.untouched.wat @@ -42,11 +42,11 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $number/a (mut i32) (i32.const 1)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) @@ -399,7 +399,7 @@ if i32.const 0 i32.const 464 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -416,7 +416,7 @@ if i32.const 0 i32.const 464 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -3550,7 +3550,7 @@ if i32.const 0 i32.const 464 - i32.const 173 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -3567,7 +3567,7 @@ if i32.const 0 i32.const 464 - i32.const 175 + i32.const 179 i32.const 4 call $~lib/env/abort unreachable @@ -3737,7 +3737,7 @@ if i32.const 0 i32.const 520 - i32.const 7 + i32.const 5 i32.const 0 call $~lib/env/abort unreachable @@ -3750,7 +3750,7 @@ if i32.const 0 i32.const 520 - i32.const 9 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable @@ -3763,7 +3763,7 @@ if i32.const 0 i32.const 520 - i32.const 10 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable @@ -3776,7 +3776,7 @@ if i32.const 0 i32.const 520 - i32.const 12 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -3789,7 +3789,7 @@ if i32.const 0 i32.const 520 - i32.const 13 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -3809,7 +3809,7 @@ if i32.const 0 i32.const 520 - i32.const 14 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -3829,7 +3829,7 @@ if i32.const 0 i32.const 520 - i32.const 15 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -3843,7 +3843,7 @@ if i32.const 0 i32.const 520 - i32.const 16 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -3857,7 +3857,7 @@ if i32.const 0 i32.const 520 - i32.const 17 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -3877,7 +3877,7 @@ if i32.const 0 i32.const 520 - i32.const 20 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -3897,7 +3897,7 @@ if i32.const 0 i32.const 520 - i32.const 21 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable @@ -3908,7 +3908,7 @@ if i32.const 0 i32.const 520 - i32.const 25 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable @@ -3923,7 +3923,7 @@ if i32.const 0 i32.const 520 - i32.const 27 + i32.const 25 i32.const 0 call $~lib/env/abort unreachable @@ -3936,7 +3936,7 @@ if i32.const 0 i32.const 520 - i32.const 28 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -3949,7 +3949,7 @@ if i32.const 0 i32.const 520 - i32.const 29 + i32.const 27 i32.const 0 call $~lib/env/abort unreachable @@ -3962,7 +3962,7 @@ if i32.const 0 i32.const 520 - i32.const 30 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable @@ -3975,7 +3975,7 @@ if i32.const 0 i32.const 520 - i32.const 31 + i32.const 29 i32.const 0 call $~lib/env/abort unreachable @@ -3988,7 +3988,7 @@ if i32.const 0 i32.const 520 - i32.const 32 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable @@ -4001,7 +4001,7 @@ if i32.const 0 i32.const 520 - i32.const 33 + i32.const 31 i32.const 0 call $~lib/env/abort unreachable @@ -4016,7 +4016,7 @@ if i32.const 0 i32.const 520 - i32.const 34 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable @@ -4029,7 +4029,7 @@ if i32.const 0 i32.const 520 - i32.const 35 + i32.const 33 i32.const 0 call $~lib/env/abort unreachable @@ -4042,7 +4042,7 @@ if i32.const 0 i32.const 520 - i32.const 36 + i32.const 34 i32.const 0 call $~lib/env/abort unreachable @@ -4055,7 +4055,7 @@ if i32.const 0 i32.const 520 - i32.const 37 + i32.const 35 i32.const 0 call $~lib/env/abort unreachable @@ -4068,7 +4068,7 @@ if i32.const 0 i32.const 520 - i32.const 38 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable @@ -4081,7 +4081,7 @@ if i32.const 0 i32.const 520 - i32.const 39 + i32.const 37 i32.const 0 call $~lib/env/abort unreachable @@ -4094,7 +4094,7 @@ if i32.const 0 i32.const 520 - i32.const 40 + i32.const 38 i32.const 0 call $~lib/env/abort unreachable @@ -4107,7 +4107,7 @@ if i32.const 0 i32.const 520 - i32.const 41 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable @@ -4120,7 +4120,7 @@ if i32.const 0 i32.const 520 - i32.const 42 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable @@ -4133,7 +4133,7 @@ if i32.const 0 i32.const 520 - i32.const 43 + i32.const 41 i32.const 0 call $~lib/env/abort unreachable @@ -4146,7 +4146,7 @@ if i32.const 0 i32.const 520 - i32.const 44 + i32.const 42 i32.const 0 call $~lib/env/abort unreachable @@ -4159,7 +4159,7 @@ if i32.const 0 i32.const 520 - i32.const 45 + i32.const 43 i32.const 0 call $~lib/env/abort unreachable @@ -4172,7 +4172,7 @@ if i32.const 0 i32.const 520 - i32.const 46 + i32.const 44 i32.const 0 call $~lib/env/abort unreachable @@ -4183,7 +4183,7 @@ if i32.const 0 i32.const 520 - i32.const 48 + i32.const 46 i32.const 0 call $~lib/env/abort unreachable @@ -4198,7 +4198,7 @@ if i32.const 0 i32.const 520 - i32.const 50 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable @@ -4211,7 +4211,7 @@ if i32.const 0 i32.const 520 - i32.const 51 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable @@ -4224,7 +4224,7 @@ if i32.const 0 i32.const 520 - i32.const 52 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable @@ -4237,7 +4237,7 @@ if i32.const 0 i32.const 520 - i32.const 53 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable @@ -4250,7 +4250,7 @@ if i32.const 0 i32.const 520 - i32.const 54 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -4263,7 +4263,7 @@ if i32.const 0 i32.const 520 - i32.const 55 + i32.const 53 i32.const 0 call $~lib/env/abort unreachable @@ -4276,7 +4276,7 @@ if i32.const 0 i32.const 520 - i32.const 56 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -4291,7 +4291,7 @@ if i32.const 0 i32.const 520 - i32.const 57 + i32.const 55 i32.const 0 call $~lib/env/abort unreachable @@ -4304,7 +4304,7 @@ if i32.const 0 i32.const 520 - i32.const 58 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable @@ -4317,7 +4317,7 @@ if i32.const 0 i32.const 520 - i32.const 59 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable @@ -4330,7 +4330,7 @@ if i32.const 0 i32.const 520 - i32.const 60 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable @@ -4343,7 +4343,7 @@ if i32.const 0 i32.const 520 - i32.const 61 + i32.const 59 i32.const 0 call $~lib/env/abort unreachable @@ -4356,7 +4356,7 @@ if i32.const 0 i32.const 520 - i32.const 62 + i32.const 60 i32.const 0 call $~lib/env/abort unreachable @@ -4369,7 +4369,7 @@ if i32.const 0 i32.const 520 - i32.const 63 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable @@ -4382,7 +4382,7 @@ if i32.const 0 i32.const 520 - i32.const 64 + i32.const 62 i32.const 0 call $~lib/env/abort unreachable @@ -4395,7 +4395,7 @@ if i32.const 0 i32.const 520 - i32.const 65 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -4408,7 +4408,7 @@ if i32.const 0 i32.const 520 - i32.const 66 + i32.const 64 i32.const 0 call $~lib/env/abort unreachable @@ -4421,7 +4421,7 @@ if i32.const 0 i32.const 520 - i32.const 67 + i32.const 65 i32.const 0 call $~lib/env/abort unreachable @@ -4434,7 +4434,7 @@ if i32.const 0 i32.const 520 - i32.const 68 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable @@ -4447,7 +4447,7 @@ if i32.const 0 i32.const 520 - i32.const 69 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/optional-typeparameters.json b/tests/compiler/optional-typeparameters.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/optional-typeparameters.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index 559fb02a..841a73e2 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -100,7 +100,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -115,7 +115,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index ce45532e..ebc66d12 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -11,9 +11,9 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $optional-typeparameters/tConcrete (mut i32) (i32.const 0)) (global $optional-typeparameters/tDerived (mut i32) (i32.const 0)) @@ -148,7 +148,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -165,7 +165,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/overflow.json b/tests/compiler/overflow.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/overflow.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/portable-conversions.json b/tests/compiler/portable-conversions.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/portable-conversions.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/recursive.json b/tests/compiler/recursive.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/recursive.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/reexport.json b/tests/compiler/reexport.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/reexport.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/rereexport.json b/tests/compiler/rereexport.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/rereexport.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/resolve-nested.json b/tests/compiler/resolve-nested.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/resolve-nested.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/retain-i32.json b/tests/compiler/retain-i32.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/retain-i32.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/runtime-arena.json b/tests/compiler/runtime-arena.json new file mode 100644 index 00000000..52d2fbb6 --- /dev/null +++ b/tests/compiler/runtime-arena.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} diff --git a/tests/compiler/runtime-arena.optimized.wat b/tests/compiler/runtime-arena.optimized.wat new file mode 100644 index 00000000..587c7142 --- /dev/null +++ b/tests/compiler/runtime-arena.optimized.wat @@ -0,0 +1,11 @@ +(module + (type $FUNCSIG$v (func)) + (memory $0 0) + (table $0 1 funcref) + (elem (i32.const 0) $null) + (export "memory" (memory $0)) + (export "table" (table $0)) + (func $null (; 0 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/runtime-arena.ts b/tests/compiler/runtime-arena.ts new file mode 100644 index 00000000..e69de29b diff --git a/tests/compiler/runtime-arena.untouched.wat b/tests/compiler/runtime-arena.untouched.wat new file mode 100644 index 00000000..4560a6a1 --- /dev/null +++ b/tests/compiler/runtime-arena.untouched.wat @@ -0,0 +1,11 @@ +(module + (type $FUNCSIG$v (func)) + (memory $0 0) + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (func $null (; 0 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/runtime-default.json b/tests/compiler/runtime-default.json new file mode 100644 index 00000000..02748ee2 --- /dev/null +++ b/tests/compiler/runtime-default.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime default" + ] +} diff --git a/tests/compiler/runtime-default.optimized.wat b/tests/compiler/runtime-default.optimized.wat new file mode 100644 index 00000000..13be3a5f --- /dev/null +++ b/tests/compiler/runtime-default.optimized.wat @@ -0,0 +1,13 @@ +(module + (type $FUNCSIG$v (func)) + (memory $0 0) + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $~lib/capabilities i32 (i32.const 2)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) + (func $null (; 0 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/runtime-default.ts b/tests/compiler/runtime-default.ts new file mode 100644 index 00000000..e69de29b diff --git a/tests/compiler/runtime-default.untouched.wat b/tests/compiler/runtime-default.untouched.wat new file mode 100644 index 00000000..413ff0e8 --- /dev/null +++ b/tests/compiler/runtime-default.untouched.wat @@ -0,0 +1,13 @@ +(module + (type $FUNCSIG$v (func)) + (memory $0 0) + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (global $~lib/capabilities i32 (i32.const 2)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) + (func $null (; 0 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/runtime-none.json b/tests/compiler/runtime-none.json new file mode 100644 index 00000000..453cb077 --- /dev/null +++ b/tests/compiler/runtime-none.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} diff --git a/tests/compiler/runtime-none.optimized.wat b/tests/compiler/runtime-none.optimized.wat new file mode 100644 index 00000000..587c7142 --- /dev/null +++ b/tests/compiler/runtime-none.optimized.wat @@ -0,0 +1,11 @@ +(module + (type $FUNCSIG$v (func)) + (memory $0 0) + (table $0 1 funcref) + (elem (i32.const 0) $null) + (export "memory" (memory $0)) + (export "table" (table $0)) + (func $null (; 0 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/runtime-none.ts b/tests/compiler/runtime-none.ts new file mode 100644 index 00000000..e69de29b diff --git a/tests/compiler/runtime-none.untouched.wat b/tests/compiler/runtime-none.untouched.wat new file mode 100644 index 00000000..4560a6a1 --- /dev/null +++ b/tests/compiler/runtime-none.untouched.wat @@ -0,0 +1,11 @@ +(module + (type $FUNCSIG$v (func)) + (memory $0 0) + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (export "memory" (memory $0)) + (export "table" (table $0)) + (func $null (; 0 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/scoped.json b/tests/compiler/scoped.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/scoped.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/simd.json b/tests/compiler/simd.json index 15ece5b4..2344125c 100644 --- a/tests/compiler/simd.json +++ b/tests/compiler/simd.json @@ -1,5 +1,8 @@ { "features": [ "simd" + ], + "asc_flags": [ + "--runtime none" ] } diff --git a/tests/compiler/static-this.json b/tests/compiler/static-this.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/static-this.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/allocator_arena.json b/tests/compiler/std/allocator_arena.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/std/allocator_arena.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/array-access.json b/tests/compiler/std/array-access.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/std/array-access.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index 2d16c9f8..84d5818a 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -14,7 +14,6 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/memory/HEAP_BASE i32 (i32.const 112)) (export "memory" (memory $0)) (export "table" (table $0)) diff --git a/tests/compiler/std/array-literal.json b/tests/compiler/std/array-literal.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/std/array-literal.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 4a741d22..4a9ecb2b 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -1,6 +1,6 @@ (module - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -191,7 +191,7 @@ if i32.const 0 i32.const 296 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -206,7 +206,7 @@ if i32.const 0 i32.const 296 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -311,7 +311,7 @@ if i32.const 0 i32.const 80 - i32.const 5 + i32.const 4 i32.const 0 call $~lib/env/abort unreachable @@ -319,6 +319,19 @@ i32.const 48 i32.const 0 call $~lib/array/Array#__get + if + i32.const 0 + i32.const 80 + i32.const 5 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 48 + i32.const 1 + call $~lib/array/Array#__get + i32.const 1 + i32.ne if i32.const 0 i32.const 80 @@ -328,9 +341,9 @@ unreachable end i32.const 48 - i32.const 1 + i32.const 2 call $~lib/array/Array#__get - i32.const 1 + i32.const 2 i32.ne if i32.const 0 @@ -340,19 +353,6 @@ call $~lib/env/abort unreachable end - i32.const 48 - i32.const 2 - call $~lib/array/Array#__get - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 80 - i32.const 8 - i32.const 0 - call $~lib/env/abort - unreachable - end i32.const 228 i32.load i32.const 3 @@ -360,7 +360,7 @@ if i32.const 0 i32.const 80 - i32.const 11 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -371,7 +371,7 @@ if i32.const 0 i32.const 80 - i32.const 12 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -381,6 +381,19 @@ call $~lib/array/Array#__get i32.const 1 i32.ne + if + i32.const 0 + i32.const 80 + i32.const 12 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 216 + i32.const 2 + call $~lib/array/Array#__get + i32.const 2 + i32.ne if i32.const 0 i32.const 80 @@ -389,25 +402,12 @@ call $~lib/env/abort unreachable end - i32.const 216 - i32.const 2 - call $~lib/array/Array#__get - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 80 - i32.const 14 - i32.const 0 - call $~lib/env/abort - unreachable - end global.get $std/array-literal/emptyArrayI32 i32.load offset=12 if i32.const 0 i32.const 80 - i32.const 17 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -450,7 +450,7 @@ if i32.const 0 i32.const 80 - i32.const 22 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -458,6 +458,19 @@ global.get $std/array-literal/dynamicArrayI8 i32.const 0 call $~lib/array/Array#__get + if + i32.const 0 + i32.const 80 + i32.const 22 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/array-literal/dynamicArrayI8 + i32.const 1 + call $~lib/array/Array#__get + i32.const 1 + i32.ne if i32.const 0 i32.const 80 @@ -467,9 +480,9 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 - i32.const 1 + i32.const 2 call $~lib/array/Array#__get - i32.const 1 + i32.const 2 i32.ne if i32.const 0 @@ -479,19 +492,6 @@ call $~lib/env/abort unreachable end - global.get $std/array-literal/dynamicArrayI8 - i32.const 2 - call $~lib/array/Array#__get - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 80 - i32.const 25 - i32.const 0 - call $~lib/env/abort - unreachable - end i32.const 0 global.set $std/array-literal/i i32.const 5 @@ -528,7 +528,7 @@ if i32.const 0 i32.const 80 - i32.const 30 + i32.const 29 i32.const 0 call $~lib/env/abort unreachable @@ -536,6 +536,19 @@ global.get $std/array-literal/dynamicArrayI32 i32.const 0 call $~lib/array/Array#__get + if + i32.const 0 + i32.const 80 + i32.const 30 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/array-literal/dynamicArrayI32 + i32.const 1 + call $~lib/array/Array#__get + i32.const 1 + i32.ne if i32.const 0 i32.const 80 @@ -545,9 +558,9 @@ unreachable end global.get $std/array-literal/dynamicArrayI32 - i32.const 1 + i32.const 2 call $~lib/array/Array#__get - i32.const 1 + i32.const 2 i32.ne if i32.const 0 @@ -557,19 +570,6 @@ call $~lib/env/abort unreachable end - global.get $std/array-literal/dynamicArrayI32 - i32.const 2 - call $~lib/array/Array#__get - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 80 - i32.const 33 - i32.const 0 - call $~lib/env/abort - unreachable - end i32.const 8 i32.const 2 call $~lib/runtime/makeArray @@ -593,7 +593,7 @@ if i32.const 0 i32.const 80 - i32.const 37 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable @@ -621,7 +621,7 @@ if i32.const 0 i32.const 80 - i32.const 41 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array-literal.ts b/tests/compiler/std/array-literal.ts index 89371eb6..2418d306 100644 --- a/tests/compiler/std/array-literal.ts +++ b/tests/compiler/std/array-literal.ts @@ -1,4 +1,3 @@ -import "allocator/arena"; import "collector/dummy"; const staticArrayI8: i8[] = [0, 1, 2]; diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 6a93778b..c9df2d90 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -1,6 +1,6 @@ (module - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) @@ -20,15 +20,15 @@ (data (i32.const 280) "\04\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 13 funcref) (elem (i32.const 0) $null $~lib/arraybuffer/ArrayBuffer~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/string/String~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/array-literal/Ref~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/array-literal/RefWithCtor~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array-literal/staticArrayI8 i32 (i32.const 48)) (global $std/array-literal/staticArrayI32 i32 (i32.const 216)) (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 264)) (global $std/array-literal/i (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/array-literal/dynamicArrayI8 (mut i32) (i32.const 0)) (global $std/array-literal/dynamicArrayI32 (mut i32) (i32.const 0)) @@ -256,7 +256,7 @@ if i32.const 0 i32.const 296 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -273,7 +273,7 @@ if i32.const 0 i32.const 296 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -1928,7 +1928,7 @@ if i32.const 0 i32.const 80 - i32.const 5 + i32.const 4 i32.const 0 call $~lib/env/abort unreachable @@ -1939,6 +1939,20 @@ i32.const 0 i32.eq i32.eqz + if + i32.const 0 + i32.const 80 + i32.const 5 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/array-literal/staticArrayI8 + i32.const 1 + call $~lib/array/Array#__get + i32.const 1 + i32.eq + i32.eqz if i32.const 0 i32.const 80 @@ -1948,9 +1962,9 @@ unreachable end global.get $std/array-literal/staticArrayI8 - i32.const 1 + i32.const 2 call $~lib/array/Array#__get - i32.const 1 + i32.const 2 i32.eq i32.eqz if @@ -1961,20 +1975,6 @@ call $~lib/env/abort unreachable end - global.get $std/array-literal/staticArrayI8 - i32.const 2 - call $~lib/array/Array#__get - i32.const 2 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 80 - i32.const 8 - i32.const 0 - call $~lib/env/abort - unreachable - end global.get $std/array-literal/staticArrayI32 call $~lib/array/Array#get:length i32.const 3 @@ -1983,7 +1983,7 @@ if i32.const 0 i32.const 80 - i32.const 11 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -1994,6 +1994,20 @@ i32.const 0 i32.eq i32.eqz + if + i32.const 0 + i32.const 80 + i32.const 11 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/array-literal/staticArrayI32 + i32.const 1 + call $~lib/array/Array#__get + i32.const 1 + i32.eq + i32.eqz if i32.const 0 i32.const 80 @@ -2003,9 +2017,9 @@ unreachable end global.get $std/array-literal/staticArrayI32 - i32.const 1 + i32.const 2 call $~lib/array/Array#__get - i32.const 1 + i32.const 2 i32.eq i32.eqz if @@ -2016,20 +2030,6 @@ call $~lib/env/abort unreachable end - global.get $std/array-literal/staticArrayI32 - i32.const 2 - call $~lib/array/Array#__get - i32.const 2 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 80 - i32.const 14 - i32.const 0 - call $~lib/env/abort - unreachable - end global.get $std/array-literal/emptyArrayI32 call $~lib/array/Array#get:length i32.const 0 @@ -2038,7 +2038,7 @@ if i32.const 0 i32.const 80 - i32.const 17 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -2097,7 +2097,7 @@ if i32.const 0 i32.const 80 - i32.const 22 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -2108,6 +2108,20 @@ i32.const 0 i32.eq i32.eqz + if + i32.const 0 + i32.const 80 + i32.const 22 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/array-literal/dynamicArrayI8 + i32.const 1 + call $~lib/array/Array#__get + i32.const 1 + i32.eq + i32.eqz if i32.const 0 i32.const 80 @@ -2117,9 +2131,9 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 - i32.const 1 + i32.const 2 call $~lib/array/Array#__get - i32.const 1 + i32.const 2 i32.eq i32.eqz if @@ -2130,20 +2144,6 @@ call $~lib/env/abort unreachable end - global.get $std/array-literal/dynamicArrayI8 - i32.const 2 - call $~lib/array/Array#__get - i32.const 2 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 80 - i32.const 25 - i32.const 0 - call $~lib/env/abort - unreachable - end i32.const 0 global.set $std/array-literal/i block (result i32) @@ -2190,7 +2190,7 @@ if i32.const 0 i32.const 80 - i32.const 30 + i32.const 29 i32.const 0 call $~lib/env/abort unreachable @@ -2201,6 +2201,20 @@ i32.const 0 i32.eq i32.eqz + if + i32.const 0 + i32.const 80 + i32.const 30 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/array-literal/dynamicArrayI32 + i32.const 1 + call $~lib/array/Array#__get + i32.const 1 + i32.eq + i32.eqz if i32.const 0 i32.const 80 @@ -2210,9 +2224,9 @@ unreachable end global.get $std/array-literal/dynamicArrayI32 - i32.const 1 + i32.const 2 call $~lib/array/Array#__get - i32.const 1 + i32.const 2 i32.eq i32.eqz if @@ -2223,20 +2237,6 @@ call $~lib/env/abort unreachable end - global.get $std/array-literal/dynamicArrayI32 - i32.const 2 - call $~lib/array/Array#__get - i32.const 2 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 80 - i32.const 33 - i32.const 0 - call $~lib/env/abort - unreachable - end block (result i32) i32.const 3 i32.const 8 @@ -2291,7 +2291,7 @@ if i32.const 0 i32.const 80 - i32.const 37 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable @@ -2350,7 +2350,7 @@ if i32.const 0 i32.const 80 - i32.const 41 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array.json b/tests/compiler/std/array.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/std/array.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 02b007bf..4b393a5e 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -2,10 +2,10 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) (type $FUNCSIG$fii (func (param i32 i32) (result f32))) @@ -790,7 +790,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -805,7 +805,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -857,7 +857,7 @@ if i32.const 0 i32.const 24 - i32.const 232 + i32.const 236 i32.const 57 call $~lib/env/abort unreachable @@ -2361,7 +2361,7 @@ if i32.const 0 i32.const 24 - i32.const 113 + i32.const 117 i32.const 8 call $~lib/env/abort unreachable @@ -3403,7 +3403,7 @@ if i32.const 0 i32.const 152 - i32.const 562 + i32.const 561 i32.const 4 call $~lib/env/abort unreachable @@ -5515,7 +5515,7 @@ if i32.const 0 i32.const 152 - i32.const 814 + i32.const 813 i32.const 2 call $~lib/env/abort unreachable @@ -5828,7 +5828,7 @@ if i32.const 0 i32.const 152 - i32.const 814 + i32.const 813 i32.const 2 call $~lib/env/abort unreachable @@ -6101,7 +6101,7 @@ if i32.const 0 i32.const 152 - i32.const 814 + i32.const 813 i32.const 2 call $~lib/env/abort unreachable @@ -6463,7 +6463,7 @@ if i32.const 0 i32.const 24 - i32.const 173 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -6477,7 +6477,7 @@ if i32.const 0 i32.const 24 - i32.const 175 + i32.const 179 i32.const 4 call $~lib/env/abort unreachable @@ -10172,7 +10172,7 @@ if i32.const 0 i32.const 152 - i32.const 40 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable @@ -10185,7 +10185,7 @@ if i32.const 0 i32.const 152 - i32.const 41 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable @@ -10219,7 +10219,7 @@ if i32.const 0 i32.const 152 - i32.const 52 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable @@ -10240,7 +10240,7 @@ if i32.const 0 i32.const 152 - i32.const 55 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -10261,7 +10261,7 @@ if i32.const 0 i32.const 152 - i32.const 58 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable @@ -10282,7 +10282,7 @@ if i32.const 0 i32.const 152 - i32.const 61 + i32.const 60 i32.const 0 call $~lib/env/abort unreachable @@ -10303,7 +10303,7 @@ if i32.const 0 i32.const 152 - i32.const 64 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -10325,7 +10325,7 @@ if i32.const 0 i32.const 152 - i32.const 69 + i32.const 68 i32.const 0 call $~lib/env/abort unreachable @@ -10347,7 +10347,7 @@ if i32.const 0 i32.const 152 - i32.const 72 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable @@ -10369,7 +10369,7 @@ if i32.const 0 i32.const 152 - i32.const 75 + i32.const 74 i32.const 0 call $~lib/env/abort unreachable @@ -10391,7 +10391,7 @@ if i32.const 0 i32.const 152 - i32.const 78 + i32.const 77 i32.const 0 call $~lib/env/abort unreachable @@ -10413,7 +10413,7 @@ if i32.const 0 i32.const 152 - i32.const 81 + i32.const 80 i32.const 0 call $~lib/env/abort unreachable @@ -10423,7 +10423,7 @@ if i32.const 0 i32.const 152 - i32.const 85 + i32.const 84 i32.const 0 call $~lib/env/abort unreachable @@ -10438,7 +10438,7 @@ if i32.const 0 i32.const 152 - i32.const 86 + i32.const 85 i32.const 0 call $~lib/env/abort unreachable @@ -10454,7 +10454,7 @@ if i32.const 0 i32.const 152 - i32.const 90 + i32.const 89 i32.const 0 call $~lib/env/abort unreachable @@ -10466,7 +10466,7 @@ if i32.const 0 i32.const 152 - i32.const 91 + i32.const 90 i32.const 0 call $~lib/env/abort unreachable @@ -10483,7 +10483,7 @@ if i32.const 0 i32.const 152 - i32.const 92 + i32.const 91 i32.const 0 call $~lib/env/abort unreachable @@ -10497,7 +10497,7 @@ if i32.const 0 i32.const 152 - i32.const 96 + i32.const 95 i32.const 0 call $~lib/env/abort unreachable @@ -10507,7 +10507,7 @@ if i32.const 0 i32.const 152 - i32.const 97 + i32.const 96 i32.const 0 call $~lib/env/abort unreachable @@ -10524,7 +10524,7 @@ if i32.const 0 i32.const 152 - i32.const 98 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable @@ -10536,6 +10536,23 @@ i32.load offset=12 i32.const 1 i32.ne + if + i32.const 0 + i32.const 152 + i32.const 101 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/array/arr + i32.load + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 2 + i32.shr_s + i32.const 1 + i32.ne if i32.const 0 i32.const 152 @@ -10545,13 +10562,9 @@ unreachable end global.get $std/array/arr - i32.load - i32.const 16 - i32.sub - i32.load offset=4 - i32.const 2 - i32.shr_s - i32.const 1 + i32.const 0 + call $~lib/array/Array#__get + i32.const 43 i32.ne if i32.const 0 @@ -10562,23 +10575,27 @@ unreachable end global.get $std/array/arr - i32.const 0 - call $~lib/array/Array#__get - i32.const 43 + i32.const 44 + call $~lib/array/Array#push + global.get $std/array/arr + i32.load offset=12 + i32.const 2 i32.ne if i32.const 0 i32.const 152 - i32.const 104 + i32.const 107 i32.const 0 call $~lib/env/abort unreachable end global.get $std/array/arr - i32.const 44 - call $~lib/array/Array#push - global.get $std/array/arr - i32.load offset=12 + i32.load + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 2 + i32.shr_s i32.const 2 i32.ne if @@ -10590,23 +10607,6 @@ unreachable end global.get $std/array/arr - i32.load - i32.const 16 - i32.sub - i32.load offset=4 - i32.const 2 - i32.shr_s - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 152 - i32.const 109 - i32.const 0 - call $~lib/env/abort - unreachable - end - global.get $std/array/arr i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -10614,7 +10614,7 @@ if i32.const 0 i32.const 152 - i32.const 110 + i32.const 109 i32.const 0 call $~lib/env/abort unreachable @@ -10627,7 +10627,7 @@ if i32.const 0 i32.const 152 - i32.const 111 + i32.const 110 i32.const 0 call $~lib/env/abort unreachable @@ -10642,7 +10642,7 @@ if i32.const 0 i32.const 152 - i32.const 115 + i32.const 114 i32.const 0 call $~lib/env/abort unreachable @@ -10659,7 +10659,7 @@ if i32.const 0 i32.const 152 - i32.const 116 + i32.const 115 i32.const 0 call $~lib/env/abort unreachable @@ -10672,7 +10672,7 @@ if i32.const 0 i32.const 152 - i32.const 117 + i32.const 116 i32.const 0 call $~lib/env/abort unreachable @@ -10685,7 +10685,7 @@ if i32.const 0 i32.const 152 - i32.const 118 + i32.const 117 i32.const 0 call $~lib/env/abort unreachable @@ -10698,7 +10698,7 @@ if i32.const 0 i32.const 152 - i32.const 119 + i32.const 118 i32.const 0 call $~lib/env/abort unreachable @@ -10721,7 +10721,7 @@ if i32.const 0 i32.const 152 - i32.const 126 + i32.const 125 i32.const 0 call $~lib/env/abort unreachable @@ -10733,7 +10733,7 @@ if i32.const 0 i32.const 152 - i32.const 127 + i32.const 126 i32.const 0 call $~lib/env/abort unreachable @@ -10745,7 +10745,7 @@ if i32.const 0 i32.const 152 - i32.const 128 + i32.const 127 i32.const 0 call $~lib/env/abort unreachable @@ -10770,7 +10770,7 @@ if i32.const 0 i32.const 152 - i32.const 131 + i32.const 130 i32.const 0 call $~lib/env/abort unreachable @@ -10783,7 +10783,7 @@ if i32.const 0 i32.const 152 - i32.const 133 + i32.const 132 i32.const 0 call $~lib/env/abort unreachable @@ -10796,7 +10796,7 @@ if i32.const 0 i32.const 152 - i32.const 134 + i32.const 133 i32.const 0 call $~lib/env/abort unreachable @@ -10809,7 +10809,7 @@ if i32.const 0 i32.const 152 - i32.const 135 + i32.const 134 i32.const 0 call $~lib/env/abort unreachable @@ -10836,7 +10836,7 @@ if i32.const 0 i32.const 152 - i32.const 142 + i32.const 141 i32.const 0 call $~lib/env/abort unreachable @@ -10848,7 +10848,7 @@ if i32.const 0 i32.const 152 - i32.const 143 + i32.const 142 i32.const 0 call $~lib/env/abort unreachable @@ -10860,7 +10860,7 @@ if i32.const 0 i32.const 152 - i32.const 144 + i32.const 143 i32.const 0 call $~lib/env/abort unreachable @@ -10873,7 +10873,7 @@ if i32.const 0 i32.const 152 - i32.const 145 + i32.const 144 i32.const 0 call $~lib/env/abort unreachable @@ -10886,7 +10886,7 @@ if i32.const 0 i32.const 152 - i32.const 146 + i32.const 145 i32.const 0 call $~lib/env/abort unreachable @@ -10899,7 +10899,7 @@ if i32.const 0 i32.const 152 - i32.const 147 + i32.const 146 i32.const 0 call $~lib/env/abort unreachable @@ -10912,7 +10912,7 @@ if i32.const 0 i32.const 152 - i32.const 148 + i32.const 147 i32.const 0 call $~lib/env/abort unreachable @@ -10925,7 +10925,7 @@ if i32.const 0 i32.const 152 - i32.const 149 + i32.const 148 i32.const 0 call $~lib/env/abort unreachable @@ -10940,7 +10940,7 @@ if i32.const 0 i32.const 152 - i32.const 152 + i32.const 151 i32.const 0 call $~lib/env/abort unreachable @@ -10956,7 +10956,7 @@ if i32.const 0 i32.const 152 - i32.const 155 + i32.const 154 i32.const 0 call $~lib/env/abort unreachable @@ -10969,7 +10969,7 @@ if i32.const 0 i32.const 152 - i32.const 156 + i32.const 155 i32.const 0 call $~lib/env/abort unreachable @@ -10979,7 +10979,7 @@ if i32.const 0 i32.const 152 - i32.const 159 + i32.const 158 i32.const 0 call $~lib/env/abort unreachable @@ -10995,7 +10995,7 @@ if i32.const 0 i32.const 152 - i32.const 161 + i32.const 160 i32.const 0 call $~lib/env/abort unreachable @@ -11005,7 +11005,7 @@ if i32.const 0 i32.const 152 - i32.const 162 + i32.const 161 i32.const 0 call $~lib/env/abort unreachable @@ -11032,7 +11032,7 @@ if i32.const 0 i32.const 152 - i32.const 168 + i32.const 167 i32.const 0 call $~lib/env/abort unreachable @@ -11059,7 +11059,7 @@ if i32.const 0 i32.const 152 - i32.const 170 + i32.const 169 i32.const 0 call $~lib/env/abort unreachable @@ -11086,7 +11086,7 @@ if i32.const 0 i32.const 152 - i32.const 172 + i32.const 171 i32.const 0 call $~lib/env/abort unreachable @@ -11113,7 +11113,7 @@ if i32.const 0 i32.const 152 - i32.const 174 + i32.const 173 i32.const 0 call $~lib/env/abort unreachable @@ -11140,7 +11140,7 @@ if i32.const 0 i32.const 152 - i32.const 176 + i32.const 175 i32.const 0 call $~lib/env/abort unreachable @@ -11167,7 +11167,7 @@ if i32.const 0 i32.const 152 - i32.const 178 + i32.const 177 i32.const 0 call $~lib/env/abort unreachable @@ -11194,7 +11194,7 @@ if i32.const 0 i32.const 152 - i32.const 180 + i32.const 179 i32.const 0 call $~lib/env/abort unreachable @@ -11221,7 +11221,7 @@ if i32.const 0 i32.const 152 - i32.const 182 + i32.const 181 i32.const 0 call $~lib/env/abort unreachable @@ -11248,7 +11248,7 @@ if i32.const 0 i32.const 152 - i32.const 184 + i32.const 183 i32.const 0 call $~lib/env/abort unreachable @@ -11275,7 +11275,7 @@ if i32.const 0 i32.const 152 - i32.const 186 + i32.const 185 i32.const 0 call $~lib/env/abort unreachable @@ -11302,7 +11302,7 @@ if i32.const 0 i32.const 152 - i32.const 188 + i32.const 187 i32.const 0 call $~lib/env/abort unreachable @@ -11329,7 +11329,7 @@ if i32.const 0 i32.const 152 - i32.const 190 + i32.const 189 i32.const 0 call $~lib/env/abort unreachable @@ -11341,6 +11341,23 @@ i32.load offset=12 i32.const 4 i32.ne + if + i32.const 0 + i32.const 152 + i32.const 195 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/array/arr + i32.load + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 2 + i32.shr_s + i32.const 4 + i32.ne if i32.const 0 i32.const 152 @@ -11350,23 +11367,6 @@ unreachable end global.get $std/array/arr - i32.load - i32.const 16 - i32.sub - i32.load offset=4 - i32.const 2 - i32.shr_s - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 152 - i32.const 197 - i32.const 0 - call $~lib/env/abort - unreachable - end - global.get $std/array/arr i32.const 0 call $~lib/array/Array#__get i32.const 42 @@ -11374,7 +11374,7 @@ if i32.const 0 i32.const 152 - i32.const 198 + i32.const 197 i32.const 0 call $~lib/env/abort unreachable @@ -11387,7 +11387,7 @@ if i32.const 0 i32.const 152 - i32.const 199 + i32.const 198 i32.const 0 call $~lib/env/abort unreachable @@ -11400,7 +11400,7 @@ if i32.const 0 i32.const 152 - i32.const 200 + i32.const 199 i32.const 0 call $~lib/env/abort unreachable @@ -11413,7 +11413,7 @@ if i32.const 0 i32.const 152 - i32.const 201 + i32.const 200 i32.const 0 call $~lib/env/abort unreachable @@ -11428,7 +11428,7 @@ if i32.const 0 i32.const 152 - i32.const 205 + i32.const 204 i32.const 0 call $~lib/env/abort unreachable @@ -11445,7 +11445,7 @@ if i32.const 0 i32.const 152 - i32.const 206 + i32.const 205 i32.const 0 call $~lib/env/abort unreachable @@ -11458,7 +11458,7 @@ if i32.const 0 i32.const 152 - i32.const 207 + i32.const 206 i32.const 0 call $~lib/env/abort unreachable @@ -11471,7 +11471,7 @@ if i32.const 0 i32.const 152 - i32.const 208 + i32.const 207 i32.const 0 call $~lib/env/abort unreachable @@ -11484,7 +11484,7 @@ if i32.const 0 i32.const 152 - i32.const 209 + i32.const 208 i32.const 0 call $~lib/env/abort unreachable @@ -11497,7 +11497,7 @@ if i32.const 0 i32.const 152 - i32.const 210 + i32.const 209 i32.const 0 call $~lib/env/abort unreachable @@ -11510,7 +11510,7 @@ if i32.const 0 i32.const 152 - i32.const 211 + i32.const 210 i32.const 0 call $~lib/env/abort unreachable @@ -11524,7 +11524,7 @@ if i32.const 0 i32.const 152 - i32.const 217 + i32.const 216 i32.const 0 call $~lib/env/abort unreachable @@ -11536,7 +11536,7 @@ if i32.const 0 i32.const 152 - i32.const 218 + i32.const 217 i32.const 0 call $~lib/env/abort unreachable @@ -11553,7 +11553,7 @@ if i32.const 0 i32.const 152 - i32.const 219 + i32.const 218 i32.const 0 call $~lib/env/abort unreachable @@ -11566,7 +11566,7 @@ if i32.const 0 i32.const 152 - i32.const 220 + i32.const 219 i32.const 0 call $~lib/env/abort unreachable @@ -11579,7 +11579,7 @@ if i32.const 0 i32.const 152 - i32.const 221 + i32.const 220 i32.const 0 call $~lib/env/abort unreachable @@ -11592,7 +11592,7 @@ if i32.const 0 i32.const 152 - i32.const 222 + i32.const 221 i32.const 0 call $~lib/env/abort unreachable @@ -11605,7 +11605,7 @@ if i32.const 0 i32.const 152 - i32.const 223 + i32.const 222 i32.const 0 call $~lib/env/abort unreachable @@ -11619,7 +11619,7 @@ if i32.const 0 i32.const 152 - i32.const 227 + i32.const 226 i32.const 0 call $~lib/env/abort unreachable @@ -11631,7 +11631,7 @@ if i32.const 0 i32.const 152 - i32.const 228 + i32.const 227 i32.const 0 call $~lib/env/abort unreachable @@ -11648,7 +11648,7 @@ if i32.const 0 i32.const 152 - i32.const 229 + i32.const 228 i32.const 0 call $~lib/env/abort unreachable @@ -11661,7 +11661,7 @@ if i32.const 0 i32.const 152 - i32.const 230 + i32.const 229 i32.const 0 call $~lib/env/abort unreachable @@ -11674,7 +11674,7 @@ if i32.const 0 i32.const 152 - i32.const 231 + i32.const 230 i32.const 0 call $~lib/env/abort unreachable @@ -11687,7 +11687,7 @@ if i32.const 0 i32.const 152 - i32.const 232 + i32.const 231 i32.const 0 call $~lib/env/abort unreachable @@ -11701,7 +11701,7 @@ if i32.const 0 i32.const 152 - i32.const 238 + i32.const 237 i32.const 0 call $~lib/env/abort unreachable @@ -11718,7 +11718,7 @@ if i32.const 0 i32.const 152 - i32.const 239 + i32.const 238 i32.const 0 call $~lib/env/abort unreachable @@ -11728,6 +11728,19 @@ call $~lib/array/Array#__get i32.const 44 i32.ne + if + i32.const 0 + i32.const 152 + i32.const 239 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/array/arr + i32.const 1 + call $~lib/array/Array#__get + i32.const 43 + i32.ne if i32.const 0 i32.const 152 @@ -11737,9 +11750,9 @@ unreachable end global.get $std/array/arr - i32.const 1 + i32.const 2 call $~lib/array/Array#__get - i32.const 43 + i32.const 42 i32.ne if i32.const 0 @@ -11750,19 +11763,6 @@ unreachable end global.get $std/array/arr - i32.const 2 - call $~lib/array/Array#__get - i32.const 42 - i32.ne - if - i32.const 0 - i32.const 152 - i32.const 242 - i32.const 0 - call $~lib/env/abort - unreachable - end - global.get $std/array/arr i32.const 43 call $~lib/array/Array#push global.get $std/array/arr @@ -11777,7 +11777,7 @@ if i32.const 0 i32.const 152 - i32.const 251 + i32.const 250 i32.const 0 call $~lib/env/abort unreachable @@ -11793,7 +11793,7 @@ if i32.const 0 i32.const 152 - i32.const 255 + i32.const 254 i32.const 0 call $~lib/env/abort unreachable @@ -11809,7 +11809,7 @@ if i32.const 0 i32.const 152 - i32.const 259 + i32.const 258 i32.const 0 call $~lib/env/abort unreachable @@ -11825,7 +11825,7 @@ if i32.const 0 i32.const 152 - i32.const 263 + i32.const 262 i32.const 0 call $~lib/env/abort unreachable @@ -11841,7 +11841,7 @@ if i32.const 0 i32.const 152 - i32.const 267 + i32.const 266 i32.const 0 call $~lib/env/abort unreachable @@ -11857,7 +11857,7 @@ if i32.const 0 i32.const 152 - i32.const 271 + i32.const 270 i32.const 0 call $~lib/env/abort unreachable @@ -11873,7 +11873,7 @@ if i32.const 0 i32.const 152 - i32.const 275 + i32.const 274 i32.const 0 call $~lib/env/abort unreachable @@ -11889,7 +11889,7 @@ if i32.const 0 i32.const 152 - i32.const 279 + i32.const 278 i32.const 0 call $~lib/env/abort unreachable @@ -11905,7 +11905,7 @@ if i32.const 0 i32.const 152 - i32.const 283 + i32.const 282 i32.const 0 call $~lib/env/abort unreachable @@ -11921,7 +11921,7 @@ if i32.const 0 i32.const 152 - i32.const 287 + i32.const 286 i32.const 0 call $~lib/env/abort unreachable @@ -11937,7 +11937,7 @@ if i32.const 0 i32.const 152 - i32.const 293 + i32.const 292 i32.const 0 call $~lib/env/abort unreachable @@ -11953,7 +11953,7 @@ if i32.const 0 i32.const 152 - i32.const 297 + i32.const 296 i32.const 0 call $~lib/env/abort unreachable @@ -11967,7 +11967,7 @@ if i32.const 0 i32.const 152 - i32.const 301 + i32.const 300 i32.const 0 call $~lib/env/abort unreachable @@ -11981,7 +11981,7 @@ if i32.const 0 i32.const 152 - i32.const 305 + i32.const 304 i32.const 0 call $~lib/env/abort unreachable @@ -11997,7 +11997,7 @@ if i32.const 0 i32.const 152 - i32.const 309 + i32.const 308 i32.const 0 call $~lib/env/abort unreachable @@ -12013,7 +12013,7 @@ if i32.const 0 i32.const 152 - i32.const 313 + i32.const 312 i32.const 0 call $~lib/env/abort unreachable @@ -12029,7 +12029,7 @@ if i32.const 0 i32.const 152 - i32.const 317 + i32.const 316 i32.const 0 call $~lib/env/abort unreachable @@ -12045,7 +12045,7 @@ if i32.const 0 i32.const 152 - i32.const 321 + i32.const 320 i32.const 0 call $~lib/env/abort unreachable @@ -12061,7 +12061,7 @@ if i32.const 0 i32.const 152 - i32.const 325 + i32.const 324 i32.const 0 call $~lib/env/abort unreachable @@ -12077,7 +12077,7 @@ if i32.const 0 i32.const 152 - i32.const 329 + i32.const 328 i32.const 0 call $~lib/env/abort unreachable @@ -12094,7 +12094,7 @@ if i32.const 0 i32.const 152 - i32.const 333 + i32.const 332 i32.const 0 call $~lib/env/abort unreachable @@ -12111,7 +12111,7 @@ if i32.const 0 i32.const 152 - i32.const 334 + i32.const 333 i32.const 0 call $~lib/env/abort unreachable @@ -12124,7 +12124,7 @@ if i32.const 0 i32.const 152 - i32.const 335 + i32.const 334 i32.const 0 call $~lib/env/abort unreachable @@ -12137,7 +12137,7 @@ if i32.const 0 i32.const 152 - i32.const 336 + i32.const 335 i32.const 0 call $~lib/env/abort unreachable @@ -12157,7 +12157,7 @@ if i32.const 0 i32.const 152 - i32.const 341 + i32.const 340 i32.const 0 call $~lib/env/abort unreachable @@ -12174,7 +12174,7 @@ if i32.const 0 i32.const 152 - i32.const 342 + i32.const 341 i32.const 0 call $~lib/env/abort unreachable @@ -12200,7 +12200,7 @@ if i32.const 0 i32.const 152 - i32.const 345 + i32.const 344 i32.const 0 call $~lib/env/abort unreachable @@ -12217,7 +12217,7 @@ if i32.const 0 i32.const 152 - i32.const 346 + i32.const 345 i32.const 0 call $~lib/env/abort unreachable @@ -12243,7 +12243,7 @@ if i32.const 0 i32.const 152 - i32.const 349 + i32.const 348 i32.const 0 call $~lib/env/abort unreachable @@ -12260,7 +12260,7 @@ if i32.const 0 i32.const 152 - i32.const 350 + i32.const 349 i32.const 0 call $~lib/env/abort unreachable @@ -12286,7 +12286,7 @@ if i32.const 0 i32.const 152 - i32.const 353 + i32.const 352 i32.const 0 call $~lib/env/abort unreachable @@ -12303,7 +12303,7 @@ if i32.const 0 i32.const 152 - i32.const 354 + i32.const 353 i32.const 0 call $~lib/env/abort unreachable @@ -12329,7 +12329,7 @@ if i32.const 0 i32.const 152 - i32.const 357 + i32.const 356 i32.const 0 call $~lib/env/abort unreachable @@ -12346,7 +12346,7 @@ if i32.const 0 i32.const 152 - i32.const 358 + i32.const 357 i32.const 0 call $~lib/env/abort unreachable @@ -12372,7 +12372,7 @@ if i32.const 0 i32.const 152 - i32.const 361 + i32.const 360 i32.const 0 call $~lib/env/abort unreachable @@ -12389,7 +12389,7 @@ if i32.const 0 i32.const 152 - i32.const 362 + i32.const 361 i32.const 0 call $~lib/env/abort unreachable @@ -12415,7 +12415,7 @@ if i32.const 0 i32.const 152 - i32.const 365 + i32.const 364 i32.const 0 call $~lib/env/abort unreachable @@ -12432,7 +12432,7 @@ if i32.const 0 i32.const 152 - i32.const 366 + i32.const 365 i32.const 0 call $~lib/env/abort unreachable @@ -12458,7 +12458,7 @@ if i32.const 0 i32.const 152 - i32.const 369 + i32.const 368 i32.const 0 call $~lib/env/abort unreachable @@ -12475,7 +12475,7 @@ if i32.const 0 i32.const 152 - i32.const 370 + i32.const 369 i32.const 0 call $~lib/env/abort unreachable @@ -12501,7 +12501,7 @@ if i32.const 0 i32.const 152 - i32.const 373 + i32.const 372 i32.const 0 call $~lib/env/abort unreachable @@ -12518,7 +12518,7 @@ if i32.const 0 i32.const 152 - i32.const 374 + i32.const 373 i32.const 0 call $~lib/env/abort unreachable @@ -12544,7 +12544,7 @@ if i32.const 0 i32.const 152 - i32.const 377 + i32.const 376 i32.const 0 call $~lib/env/abort unreachable @@ -12561,7 +12561,7 @@ if i32.const 0 i32.const 152 - i32.const 378 + i32.const 377 i32.const 0 call $~lib/env/abort unreachable @@ -12587,7 +12587,7 @@ if i32.const 0 i32.const 152 - i32.const 381 + i32.const 380 i32.const 0 call $~lib/env/abort unreachable @@ -12604,7 +12604,7 @@ if i32.const 0 i32.const 152 - i32.const 382 + i32.const 381 i32.const 0 call $~lib/env/abort unreachable @@ -12630,7 +12630,7 @@ if i32.const 0 i32.const 152 - i32.const 385 + i32.const 384 i32.const 0 call $~lib/env/abort unreachable @@ -12647,7 +12647,7 @@ if i32.const 0 i32.const 152 - i32.const 386 + i32.const 385 i32.const 0 call $~lib/env/abort unreachable @@ -12673,7 +12673,7 @@ if i32.const 0 i32.const 152 - i32.const 389 + i32.const 388 i32.const 0 call $~lib/env/abort unreachable @@ -12690,7 +12690,7 @@ if i32.const 0 i32.const 152 - i32.const 390 + i32.const 389 i32.const 0 call $~lib/env/abort unreachable @@ -12719,7 +12719,7 @@ if i32.const 0 i32.const 152 - i32.const 400 + i32.const 399 i32.const 0 call $~lib/env/abort unreachable @@ -12734,7 +12734,7 @@ if i32.const 0 i32.const 152 - i32.const 403 + i32.const 402 i32.const 0 call $~lib/env/abort unreachable @@ -12749,7 +12749,7 @@ if i32.const 0 i32.const 152 - i32.const 406 + i32.const 405 i32.const 0 call $~lib/env/abort unreachable @@ -12764,7 +12764,7 @@ if i32.const 0 i32.const 152 - i32.const 414 + i32.const 413 i32.const 0 call $~lib/env/abort unreachable @@ -12776,7 +12776,7 @@ if i32.const 0 i32.const 152 - i32.const 415 + i32.const 414 i32.const 0 call $~lib/env/abort unreachable @@ -12791,7 +12791,7 @@ if i32.const 0 i32.const 152 - i32.const 417 + i32.const 416 i32.const 0 call $~lib/env/abort unreachable @@ -12818,7 +12818,7 @@ if i32.const 0 i32.const 152 - i32.const 430 + i32.const 429 i32.const 0 call $~lib/env/abort unreachable @@ -12830,7 +12830,7 @@ if i32.const 0 i32.const 152 - i32.const 431 + i32.const 430 i32.const 0 call $~lib/env/abort unreachable @@ -12851,7 +12851,7 @@ if i32.const 0 i32.const 152 - i32.const 439 + i32.const 438 i32.const 0 call $~lib/env/abort unreachable @@ -12864,7 +12864,7 @@ if i32.const 0 i32.const 152 - i32.const 442 + i32.const 441 i32.const 0 call $~lib/env/abort unreachable @@ -12879,7 +12879,7 @@ if i32.const 0 i32.const 152 - i32.const 450 + i32.const 449 i32.const 0 call $~lib/env/abort unreachable @@ -12891,7 +12891,7 @@ if i32.const 0 i32.const 152 - i32.const 451 + i32.const 450 i32.const 0 call $~lib/env/abort unreachable @@ -12904,7 +12904,7 @@ if i32.const 0 i32.const 152 - i32.const 453 + i32.const 452 i32.const 0 call $~lib/env/abort unreachable @@ -12931,7 +12931,7 @@ if i32.const 0 i32.const 152 - i32.const 466 + i32.const 465 i32.const 0 call $~lib/env/abort unreachable @@ -12943,7 +12943,7 @@ if i32.const 0 i32.const 152 - i32.const 467 + i32.const 466 i32.const 0 call $~lib/env/abort unreachable @@ -12964,7 +12964,7 @@ if i32.const 0 i32.const 152 - i32.const 475 + i32.const 474 i32.const 0 call $~lib/env/abort unreachable @@ -12977,7 +12977,7 @@ if i32.const 0 i32.const 152 - i32.const 478 + i32.const 477 i32.const 0 call $~lib/env/abort unreachable @@ -12990,7 +12990,7 @@ if i32.const 0 i32.const 152 - i32.const 486 + i32.const 485 i32.const 0 call $~lib/env/abort unreachable @@ -13002,7 +13002,7 @@ if i32.const 0 i32.const 152 - i32.const 487 + i32.const 486 i32.const 0 call $~lib/env/abort unreachable @@ -13017,7 +13017,7 @@ if i32.const 0 i32.const 152 - i32.const 489 + i32.const 488 i32.const 0 call $~lib/env/abort unreachable @@ -13042,7 +13042,7 @@ if i32.const 0 i32.const 152 - i32.const 502 + i32.const 501 i32.const 0 call $~lib/env/abort unreachable @@ -13054,7 +13054,7 @@ if i32.const 0 i32.const 152 - i32.const 503 + i32.const 502 i32.const 0 call $~lib/env/abort unreachable @@ -13076,7 +13076,7 @@ if i32.const 0 i32.const 152 - i32.const 512 + i32.const 511 i32.const 0 call $~lib/env/abort unreachable @@ -13092,7 +13092,7 @@ if i32.const 0 i32.const 152 - i32.const 521 + i32.const 520 i32.const 0 call $~lib/env/abort unreachable @@ -13104,7 +13104,7 @@ if i32.const 0 i32.const 152 - i32.const 522 + i32.const 521 i32.const 0 call $~lib/env/abort unreachable @@ -13120,7 +13120,7 @@ if i32.const 0 i32.const 152 - i32.const 525 + i32.const 524 i32.const 0 call $~lib/env/abort unreachable @@ -13148,7 +13148,7 @@ if i32.const 0 i32.const 152 - i32.const 539 + i32.const 538 i32.const 0 call $~lib/env/abort unreachable @@ -13160,7 +13160,7 @@ if i32.const 0 i32.const 152 - i32.const 540 + i32.const 539 i32.const 0 call $~lib/env/abort unreachable @@ -13181,7 +13181,7 @@ if i32.const 0 i32.const 152 - i32.const 565 + i32.const 564 i32.const 0 call $~lib/env/abort unreachable @@ -13223,7 +13223,7 @@ if i32.const 0 i32.const 152 - i32.const 576 + i32.const 575 i32.const 0 call $~lib/env/abort unreachable @@ -13239,7 +13239,7 @@ if i32.const 0 i32.const 152 - i32.const 577 + i32.const 576 i32.const 0 call $~lib/env/abort unreachable @@ -13255,7 +13255,7 @@ if i32.const 0 i32.const 152 - i32.const 586 + i32.const 585 i32.const 0 call $~lib/env/abort unreachable @@ -13267,7 +13267,7 @@ if i32.const 0 i32.const 152 - i32.const 587 + i32.const 586 i32.const 0 call $~lib/env/abort unreachable @@ -13283,7 +13283,7 @@ if i32.const 0 i32.const 152 - i32.const 594 + i32.const 593 i32.const 0 call $~lib/env/abort unreachable @@ -13311,7 +13311,7 @@ if i32.const 0 i32.const 152 - i32.const 609 + i32.const 608 i32.const 0 call $~lib/env/abort unreachable @@ -13323,7 +13323,7 @@ if i32.const 0 i32.const 152 - i32.const 610 + i32.const 609 i32.const 0 call $~lib/env/abort unreachable @@ -13345,7 +13345,7 @@ if i32.const 0 i32.const 152 - i32.const 618 + i32.const 617 i32.const 0 call $~lib/env/abort unreachable @@ -13362,7 +13362,7 @@ if i32.const 0 i32.const 152 - i32.const 627 + i32.const 626 i32.const 0 call $~lib/env/abort unreachable @@ -13374,7 +13374,7 @@ if i32.const 0 i32.const 152 - i32.const 628 + i32.const 627 i32.const 0 call $~lib/env/abort unreachable @@ -13391,7 +13391,7 @@ if i32.const 0 i32.const 152 - i32.const 635 + i32.const 634 i32.const 0 call $~lib/env/abort unreachable @@ -13420,7 +13420,7 @@ if i32.const 0 i32.const 152 - i32.const 650 + i32.const 649 i32.const 0 call $~lib/env/abort unreachable @@ -13432,7 +13432,7 @@ if i32.const 0 i32.const 152 - i32.const 651 + i32.const 650 i32.const 0 call $~lib/env/abort unreachable @@ -13454,7 +13454,7 @@ if i32.const 0 i32.const 152 - i32.const 659 + i32.const 658 i32.const 0 call $~lib/env/abort unreachable @@ -13470,7 +13470,7 @@ if i32.const 0 i32.const 152 - i32.const 663 + i32.const 662 i32.const 0 call $~lib/env/abort unreachable @@ -13488,7 +13488,7 @@ if i32.const 0 i32.const 152 - i32.const 666 + i32.const 665 i32.const 0 call $~lib/env/abort unreachable @@ -13504,7 +13504,7 @@ if i32.const 0 i32.const 152 - i32.const 669 + i32.const 668 i32.const 0 call $~lib/env/abort unreachable @@ -13520,7 +13520,7 @@ if i32.const 0 i32.const 152 - i32.const 677 + i32.const 676 i32.const 0 call $~lib/env/abort unreachable @@ -13532,7 +13532,7 @@ if i32.const 0 i32.const 152 - i32.const 678 + i32.const 677 i32.const 0 call $~lib/env/abort unreachable @@ -13548,7 +13548,7 @@ if i32.const 0 i32.const 152 - i32.const 680 + i32.const 679 i32.const 0 call $~lib/env/abort unreachable @@ -13576,7 +13576,7 @@ if i32.const 0 i32.const 152 - i32.const 693 + i32.const 692 i32.const 0 call $~lib/env/abort unreachable @@ -13588,7 +13588,7 @@ if i32.const 0 i32.const 152 - i32.const 694 + i32.const 693 i32.const 0 call $~lib/env/abort unreachable @@ -13610,7 +13610,7 @@ if i32.const 0 i32.const 152 - i32.const 702 + i32.const 701 i32.const 0 call $~lib/env/abort unreachable @@ -13626,7 +13626,7 @@ if i32.const 0 i32.const 152 - i32.const 706 + i32.const 705 i32.const 0 call $~lib/env/abort unreachable @@ -13644,7 +13644,7 @@ if i32.const 0 i32.const 152 - i32.const 709 + i32.const 708 i32.const 0 call $~lib/env/abort unreachable @@ -13660,7 +13660,7 @@ if i32.const 0 i32.const 152 - i32.const 712 + i32.const 711 i32.const 0 call $~lib/env/abort unreachable @@ -13676,7 +13676,7 @@ if i32.const 0 i32.const 152 - i32.const 720 + i32.const 719 i32.const 0 call $~lib/env/abort unreachable @@ -13688,7 +13688,7 @@ if i32.const 0 i32.const 152 - i32.const 721 + i32.const 720 i32.const 0 call $~lib/env/abort unreachable @@ -13704,7 +13704,7 @@ if i32.const 0 i32.const 152 - i32.const 723 + i32.const 722 i32.const 0 call $~lib/env/abort unreachable @@ -13732,7 +13732,7 @@ if i32.const 0 i32.const 152 - i32.const 736 + i32.const 735 i32.const 0 call $~lib/env/abort unreachable @@ -13742,7 +13742,7 @@ if i32.const 0 i32.const 152 - i32.const 737 + i32.const 736 i32.const 0 call $~lib/env/abort unreachable @@ -13793,7 +13793,7 @@ if i32.const 0 i32.const 152 - i32.const 825 + i32.const 824 i32.const 0 call $~lib/env/abort unreachable @@ -13829,7 +13829,7 @@ if i32.const 0 i32.const 152 - i32.const 829 + i32.const 828 i32.const 0 call $~lib/env/abort unreachable @@ -13867,7 +13867,7 @@ if i32.const 0 i32.const 152 - i32.const 833 + i32.const 832 i32.const 0 call $~lib/env/abort unreachable @@ -13905,7 +13905,7 @@ if i32.const 0 i32.const 152 - i32.const 837 + i32.const 836 i32.const 0 call $~lib/env/abort unreachable @@ -13941,7 +13941,7 @@ if i32.const 0 i32.const 152 - i32.const 857 + i32.const 856 i32.const 0 call $~lib/env/abort unreachable @@ -13960,7 +13960,7 @@ if i32.const 0 i32.const 152 - i32.const 860 + i32.const 859 i32.const 0 call $~lib/env/abort unreachable @@ -13975,7 +13975,7 @@ if i32.const 0 i32.const 152 - i32.const 863 + i32.const 862 i32.const 0 call $~lib/env/abort unreachable @@ -13990,7 +13990,7 @@ if i32.const 0 i32.const 152 - i32.const 866 + i32.const 865 i32.const 0 call $~lib/env/abort unreachable @@ -14005,7 +14005,7 @@ if i32.const 0 i32.const 152 - i32.const 869 + i32.const 868 i32.const 0 call $~lib/env/abort unreachable @@ -14020,7 +14020,7 @@ if i32.const 0 i32.const 152 - i32.const 872 + i32.const 871 i32.const 0 call $~lib/env/abort unreachable @@ -14035,7 +14035,7 @@ if i32.const 0 i32.const 152 - i32.const 875 + i32.const 874 i32.const 0 call $~lib/env/abort unreachable @@ -14081,7 +14081,7 @@ if i32.const 0 i32.const 152 - i32.const 905 + i32.const 904 i32.const 0 call $~lib/env/abort unreachable @@ -14122,7 +14122,7 @@ if i32.const 0 i32.const 152 - i32.const 914 + i32.const 913 i32.const 0 call $~lib/env/abort unreachable @@ -14140,7 +14140,7 @@ if i32.const 0 i32.const 152 - i32.const 915 + i32.const 914 i32.const 0 call $~lib/env/abort unreachable @@ -14158,7 +14158,7 @@ if i32.const 0 i32.const 152 - i32.const 916 + i32.const 915 i32.const 0 call $~lib/env/abort unreachable @@ -14176,7 +14176,7 @@ if i32.const 0 i32.const 152 - i32.const 917 + i32.const 916 i32.const 0 call $~lib/env/abort unreachable @@ -14193,7 +14193,7 @@ if i32.const 0 i32.const 152 - i32.const 918 + i32.const 917 i32.const 0 call $~lib/env/abort unreachable @@ -14211,7 +14211,7 @@ if i32.const 0 i32.const 152 - i32.const 919 + i32.const 918 i32.const 0 call $~lib/env/abort unreachable @@ -14242,7 +14242,7 @@ if i32.const 0 i32.const 152 - i32.const 921 + i32.const 920 i32.const 0 call $~lib/env/abort unreachable @@ -14255,7 +14255,7 @@ if i32.const 0 i32.const 152 - i32.const 925 + i32.const 924 i32.const 0 call $~lib/env/abort unreachable @@ -14268,7 +14268,7 @@ if i32.const 0 i32.const 152 - i32.const 926 + i32.const 925 i32.const 0 call $~lib/env/abort unreachable @@ -14281,7 +14281,7 @@ if i32.const 0 i32.const 152 - i32.const 927 + i32.const 926 i32.const 0 call $~lib/env/abort unreachable @@ -14294,7 +14294,7 @@ if i32.const 0 i32.const 152 - i32.const 928 + i32.const 927 i32.const 0 call $~lib/env/abort unreachable @@ -14311,7 +14311,7 @@ if i32.const 0 i32.const 152 - i32.const 930 + i32.const 929 i32.const 0 call $~lib/env/abort unreachable @@ -14328,7 +14328,7 @@ if i32.const 0 i32.const 152 - i32.const 931 + i32.const 930 i32.const 0 call $~lib/env/abort unreachable @@ -14345,7 +14345,7 @@ if i32.const 0 i32.const 152 - i32.const 932 + i32.const 931 i32.const 0 call $~lib/env/abort unreachable @@ -14362,7 +14362,7 @@ if i32.const 0 i32.const 152 - i32.const 933 + i32.const 932 i32.const 0 call $~lib/env/abort unreachable @@ -14375,7 +14375,7 @@ if i32.const 0 i32.const 152 - i32.const 934 + i32.const 933 i32.const 0 call $~lib/env/abort unreachable @@ -14392,7 +14392,7 @@ if i32.const 0 i32.const 152 - i32.const 935 + i32.const 934 i32.const 0 call $~lib/env/abort unreachable @@ -14428,7 +14428,7 @@ if i32.const 0 i32.const 152 - i32.const 938 + i32.const 937 i32.const 0 call $~lib/env/abort unreachable @@ -14464,7 +14464,7 @@ if i32.const 0 i32.const 152 - i32.const 941 + i32.const 940 i32.const 0 call $~lib/env/abort unreachable @@ -14503,7 +14503,7 @@ if i32.const 0 i32.const 152 - i32.const 944 + i32.const 943 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/array.ts b/tests/compiler/std/array.ts index 6306cbef..0a6fce0a 100644 --- a/tests/compiler/std/array.ts +++ b/tests/compiler/std/array.ts @@ -1,4 +1,3 @@ -import "allocator/arena"; import "collector/dummy"; import { Array } from "array"; import { COMPARATOR } from "util/sort"; diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 4d57ccbc..09f40665 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -2,10 +2,10 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) (type $FUNCSIG$fii (func (param i32 i32) (result f32))) @@ -224,10 +224,10 @@ (table $0 102 funcref) (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/runtime/ArrayBufferView~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/array/P~iterate $~lib/typedarray/Uint8Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|4 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|18 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $~lib/array/Array~iterate $~lib/array/Array~iterate $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|30 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|34 $start:std/array~anonymous|35 $start:std/array~anonymous|36 $start:std/array~anonymous|37 $start:std/array~anonymous|38 $start:std/array~anonymous|39 $start:std/array~anonymous|40 $start:std/array~anonymous|41 $start:std/array~anonymous|42 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $start:std/array~anonymous|47 $~lib/array/Array>~iterate $std/array/Proxy~iterate $~lib/array/Array>~iterate $start:std/array~anonymous|48 $~lib/array/Array<~lib/string/String | null>~iterate $~lib/array/Array<~lib/string/String | null>~iterate $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/array/Array<~lib/string/String>~iterate $~lib/array/Array<~lib/string/String>~iterate $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0 $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $std/array/Ref~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array>~iterate $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~iterate) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) @@ -690,7 +690,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -707,7 +707,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -785,7 +785,7 @@ if i32.const 0 i32.const 24 - i32.const 232 + i32.const 236 i32.const 57 call $~lib/env/abort unreachable @@ -2920,7 +2920,7 @@ if i32.const 0 i32.const 24 - i32.const 113 + i32.const 117 i32.const 8 call $~lib/env/abort unreachable @@ -4259,7 +4259,7 @@ if i32.const 0 i32.const 152 - i32.const 562 + i32.const 561 i32.const 4 call $~lib/env/abort unreachable @@ -7522,7 +7522,7 @@ if i32.const 0 i32.const 152 - i32.const 814 + i32.const 813 i32.const 2 call $~lib/env/abort unreachable @@ -8037,7 +8037,7 @@ if i32.const 0 i32.const 152 - i32.const 814 + i32.const 813 i32.const 2 call $~lib/env/abort unreachable @@ -8532,7 +8532,7 @@ if i32.const 0 i32.const 152 - i32.const 814 + i32.const 813 i32.const 2 call $~lib/env/abort unreachable @@ -8847,7 +8847,7 @@ if i32.const 0 i32.const 152 - i32.const 814 + i32.const 813 i32.const 2 call $~lib/env/abort unreachable @@ -9732,7 +9732,7 @@ if i32.const 0 i32.const 152 - i32.const 814 + i32.const 813 i32.const 2 call $~lib/env/abort unreachable @@ -9975,7 +9975,7 @@ if i32.const 0 i32.const 24 - i32.const 173 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -9992,7 +9992,7 @@ if i32.const 0 i32.const 24 - i32.const 175 + i32.const 179 i32.const 4 call $~lib/env/abort unreachable @@ -15389,7 +15389,7 @@ if i32.const 0 i32.const 152 - i32.const 40 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable @@ -15402,7 +15402,7 @@ if i32.const 0 i32.const 152 - i32.const 41 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable @@ -15416,7 +15416,7 @@ if i32.const 0 i32.const 152 - i32.const 42 + i32.const 41 i32.const 0 call $~lib/env/abort unreachable @@ -15431,7 +15431,7 @@ if i32.const 0 i32.const 152 - i32.const 43 + i32.const 42 i32.const 0 call $~lib/env/abort unreachable @@ -15444,7 +15444,7 @@ if i32.const 0 i32.const 152 - i32.const 44 + i32.const 43 i32.const 0 call $~lib/env/abort unreachable @@ -15457,7 +15457,7 @@ if i32.const 0 i32.const 152 - i32.const 45 + i32.const 44 i32.const 0 call $~lib/env/abort unreachable @@ -15480,7 +15480,7 @@ if i32.const 0 i32.const 152 - i32.const 52 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable @@ -15503,7 +15503,7 @@ if i32.const 0 i32.const 152 - i32.const 55 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -15526,7 +15526,7 @@ if i32.const 0 i32.const 152 - i32.const 58 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable @@ -15549,7 +15549,7 @@ if i32.const 0 i32.const 152 - i32.const 61 + i32.const 60 i32.const 0 call $~lib/env/abort unreachable @@ -15572,7 +15572,7 @@ if i32.const 0 i32.const 152 - i32.const 64 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -15595,7 +15595,7 @@ if i32.const 0 i32.const 152 - i32.const 69 + i32.const 68 i32.const 0 call $~lib/env/abort unreachable @@ -15618,7 +15618,7 @@ if i32.const 0 i32.const 152 - i32.const 72 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable @@ -15641,7 +15641,7 @@ if i32.const 0 i32.const 152 - i32.const 75 + i32.const 74 i32.const 0 call $~lib/env/abort unreachable @@ -15664,7 +15664,7 @@ if i32.const 0 i32.const 152 - i32.const 78 + i32.const 77 i32.const 0 call $~lib/env/abort unreachable @@ -15687,7 +15687,7 @@ if i32.const 0 i32.const 152 - i32.const 81 + i32.const 80 i32.const 0 call $~lib/env/abort unreachable @@ -15700,7 +15700,7 @@ if i32.const 0 i32.const 152 - i32.const 85 + i32.const 84 i32.const 0 call $~lib/env/abort unreachable @@ -15713,7 +15713,7 @@ if i32.const 0 i32.const 152 - i32.const 86 + i32.const 85 i32.const 0 call $~lib/env/abort unreachable @@ -15731,7 +15731,7 @@ if i32.const 0 i32.const 152 - i32.const 90 + i32.const 89 i32.const 0 call $~lib/env/abort unreachable @@ -15744,7 +15744,7 @@ if i32.const 0 i32.const 152 - i32.const 91 + i32.const 90 i32.const 0 call $~lib/env/abort unreachable @@ -15757,7 +15757,7 @@ if i32.const 0 i32.const 152 - i32.const 92 + i32.const 91 i32.const 0 call $~lib/env/abort unreachable @@ -15772,7 +15772,7 @@ if i32.const 0 i32.const 152 - i32.const 96 + i32.const 95 i32.const 0 call $~lib/env/abort unreachable @@ -15785,7 +15785,7 @@ if i32.const 0 i32.const 152 - i32.const 97 + i32.const 96 i32.const 0 call $~lib/env/abort unreachable @@ -15798,7 +15798,7 @@ if i32.const 0 i32.const 152 - i32.const 98 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable @@ -15812,6 +15812,19 @@ i32.const 1 i32.eq i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 101 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/array/arr + call $std/array/internalCapacity + i32.const 1 + i32.eq + i32.eqz if i32.const 0 i32.const 152 @@ -15821,8 +15834,9 @@ unreachable end global.get $std/array/arr - call $std/array/internalCapacity - i32.const 1 + i32.const 0 + call $~lib/array/Array#__get + i32.const 43 i32.eq i32.eqz if @@ -15834,20 +15848,6 @@ unreachable end global.get $std/array/arr - i32.const 0 - call $~lib/array/Array#__get - i32.const 43 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 152 - i32.const 104 - i32.const 0 - call $~lib/env/abort - unreachable - end - global.get $std/array/arr i32.const 44 call $~lib/array/Array#push drop @@ -15856,6 +15856,19 @@ i32.const 2 i32.eq i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 107 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/array/arr + call $std/array/internalCapacity + i32.const 2 + i32.eq + i32.eqz if i32.const 0 i32.const 152 @@ -15865,19 +15878,6 @@ unreachable end global.get $std/array/arr - call $std/array/internalCapacity - i32.const 2 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 152 - i32.const 109 - i32.const 0 - call $~lib/env/abort - unreachable - end - global.get $std/array/arr i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -15886,7 +15886,7 @@ if i32.const 0 i32.const 152 - i32.const 110 + i32.const 109 i32.const 0 call $~lib/env/abort unreachable @@ -15900,7 +15900,7 @@ if i32.const 0 i32.const 152 - i32.const 111 + i32.const 110 i32.const 0 call $~lib/env/abort unreachable @@ -15917,7 +15917,7 @@ if i32.const 0 i32.const 152 - i32.const 115 + i32.const 114 i32.const 0 call $~lib/env/abort unreachable @@ -15930,7 +15930,7 @@ if i32.const 0 i32.const 152 - i32.const 116 + i32.const 115 i32.const 0 call $~lib/env/abort unreachable @@ -15944,7 +15944,7 @@ if i32.const 0 i32.const 152 - i32.const 117 + i32.const 116 i32.const 0 call $~lib/env/abort unreachable @@ -15958,7 +15958,7 @@ if i32.const 0 i32.const 152 - i32.const 118 + i32.const 117 i32.const 0 call $~lib/env/abort unreachable @@ -15972,7 +15972,7 @@ if i32.const 0 i32.const 152 - i32.const 119 + i32.const 118 i32.const 0 call $~lib/env/abort unreachable @@ -15993,7 +15993,7 @@ if i32.const 0 i32.const 152 - i32.const 126 + i32.const 125 i32.const 0 call $~lib/env/abort unreachable @@ -16006,7 +16006,7 @@ if i32.const 0 i32.const 152 - i32.const 127 + i32.const 126 i32.const 0 call $~lib/env/abort unreachable @@ -16019,7 +16019,7 @@ if i32.const 0 i32.const 152 - i32.const 128 + i32.const 127 i32.const 0 call $~lib/env/abort unreachable @@ -16040,7 +16040,7 @@ if i32.const 0 i32.const 152 - i32.const 131 + i32.const 130 i32.const 0 call $~lib/env/abort unreachable @@ -16054,7 +16054,7 @@ if i32.const 0 i32.const 152 - i32.const 133 + i32.const 132 i32.const 0 call $~lib/env/abort unreachable @@ -16068,7 +16068,7 @@ if i32.const 0 i32.const 152 - i32.const 134 + i32.const 133 i32.const 0 call $~lib/env/abort unreachable @@ -16082,7 +16082,7 @@ if i32.const 0 i32.const 152 - i32.const 135 + i32.const 134 i32.const 0 call $~lib/env/abort unreachable @@ -16107,7 +16107,7 @@ if i32.const 0 i32.const 152 - i32.const 142 + i32.const 141 i32.const 0 call $~lib/env/abort unreachable @@ -16120,7 +16120,7 @@ if i32.const 0 i32.const 152 - i32.const 143 + i32.const 142 i32.const 0 call $~lib/env/abort unreachable @@ -16133,7 +16133,7 @@ if i32.const 0 i32.const 152 - i32.const 144 + i32.const 143 i32.const 0 call $~lib/env/abort unreachable @@ -16147,7 +16147,7 @@ if i32.const 0 i32.const 152 - i32.const 145 + i32.const 144 i32.const 0 call $~lib/env/abort unreachable @@ -16161,7 +16161,7 @@ if i32.const 0 i32.const 152 - i32.const 146 + i32.const 145 i32.const 0 call $~lib/env/abort unreachable @@ -16175,7 +16175,7 @@ if i32.const 0 i32.const 152 - i32.const 147 + i32.const 146 i32.const 0 call $~lib/env/abort unreachable @@ -16189,7 +16189,7 @@ if i32.const 0 i32.const 152 - i32.const 148 + i32.const 147 i32.const 0 call $~lib/env/abort unreachable @@ -16203,7 +16203,7 @@ if i32.const 0 i32.const 152 - i32.const 149 + i32.const 148 i32.const 0 call $~lib/env/abort unreachable @@ -16219,7 +16219,7 @@ if i32.const 0 i32.const 152 - i32.const 152 + i32.const 151 i32.const 0 call $~lib/env/abort unreachable @@ -16236,7 +16236,7 @@ if i32.const 0 i32.const 152 - i32.const 155 + i32.const 154 i32.const 0 call $~lib/env/abort unreachable @@ -16250,7 +16250,7 @@ if i32.const 0 i32.const 152 - i32.const 156 + i32.const 155 i32.const 0 call $~lib/env/abort unreachable @@ -16263,7 +16263,7 @@ if i32.const 0 i32.const 152 - i32.const 159 + i32.const 158 i32.const 0 call $~lib/env/abort unreachable @@ -16280,7 +16280,7 @@ if i32.const 0 i32.const 152 - i32.const 161 + i32.const 160 i32.const 0 call $~lib/env/abort unreachable @@ -16293,7 +16293,7 @@ if i32.const 0 i32.const 152 - i32.const 162 + i32.const 161 i32.const 0 call $~lib/env/abort unreachable @@ -16320,7 +16320,7 @@ if i32.const 0 i32.const 152 - i32.const 168 + i32.const 167 i32.const 0 call $~lib/env/abort unreachable @@ -16347,7 +16347,7 @@ if i32.const 0 i32.const 152 - i32.const 170 + i32.const 169 i32.const 0 call $~lib/env/abort unreachable @@ -16374,7 +16374,7 @@ if i32.const 0 i32.const 152 - i32.const 172 + i32.const 171 i32.const 0 call $~lib/env/abort unreachable @@ -16401,7 +16401,7 @@ if i32.const 0 i32.const 152 - i32.const 174 + i32.const 173 i32.const 0 call $~lib/env/abort unreachable @@ -16428,7 +16428,7 @@ if i32.const 0 i32.const 152 - i32.const 176 + i32.const 175 i32.const 0 call $~lib/env/abort unreachable @@ -16455,7 +16455,7 @@ if i32.const 0 i32.const 152 - i32.const 178 + i32.const 177 i32.const 0 call $~lib/env/abort unreachable @@ -16482,7 +16482,7 @@ if i32.const 0 i32.const 152 - i32.const 180 + i32.const 179 i32.const 0 call $~lib/env/abort unreachable @@ -16509,7 +16509,7 @@ if i32.const 0 i32.const 152 - i32.const 182 + i32.const 181 i32.const 0 call $~lib/env/abort unreachable @@ -16536,7 +16536,7 @@ if i32.const 0 i32.const 152 - i32.const 184 + i32.const 183 i32.const 0 call $~lib/env/abort unreachable @@ -16563,7 +16563,7 @@ if i32.const 0 i32.const 152 - i32.const 186 + i32.const 185 i32.const 0 call $~lib/env/abort unreachable @@ -16590,7 +16590,7 @@ if i32.const 0 i32.const 152 - i32.const 188 + i32.const 187 i32.const 0 call $~lib/env/abort unreachable @@ -16617,7 +16617,7 @@ if i32.const 0 i32.const 152 - i32.const 190 + i32.const 189 i32.const 0 call $~lib/env/abort unreachable @@ -16631,6 +16631,19 @@ i32.const 4 i32.eq i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 195 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/array/arr + call $std/array/internalCapacity + i32.const 4 + i32.eq + i32.eqz if i32.const 0 i32.const 152 @@ -16640,19 +16653,6 @@ unreachable end global.get $std/array/arr - call $std/array/internalCapacity - i32.const 4 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 152 - i32.const 197 - i32.const 0 - call $~lib/env/abort - unreachable - end - global.get $std/array/arr i32.const 0 call $~lib/array/Array#__get i32.const 42 @@ -16661,7 +16661,7 @@ if i32.const 0 i32.const 152 - i32.const 198 + i32.const 197 i32.const 0 call $~lib/env/abort unreachable @@ -16675,7 +16675,7 @@ if i32.const 0 i32.const 152 - i32.const 199 + i32.const 198 i32.const 0 call $~lib/env/abort unreachable @@ -16689,7 +16689,7 @@ if i32.const 0 i32.const 152 - i32.const 200 + i32.const 199 i32.const 0 call $~lib/env/abort unreachable @@ -16703,7 +16703,7 @@ if i32.const 0 i32.const 152 - i32.const 201 + i32.const 200 i32.const 0 call $~lib/env/abort unreachable @@ -16720,7 +16720,7 @@ if i32.const 0 i32.const 152 - i32.const 205 + i32.const 204 i32.const 0 call $~lib/env/abort unreachable @@ -16733,7 +16733,7 @@ if i32.const 0 i32.const 152 - i32.const 206 + i32.const 205 i32.const 0 call $~lib/env/abort unreachable @@ -16747,7 +16747,7 @@ if i32.const 0 i32.const 152 - i32.const 207 + i32.const 206 i32.const 0 call $~lib/env/abort unreachable @@ -16761,7 +16761,7 @@ if i32.const 0 i32.const 152 - i32.const 208 + i32.const 207 i32.const 0 call $~lib/env/abort unreachable @@ -16775,7 +16775,7 @@ if i32.const 0 i32.const 152 - i32.const 209 + i32.const 208 i32.const 0 call $~lib/env/abort unreachable @@ -16789,7 +16789,7 @@ if i32.const 0 i32.const 152 - i32.const 210 + i32.const 209 i32.const 0 call $~lib/env/abort unreachable @@ -16803,7 +16803,7 @@ if i32.const 0 i32.const 152 - i32.const 211 + i32.const 210 i32.const 0 call $~lib/env/abort unreachable @@ -16818,7 +16818,7 @@ if i32.const 0 i32.const 152 - i32.const 217 + i32.const 216 i32.const 0 call $~lib/env/abort unreachable @@ -16831,7 +16831,7 @@ if i32.const 0 i32.const 152 - i32.const 218 + i32.const 217 i32.const 0 call $~lib/env/abort unreachable @@ -16844,7 +16844,7 @@ if i32.const 0 i32.const 152 - i32.const 219 + i32.const 218 i32.const 0 call $~lib/env/abort unreachable @@ -16858,7 +16858,7 @@ if i32.const 0 i32.const 152 - i32.const 220 + i32.const 219 i32.const 0 call $~lib/env/abort unreachable @@ -16872,7 +16872,7 @@ if i32.const 0 i32.const 152 - i32.const 221 + i32.const 220 i32.const 0 call $~lib/env/abort unreachable @@ -16886,7 +16886,7 @@ if i32.const 0 i32.const 152 - i32.const 222 + i32.const 221 i32.const 0 call $~lib/env/abort unreachable @@ -16900,7 +16900,7 @@ if i32.const 0 i32.const 152 - i32.const 223 + i32.const 222 i32.const 0 call $~lib/env/abort unreachable @@ -16915,7 +16915,7 @@ if i32.const 0 i32.const 152 - i32.const 227 + i32.const 226 i32.const 0 call $~lib/env/abort unreachable @@ -16928,7 +16928,7 @@ if i32.const 0 i32.const 152 - i32.const 228 + i32.const 227 i32.const 0 call $~lib/env/abort unreachable @@ -16941,7 +16941,7 @@ if i32.const 0 i32.const 152 - i32.const 229 + i32.const 228 i32.const 0 call $~lib/env/abort unreachable @@ -16955,7 +16955,7 @@ if i32.const 0 i32.const 152 - i32.const 230 + i32.const 229 i32.const 0 call $~lib/env/abort unreachable @@ -16969,7 +16969,7 @@ if i32.const 0 i32.const 152 - i32.const 231 + i32.const 230 i32.const 0 call $~lib/env/abort unreachable @@ -16983,7 +16983,7 @@ if i32.const 0 i32.const 152 - i32.const 232 + i32.const 231 i32.const 0 call $~lib/env/abort unreachable @@ -16999,7 +16999,7 @@ if i32.const 0 i32.const 152 - i32.const 238 + i32.const 237 i32.const 0 call $~lib/env/abort unreachable @@ -17012,7 +17012,7 @@ if i32.const 0 i32.const 152 - i32.const 239 + i32.const 238 i32.const 0 call $~lib/env/abort unreachable @@ -17023,6 +17023,20 @@ i32.const 44 i32.eq i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 239 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/array/arr + i32.const 1 + call $~lib/array/Array#__get + i32.const 43 + i32.eq + i32.eqz if i32.const 0 i32.const 152 @@ -17032,9 +17046,9 @@ unreachable end global.get $std/array/arr - i32.const 1 + i32.const 2 call $~lib/array/Array#__get - i32.const 43 + i32.const 42 i32.eq i32.eqz if @@ -17046,20 +17060,6 @@ unreachable end global.get $std/array/arr - i32.const 2 - call $~lib/array/Array#__get - i32.const 42 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 152 - i32.const 242 - i32.const 0 - call $~lib/env/abort - unreachable - end - global.get $std/array/arr i32.const 43 call $~lib/array/Array#push drop @@ -17079,7 +17079,7 @@ if i32.const 0 i32.const 152 - i32.const 251 + i32.const 250 i32.const 0 call $~lib/env/abort unreachable @@ -17096,7 +17096,7 @@ if i32.const 0 i32.const 152 - i32.const 255 + i32.const 254 i32.const 0 call $~lib/env/abort unreachable @@ -17113,7 +17113,7 @@ if i32.const 0 i32.const 152 - i32.const 259 + i32.const 258 i32.const 0 call $~lib/env/abort unreachable @@ -17130,7 +17130,7 @@ if i32.const 0 i32.const 152 - i32.const 263 + i32.const 262 i32.const 0 call $~lib/env/abort unreachable @@ -17147,7 +17147,7 @@ if i32.const 0 i32.const 152 - i32.const 267 + i32.const 266 i32.const 0 call $~lib/env/abort unreachable @@ -17164,7 +17164,7 @@ if i32.const 0 i32.const 152 - i32.const 271 + i32.const 270 i32.const 0 call $~lib/env/abort unreachable @@ -17181,7 +17181,7 @@ if i32.const 0 i32.const 152 - i32.const 275 + i32.const 274 i32.const 0 call $~lib/env/abort unreachable @@ -17198,7 +17198,7 @@ if i32.const 0 i32.const 152 - i32.const 279 + i32.const 278 i32.const 0 call $~lib/env/abort unreachable @@ -17215,7 +17215,7 @@ if i32.const 0 i32.const 152 - i32.const 283 + i32.const 282 i32.const 0 call $~lib/env/abort unreachable @@ -17232,7 +17232,7 @@ if i32.const 0 i32.const 152 - i32.const 287 + i32.const 286 i32.const 0 call $~lib/env/abort unreachable @@ -17249,7 +17249,7 @@ if i32.const 0 i32.const 152 - i32.const 293 + i32.const 292 i32.const 0 call $~lib/env/abort unreachable @@ -17266,7 +17266,7 @@ if i32.const 0 i32.const 152 - i32.const 297 + i32.const 296 i32.const 0 call $~lib/env/abort unreachable @@ -17283,7 +17283,7 @@ if i32.const 0 i32.const 152 - i32.const 301 + i32.const 300 i32.const 0 call $~lib/env/abort unreachable @@ -17300,7 +17300,7 @@ if i32.const 0 i32.const 152 - i32.const 305 + i32.const 304 i32.const 0 call $~lib/env/abort unreachable @@ -17317,7 +17317,7 @@ if i32.const 0 i32.const 152 - i32.const 309 + i32.const 308 i32.const 0 call $~lib/env/abort unreachable @@ -17334,7 +17334,7 @@ if i32.const 0 i32.const 152 - i32.const 313 + i32.const 312 i32.const 0 call $~lib/env/abort unreachable @@ -17351,7 +17351,7 @@ if i32.const 0 i32.const 152 - i32.const 317 + i32.const 316 i32.const 0 call $~lib/env/abort unreachable @@ -17368,7 +17368,7 @@ if i32.const 0 i32.const 152 - i32.const 321 + i32.const 320 i32.const 0 call $~lib/env/abort unreachable @@ -17385,7 +17385,7 @@ if i32.const 0 i32.const 152 - i32.const 325 + i32.const 324 i32.const 0 call $~lib/env/abort unreachable @@ -17402,7 +17402,7 @@ if i32.const 0 i32.const 152 - i32.const 329 + i32.const 328 i32.const 0 call $~lib/env/abort unreachable @@ -17420,7 +17420,7 @@ if i32.const 0 i32.const 152 - i32.const 333 + i32.const 332 i32.const 0 call $~lib/env/abort unreachable @@ -17433,7 +17433,7 @@ if i32.const 0 i32.const 152 - i32.const 334 + i32.const 333 i32.const 0 call $~lib/env/abort unreachable @@ -17447,7 +17447,7 @@ if i32.const 0 i32.const 152 - i32.const 335 + i32.const 334 i32.const 0 call $~lib/env/abort unreachable @@ -17461,7 +17461,7 @@ if i32.const 0 i32.const 152 - i32.const 336 + i32.const 335 i32.const 0 call $~lib/env/abort unreachable @@ -17481,7 +17481,7 @@ if i32.const 0 i32.const 152 - i32.const 341 + i32.const 340 i32.const 0 call $~lib/env/abort unreachable @@ -17498,7 +17498,7 @@ if i32.const 0 i32.const 152 - i32.const 342 + i32.const 341 i32.const 0 call $~lib/env/abort unreachable @@ -17524,7 +17524,7 @@ if i32.const 0 i32.const 152 - i32.const 345 + i32.const 344 i32.const 0 call $~lib/env/abort unreachable @@ -17541,7 +17541,7 @@ if i32.const 0 i32.const 152 - i32.const 346 + i32.const 345 i32.const 0 call $~lib/env/abort unreachable @@ -17567,7 +17567,7 @@ if i32.const 0 i32.const 152 - i32.const 349 + i32.const 348 i32.const 0 call $~lib/env/abort unreachable @@ -17584,7 +17584,7 @@ if i32.const 0 i32.const 152 - i32.const 350 + i32.const 349 i32.const 0 call $~lib/env/abort unreachable @@ -17610,7 +17610,7 @@ if i32.const 0 i32.const 152 - i32.const 353 + i32.const 352 i32.const 0 call $~lib/env/abort unreachable @@ -17627,7 +17627,7 @@ if i32.const 0 i32.const 152 - i32.const 354 + i32.const 353 i32.const 0 call $~lib/env/abort unreachable @@ -17653,7 +17653,7 @@ if i32.const 0 i32.const 152 - i32.const 357 + i32.const 356 i32.const 0 call $~lib/env/abort unreachable @@ -17670,7 +17670,7 @@ if i32.const 0 i32.const 152 - i32.const 358 + i32.const 357 i32.const 0 call $~lib/env/abort unreachable @@ -17696,7 +17696,7 @@ if i32.const 0 i32.const 152 - i32.const 361 + i32.const 360 i32.const 0 call $~lib/env/abort unreachable @@ -17713,7 +17713,7 @@ if i32.const 0 i32.const 152 - i32.const 362 + i32.const 361 i32.const 0 call $~lib/env/abort unreachable @@ -17739,7 +17739,7 @@ if i32.const 0 i32.const 152 - i32.const 365 + i32.const 364 i32.const 0 call $~lib/env/abort unreachable @@ -17756,7 +17756,7 @@ if i32.const 0 i32.const 152 - i32.const 366 + i32.const 365 i32.const 0 call $~lib/env/abort unreachable @@ -17782,7 +17782,7 @@ if i32.const 0 i32.const 152 - i32.const 369 + i32.const 368 i32.const 0 call $~lib/env/abort unreachable @@ -17799,7 +17799,7 @@ if i32.const 0 i32.const 152 - i32.const 370 + i32.const 369 i32.const 0 call $~lib/env/abort unreachable @@ -17825,7 +17825,7 @@ if i32.const 0 i32.const 152 - i32.const 373 + i32.const 372 i32.const 0 call $~lib/env/abort unreachable @@ -17842,7 +17842,7 @@ if i32.const 0 i32.const 152 - i32.const 374 + i32.const 373 i32.const 0 call $~lib/env/abort unreachable @@ -17868,7 +17868,7 @@ if i32.const 0 i32.const 152 - i32.const 377 + i32.const 376 i32.const 0 call $~lib/env/abort unreachable @@ -17885,7 +17885,7 @@ if i32.const 0 i32.const 152 - i32.const 378 + i32.const 377 i32.const 0 call $~lib/env/abort unreachable @@ -17911,7 +17911,7 @@ if i32.const 0 i32.const 152 - i32.const 381 + i32.const 380 i32.const 0 call $~lib/env/abort unreachable @@ -17928,7 +17928,7 @@ if i32.const 0 i32.const 152 - i32.const 382 + i32.const 381 i32.const 0 call $~lib/env/abort unreachable @@ -17954,7 +17954,7 @@ if i32.const 0 i32.const 152 - i32.const 385 + i32.const 384 i32.const 0 call $~lib/env/abort unreachable @@ -17971,7 +17971,7 @@ if i32.const 0 i32.const 152 - i32.const 386 + i32.const 385 i32.const 0 call $~lib/env/abort unreachable @@ -17997,7 +17997,7 @@ if i32.const 0 i32.const 152 - i32.const 389 + i32.const 388 i32.const 0 call $~lib/env/abort unreachable @@ -18014,7 +18014,7 @@ if i32.const 0 i32.const 152 - i32.const 390 + i32.const 389 i32.const 0 call $~lib/env/abort unreachable @@ -18046,7 +18046,7 @@ if i32.const 0 i32.const 152 - i32.const 400 + i32.const 399 i32.const 0 call $~lib/env/abort unreachable @@ -18062,7 +18062,7 @@ if i32.const 0 i32.const 152 - i32.const 403 + i32.const 402 i32.const 0 call $~lib/env/abort unreachable @@ -18078,7 +18078,7 @@ if i32.const 0 i32.const 152 - i32.const 406 + i32.const 405 i32.const 0 call $~lib/env/abort unreachable @@ -18094,7 +18094,7 @@ if i32.const 0 i32.const 152 - i32.const 414 + i32.const 413 i32.const 0 call $~lib/env/abort unreachable @@ -18107,7 +18107,7 @@ if i32.const 0 i32.const 152 - i32.const 415 + i32.const 414 i32.const 0 call $~lib/env/abort unreachable @@ -18123,7 +18123,7 @@ if i32.const 0 i32.const 152 - i32.const 417 + i32.const 416 i32.const 0 call $~lib/env/abort unreachable @@ -18151,7 +18151,7 @@ if i32.const 0 i32.const 152 - i32.const 430 + i32.const 429 i32.const 0 call $~lib/env/abort unreachable @@ -18164,7 +18164,7 @@ if i32.const 0 i32.const 152 - i32.const 431 + i32.const 430 i32.const 0 call $~lib/env/abort unreachable @@ -18188,7 +18188,7 @@ if i32.const 0 i32.const 152 - i32.const 439 + i32.const 438 i32.const 0 call $~lib/env/abort unreachable @@ -18204,7 +18204,7 @@ if i32.const 0 i32.const 152 - i32.const 442 + i32.const 441 i32.const 0 call $~lib/env/abort unreachable @@ -18220,7 +18220,7 @@ if i32.const 0 i32.const 152 - i32.const 450 + i32.const 449 i32.const 0 call $~lib/env/abort unreachable @@ -18233,7 +18233,7 @@ if i32.const 0 i32.const 152 - i32.const 451 + i32.const 450 i32.const 0 call $~lib/env/abort unreachable @@ -18249,7 +18249,7 @@ if i32.const 0 i32.const 152 - i32.const 453 + i32.const 452 i32.const 0 call $~lib/env/abort unreachable @@ -18277,7 +18277,7 @@ if i32.const 0 i32.const 152 - i32.const 466 + i32.const 465 i32.const 0 call $~lib/env/abort unreachable @@ -18290,7 +18290,7 @@ if i32.const 0 i32.const 152 - i32.const 467 + i32.const 466 i32.const 0 call $~lib/env/abort unreachable @@ -18314,7 +18314,7 @@ if i32.const 0 i32.const 152 - i32.const 475 + i32.const 474 i32.const 0 call $~lib/env/abort unreachable @@ -18330,7 +18330,7 @@ if i32.const 0 i32.const 152 - i32.const 478 + i32.const 477 i32.const 0 call $~lib/env/abort unreachable @@ -18346,7 +18346,7 @@ if i32.const 0 i32.const 152 - i32.const 486 + i32.const 485 i32.const 0 call $~lib/env/abort unreachable @@ -18359,7 +18359,7 @@ if i32.const 0 i32.const 152 - i32.const 487 + i32.const 486 i32.const 0 call $~lib/env/abort unreachable @@ -18375,7 +18375,7 @@ if i32.const 0 i32.const 152 - i32.const 489 + i32.const 488 i32.const 0 call $~lib/env/abort unreachable @@ -18403,7 +18403,7 @@ if i32.const 0 i32.const 152 - i32.const 502 + i32.const 501 i32.const 0 call $~lib/env/abort unreachable @@ -18416,7 +18416,7 @@ if i32.const 0 i32.const 152 - i32.const 503 + i32.const 502 i32.const 0 call $~lib/env/abort unreachable @@ -18441,7 +18441,7 @@ if i32.const 0 i32.const 152 - i32.const 512 + i32.const 511 i32.const 0 call $~lib/env/abort unreachable @@ -18458,7 +18458,7 @@ if i32.const 0 i32.const 152 - i32.const 521 + i32.const 520 i32.const 0 call $~lib/env/abort unreachable @@ -18471,7 +18471,7 @@ if i32.const 0 i32.const 152 - i32.const 522 + i32.const 521 i32.const 0 call $~lib/env/abort unreachable @@ -18488,7 +18488,7 @@ if i32.const 0 i32.const 152 - i32.const 525 + i32.const 524 i32.const 0 call $~lib/env/abort unreachable @@ -18517,7 +18517,7 @@ if i32.const 0 i32.const 152 - i32.const 539 + i32.const 538 i32.const 0 call $~lib/env/abort unreachable @@ -18530,7 +18530,7 @@ if i32.const 0 i32.const 152 - i32.const 540 + i32.const 539 i32.const 0 call $~lib/env/abort unreachable @@ -18554,7 +18554,7 @@ if i32.const 0 i32.const 152 - i32.const 565 + i32.const 564 i32.const 0 call $~lib/env/abort unreachable @@ -18608,7 +18608,7 @@ if i32.const 0 i32.const 152 - i32.const 576 + i32.const 575 i32.const 0 call $~lib/env/abort unreachable @@ -18625,7 +18625,7 @@ if i32.const 0 i32.const 152 - i32.const 577 + i32.const 576 i32.const 0 call $~lib/env/abort unreachable @@ -18643,7 +18643,7 @@ if i32.const 0 i32.const 152 - i32.const 586 + i32.const 585 i32.const 0 call $~lib/env/abort unreachable @@ -18656,7 +18656,7 @@ if i32.const 0 i32.const 152 - i32.const 587 + i32.const 586 i32.const 0 call $~lib/env/abort unreachable @@ -18674,7 +18674,7 @@ if i32.const 0 i32.const 152 - i32.const 594 + i32.const 593 i32.const 0 call $~lib/env/abort unreachable @@ -18704,7 +18704,7 @@ if i32.const 0 i32.const 152 - i32.const 609 + i32.const 608 i32.const 0 call $~lib/env/abort unreachable @@ -18717,7 +18717,7 @@ if i32.const 0 i32.const 152 - i32.const 610 + i32.const 609 i32.const 0 call $~lib/env/abort unreachable @@ -18742,7 +18742,7 @@ if i32.const 0 i32.const 152 - i32.const 618 + i32.const 617 i32.const 0 call $~lib/env/abort unreachable @@ -18760,7 +18760,7 @@ if i32.const 0 i32.const 152 - i32.const 627 + i32.const 626 i32.const 0 call $~lib/env/abort unreachable @@ -18773,7 +18773,7 @@ if i32.const 0 i32.const 152 - i32.const 628 + i32.const 627 i32.const 0 call $~lib/env/abort unreachable @@ -18791,7 +18791,7 @@ if i32.const 0 i32.const 152 - i32.const 635 + i32.const 634 i32.const 0 call $~lib/env/abort unreachable @@ -18821,7 +18821,7 @@ if i32.const 0 i32.const 152 - i32.const 650 + i32.const 649 i32.const 0 call $~lib/env/abort unreachable @@ -18834,7 +18834,7 @@ if i32.const 0 i32.const 152 - i32.const 651 + i32.const 650 i32.const 0 call $~lib/env/abort unreachable @@ -18859,7 +18859,7 @@ if i32.const 0 i32.const 152 - i32.const 659 + i32.const 658 i32.const 0 call $~lib/env/abort unreachable @@ -18876,7 +18876,7 @@ if i32.const 0 i32.const 152 - i32.const 663 + i32.const 662 i32.const 0 call $~lib/env/abort unreachable @@ -18895,7 +18895,7 @@ if i32.const 0 i32.const 152 - i32.const 666 + i32.const 665 i32.const 0 call $~lib/env/abort unreachable @@ -18914,7 +18914,7 @@ if i32.const 0 i32.const 152 - i32.const 669 + i32.const 668 i32.const 0 call $~lib/env/abort unreachable @@ -18931,7 +18931,7 @@ if i32.const 0 i32.const 152 - i32.const 677 + i32.const 676 i32.const 0 call $~lib/env/abort unreachable @@ -18944,7 +18944,7 @@ if i32.const 0 i32.const 152 - i32.const 678 + i32.const 677 i32.const 0 call $~lib/env/abort unreachable @@ -18961,7 +18961,7 @@ if i32.const 0 i32.const 152 - i32.const 680 + i32.const 679 i32.const 0 call $~lib/env/abort unreachable @@ -18990,7 +18990,7 @@ if i32.const 0 i32.const 152 - i32.const 693 + i32.const 692 i32.const 0 call $~lib/env/abort unreachable @@ -19003,7 +19003,7 @@ if i32.const 0 i32.const 152 - i32.const 694 + i32.const 693 i32.const 0 call $~lib/env/abort unreachable @@ -19028,7 +19028,7 @@ if i32.const 0 i32.const 152 - i32.const 702 + i32.const 701 i32.const 0 call $~lib/env/abort unreachable @@ -19045,7 +19045,7 @@ if i32.const 0 i32.const 152 - i32.const 706 + i32.const 705 i32.const 0 call $~lib/env/abort unreachable @@ -19064,7 +19064,7 @@ if i32.const 0 i32.const 152 - i32.const 709 + i32.const 708 i32.const 0 call $~lib/env/abort unreachable @@ -19083,7 +19083,7 @@ if i32.const 0 i32.const 152 - i32.const 712 + i32.const 711 i32.const 0 call $~lib/env/abort unreachable @@ -19100,7 +19100,7 @@ if i32.const 0 i32.const 152 - i32.const 720 + i32.const 719 i32.const 0 call $~lib/env/abort unreachable @@ -19113,7 +19113,7 @@ if i32.const 0 i32.const 152 - i32.const 721 + i32.const 720 i32.const 0 call $~lib/env/abort unreachable @@ -19130,7 +19130,7 @@ if i32.const 0 i32.const 152 - i32.const 723 + i32.const 722 i32.const 0 call $~lib/env/abort unreachable @@ -19159,7 +19159,7 @@ if i32.const 0 i32.const 152 - i32.const 736 + i32.const 735 i32.const 0 call $~lib/env/abort unreachable @@ -19172,7 +19172,7 @@ if i32.const 0 i32.const 152 - i32.const 737 + i32.const 736 i32.const 0 call $~lib/env/abort unreachable @@ -19216,7 +19216,7 @@ if i32.const 0 i32.const 152 - i32.const 825 + i32.const 824 i32.const 0 call $~lib/env/abort unreachable @@ -19241,7 +19241,7 @@ if i32.const 0 i32.const 152 - i32.const 829 + i32.const 828 i32.const 0 call $~lib/env/abort unreachable @@ -19266,7 +19266,7 @@ if i32.const 0 i32.const 152 - i32.const 833 + i32.const 832 i32.const 0 call $~lib/env/abort unreachable @@ -19291,7 +19291,7 @@ if i32.const 0 i32.const 152 - i32.const 837 + i32.const 836 i32.const 0 call $~lib/env/abort unreachable @@ -19327,7 +19327,7 @@ if i32.const 0 i32.const 152 - i32.const 857 + i32.const 856 i32.const 0 call $~lib/env/abort unreachable @@ -19346,7 +19346,7 @@ if i32.const 0 i32.const 152 - i32.const 860 + i32.const 859 i32.const 0 call $~lib/env/abort unreachable @@ -19361,7 +19361,7 @@ if i32.const 0 i32.const 152 - i32.const 863 + i32.const 862 i32.const 0 call $~lib/env/abort unreachable @@ -19376,7 +19376,7 @@ if i32.const 0 i32.const 152 - i32.const 866 + i32.const 865 i32.const 0 call $~lib/env/abort unreachable @@ -19391,7 +19391,7 @@ if i32.const 0 i32.const 152 - i32.const 869 + i32.const 868 i32.const 0 call $~lib/env/abort unreachable @@ -19406,7 +19406,7 @@ if i32.const 0 i32.const 152 - i32.const 872 + i32.const 871 i32.const 0 call $~lib/env/abort unreachable @@ -19421,7 +19421,7 @@ if i32.const 0 i32.const 152 - i32.const 875 + i32.const 874 i32.const 0 call $~lib/env/abort unreachable @@ -19473,7 +19473,7 @@ if i32.const 0 i32.const 152 - i32.const 905 + i32.const 904 i32.const 0 call $~lib/env/abort unreachable @@ -19501,7 +19501,7 @@ if i32.const 0 i32.const 152 - i32.const 914 + i32.const 913 i32.const 0 call $~lib/env/abort unreachable @@ -19519,7 +19519,7 @@ if i32.const 0 i32.const 152 - i32.const 915 + i32.const 914 i32.const 0 call $~lib/env/abort unreachable @@ -19537,7 +19537,7 @@ if i32.const 0 i32.const 152 - i32.const 916 + i32.const 915 i32.const 0 call $~lib/env/abort unreachable @@ -19555,7 +19555,7 @@ if i32.const 0 i32.const 152 - i32.const 917 + i32.const 916 i32.const 0 call $~lib/env/abort unreachable @@ -19573,7 +19573,7 @@ if i32.const 0 i32.const 152 - i32.const 918 + i32.const 917 i32.const 0 call $~lib/env/abort unreachable @@ -19591,7 +19591,7 @@ if i32.const 0 i32.const 152 - i32.const 919 + i32.const 918 i32.const 0 call $~lib/env/abort unreachable @@ -19659,7 +19659,7 @@ if i32.const 0 i32.const 152 - i32.const 921 + i32.const 920 i32.const 0 call $~lib/env/abort unreachable @@ -19672,7 +19672,7 @@ if i32.const 0 i32.const 152 - i32.const 925 + i32.const 924 i32.const 0 call $~lib/env/abort unreachable @@ -19685,7 +19685,7 @@ if i32.const 0 i32.const 152 - i32.const 926 + i32.const 925 i32.const 0 call $~lib/env/abort unreachable @@ -19698,7 +19698,7 @@ if i32.const 0 i32.const 152 - i32.const 927 + i32.const 926 i32.const 0 call $~lib/env/abort unreachable @@ -19711,7 +19711,7 @@ if i32.const 0 i32.const 152 - i32.const 928 + i32.const 927 i32.const 0 call $~lib/env/abort unreachable @@ -19728,7 +19728,7 @@ if i32.const 0 i32.const 152 - i32.const 930 + i32.const 929 i32.const 0 call $~lib/env/abort unreachable @@ -19745,7 +19745,7 @@ if i32.const 0 i32.const 152 - i32.const 931 + i32.const 930 i32.const 0 call $~lib/env/abort unreachable @@ -19762,7 +19762,7 @@ if i32.const 0 i32.const 152 - i32.const 932 + i32.const 931 i32.const 0 call $~lib/env/abort unreachable @@ -19779,7 +19779,7 @@ if i32.const 0 i32.const 152 - i32.const 933 + i32.const 932 i32.const 0 call $~lib/env/abort unreachable @@ -19792,7 +19792,7 @@ if i32.const 0 i32.const 152 - i32.const 934 + i32.const 933 i32.const 0 call $~lib/env/abort unreachable @@ -19809,7 +19809,7 @@ if i32.const 0 i32.const 152 - i32.const 935 + i32.const 934 i32.const 0 call $~lib/env/abort unreachable @@ -19863,7 +19863,7 @@ if i32.const 0 i32.const 152 - i32.const 938 + i32.const 937 i32.const 0 call $~lib/env/abort unreachable @@ -19917,7 +19917,7 @@ if i32.const 0 i32.const 152 - i32.const 941 + i32.const 940 i32.const 0 call $~lib/env/abort unreachable @@ -19978,7 +19978,7 @@ if i32.const 0 i32.const 152 - i32.const 944 + i32.const 943 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/arraybuffer.json b/tests/compiler/std/arraybuffer.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/std/arraybuffer.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index cedf97f5..675968f8 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -326,7 +326,7 @@ if i32.const 0 i32.const 64 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -341,7 +341,7 @@ if i32.const 0 i32.const 64 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -1494,7 +1494,7 @@ if i32.const 0 i32.const 64 - i32.const 232 + i32.const 236 i32.const 57 call $~lib/env/abort unreachable @@ -1629,7 +1629,7 @@ if i32.const 0 i32.const 104 - i32.const 5 + i32.const 3 i32.const 0 call $~lib/env/abort unreachable @@ -1648,7 +1648,7 @@ if i32.const 0 i32.const 104 - i32.const 9 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable @@ -1659,7 +1659,7 @@ if i32.const 0 i32.const 104 - i32.const 10 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable @@ -1678,7 +1678,7 @@ if i32.const 0 i32.const 104 - i32.const 14 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -1697,7 +1697,7 @@ if i32.const 0 i32.const 104 - i32.const 18 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -1716,7 +1716,7 @@ if i32.const 0 i32.const 104 - i32.const 22 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -1735,7 +1735,7 @@ if i32.const 0 i32.const 104 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -1754,7 +1754,7 @@ if i32.const 0 i32.const 104 - i32.const 30 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable @@ -1773,7 +1773,7 @@ if i32.const 0 i32.const 104 - i32.const 34 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable @@ -1790,7 +1790,7 @@ if i32.const 0 i32.const 104 - i32.const 38 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable @@ -1800,7 +1800,7 @@ if i32.const 0 i32.const 104 - i32.const 39 + i32.const 37 i32.const 0 call $~lib/env/abort unreachable @@ -1824,7 +1824,7 @@ if i32.const 0 i32.const 104 - i32.const 49 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable @@ -1845,7 +1845,7 @@ if i32.const 0 i32.const 104 - i32.const 50 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable @@ -1863,7 +1863,7 @@ if i32.const 0 i32.const 104 - i32.const 51 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/arraybuffer.ts b/tests/compiler/std/arraybuffer.ts index 59232119..77b5b8b8 100644 --- a/tests/compiler/std/arraybuffer.ts +++ b/tests/compiler/std/arraybuffer.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; - var buffer = new ArrayBuffer(8); assert(buffer.byteLength == 8); diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 121f179a..8b21d815 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -16,10 +16,10 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/arraybuffer/buffer (mut i32) (i32.const 0)) (global $std/arraybuffer/sliced (mut i32) (i32.const 0)) @@ -407,7 +407,7 @@ if i32.const 0 i32.const 64 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -424,7 +424,7 @@ if i32.const 0 i32.const 64 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -2044,7 +2044,7 @@ if i32.const 0 i32.const 64 - i32.const 232 + i32.const 236 i32.const 57 call $~lib/env/abort unreachable @@ -2252,7 +2252,7 @@ if i32.const 0 i32.const 104 - i32.const 5 + i32.const 3 i32.const 0 call $~lib/env/abort unreachable @@ -2270,7 +2270,7 @@ if i32.const 0 i32.const 104 - i32.const 9 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable @@ -2282,7 +2282,7 @@ if i32.const 0 i32.const 104 - i32.const 10 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable @@ -2300,7 +2300,7 @@ if i32.const 0 i32.const 104 - i32.const 14 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -2318,7 +2318,7 @@ if i32.const 0 i32.const 104 - i32.const 18 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -2336,7 +2336,7 @@ if i32.const 0 i32.const 104 - i32.const 22 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -2354,7 +2354,7 @@ if i32.const 0 i32.const 104 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -2372,7 +2372,7 @@ if i32.const 0 i32.const 104 - i32.const 30 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable @@ -2390,7 +2390,7 @@ if i32.const 0 i32.const 104 - i32.const 34 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable @@ -2408,7 +2408,7 @@ if i32.const 0 i32.const 104 - i32.const 38 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable @@ -2420,7 +2420,7 @@ if i32.const 0 i32.const 104 - i32.const 39 + i32.const 37 i32.const 0 call $~lib/env/abort unreachable @@ -2432,7 +2432,7 @@ if i32.const 0 i32.const 104 - i32.const 41 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable @@ -2444,7 +2444,7 @@ if i32.const 0 i32.const 104 - i32.const 42 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable @@ -2456,7 +2456,7 @@ if i32.const 0 i32.const 104 - i32.const 43 + i32.const 41 i32.const 0 call $~lib/env/abort unreachable @@ -2468,7 +2468,7 @@ if i32.const 0 i32.const 104 - i32.const 44 + i32.const 42 i32.const 0 call $~lib/env/abort unreachable @@ -2480,7 +2480,7 @@ if i32.const 0 i32.const 104 - i32.const 45 + i32.const 43 i32.const 0 call $~lib/env/abort unreachable @@ -2500,7 +2500,7 @@ if i32.const 0 i32.const 104 - i32.const 48 + i32.const 46 i32.const 0 call $~lib/env/abort unreachable @@ -2511,7 +2511,7 @@ if i32.const 0 i32.const 104 - i32.const 49 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable @@ -2524,7 +2524,7 @@ if i32.const 0 i32.const 104 - i32.const 50 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable @@ -2540,7 +2540,7 @@ if i32.const 0 i32.const 104 - i32.const 51 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/dataview.json b/tests/compiler/std/dataview.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/std/dataview.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 21c380cd..e6e004fb 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -164,7 +164,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -179,7 +179,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -1021,7 +1021,7 @@ if i32.const 0 i32.const 192 - i32.const 16 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -1035,7 +1035,7 @@ if i32.const 0 i32.const 192 - i32.const 17 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -1049,7 +1049,7 @@ if i32.const 0 i32.const 192 - i32.const 18 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -1063,7 +1063,7 @@ if i32.const 0 i32.const 192 - i32.const 19 + i32.const 17 i32.const 0 call $~lib/env/abort unreachable @@ -1077,7 +1077,7 @@ if i32.const 0 i32.const 192 - i32.const 20 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -1091,7 +1091,7 @@ if i32.const 0 i32.const 192 - i32.const 22 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -1105,7 +1105,7 @@ if i32.const 0 i32.const 192 - i32.const 23 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -1119,7 +1119,7 @@ if i32.const 0 i32.const 192 - i32.const 24 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -1133,7 +1133,7 @@ if i32.const 0 i32.const 192 - i32.const 25 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable @@ -1147,7 +1147,7 @@ if i32.const 0 i32.const 192 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -1160,7 +1160,7 @@ if i32.const 0 i32.const 192 - i32.const 28 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -1173,7 +1173,7 @@ if i32.const 0 i32.const 192 - i32.const 29 + i32.const 27 i32.const 0 call $~lib/env/abort unreachable @@ -1186,7 +1186,7 @@ if i32.const 0 i32.const 192 - i32.const 31 + i32.const 29 i32.const 0 call $~lib/env/abort unreachable @@ -1199,7 +1199,7 @@ if i32.const 0 i32.const 192 - i32.const 32 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable @@ -1212,7 +1212,7 @@ if i32.const 0 i32.const 192 - i32.const 33 + i32.const 31 i32.const 0 call $~lib/env/abort unreachable @@ -1225,7 +1225,7 @@ if i32.const 0 i32.const 192 - i32.const 34 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable @@ -1238,7 +1238,7 @@ if i32.const 0 i32.const 192 - i32.const 35 + i32.const 33 i32.const 0 call $~lib/env/abort unreachable @@ -1251,7 +1251,7 @@ if i32.const 0 i32.const 192 - i32.const 36 + i32.const 34 i32.const 0 call $~lib/env/abort unreachable @@ -1264,7 +1264,7 @@ if i32.const 0 i32.const 192 - i32.const 37 + i32.const 35 i32.const 0 call $~lib/env/abort unreachable @@ -1277,7 +1277,7 @@ if i32.const 0 i32.const 192 - i32.const 38 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable @@ -1293,7 +1293,7 @@ if i32.const 0 i32.const 192 - i32.const 40 + i32.const 38 i32.const 0 call $~lib/env/abort unreachable @@ -1309,7 +1309,7 @@ if i32.const 0 i32.const 192 - i32.const 41 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable @@ -1325,7 +1325,7 @@ if i32.const 0 i32.const 192 - i32.const 42 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable @@ -1341,7 +1341,7 @@ if i32.const 0 i32.const 192 - i32.const 43 + i32.const 41 i32.const 0 call $~lib/env/abort unreachable @@ -1357,7 +1357,7 @@ if i32.const 0 i32.const 192 - i32.const 44 + i32.const 42 i32.const 0 call $~lib/env/abort unreachable @@ -1373,7 +1373,7 @@ if i32.const 0 i32.const 192 - i32.const 45 + i32.const 43 i32.const 0 call $~lib/env/abort unreachable @@ -1389,7 +1389,7 @@ if i32.const 0 i32.const 192 - i32.const 46 + i32.const 44 i32.const 0 call $~lib/env/abort unreachable @@ -1405,7 +1405,7 @@ if i32.const 0 i32.const 192 - i32.const 48 + i32.const 46 i32.const 0 call $~lib/env/abort unreachable @@ -1421,7 +1421,7 @@ if i32.const 0 i32.const 192 - i32.const 49 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable @@ -1437,7 +1437,7 @@ if i32.const 0 i32.const 192 - i32.const 50 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable @@ -1453,7 +1453,7 @@ if i32.const 0 i32.const 192 - i32.const 51 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable @@ -1469,7 +1469,7 @@ if i32.const 0 i32.const 192 - i32.const 52 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable @@ -1485,7 +1485,7 @@ if i32.const 0 i32.const 192 - i32.const 53 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable @@ -1501,7 +1501,7 @@ if i32.const 0 i32.const 192 - i32.const 54 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -1515,7 +1515,7 @@ if i32.const 0 i32.const 192 - i32.const 56 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -1529,7 +1529,7 @@ if i32.const 0 i32.const 192 - i32.const 57 + i32.const 55 i32.const 0 call $~lib/env/abort unreachable @@ -1543,7 +1543,7 @@ if i32.const 0 i32.const 192 - i32.const 58 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable @@ -1557,7 +1557,7 @@ if i32.const 0 i32.const 192 - i32.const 59 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable @@ -1571,7 +1571,7 @@ if i32.const 0 i32.const 192 - i32.const 60 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable @@ -1585,7 +1585,7 @@ if i32.const 0 i32.const 192 - i32.const 62 + i32.const 60 i32.const 0 call $~lib/env/abort unreachable @@ -1599,7 +1599,7 @@ if i32.const 0 i32.const 192 - i32.const 63 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable @@ -1613,7 +1613,7 @@ if i32.const 0 i32.const 192 - i32.const 64 + i32.const 62 i32.const 0 call $~lib/env/abort unreachable @@ -1627,7 +1627,7 @@ if i32.const 0 i32.const 192 - i32.const 65 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -1641,7 +1641,7 @@ if i32.const 0 i32.const 192 - i32.const 66 + i32.const 64 i32.const 0 call $~lib/env/abort unreachable @@ -1654,7 +1654,7 @@ if i32.const 0 i32.const 192 - i32.const 68 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable @@ -1667,7 +1667,7 @@ if i32.const 0 i32.const 192 - i32.const 69 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable @@ -1680,7 +1680,7 @@ if i32.const 0 i32.const 192 - i32.const 71 + i32.const 69 i32.const 0 call $~lib/env/abort unreachable @@ -1693,7 +1693,7 @@ if i32.const 0 i32.const 192 - i32.const 72 + i32.const 70 i32.const 0 call $~lib/env/abort unreachable @@ -1706,7 +1706,7 @@ if i32.const 0 i32.const 192 - i32.const 73 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable @@ -1719,7 +1719,7 @@ if i32.const 0 i32.const 192 - i32.const 74 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable @@ -1732,7 +1732,7 @@ if i32.const 0 i32.const 192 - i32.const 75 + i32.const 73 i32.const 0 call $~lib/env/abort unreachable @@ -1745,7 +1745,7 @@ if i32.const 0 i32.const 192 - i32.const 76 + i32.const 74 i32.const 0 call $~lib/env/abort unreachable @@ -1758,7 +1758,7 @@ if i32.const 0 i32.const 192 - i32.const 77 + i32.const 75 i32.const 0 call $~lib/env/abort unreachable @@ -1771,7 +1771,7 @@ if i32.const 0 i32.const 192 - i32.const 78 + i32.const 76 i32.const 0 call $~lib/env/abort unreachable @@ -1787,7 +1787,7 @@ if i32.const 0 i32.const 192 - i32.const 80 + i32.const 78 i32.const 0 call $~lib/env/abort unreachable @@ -1803,7 +1803,7 @@ if i32.const 0 i32.const 192 - i32.const 81 + i32.const 79 i32.const 0 call $~lib/env/abort unreachable @@ -1819,7 +1819,7 @@ if i32.const 0 i32.const 192 - i32.const 82 + i32.const 80 i32.const 0 call $~lib/env/abort unreachable @@ -1835,7 +1835,7 @@ if i32.const 0 i32.const 192 - i32.const 83 + i32.const 81 i32.const 0 call $~lib/env/abort unreachable @@ -1851,7 +1851,7 @@ if i32.const 0 i32.const 192 - i32.const 84 + i32.const 82 i32.const 0 call $~lib/env/abort unreachable @@ -1867,7 +1867,7 @@ if i32.const 0 i32.const 192 - i32.const 85 + i32.const 83 i32.const 0 call $~lib/env/abort unreachable @@ -1883,7 +1883,7 @@ if i32.const 0 i32.const 192 - i32.const 86 + i32.const 84 i32.const 0 call $~lib/env/abort unreachable @@ -1899,7 +1899,7 @@ if i32.const 0 i32.const 192 - i32.const 88 + i32.const 86 i32.const 0 call $~lib/env/abort unreachable @@ -1915,7 +1915,7 @@ if i32.const 0 i32.const 192 - i32.const 89 + i32.const 87 i32.const 0 call $~lib/env/abort unreachable @@ -1931,7 +1931,7 @@ if i32.const 0 i32.const 192 - i32.const 90 + i32.const 88 i32.const 0 call $~lib/env/abort unreachable @@ -1947,7 +1947,7 @@ if i32.const 0 i32.const 192 - i32.const 91 + i32.const 89 i32.const 0 call $~lib/env/abort unreachable @@ -1963,7 +1963,7 @@ if i32.const 0 i32.const 192 - i32.const 92 + i32.const 90 i32.const 0 call $~lib/env/abort unreachable @@ -1979,7 +1979,7 @@ if i32.const 0 i32.const 192 - i32.const 93 + i32.const 91 i32.const 0 call $~lib/env/abort unreachable @@ -1995,7 +1995,7 @@ if i32.const 0 i32.const 192 - i32.const 94 + i32.const 92 i32.const 0 call $~lib/env/abort unreachable @@ -2009,7 +2009,7 @@ if i32.const 0 i32.const 192 - i32.const 96 + i32.const 94 i32.const 0 call $~lib/env/abort unreachable @@ -2023,7 +2023,7 @@ if i32.const 0 i32.const 192 - i32.const 97 + i32.const 95 i32.const 0 call $~lib/env/abort unreachable @@ -2037,7 +2037,7 @@ if i32.const 0 i32.const 192 - i32.const 98 + i32.const 96 i32.const 0 call $~lib/env/abort unreachable @@ -2051,7 +2051,7 @@ if i32.const 0 i32.const 192 - i32.const 99 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable @@ -2065,7 +2065,7 @@ if i32.const 0 i32.const 192 - i32.const 100 + i32.const 98 i32.const 0 call $~lib/env/abort unreachable @@ -2079,7 +2079,7 @@ if i32.const 0 i32.const 192 - i32.const 102 + i32.const 100 i32.const 0 call $~lib/env/abort unreachable @@ -2093,7 +2093,7 @@ if i32.const 0 i32.const 192 - i32.const 103 + i32.const 101 i32.const 0 call $~lib/env/abort unreachable @@ -2107,7 +2107,7 @@ if i32.const 0 i32.const 192 - i32.const 104 + i32.const 102 i32.const 0 call $~lib/env/abort unreachable @@ -2121,7 +2121,7 @@ if i32.const 0 i32.const 192 - i32.const 105 + i32.const 103 i32.const 0 call $~lib/env/abort unreachable @@ -2135,7 +2135,7 @@ if i32.const 0 i32.const 192 - i32.const 106 + i32.const 104 i32.const 0 call $~lib/env/abort unreachable @@ -2148,7 +2148,7 @@ if i32.const 0 i32.const 192 - i32.const 108 + i32.const 106 i32.const 0 call $~lib/env/abort unreachable @@ -2161,7 +2161,7 @@ if i32.const 0 i32.const 192 - i32.const 109 + i32.const 107 i32.const 0 call $~lib/env/abort unreachable @@ -2179,7 +2179,7 @@ if i32.const 0 i32.const 192 - i32.const 112 + i32.const 110 i32.const 0 call $~lib/env/abort unreachable @@ -2197,7 +2197,7 @@ if i32.const 0 i32.const 192 - i32.const 115 + i32.const 113 i32.const 0 call $~lib/env/abort unreachable @@ -2214,7 +2214,7 @@ if i32.const 0 i32.const 192 - i32.const 118 + i32.const 116 i32.const 0 call $~lib/env/abort unreachable @@ -2231,7 +2231,7 @@ if i32.const 0 i32.const 192 - i32.const 121 + i32.const 119 i32.const 0 call $~lib/env/abort unreachable @@ -2246,7 +2246,7 @@ if i32.const 0 i32.const 192 - i32.const 124 + i32.const 122 i32.const 0 call $~lib/env/abort unreachable @@ -2266,7 +2266,7 @@ if i32.const 0 i32.const 192 - i32.const 127 + i32.const 125 i32.const 0 call $~lib/env/abort unreachable @@ -2286,7 +2286,7 @@ if i32.const 0 i32.const 192 - i32.const 130 + i32.const 128 i32.const 0 call $~lib/env/abort unreachable @@ -2304,7 +2304,7 @@ if i32.const 0 i32.const 192 - i32.const 133 + i32.const 131 i32.const 0 call $~lib/env/abort unreachable @@ -2322,7 +2322,7 @@ if i32.const 0 i32.const 192 - i32.const 136 + i32.const 134 i32.const 0 call $~lib/env/abort unreachable @@ -2339,7 +2339,7 @@ if i32.const 0 i32.const 192 - i32.const 139 + i32.const 137 i32.const 0 call $~lib/env/abort unreachable @@ -2356,7 +2356,7 @@ if i32.const 0 i32.const 192 - i32.const 142 + i32.const 140 i32.const 0 call $~lib/env/abort unreachable @@ -2371,7 +2371,7 @@ if i32.const 0 i32.const 192 - i32.const 145 + i32.const 143 i32.const 0 call $~lib/env/abort unreachable @@ -2391,7 +2391,7 @@ if i32.const 0 i32.const 192 - i32.const 148 + i32.const 146 i32.const 0 call $~lib/env/abort unreachable @@ -2411,7 +2411,7 @@ if i32.const 0 i32.const 192 - i32.const 151 + i32.const 149 i32.const 0 call $~lib/env/abort unreachable @@ -2429,7 +2429,7 @@ if i32.const 0 i32.const 192 - i32.const 154 + i32.const 152 i32.const 0 call $~lib/env/abort unreachable @@ -2447,7 +2447,7 @@ if i32.const 0 i32.const 192 - i32.const 157 + i32.const 155 i32.const 0 call $~lib/env/abort unreachable @@ -2464,7 +2464,7 @@ if i32.const 0 i32.const 192 - i32.const 160 + i32.const 158 i32.const 0 call $~lib/env/abort unreachable @@ -2481,7 +2481,7 @@ if i32.const 0 i32.const 192 - i32.const 163 + i32.const 161 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/dataview.ts b/tests/compiler/std/dataview.ts index 68e12f34..6ff42538 100644 --- a/tests/compiler/std/dataview.ts +++ b/tests/compiler/std/dataview.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; - var array = new Uint8Array(8); array[0] = 246; diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index b3cb8091..16dd9153 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -23,10 +23,10 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/dataview/array (mut i32) (i32.const 0)) (global $~lib/builtins/i32.MIN_VALUE i32 (i32.const -2147483648)) @@ -413,7 +413,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -430,7 +430,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -483,7 +483,7 @@ if i32.const 0 i32.const 16 - i32.const 232 + i32.const 236 i32.const 57 call $~lib/env/abort unreachable @@ -1504,7 +1504,7 @@ if i32.const 0 i32.const 192 - i32.const 16 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -1519,7 +1519,7 @@ if i32.const 0 i32.const 192 - i32.const 17 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -1534,7 +1534,7 @@ if i32.const 0 i32.const 192 - i32.const 18 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -1549,7 +1549,7 @@ if i32.const 0 i32.const 192 - i32.const 19 + i32.const 17 i32.const 0 call $~lib/env/abort unreachable @@ -1564,7 +1564,7 @@ if i32.const 0 i32.const 192 - i32.const 20 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -1579,7 +1579,7 @@ if i32.const 0 i32.const 192 - i32.const 22 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -1594,7 +1594,7 @@ if i32.const 0 i32.const 192 - i32.const 23 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -1609,7 +1609,7 @@ if i32.const 0 i32.const 192 - i32.const 24 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -1624,7 +1624,7 @@ if i32.const 0 i32.const 192 - i32.const 25 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable @@ -1639,7 +1639,7 @@ if i32.const 0 i32.const 192 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -1654,7 +1654,7 @@ if i32.const 0 i32.const 192 - i32.const 28 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -1669,7 +1669,7 @@ if i32.const 0 i32.const 192 - i32.const 29 + i32.const 27 i32.const 0 call $~lib/env/abort unreachable @@ -1683,7 +1683,7 @@ if i32.const 0 i32.const 192 - i32.const 31 + i32.const 29 i32.const 0 call $~lib/env/abort unreachable @@ -1697,7 +1697,7 @@ if i32.const 0 i32.const 192 - i32.const 32 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable @@ -1711,7 +1711,7 @@ if i32.const 0 i32.const 192 - i32.const 33 + i32.const 31 i32.const 0 call $~lib/env/abort unreachable @@ -1725,7 +1725,7 @@ if i32.const 0 i32.const 192 - i32.const 34 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable @@ -1739,7 +1739,7 @@ if i32.const 0 i32.const 192 - i32.const 35 + i32.const 33 i32.const 0 call $~lib/env/abort unreachable @@ -1753,7 +1753,7 @@ if i32.const 0 i32.const 192 - i32.const 36 + i32.const 34 i32.const 0 call $~lib/env/abort unreachable @@ -1767,7 +1767,7 @@ if i32.const 0 i32.const 192 - i32.const 37 + i32.const 35 i32.const 0 call $~lib/env/abort unreachable @@ -1781,7 +1781,7 @@ if i32.const 0 i32.const 192 - i32.const 38 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable @@ -1800,7 +1800,7 @@ if i32.const 0 i32.const 192 - i32.const 40 + i32.const 38 i32.const 0 call $~lib/env/abort unreachable @@ -1819,7 +1819,7 @@ if i32.const 0 i32.const 192 - i32.const 41 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable @@ -1838,7 +1838,7 @@ if i32.const 0 i32.const 192 - i32.const 42 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable @@ -1857,7 +1857,7 @@ if i32.const 0 i32.const 192 - i32.const 43 + i32.const 41 i32.const 0 call $~lib/env/abort unreachable @@ -1876,7 +1876,7 @@ if i32.const 0 i32.const 192 - i32.const 44 + i32.const 42 i32.const 0 call $~lib/env/abort unreachable @@ -1895,7 +1895,7 @@ if i32.const 0 i32.const 192 - i32.const 45 + i32.const 43 i32.const 0 call $~lib/env/abort unreachable @@ -1914,7 +1914,7 @@ if i32.const 0 i32.const 192 - i32.const 46 + i32.const 44 i32.const 0 call $~lib/env/abort unreachable @@ -1933,7 +1933,7 @@ if i32.const 0 i32.const 192 - i32.const 48 + i32.const 46 i32.const 0 call $~lib/env/abort unreachable @@ -1952,7 +1952,7 @@ if i32.const 0 i32.const 192 - i32.const 49 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable @@ -1971,7 +1971,7 @@ if i32.const 0 i32.const 192 - i32.const 50 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable @@ -1990,7 +1990,7 @@ if i32.const 0 i32.const 192 - i32.const 51 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable @@ -2009,7 +2009,7 @@ if i32.const 0 i32.const 192 - i32.const 52 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable @@ -2028,7 +2028,7 @@ if i32.const 0 i32.const 192 - i32.const 53 + i32.const 51 i32.const 0 call $~lib/env/abort unreachable @@ -2047,7 +2047,7 @@ if i32.const 0 i32.const 192 - i32.const 54 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -2062,7 +2062,7 @@ if i32.const 0 i32.const 192 - i32.const 56 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -2077,7 +2077,7 @@ if i32.const 0 i32.const 192 - i32.const 57 + i32.const 55 i32.const 0 call $~lib/env/abort unreachable @@ -2092,7 +2092,7 @@ if i32.const 0 i32.const 192 - i32.const 58 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable @@ -2107,7 +2107,7 @@ if i32.const 0 i32.const 192 - i32.const 59 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable @@ -2122,7 +2122,7 @@ if i32.const 0 i32.const 192 - i32.const 60 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable @@ -2137,7 +2137,7 @@ if i32.const 0 i32.const 192 - i32.const 62 + i32.const 60 i32.const 0 call $~lib/env/abort unreachable @@ -2152,7 +2152,7 @@ if i32.const 0 i32.const 192 - i32.const 63 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable @@ -2167,7 +2167,7 @@ if i32.const 0 i32.const 192 - i32.const 64 + i32.const 62 i32.const 0 call $~lib/env/abort unreachable @@ -2182,7 +2182,7 @@ if i32.const 0 i32.const 192 - i32.const 65 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -2197,7 +2197,7 @@ if i32.const 0 i32.const 192 - i32.const 66 + i32.const 64 i32.const 0 call $~lib/env/abort unreachable @@ -2212,7 +2212,7 @@ if i32.const 0 i32.const 192 - i32.const 68 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable @@ -2227,7 +2227,7 @@ if i32.const 0 i32.const 192 - i32.const 69 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable @@ -2241,7 +2241,7 @@ if i32.const 0 i32.const 192 - i32.const 71 + i32.const 69 i32.const 0 call $~lib/env/abort unreachable @@ -2255,7 +2255,7 @@ if i32.const 0 i32.const 192 - i32.const 72 + i32.const 70 i32.const 0 call $~lib/env/abort unreachable @@ -2269,7 +2269,7 @@ if i32.const 0 i32.const 192 - i32.const 73 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable @@ -2283,7 +2283,7 @@ if i32.const 0 i32.const 192 - i32.const 74 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable @@ -2297,7 +2297,7 @@ if i32.const 0 i32.const 192 - i32.const 75 + i32.const 73 i32.const 0 call $~lib/env/abort unreachable @@ -2311,7 +2311,7 @@ if i32.const 0 i32.const 192 - i32.const 76 + i32.const 74 i32.const 0 call $~lib/env/abort unreachable @@ -2325,7 +2325,7 @@ if i32.const 0 i32.const 192 - i32.const 77 + i32.const 75 i32.const 0 call $~lib/env/abort unreachable @@ -2339,7 +2339,7 @@ if i32.const 0 i32.const 192 - i32.const 78 + i32.const 76 i32.const 0 call $~lib/env/abort unreachable @@ -2356,7 +2356,7 @@ if i32.const 0 i32.const 192 - i32.const 80 + i32.const 78 i32.const 0 call $~lib/env/abort unreachable @@ -2373,7 +2373,7 @@ if i32.const 0 i32.const 192 - i32.const 81 + i32.const 79 i32.const 0 call $~lib/env/abort unreachable @@ -2390,7 +2390,7 @@ if i32.const 0 i32.const 192 - i32.const 82 + i32.const 80 i32.const 0 call $~lib/env/abort unreachable @@ -2407,7 +2407,7 @@ if i32.const 0 i32.const 192 - i32.const 83 + i32.const 81 i32.const 0 call $~lib/env/abort unreachable @@ -2424,7 +2424,7 @@ if i32.const 0 i32.const 192 - i32.const 84 + i32.const 82 i32.const 0 call $~lib/env/abort unreachable @@ -2441,7 +2441,7 @@ if i32.const 0 i32.const 192 - i32.const 85 + i32.const 83 i32.const 0 call $~lib/env/abort unreachable @@ -2458,7 +2458,7 @@ if i32.const 0 i32.const 192 - i32.const 86 + i32.const 84 i32.const 0 call $~lib/env/abort unreachable @@ -2475,7 +2475,7 @@ if i32.const 0 i32.const 192 - i32.const 88 + i32.const 86 i32.const 0 call $~lib/env/abort unreachable @@ -2492,7 +2492,7 @@ if i32.const 0 i32.const 192 - i32.const 89 + i32.const 87 i32.const 0 call $~lib/env/abort unreachable @@ -2509,7 +2509,7 @@ if i32.const 0 i32.const 192 - i32.const 90 + i32.const 88 i32.const 0 call $~lib/env/abort unreachable @@ -2526,7 +2526,7 @@ if i32.const 0 i32.const 192 - i32.const 91 + i32.const 89 i32.const 0 call $~lib/env/abort unreachable @@ -2543,7 +2543,7 @@ if i32.const 0 i32.const 192 - i32.const 92 + i32.const 90 i32.const 0 call $~lib/env/abort unreachable @@ -2560,7 +2560,7 @@ if i32.const 0 i32.const 192 - i32.const 93 + i32.const 91 i32.const 0 call $~lib/env/abort unreachable @@ -2577,7 +2577,7 @@ if i32.const 0 i32.const 192 - i32.const 94 + i32.const 92 i32.const 0 call $~lib/env/abort unreachable @@ -2592,7 +2592,7 @@ if i32.const 0 i32.const 192 - i32.const 96 + i32.const 94 i32.const 0 call $~lib/env/abort unreachable @@ -2607,7 +2607,7 @@ if i32.const 0 i32.const 192 - i32.const 97 + i32.const 95 i32.const 0 call $~lib/env/abort unreachable @@ -2622,7 +2622,7 @@ if i32.const 0 i32.const 192 - i32.const 98 + i32.const 96 i32.const 0 call $~lib/env/abort unreachable @@ -2637,7 +2637,7 @@ if i32.const 0 i32.const 192 - i32.const 99 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable @@ -2652,7 +2652,7 @@ if i32.const 0 i32.const 192 - i32.const 100 + i32.const 98 i32.const 0 call $~lib/env/abort unreachable @@ -2667,7 +2667,7 @@ if i32.const 0 i32.const 192 - i32.const 102 + i32.const 100 i32.const 0 call $~lib/env/abort unreachable @@ -2682,7 +2682,7 @@ if i32.const 0 i32.const 192 - i32.const 103 + i32.const 101 i32.const 0 call $~lib/env/abort unreachable @@ -2697,7 +2697,7 @@ if i32.const 0 i32.const 192 - i32.const 104 + i32.const 102 i32.const 0 call $~lib/env/abort unreachable @@ -2712,7 +2712,7 @@ if i32.const 0 i32.const 192 - i32.const 105 + i32.const 103 i32.const 0 call $~lib/env/abort unreachable @@ -2727,7 +2727,7 @@ if i32.const 0 i32.const 192 - i32.const 106 + i32.const 104 i32.const 0 call $~lib/env/abort unreachable @@ -2742,7 +2742,7 @@ if i32.const 0 i32.const 192 - i32.const 108 + i32.const 106 i32.const 0 call $~lib/env/abort unreachable @@ -2757,7 +2757,7 @@ if i32.const 0 i32.const 192 - i32.const 109 + i32.const 107 i32.const 0 call $~lib/env/abort unreachable @@ -2777,7 +2777,7 @@ if i32.const 0 i32.const 192 - i32.const 112 + i32.const 110 i32.const 0 call $~lib/env/abort unreachable @@ -2797,7 +2797,7 @@ if i32.const 0 i32.const 192 - i32.const 115 + i32.const 113 i32.const 0 call $~lib/env/abort unreachable @@ -2817,7 +2817,7 @@ if i32.const 0 i32.const 192 - i32.const 118 + i32.const 116 i32.const 0 call $~lib/env/abort unreachable @@ -2837,7 +2837,7 @@ if i32.const 0 i32.const 192 - i32.const 121 + i32.const 119 i32.const 0 call $~lib/env/abort unreachable @@ -2855,7 +2855,7 @@ if i32.const 0 i32.const 192 - i32.const 124 + i32.const 122 i32.const 0 call $~lib/env/abort unreachable @@ -2879,7 +2879,7 @@ if i32.const 0 i32.const 192 - i32.const 127 + i32.const 125 i32.const 0 call $~lib/env/abort unreachable @@ -2903,7 +2903,7 @@ if i32.const 0 i32.const 192 - i32.const 130 + i32.const 128 i32.const 0 call $~lib/env/abort unreachable @@ -2923,7 +2923,7 @@ if i32.const 0 i32.const 192 - i32.const 133 + i32.const 131 i32.const 0 call $~lib/env/abort unreachable @@ -2943,7 +2943,7 @@ if i32.const 0 i32.const 192 - i32.const 136 + i32.const 134 i32.const 0 call $~lib/env/abort unreachable @@ -2963,7 +2963,7 @@ if i32.const 0 i32.const 192 - i32.const 139 + i32.const 137 i32.const 0 call $~lib/env/abort unreachable @@ -2983,7 +2983,7 @@ if i32.const 0 i32.const 192 - i32.const 142 + i32.const 140 i32.const 0 call $~lib/env/abort unreachable @@ -3001,7 +3001,7 @@ if i32.const 0 i32.const 192 - i32.const 145 + i32.const 143 i32.const 0 call $~lib/env/abort unreachable @@ -3023,7 +3023,7 @@ if i32.const 0 i32.const 192 - i32.const 148 + i32.const 146 i32.const 0 call $~lib/env/abort unreachable @@ -3045,7 +3045,7 @@ if i32.const 0 i32.const 192 - i32.const 151 + i32.const 149 i32.const 0 call $~lib/env/abort unreachable @@ -3065,7 +3065,7 @@ if i32.const 0 i32.const 192 - i32.const 154 + i32.const 152 i32.const 0 call $~lib/env/abort unreachable @@ -3085,7 +3085,7 @@ if i32.const 0 i32.const 192 - i32.const 157 + i32.const 155 i32.const 0 call $~lib/env/abort unreachable @@ -3105,7 +3105,7 @@ if i32.const 0 i32.const 192 - i32.const 160 + i32.const 158 i32.const 0 call $~lib/env/abort unreachable @@ -3125,7 +3125,7 @@ if i32.const 0 i32.const 192 - i32.const 163 + i32.const 161 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.json b/tests/compiler/std/date.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/std/date.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index 5f6e1524..44ae296b 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -89,7 +89,7 @@ if i32.const 0 i32.const 48 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -104,7 +104,7 @@ if i32.const 0 i32.const 48 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -131,7 +131,7 @@ if i32.const 0 i32.const 16 - i32.const 3 + i32.const 1 i32.const 0 call $~lib/env/abort unreachable @@ -150,7 +150,7 @@ if i32.const 0 i32.const 16 - i32.const 4 + i32.const 2 i32.const 0 call $~lib/env/abort unreachable @@ -171,7 +171,7 @@ if i32.const 0 i32.const 16 - i32.const 7 + i32.const 5 i32.const 0 call $~lib/env/abort unreachable @@ -183,7 +183,7 @@ if i32.const 0 i32.const 16 - i32.const 9 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable @@ -221,7 +221,7 @@ if i32.const 0 i32.const 16 - i32.const 12 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -240,7 +240,7 @@ if i32.const 0 i32.const 16 - i32.const 14 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.ts b/tests/compiler/std/date.ts index c118d4d4..87ba3a47 100644 --- a/tests/compiler/std/date.ts +++ b/tests/compiler/std/date.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; - assert(Date.UTC(1970, 0, 1) == 0); assert(Date.UTC(1970, 0, 1, 0, 0, 0, 0) == 0); diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index d2d421ff..25d22b7b 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -18,9 +18,9 @@ (elem (i32.const 0) $null) (global $std/date/creationTime (mut i64) (i64.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/date/date (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 80)) @@ -148,7 +148,7 @@ if i32.const 0 i32.const 48 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -165,7 +165,7 @@ if i32.const 0 i32.const 48 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -245,7 +245,7 @@ if i32.const 0 i32.const 16 - i32.const 3 + i32.const 1 i32.const 0 call $~lib/env/abort unreachable @@ -282,7 +282,7 @@ if i32.const 0 i32.const 16 - i32.const 4 + i32.const 2 i32.const 0 call $~lib/env/abort unreachable @@ -321,7 +321,7 @@ if i32.const 0 i32.const 16 - i32.const 7 + i32.const 5 i32.const 0 call $~lib/env/abort unreachable @@ -336,7 +336,7 @@ if i32.const 0 i32.const 16 - i32.const 9 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable @@ -363,7 +363,7 @@ if i32.const 0 i32.const 16 - i32.const 12 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -384,7 +384,7 @@ if i32.const 0 i32.const 16 - i32.const 14 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/gc-array.optimized.wat b/tests/compiler/std/gc-array.optimized.wat deleted file mode 100644 index 1bc556e6..00000000 --- a/tests/compiler/std/gc-array.optimized.wat +++ /dev/null @@ -1,1904 +0,0 @@ -(module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 16) "\01") - (data (i32.const 40) "\02\00\00\00\00\00\00\00\18") - (data (i32.const 64) "\05\00\00\00\00\00\00\00\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 112) "\05\00\00\00\00\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (table $0 7 funcref) - (elem (i32.const 0) $null $~lib/arraybuffer/ArrayBuffer~gc $~lib/array/Array~gc $~lib/collector/itcm/__gc_mark $~lib/arraybuffer/ArrayBuffer~gc $~lib/arraybuffer/ArrayBuffer~gc $~lib/allocator/arena/__memory_free) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $std/gc-array/arr (mut i32) (i32.const 48)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/started (mut i32) (i32.const 0)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (export "main" (func $std/gc-array/main)) - (func $~lib/arraybuffer/ArrayBuffer~gc (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - call $~lib/collector/itcm/__gc_mark - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - local.get $1 - i32.load - i32.const 3 - i32.and - local.get $0 - i32.or - i32.store - local.get $1 - local.get $2 - i32.store offset=4 - local.get $2 - local.get $2 - i32.load - i32.const 3 - i32.and - local.get $1 - i32.or - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/collector/itcm/iter - local.get $0 - i32.eq - if - local.get $0 - i32.load offset=4 - global.set $~lib/collector/itcm/iter - end - local.get $0 - i32.load - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.load offset=4 - local.tee $1 - i32.store offset=4 - local.get $1 - local.get $1 - i32.load - i32.const 3 - i32.and - local.get $2 - i32.or - i32.store - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load - i32.const -4 - i32.and - i32.const 2 - i32.or - i32.store - ) - (func $~lib/collector/itcm/__gc_mark (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - if - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load - i32.const 3 - i32.and - i32.eq - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#makeGray - end - end - ) - (func $~lib/array/Array~gc (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load - local.tee $2 - call $~lib/collector/itcm/__gc_mark - local.get $0 - i32.load offset=4 - i32.const 2 - i32.shl - local.set $0 - loop $continue|0 - local.get $1 - local.get $0 - i32.lt_u - if - local.get $1 - local.get $2 - i32.add - i32.load offset=8 - call $~lib/collector/itcm/__gc_mark - local.get $1 - i32.const 4 - i32.add - local.set $1 - br $continue|0 - end - end - ) - (func $~lib/allocator/arena/__memory_allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.tee $1 - local.get $0 - i32.const 1 - local.get $0 - i32.const 1 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const -8 - i32.and - local.tee $0 - current_memory - local.tee $2 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $2 - local.get $0 - local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $3 - local.get $2 - local.get $3 - i32.gt_s - select - grow_memory - i32.const 0 - i32.lt_s - if - local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - end - local.get $0 - global.set $~lib/allocator/arena/offset - local.get $1 - ) - (func $~lib/allocator/arena/__memory_free (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/collector/itcm/step (; 8 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - if - local.get $0 - i32.const 1 - i32.sub - br_table $case1|0 $case2|0 $case3|0 $break|0 - end - i32.const 16 - call $~lib/allocator/arena/__memory_allocate - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - local.tee $0 - i32.const -1 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - i32.const 16 - call $~lib/allocator/arena/__memory_allocate - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - local.tee $0 - i32.const -1 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - global.get $std/gc-array/arr - i32.const 3 - call_indirect (type $FUNCSIG$vi) - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - end - global.get $~lib/collector/itcm/iter - i32.load - i32.const -4 - i32.and - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - local.get $0 - i32.load - i32.const -4 - i32.and - i32.or - i32.store - i32.const 1 - global.set $~lib/argc - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load offset=8 - call_indirect (type $FUNCSIG$vi) - else - global.get $std/gc-array/arr - i32.const 3 - call_indirect (type $FUNCSIG$vi) - global.get $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/iter - i32.load - i32.const -4 - i32.and - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $0 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $0 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $0 - i32.load - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - end - global.get $~lib/collector/itcm/iter - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - i32.load - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - else - global.get $~lib/collector/itcm/toSpace - local.tee $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - i32.const 1 - global.set $~lib/collector/itcm/state - end - end - ) - (func $~lib/collector/itcm/__gc_collect (; 9 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - i32.eqz - br_if $case1|0 - local.get $0 - i32.const 1 - i32.eq - br_if $case1|0 - br $break|0 - end - call $~lib/collector/itcm/step - end - loop $continue|1 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|1 - end - end - ) - (func $~lib/collector/itcm/__gc_allocate (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - call $~lib/collector/itcm/step - local.get $0 - i32.const 16 - i32.add - call $~lib/allocator/arena/__memory_allocate - local.tee $0 - local.get $1 - i32.store offset=8 - local.get $0 - global.get $~lib/collector/itcm/white - local.get $0 - i32.load - i32.const -4 - i32.and - i32.or - i32.store - global.get $~lib/collector/itcm/fromSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - i32.const 16 - i32.add - ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 120 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - i32.const 1 - i32.const 32 - local.get $0 - i32.const 7 - i32.add - i32.clz - i32.sub - i32.shl - i32.const 6 - call $~lib/collector/itcm/__gc_allocate - local.tee $1 - local.get $0 - i32.store - local.get $1 - ) - (func $~lib/internal/memory/memcpy (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - loop $continue|0 - local.get $1 - i32.const 3 - i32.and - local.get $2 - local.get $2 - select - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|1 - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 8 - i32.add - local.set $0 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - local.get $0 - i32.const 3 - i32.and - local.tee $3 - i32.const 1 - i32.ne - if - local.get $3 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $3 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - local.get $5 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 5 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 9 - i32.add - i32.load - local.tee $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 13 - i32.add - i32.load - local.tee $5 - i32.const 8 - i32.shl - local.get $3 - i32.const 24 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|3 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 2 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - local.get $5 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 6 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 10 - i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 14 - i32.add - i32.load - local.tee $5 - i32.const 16 - i32.shl - local.get $3 - i32.const 16 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 3 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - local.get $5 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 7 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 11 - i32.add - i32.load - local.tee $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 15 - i32.add - i32.load - local.tee $5 - i32.const 24 - i32.shl - local.get $3 - i32.const 8 - i32.shr_u - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - br $continue|5 - end - end - end - end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/internal/memory/memmove (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - i32.eqz - if - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - local.set $3 - end - local.get $3 - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - br $continue|0 - end - end - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $continue|1 - end - end - end - loop $continue|2 - local.get $2 - if - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|3 - end - end - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $2 - i32.const 8 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - br $continue|4 - end - end - end - loop $continue|5 - local.get $2 - if - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - ) - (func $~lib/internal/memory/memset (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $1 - i32.eqz - if - return - end - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $2 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $2 - local.get $0 - i32.add - local.tee $0 - i32.const 0 - i32.store - local.get $1 - local.get $2 - i32.sub - i32.const -4 - i32.and - local.tee $1 - local.get $0 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 16 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 20 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $2 - local.get $0 - i32.add - local.set $0 - local.get $1 - local.get $2 - i32.sub - local.set $1 - loop $continue|0 - local.get $1 - i32.const 32 - i32.ge_u - if - local.get $0 - i64.const 0 - i64.store - local.get $0 - i32.const 8 - i32.add - i64.const 0 - i64.store - local.get $0 - i32.const 16 - i32.add - i64.const 0 - i64.store - local.get $0 - i32.const 24 - i32.add - i64.const 0 - i64.store - local.get $1 - i32.const 32 - i32.sub - local.set $1 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $continue|0 - end - end - ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 - local.get $0 - i32.load - local.tee $2 - i32.gt_s - if - local.get $1 - i32.const 1073741816 - i32.gt_s - if - i32.const 0 - i32.const 120 - i32.const 40 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 1 - i32.const 32 - local.get $2 - i32.const 7 - i32.add - i32.clz - i32.sub - i32.shl - i32.const 8 - i32.sub - i32.le_s - if - local.get $0 - local.get $1 - i32.store - else - local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $3 - i32.const 8 - i32.add - local.get $0 - i32.const 8 - i32.add - local.get $2 - call $~lib/internal/memory/memmove - local.get $3 - local.set $0 - end - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.sub - call $~lib/internal/memory/memset - else - local.get $1 - local.get $2 - i32.lt_s - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 0 - i32.const 120 - i32.const 62 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - i32.store - end - end - local.get $0 - ) - (func $~lib/collector/itcm/__gc_link (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - global.get $~lib/collector/itcm/white - i32.eqz - local.get $0 - i32.const 16 - i32.sub - local.tee $2 - i32.load - i32.const 3 - i32.and - i32.eq - local.tee $0 - if (result i32) - global.get $~lib/collector/itcm/white - local.get $1 - i32.const 16 - i32.sub - i32.load - i32.const 3 - i32.and - i32.eq - else - local.get $0 - end - if - local.get $2 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/array/Array#__set (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - local.get $0 - i32.load - local.tee $3 - i32.load - i32.const 2 - i32.shr_u - i32.ge_u - if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 72 - i32.const 107 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.tee $3 - i32.store - local.get $0 - local.get $4 - i32.store offset=4 - end - local.get $3 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=8 - local.get $0 - local.get $2 - call $~lib/collector/itcm/__gc_link - ) - (func $start:std/gc-array (; 18 ;) (type $FUNCSIG$v) - i32.const 184 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - call $~lib/collector/itcm/__gc_collect - global.get $std/gc-array/arr - i32.const 0 - i32.const 0 - i32.const 4 - call $~lib/collector/itcm/__gc_allocate - call $~lib/array/Array#__set - call $~lib/collector/itcm/__gc_collect - global.get $std/gc-array/arr - i32.const 1 - i32.const 0 - i32.const 4 - call $~lib/collector/itcm/__gc_allocate - call $~lib/array/Array#__set - call $~lib/collector/itcm/__gc_collect - global.get $std/gc-array/arr - i32.const 0 - i32.const 0 - i32.const 4 - call $~lib/collector/itcm/__gc_allocate - call $~lib/array/Array#__set - call $~lib/collector/itcm/__gc_collect - ) - (func $std/gc-array/main (; 19 ;) (type $FUNCSIG$i) (result i32) - global.get $~lib/started - i32.eqz - if - call $start:std/gc-array - i32.const 1 - global.set $~lib/started - end - i32.const 0 - ) - (func $null (; 20 ;) (type $FUNCSIG$v) - nop - ) -) diff --git a/tests/compiler/std/gc-array.untouched.wat b/tests/compiler/std/gc-array.untouched.wat deleted file mode 100644 index ecf4d806..00000000 --- a/tests/compiler/std/gc-array.untouched.wat +++ /dev/null @@ -1,2540 +0,0 @@ -(module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 8) "\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 32) "\00\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\18\00\00\00\00\00\00\00") - (data (i32.const 56) "\00\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 104) "\00\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (table $0 7 funcref) - (elem (i32.const 0) $null $~lib/arraybuffer/ArrayBuffer~gc $~lib/array/Array~gc $~lib/collector/itcm/__gc_mark $std/gc-array/Foo~gc $~lib/string/String~gc $~lib/internal/arraybuffer/__gc) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $std/gc-array/arr (mut i32) (i32.const 48)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 180)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (export "main" (func $std/gc-array/main)) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $~lib/arraybuffer/ArrayBuffer~gc (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - call $~lib/collector/itcm/__gc_mark - ) - (func $~lib/collector/itcm/ManagedObject#get:color (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - i32.const 3 - i32.and - ) - (func $~lib/collector/itcm/ManagedObject#get:next (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - ) - (func $~lib/collector/itcm/ManagedObject#set:next (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 - i32.load - i32.const 3 - i32.and - i32.or - i32.store - ) - (func $~lib/collector/itcm/ManagedObject#unlink (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - local.set $1 - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - local.get $2 - i32.store offset=4 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - local.get $0 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $1 - local.get $2 - i32.store offset=4 - local.get $2 - local.get $1 - call $~lib/collector/itcm/ManagedObject#set:next - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - global.get $~lib/collector/itcm/iter - i32.eq - if - local.get $0 - i32.load offset=4 - global.set $~lib/collector/itcm/iter - end - local.get $0 - call $~lib/collector/itcm/ManagedObject#unlink - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - i32.const 2 - i32.or - i32.store - ) - (func $~lib/collector/itcm/__gc_mark (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - local.get $0 - if - block $~lib/collector/itcm/refToObj|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 16 - i32.sub - end - local.set $1 - local.get $1 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - if - local.get $1 - call $~lib/collector/itcm/ManagedObject#makeGray - end - end - ) - (func $~lib/array/Array~gc (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load - local.set $1 - local.get $1 - call $~lib/collector/itcm/__gc_mark - i32.const 0 - local.set $2 - local.get $0 - i32.load offset=4 - i32.const 2 - i32.shl - local.set $3 - block $break|0 - loop $continue|0 - local.get $2 - local.get $3 - i32.lt_u - if - block - local.get $1 - local.get $2 - i32.add - i32.load offset=8 - call $~lib/collector/itcm/__gc_mark - local.get $2 - i32.const 4 - i32.add - local.set $2 - end - br $continue|0 - end - end - end - ) - (func $~lib/allocator/arena/__memory_allocate (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 - local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const 65535 - i32.const -1 - i32.xor - i32.and - i32.const 16 - i32.shr_u - local.set $2 - local.get $5 - local.tee $3 - local.get $2 - local.tee $6 - local.get $3 - local.get $6 - i32.gt_s - select - local.set $3 - local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - local.get $2 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 - ) - (func $~lib/collector/itcm/ManagedObjectList#clear (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - ) - (func $~lib/collector/itcm/ManagedObject#set:color (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.get $1 - i32.or - i32.store - ) - (func $~lib/allocator/arena/__memory_free (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/collector/itcm/step (; 15 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - block $case0|0 - global.get $~lib/collector/itcm/state - local.set $1 - local.get $1 - i32.const 0 - i32.eq - br_if $case0|0 - local.get $1 - i32.const 1 - i32.eq - br_if $case1|0 - local.get $1 - i32.const 2 - i32.eq - br_if $case2|0 - local.get $1 - i32.const 3 - i32.eq - br_if $case3|0 - br $break|0 - end - block - block $~lib/memory/memory.allocate|inlined.0 (result i32) - i32.const 16 - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - i32.const -1 - i32.store offset=8 - global.get $~lib/collector/itcm/fromSpace - call $~lib/collector/itcm/ManagedObjectList#clear - block $~lib/memory/memory.allocate|inlined.1 (result i32) - i32.const 16 - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.1 - end - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - i32.const -1 - i32.store offset=8 - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - end - block - i32.const 3 - call $~iterateRoots - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - unreachable - end - unreachable - end - block - global.get $~lib/collector/itcm/iter - call $~lib/collector/itcm/ManagedObject#get:next - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - call $~lib/collector/itcm/ManagedObject#set:color - i32.const 1 - global.set $~lib/argc - block $~lib/collector/itcm/objToRef|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - i32.const 16 - i32.add - end - local.get $0 - i32.load offset=8 - call_indirect (type $FUNCSIG$vi) - else - i32.const 3 - call $~iterateRoots - global.get $~lib/collector/itcm/iter - call $~lib/collector/itcm/ManagedObject#get:next - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $1 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $1 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $1 - call $~lib/collector/itcm/ManagedObject#get:next - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - unreachable - end - unreachable - end - block - global.get $~lib/collector/itcm/iter - local.set $0 - local.get $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#get:next - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/memory/HEAP_BASE - i32.ge_u - if - block $~lib/memory/memory.free|inlined.0 - local.get $0 - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.0 - end - end - else - global.get $~lib/collector/itcm/toSpace - call $~lib/collector/itcm/ManagedObjectList#clear - i32.const 1 - global.set $~lib/collector/itcm/state - end - br $break|0 - unreachable - end - unreachable - end - ) - (func $~lib/collector/itcm/__gc_collect (; 16 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case1|0 - block $case0|0 - global.get $~lib/collector/itcm/state - local.set $0 - local.get $0 - i32.const 0 - i32.eq - br_if $case0|0 - local.get $0 - i32.const 1 - i32.eq - br_if $case1|0 - br $break|0 - end - end - call $~lib/collector/itcm/step - end - block $break|1 - loop $continue|1 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|1 - end - end - end - ) - (func $~lib/gc/gc.collect (; 17 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/__gc_collect - return - ) - (func $~lib/collector/itcm/__gc_allocate (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741824 - i32.const 16 - i32.sub - i32.gt_u - if - unreachable - end - call $~lib/collector/itcm/step - block $~lib/memory/memory.allocate|inlined.2 (result i32) - i32.const 16 - local.get $0 - i32.add - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.2 - end - local.set $3 - local.get $3 - local.get $1 - i32.store offset=8 - local.get $3 - global.get $~lib/collector/itcm/white - call $~lib/collector/itcm/ManagedObject#set:color - global.get $~lib/collector/itcm/fromSpace - local.get $3 - call $~lib/collector/itcm/ManagedObjectList#push - block $~lib/collector/itcm/objToRef|inlined.1 (result i32) - local.get $3 - local.set $2 - local.get $2 - i32.const 16 - i32.add - end - ) - (func $std/gc-array/Foo~gc (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - call $~lib/collector/itcm/__gc_mark - ) - (func $~lib/string/String~gc (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - call $~lib/collector/itcm/__gc_mark - ) - (func $~lib/internal/arraybuffer/computeSize (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - i32.const 32 - local.get $0 - i32.const 8 - i32.add - i32.const 1 - i32.sub - i32.clz - i32.sub - i32.shl - ) - (func $~lib/internal/arraybuffer/__gc (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - call $~lib/internal/arraybuffer/computeSize - i32.const 6 - call $~lib/collector/itcm/__gc_allocate - local.set $1 - local.get $1 - local.get $0 - i32.store - local.get $1 - ) - (func $~lib/internal/memory/memcpy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $break|0 - loop $continue|0 - local.get $2 - if (result i32) - local.get $1 - i32.const 3 - i32.and - else - local.get $2 - end - if - block - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|0 - end - end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - block $break|1 - loop $continue|1 - local.get $2 - i32.const 16 - i32.ge_u - if - block - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 12 - i32.add - i32.load - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|1 - end - end - end - local.get $2 - i32.const 8 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - i32.load - i32.store - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - local.get $2 - i32.const 4 - i32.and - if - local.get $0 - local.get $1 - i32.load - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 4 - i32.add - local.set $1 - end - local.get $2 - i32.const 2 - i32.and - if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - return - end - local.get $2 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 - block $case0|2 - local.get $0 - i32.const 3 - i32.and - local.set $5 - local.get $5 - i32.const 1 - i32.eq - br_if $case0|2 - local.get $5 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $5 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 3 - i32.sub - local.set $2 - block $break|3 - loop $continue|3 - local.get $2 - i32.const 17 - i32.ge_u - if - block - local.get $1 - i32.const 1 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 5 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 9 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 24 - i32.shr_u - local.get $4 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 13 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 24 - i32.shr_u - local.get $3 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|3 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 2 - i32.sub - local.set $2 - block $break|4 - loop $continue|4 - local.get $2 - i32.const 18 - i32.ge_u - if - block - local.get $1 - i32.const 2 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 6 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 10 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 16 - i32.shr_u - local.get $4 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 14 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|4 - end - end - end - br $break|2 - unreachable - end - unreachable - end - block - local.get $1 - i32.load - local.set $3 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block $break|5 - loop $continue|5 - local.get $2 - i32.const 19 - i32.ge_u - if - block - local.get $1 - i32.const 3 - i32.add - i32.load - local.set $4 - local.get $0 - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 7 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 11 - i32.add - i32.load - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $3 - i32.const 8 - i32.shr_u - local.get $4 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 15 - i32.add - i32.load - local.set $3 - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $1 - i32.const 16 - i32.add - local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.sub - local.set $2 - end - br $continue|5 - end - end - end - br $break|2 - unreachable - end - unreachable - end - end - local.get $2 - i32.const 16 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 8 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 4 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 2 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 - end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 - end - i32.load8_u - i32.store8 - end - ) - (func $~lib/internal/memory/memmove (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - end - i32.load8_u - i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - end - br $continue|1 - end - end - end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 - end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 - end - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - end - br $continue|2 - end - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - end - br $continue|3 - end - end - end - block $break|4 - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 - end - end - end - end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end - end - end - end - ) - (func $~lib/internal/memory/memset (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i64) - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u - local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $5 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - end - br $continue|0 - end - end - end - ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.gt_s - if - local.get $1 - i32.const 1073741816 - i32.le_s - i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 40 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - local.get $2 - call $~lib/internal/arraybuffer/computeSize - i32.const 8 - i32.sub - i32.le_s - if - local.get $0 - local.get $1 - i32.store - else - local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.copy|inlined.0 - local.get $3 - i32.const 8 - i32.add - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memmove - end - local.get $3 - local.set $0 - end - block $~lib/memory/memory.fill|inlined.0 - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.add - local.set $3 - i32.const 0 - local.set $6 - local.get $1 - local.get $2 - i32.sub - local.set $5 - local.get $3 - local.get $6 - local.get $5 - call $~lib/internal/memory/memset - end - else - local.get $1 - local.get $2 - i32.lt_s - if - local.get $1 - i32.const 0 - i32.ge_s - i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 62 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - i32.store - end - end - local.get $0 - ) - (func $~lib/collector/itcm/__gc_link (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - block $~lib/collector/itcm/refToObj|inlined.1 (result i32) - local.get $0 - local.set $2 - local.get $2 - i32.const 16 - i32.sub - end - local.set $3 - local.get $3 - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eqz - i32.eq - local.tee $2 - if (result i32) - block $~lib/collector/itcm/refToObj|inlined.3 (result i32) - local.get $1 - local.set $2 - local.get $2 - i32.const 16 - i32.sub - end - call $~lib/collector/itcm/ManagedObject#get:color - global.get $~lib/collector/itcm/white - i32.eq - else - local.get $2 - end - if - local.get $3 - call $~lib/collector/itcm/ManagedObject#makeGray - end - ) - (func $~lib/array/Array#__set (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 - i32.load - local.set $3 - local.get $3 - i32.load - i32.const 2 - i32.shr_u - local.set $4 - local.get $1 - local.get $4 - i32.ge_u - if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 72 - i32.const 107 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $3 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $3 - local.get $0 - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $3 - local.set $5 - local.get $1 - local.set $6 - local.get $2 - local.set $7 - i32.const 0 - local.set $8 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - local.get $7 - i32.store offset=8 - end - local.get $0 - local.get $2 - call $~lib/collector/itcm/__gc_link - ) - (func $start:std/gc-array (; 30 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - (local $2 i32) - call $start:~lib/allocator/arena - call $~lib/gc/gc.collect - global.get $std/gc-array/arr - i32.const 0 - block (result i32) - i32.const 0 - i32.const 4 - call $~lib/collector/itcm/__gc_allocate - local.set $0 - local.get $0 - end - call $~lib/array/Array#__set - call $~lib/gc/gc.collect - global.get $std/gc-array/arr - i32.const 1 - block (result i32) - i32.const 0 - i32.const 4 - call $~lib/collector/itcm/__gc_allocate - local.set $1 - local.get $1 - end - call $~lib/array/Array#__set - call $~lib/gc/gc.collect - global.get $std/gc-array/arr - i32.const 0 - block (result i32) - i32.const 0 - i32.const 4 - call $~lib/collector/itcm/__gc_allocate - local.set $2 - local.get $2 - end - call $~lib/array/Array#__set - call $~lib/gc/gc.collect - ) - (func $std/gc-array/main (; 31 ;) (type $FUNCSIG$i) (result i32) - global.get $~lib/started - i32.eqz - if - call $start - i32.const 1 - global.set $~lib/started - end - i32.const 0 - ) - (func $start (; 32 ;) (type $FUNCSIG$v) - call $start:std/gc-array - ) - (func $null (; 33 ;) (type $FUNCSIG$v) - ) - (func $~iterateRoots (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) - global.get $std/gc-array/arr - local.get $0 - call_indirect (type $FUNCSIG$vi) - ) -) diff --git a/tests/compiler/std/gc-basics.optimized.wat b/tests/compiler/std/gc-basics.optimized.wat deleted file mode 100644 index 15b10695..00000000 --- a/tests/compiler/std/gc-basics.optimized.wat +++ /dev/null @@ -1,481 +0,0 @@ -(module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 16) "\03\00\00\00\00\00\00\00\10\00\00\00s\00t\00d\00/\00g\00c\00-\00b\00a\00s\00i\00c\00s\00.\00t\00s") - (table $0 4 funcref) - (elem (i32.const 0) $null $std/gc-basics/MyObject_visit $~lib/collector/itcm/__gc_mark $~lib/string/String~gc) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $std/gc-basics/obj (mut i32) (i32.const 0)) - (global $std/gc-basics/obj2 (mut i32) (i32.const 0)) - (global $~lib/started (mut i32) (i32.const 0)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (export "main" (func $std/gc-basics/main)) - (func $std/gc-basics/MyObject_visit (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.tee $1 - local.get $0 - i32.const 1 - local.get $0 - i32.const 1 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const -8 - i32.and - local.tee $0 - current_memory - local.tee $2 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $2 - local.get $0 - local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $3 - local.get $2 - local.get $3 - i32.gt_s - select - grow_memory - i32.const 0 - i32.lt_s - if - local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - end - local.get $0 - global.set $~lib/allocator/arena/offset - local.get $1 - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - local.get $1 - i32.load - i32.const 3 - i32.and - local.get $0 - i32.or - i32.store - local.get $1 - local.get $2 - i32.store offset=4 - local.get $2 - local.get $2 - i32.load - i32.const 3 - i32.and - local.get $1 - i32.or - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/collector/itcm/iter - local.get $0 - i32.eq - if - local.get $0 - i32.load offset=4 - global.set $~lib/collector/itcm/iter - end - local.get $0 - i32.load - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.load offset=4 - local.tee $1 - i32.store offset=4 - local.get $1 - local.get $1 - i32.load - i32.const 3 - i32.and - local.get $2 - i32.or - i32.store - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load - i32.const -4 - i32.and - i32.const 2 - i32.or - i32.store - ) - (func $~lib/collector/itcm/__gc_mark (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - if - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load - i32.const 3 - i32.and - i32.eq - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#makeGray - end - end - ) - (func $~lib/collector/itcm/step (; 6 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - if - local.get $0 - i32.const 1 - i32.sub - br_table $case1|0 $case2|0 $case3|0 $break|0 - end - i32.const 16 - call $~lib/allocator/arena/__memory_allocate - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - local.tee $0 - i32.const -1 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - i32.const 16 - call $~lib/allocator/arena/__memory_allocate - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - local.tee $0 - i32.const -1 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - global.get $std/gc-basics/obj - i32.const 2 - call_indirect (type $FUNCSIG$vi) - global.get $std/gc-basics/obj2 - i32.const 2 - call_indirect (type $FUNCSIG$vi) - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - end - global.get $~lib/collector/itcm/iter - i32.load - i32.const -4 - i32.and - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - local.get $0 - i32.load - i32.const -4 - i32.and - i32.or - i32.store - i32.const 1 - global.set $~lib/argc - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load offset=8 - call_indirect (type $FUNCSIG$vi) - else - global.get $std/gc-basics/obj - i32.const 2 - call_indirect (type $FUNCSIG$vi) - global.get $std/gc-basics/obj2 - i32.const 2 - call_indirect (type $FUNCSIG$vi) - global.get $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/iter - i32.load - i32.const -4 - i32.and - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $0 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $0 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $0 - i32.load - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - end - global.get $~lib/collector/itcm/iter - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - i32.load - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - else - global.get $~lib/collector/itcm/toSpace - local.tee $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - i32.const 1 - global.set $~lib/collector/itcm/state - end - end - ) - (func $~lib/collector/itcm/__gc_allocate (; 7 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - call $~lib/collector/itcm/step - i32.const 20 - call $~lib/allocator/arena/__memory_allocate - local.tee $0 - i32.const 1 - i32.store offset=8 - local.get $0 - global.get $~lib/collector/itcm/white - local.get $0 - i32.load - i32.const -4 - i32.and - i32.or - i32.store - global.get $~lib/collector/itcm/fromSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - i32.const 16 - i32.add - ) - (func $~lib/string/String~gc (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - call $~lib/collector/itcm/__gc_mark - ) - (func $~lib/collector/itcm/__gc_collect (; 9 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - i32.eqz - br_if $case1|0 - local.get $0 - i32.const 1 - i32.eq - br_if $case1|0 - br $break|0 - end - call $~lib/collector/itcm/step - end - loop $continue|1 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|1 - end - end - ) - (func $start:std/gc-basics (; 10 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 64 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - call $~lib/collector/itcm/__gc_allocate - global.set $std/gc-basics/obj - global.get $std/gc-basics/obj - local.tee $0 - i32.const 123 - i32.store - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load offset=4 - local.set $2 - block (result i32) - local.get $0 - i32.load - i32.const -4 - i32.and - local.tee $3 - i32.const 0 - i32.ne - local.tee $1 - if - local.get $2 - i32.const 0 - i32.ne - local.set $1 - end - local.get $1 - end - if (result i32) - local.get $2 - local.get $3 - i32.eq - else - local.get $1 - end - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 19 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 24 - i32.const 21 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=12 - if - i32.const 0 - i32.const 24 - i32.const 23 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=16 - i32.const 123 - i32.ne - if - i32.const 0 - i32.const 24 - i32.const 25 - i32.const 2 - call $~lib/env/abort - unreachable - end - call $~lib/collector/itcm/__gc_collect - i32.const 0 - global.set $std/gc-basics/obj - call $~lib/collector/itcm/__gc_collect - ) - (func $std/gc-basics/main (; 11 ;) (type $FUNCSIG$i) (result i32) - global.get $~lib/started - i32.eqz - if - call $start:std/gc-basics - i32.const 1 - global.set $~lib/started - end - i32.const 0 - ) - (func $null (; 12 ;) (type $FUNCSIG$v) - nop - ) -) diff --git a/tests/compiler/std/gc-object.optimized.wat b/tests/compiler/std/gc-object.optimized.wat deleted file mode 100644 index dff104f0..00000000 --- a/tests/compiler/std/gc-object.optimized.wat +++ /dev/null @@ -1,437 +0,0 @@ -(module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$i (func (result i32))) - (memory $0 0) - (table $0 4 funcref) - (elem (i32.const 0) $null $~lib/collector/itcm/__gc_mark $std/gc-object/Base~gc $std/gc-object/Custom~gc) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/white (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0)) - (global $~lib/collector/itcm/iter (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $std/gc-object/obj (mut i32) (i32.const 0)) - (global $~lib/started (mut i32) (i32.const 0)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (export "main" (func $std/gc-object/main)) - (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.tee $1 - local.get $0 - i32.const 1 - local.get $0 - i32.const 1 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const -8 - i32.and - local.tee $0 - current_memory - local.tee $2 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $2 - local.get $0 - local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $3 - local.get $2 - local.get $3 - i32.gt_s - select - grow_memory - i32.const 0 - i32.lt_s - if - local.get $3 - grow_memory - i32.const 0 - i32.lt_s - if - unreachable - end - end - end - local.get $0 - global.set $~lib/allocator/arena/offset - local.get $1 - ) - (func $~lib/collector/itcm/ManagedObjectList#push (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - local.get $1 - i32.load - i32.const 3 - i32.and - local.get $0 - i32.or - i32.store - local.get $1 - local.get $2 - i32.store offset=4 - local.get $2 - local.get $2 - i32.load - i32.const 3 - i32.and - local.get $1 - i32.or - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $~lib/collector/itcm/ManagedObject#makeGray (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/collector/itcm/iter - local.get $0 - i32.eq - if - local.get $0 - i32.load offset=4 - global.set $~lib/collector/itcm/iter - end - local.get $0 - i32.load - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.load offset=4 - local.tee $1 - i32.store offset=4 - local.get $1 - local.get $1 - i32.load - i32.const 3 - i32.and - local.get $2 - i32.or - i32.store - global.get $~lib/collector/itcm/toSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - local.get $0 - i32.load - i32.const -4 - i32.and - i32.const 2 - i32.or - i32.store - ) - (func $~lib/collector/itcm/__gc_mark (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - if - global.get $~lib/collector/itcm/white - local.get $0 - i32.const 16 - i32.sub - local.tee $0 - i32.load - i32.const 3 - i32.and - i32.eq - if - local.get $0 - call $~lib/collector/itcm/ManagedObject#makeGray - end - end - ) - (func $~lib/collector/itcm/step (; 4 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case3|0 - block $case2|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - if - local.get $0 - i32.const 1 - i32.sub - br_table $case1|0 $case2|0 $case3|0 $break|0 - end - i32.const 16 - call $~lib/allocator/arena/__memory_allocate - global.set $~lib/collector/itcm/fromSpace - global.get $~lib/collector/itcm/fromSpace - local.tee $0 - i32.const -1 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - i32.const 16 - call $~lib/allocator/arena/__memory_allocate - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/toSpace - local.tee $0 - i32.const -1 - i32.store offset=8 - local.get $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/iter - i32.const 1 - global.set $~lib/collector/itcm/state - end - global.get $std/gc-object/obj - i32.const 1 - call_indirect (type $FUNCSIG$vi) - i32.const 2 - global.set $~lib/collector/itcm/state - br $break|0 - end - global.get $~lib/collector/itcm/iter - i32.load - i32.const -4 - i32.and - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - global.set $~lib/collector/itcm/iter - local.get $0 - global.get $~lib/collector/itcm/white - i32.eqz - local.get $0 - i32.load - i32.const -4 - i32.and - i32.or - i32.store - i32.const 1 - global.set $~lib/argc - local.get $0 - i32.const 16 - i32.add - local.get $0 - i32.load offset=8 - call_indirect (type $FUNCSIG$vi) - else - global.get $std/gc-object/obj - i32.const 1 - call_indirect (type $FUNCSIG$vi) - global.get $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/iter - i32.load - i32.const -4 - i32.and - i32.eq - if - global.get $~lib/collector/itcm/fromSpace - local.set $0 - global.get $~lib/collector/itcm/toSpace - global.set $~lib/collector/itcm/fromSpace - local.get $0 - global.set $~lib/collector/itcm/toSpace - global.get $~lib/collector/itcm/white - i32.eqz - global.set $~lib/collector/itcm/white - local.get $0 - i32.load - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - i32.const 3 - global.set $~lib/collector/itcm/state - end - end - br $break|0 - end - global.get $~lib/collector/itcm/iter - local.tee $0 - global.get $~lib/collector/itcm/toSpace - i32.ne - if - local.get $0 - i32.load - i32.const -4 - i32.and - global.set $~lib/collector/itcm/iter - else - global.get $~lib/collector/itcm/toSpace - local.tee $0 - local.get $0 - i32.store - local.get $0 - local.get $0 - i32.store offset=4 - i32.const 1 - global.set $~lib/collector/itcm/state - end - end - ) - (func $~lib/collector/itcm/__gc_allocate (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - call $~lib/collector/itcm/step - local.get $0 - i32.const 16 - i32.add - call $~lib/allocator/arena/__memory_allocate - local.tee $0 - local.get $1 - i32.store offset=8 - local.get $0 - global.get $~lib/collector/itcm/white - local.get $0 - i32.load - i32.const -4 - i32.and - i32.or - i32.store - global.get $~lib/collector/itcm/fromSpace - local.get $0 - call $~lib/collector/itcm/ManagedObjectList#push - local.get $0 - i32.const 16 - i32.add - ) - (func $std/gc-object/Base~gc (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - call $~lib/collector/itcm/__gc_mark - ) - (func $std/gc-object/Custom~gc (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.eqz - if - return - end - local.get $0 - i32.const 2 - call_indirect (type $FUNCSIG$vi) - local.get $0 - i32.load - call $~lib/collector/itcm/__gc_mark - local.get $0 - i32.load offset=4 - call $~lib/collector/itcm/__gc_mark - ) - (func $std/gc-object/Custom#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - i32.const 8 - i32.const 3 - call $~lib/collector/itcm/__gc_allocate - local.tee $0 - i32.eqz - if - i32.const 0 - i32.const 2 - call $~lib/collector/itcm/__gc_allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - ) - (func $~lib/collector/itcm/__gc_collect (; 9 ;) (type $FUNCSIG$v) - (local $0 i32) - block $break|0 - block $case1|0 - global.get $~lib/collector/itcm/state - local.tee $0 - i32.eqz - br_if $case1|0 - local.get $0 - i32.const 1 - i32.eq - br_if $case1|0 - br $break|0 - end - call $~lib/collector/itcm/step - end - loop $continue|1 - global.get $~lib/collector/itcm/state - i32.const 1 - i32.ne - if - call $~lib/collector/itcm/step - br $continue|1 - end - end - ) - (func $start:std/gc-object (; 10 ;) (type $FUNCSIG$v) - (local $0 i32) - i32.const 8 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - call $std/gc-object/Custom#constructor - global.set $std/gc-object/obj - call $~lib/collector/itcm/__gc_collect - global.get $std/gc-object/obj - local.tee $0 - local.get $0 - i32.store - call $~lib/collector/itcm/__gc_collect - i32.const 0 - global.set $std/gc-object/obj - call $~lib/collector/itcm/__gc_collect - ) - (func $std/gc-object/main (; 11 ;) (type $FUNCSIG$v) - global.get $~lib/started - i32.eqz - if - call $start:std/gc-object - i32.const 1 - global.set $~lib/started - end - ) - (func $null (; 12 ;) (type $FUNCSIG$v) - nop - ) -) diff --git a/tests/compiler/std/hash.json b/tests/compiler/std/hash.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/std/hash.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/hash.untouched.wat b/tests/compiler/std/hash.untouched.wat index 10f7f92f..554280c0 100644 --- a/tests/compiler/std/hash.untouched.wat +++ b/tests/compiler/std/hash.untouched.wat @@ -10,7 +10,6 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/memory/HEAP_BASE i32 (i32.const 64)) (export "memory" (memory $0)) (export "table" (table $0)) diff --git a/tests/compiler/std/libm.json b/tests/compiler/std/libm.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/std/libm.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/map.json b/tests/compiler/std/map.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/std/map.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index f026b941..cab77e67 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -155,7 +155,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -170,7 +170,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -850,7 +850,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -872,7 +872,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -891,7 +891,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -912,7 +912,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -931,7 +931,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -950,7 +950,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -972,7 +972,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -991,7 +991,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -1012,7 +1012,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -1031,7 +1031,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -1050,7 +1050,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -1064,7 +1064,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -1085,7 +1085,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -1103,7 +1103,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -1125,7 +1125,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -1139,7 +1139,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -1160,7 +1160,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -1172,7 +1172,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -1527,7 +1527,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -1547,7 +1547,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -1564,7 +1564,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -1585,7 +1585,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -1604,7 +1604,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -1621,7 +1621,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -1641,7 +1641,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -1658,7 +1658,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -1679,7 +1679,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -1698,7 +1698,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -1715,7 +1715,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -1729,7 +1729,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -1750,7 +1750,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -1768,7 +1768,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -1788,7 +1788,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -1802,7 +1802,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -1823,7 +1823,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -1835,7 +1835,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -2288,7 +2288,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -2310,7 +2310,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -2329,7 +2329,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -2350,7 +2350,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -2369,7 +2369,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -2388,7 +2388,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -2410,7 +2410,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -2429,7 +2429,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -2450,7 +2450,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -2469,7 +2469,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -2488,7 +2488,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -2502,7 +2502,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -2523,7 +2523,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -2541,7 +2541,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -2563,7 +2563,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -2577,7 +2577,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -2598,7 +2598,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -2610,7 +2610,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -3010,7 +3010,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -3030,7 +3030,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -3047,7 +3047,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -3068,7 +3068,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -3087,7 +3087,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -3104,7 +3104,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -3124,7 +3124,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -3141,7 +3141,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -3162,7 +3162,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -3181,7 +3181,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -3198,7 +3198,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -3212,7 +3212,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -3233,7 +3233,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -3251,7 +3251,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -3271,7 +3271,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -3285,7 +3285,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -3306,7 +3306,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -3318,7 +3318,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -3722,7 +3722,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -3740,7 +3740,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -3755,7 +3755,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -3776,7 +3776,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -3795,7 +3795,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -3810,7 +3810,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -3828,7 +3828,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -3843,7 +3843,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -3864,7 +3864,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -3883,7 +3883,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -3898,7 +3898,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -3912,7 +3912,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -3933,7 +3933,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -3951,7 +3951,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -3969,7 +3969,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -3983,7 +3983,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -4004,7 +4004,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -4016,7 +4016,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -4066,7 +4066,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -4084,7 +4084,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -4099,7 +4099,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -4120,7 +4120,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -4139,7 +4139,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -4154,7 +4154,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -4172,7 +4172,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -4187,7 +4187,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -4208,7 +4208,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -4227,7 +4227,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -4242,7 +4242,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -4256,7 +4256,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -4277,7 +4277,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -4295,7 +4295,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -4313,7 +4313,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -4327,7 +4327,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -4348,7 +4348,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -4360,7 +4360,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -4835,7 +4835,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -4854,7 +4854,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -4870,7 +4870,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -4891,7 +4891,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -4910,7 +4910,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -4926,7 +4926,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -4945,7 +4945,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -4961,7 +4961,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -4982,7 +4982,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -5001,7 +5001,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -5017,7 +5017,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -5031,7 +5031,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -5052,7 +5052,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -5070,7 +5070,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -5089,7 +5089,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -5103,7 +5103,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -5124,7 +5124,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -5136,7 +5136,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -5186,7 +5186,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -5205,7 +5205,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -5221,7 +5221,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -5242,7 +5242,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -5261,7 +5261,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -5277,7 +5277,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -5296,7 +5296,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -5312,7 +5312,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -5333,7 +5333,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -5352,7 +5352,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -5368,7 +5368,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -5382,7 +5382,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -5403,7 +5403,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -5421,7 +5421,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -5440,7 +5440,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -5454,7 +5454,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -5475,7 +5475,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -5487,7 +5487,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -5866,7 +5866,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -5885,7 +5885,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -5901,7 +5901,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -5922,7 +5922,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -5941,7 +5941,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -5957,7 +5957,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -5976,7 +5976,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -5992,7 +5992,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -6013,7 +6013,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -6032,7 +6032,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -6048,7 +6048,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -6062,7 +6062,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -6083,7 +6083,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -6101,7 +6101,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -6120,7 +6120,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -6134,7 +6134,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -6155,7 +6155,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -6167,7 +6167,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -6546,7 +6546,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -6565,7 +6565,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -6581,7 +6581,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -6602,7 +6602,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -6621,7 +6621,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -6637,7 +6637,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -6656,7 +6656,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -6672,7 +6672,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -6693,7 +6693,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -6712,7 +6712,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -6728,7 +6728,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -6742,7 +6742,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -6763,7 +6763,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -6781,7 +6781,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -6800,7 +6800,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -6814,7 +6814,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -6835,7 +6835,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -6847,7 +6847,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/map.ts b/tests/compiler/std/map.ts index bcf018b3..fed0f646 100644 --- a/tests/compiler/std/map.ts +++ b/tests/compiler/std/map.ts @@ -1,4 +1,3 @@ -import "allocator/arena"; import "collector/dummy"; function testNumeric(): void { diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index 2aa29238..2172de8f 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -25,9 +25,9 @@ (table $0 23 funcref) (elem (i32.const 0) $null $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/string/String~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate $~lib/map/Map~iterate) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) @@ -187,7 +187,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -204,7 +204,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -1112,7 +1112,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -1134,7 +1134,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -1154,7 +1154,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -1177,7 +1177,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -1199,7 +1199,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -1219,7 +1219,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -1241,7 +1241,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -1261,7 +1261,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -1284,7 +1284,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -1306,7 +1306,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -1326,7 +1326,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -1343,7 +1343,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -1366,7 +1366,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -1389,7 +1389,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -1411,7 +1411,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -1428,7 +1428,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -1451,7 +1451,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -1466,7 +1466,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -2069,7 +2069,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -2089,7 +2089,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -2107,7 +2107,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -2130,7 +2130,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -2152,7 +2152,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -2170,7 +2170,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -2190,7 +2190,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -2208,7 +2208,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -2231,7 +2231,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -2253,7 +2253,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -2271,7 +2271,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -2288,7 +2288,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -2311,7 +2311,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -2334,7 +2334,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -2354,7 +2354,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -2371,7 +2371,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -2394,7 +2394,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -2409,7 +2409,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -3044,7 +3044,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -3066,7 +3066,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -3086,7 +3086,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -3109,7 +3109,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -3131,7 +3131,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -3151,7 +3151,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -3173,7 +3173,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -3193,7 +3193,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -3216,7 +3216,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -3238,7 +3238,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -3258,7 +3258,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -3275,7 +3275,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -3298,7 +3298,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -3321,7 +3321,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -3343,7 +3343,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -3360,7 +3360,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -3383,7 +3383,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -3398,7 +3398,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -4001,7 +4001,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -4021,7 +4021,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -4039,7 +4039,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -4062,7 +4062,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -4084,7 +4084,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -4102,7 +4102,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -4122,7 +4122,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -4140,7 +4140,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -4163,7 +4163,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -4185,7 +4185,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -4203,7 +4203,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -4220,7 +4220,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -4243,7 +4243,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -4266,7 +4266,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -4286,7 +4286,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -4303,7 +4303,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -4326,7 +4326,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -4341,7 +4341,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -4976,7 +4976,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -4994,7 +4994,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -5010,7 +5010,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -5033,7 +5033,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -5055,7 +5055,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -5071,7 +5071,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -5089,7 +5089,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -5105,7 +5105,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -5128,7 +5128,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -5150,7 +5150,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -5166,7 +5166,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -5183,7 +5183,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -5206,7 +5206,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -5229,7 +5229,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -5247,7 +5247,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -5264,7 +5264,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -5287,7 +5287,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -5302,7 +5302,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -5895,7 +5895,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -5913,7 +5913,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -5929,7 +5929,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -5952,7 +5952,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -5974,7 +5974,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -5990,7 +5990,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -6008,7 +6008,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -6024,7 +6024,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -6047,7 +6047,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -6069,7 +6069,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -6085,7 +6085,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -6102,7 +6102,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -6125,7 +6125,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -6148,7 +6148,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -6166,7 +6166,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -6183,7 +6183,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -6206,7 +6206,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -6221,7 +6221,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -6905,7 +6905,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -6924,7 +6924,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -6941,7 +6941,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -6964,7 +6964,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -6986,7 +6986,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -7003,7 +7003,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -7022,7 +7022,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -7039,7 +7039,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -7062,7 +7062,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -7084,7 +7084,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -7101,7 +7101,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -7118,7 +7118,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -7141,7 +7141,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -7164,7 +7164,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -7183,7 +7183,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -7200,7 +7200,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -7223,7 +7223,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -7238,7 +7238,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -7834,7 +7834,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -7853,7 +7853,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -7870,7 +7870,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -7893,7 +7893,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -7915,7 +7915,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -7932,7 +7932,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -7951,7 +7951,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -7968,7 +7968,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -7991,7 +7991,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -8013,7 +8013,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -8030,7 +8030,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -8047,7 +8047,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -8070,7 +8070,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -8093,7 +8093,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -8112,7 +8112,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -8129,7 +8129,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -8152,7 +8152,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -8167,7 +8167,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -8768,7 +8768,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -8787,7 +8787,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -8804,7 +8804,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -8827,7 +8827,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -8849,7 +8849,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -8866,7 +8866,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -8885,7 +8885,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -8902,7 +8902,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -8925,7 +8925,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -8947,7 +8947,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -8964,7 +8964,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -8981,7 +8981,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -9004,7 +9004,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -9027,7 +9027,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -9046,7 +9046,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -9063,7 +9063,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -9086,7 +9086,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -9101,7 +9101,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -9702,7 +9702,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -9721,7 +9721,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -9738,7 +9738,7 @@ if i32.const 0 i32.const 128 - i32.const 12 + i32.const 11 i32.const 4 call $~lib/env/abort unreachable @@ -9761,7 +9761,7 @@ if i32.const 0 i32.const 128 - i32.const 14 + i32.const 13 i32.const 2 call $~lib/env/abort unreachable @@ -9783,7 +9783,7 @@ if i32.const 0 i32.const 128 - i32.const 18 + i32.const 17 i32.const 4 call $~lib/env/abort unreachable @@ -9800,7 +9800,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -9819,7 +9819,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 4 call $~lib/env/abort unreachable @@ -9836,7 +9836,7 @@ if i32.const 0 i32.const 128 - i32.const 22 + i32.const 21 i32.const 4 call $~lib/env/abort unreachable @@ -9859,7 +9859,7 @@ if i32.const 0 i32.const 128 - i32.const 24 + i32.const 23 i32.const 2 call $~lib/env/abort unreachable @@ -9881,7 +9881,7 @@ if i32.const 0 i32.const 128 - i32.const 28 + i32.const 27 i32.const 4 call $~lib/env/abort unreachable @@ -9898,7 +9898,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 4 call $~lib/env/abort unreachable @@ -9915,7 +9915,7 @@ if i32.const 0 i32.const 128 - i32.const 31 + i32.const 30 i32.const 4 call $~lib/env/abort unreachable @@ -9938,7 +9938,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 2 call $~lib/env/abort unreachable @@ -9961,7 +9961,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -9980,7 +9980,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 4 call $~lib/env/abort unreachable @@ -9997,7 +9997,7 @@ if i32.const 0 i32.const 128 - i32.const 41 + i32.const 40 i32.const 4 call $~lib/env/abort unreachable @@ -10020,7 +10020,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -10035,7 +10035,7 @@ if i32.const 0 i32.const 128 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/math.json b/tests/compiler/std/math.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/std/math.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/math.untouched.wat b/tests/compiler/std/math.untouched.wat index 7762cdf4..8c642299 100644 --- a/tests/compiler/std/math.untouched.wat +++ b/tests/compiler/std/math.untouched.wat @@ -91,8 +91,6 @@ (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/math/rempio2f_y (mut f64) (f64.const 0)) (global $~lib/math/PIO2_TABLE i32 (i32.const 88)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/builtins/f32.MAX_VALUE f32 (f32.const 3402823466385288598117041e14)) (global $~lib/builtins/f64.MIN_VALUE f64 (f64.const 5e-324)) (global $~lib/math/random_seeded (mut i32) (i32.const 0)) diff --git a/tests/compiler/std/mod.json b/tests/compiler/std/mod.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/std/mod.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/new.json b/tests/compiler/std/new.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/std/new.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index ac0c4944..45fa3ebd 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -84,7 +84,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -99,7 +99,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/new.ts b/tests/compiler/std/new.ts index 92f356eb..2eecae5e 100644 --- a/tests/compiler/std/new.ts +++ b/tests/compiler/std/new.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; - class AClass { static aStaticField: i32 = 0; aField: i32 = 1; diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index 13b327ae..81e5b86f 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -11,9 +11,9 @@ (elem (i32.const 0) $null) (global $std/new/AClass.aStaticField (mut i32) (i32.const 0)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/new/aClass (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) @@ -141,7 +141,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/object-literal.json b/tests/compiler/std/object-literal.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/std/object-literal.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat similarity index 69% rename from tests/compiler/object-literal.optimized.wat rename to tests/compiler/std/object-literal.optimized.wat index 19722400..25b1184b 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -1,22 +1,31 @@ (module + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\16\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d") - (data (i32.const 40) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 80) "\01\00\00\00\"\00\00\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\01\00\00\00\16") + (data (i32.const 24) "h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d") + (data (i32.const 48) "\01\00\00\00\1e") + (data (i32.const 64) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 96) "\01\00\00\00*") + (data (i32.const 112) "s\00t\00d\00/\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") + (table $0 4 funcref) + (elem (i32.const 0) $null $~lib/string/String~iterate $std/object-literal/Foo~iterate $~lib/string/String~iterate) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -78,12 +87,12 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const 1 i32.const 32 local.get $0 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub @@ -96,24 +105,40 @@ local.get $0 i32.store offset=4 local.get $1 - i32.const 8 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 16 i32.add ) - (func $~lib/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/object-literal/Foo~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=4 + local.tee $0 + if + local.get $0 + local.get $1 + call_indirect (type $FUNCSIG$vi) + end + ) + (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 - i32.const 124 + i32.const 156 i32.le_u if i32.const 0 - i32.const 48 - i32.const 149 + i32.const 64 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.const 8 + i32.const 16 i32.sub local.tee $2 i32.load @@ -121,8 +146,8 @@ i32.ne if i32.const 0 - i32.const 48 - i32.const 151 + i32.const 64 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -132,10 +157,10 @@ i32.store local.get $0 ) - (func $~lib/util/string/compareImpl (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/compareImpl (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 16 + i32.const 24 local.set $2 loop $continue|0 local.get $1 @@ -168,10 +193,10 @@ end local.get $3 ) - (func $~lib/string/String.__eq (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String.__eq (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 16 + i32.const 24 i32.eq if i32.const 1 @@ -191,7 +216,7 @@ return end local.get $0 - i32.const 8 + i32.const 16 i32.sub i32.load offset=4 i32.const 1 @@ -211,14 +236,14 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $object-literal/bar (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/object-literal/bar (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 1 i32.ne if i32.const 0 - i32.const 88 + i32.const 112 i32.const 9 i32.const 2 call $~lib/env/abort @@ -230,16 +255,16 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 112 i32.const 10 i32.const 2 call $~lib/env/abort unreachable end ) - (func $start:object-literal (; 7 ;) (type $FUNCSIG$v) + (func $start:std/object-literal (; 9 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 128 + i32.const 160 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -251,10 +276,10 @@ i32.const 1 i32.store local.get $0 - i32.const 16 + i32.const 24 i32.store offset=4 local.get $0 - call $object-literal/bar + call $std/object-literal/bar i32.const 4 call $~lib/runtime/allocate i32.const 3 @@ -268,7 +293,7 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 112 i32.const 26 i32.const 2 call $~lib/env/abort @@ -287,17 +312,17 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 112 i32.const 21 i32.const 4 call $~lib/env/abort unreachable end ) - (func $start (; 8 ;) (type $FUNCSIG$v) - call $start:object-literal + (func $start (; 10 ;) (type $FUNCSIG$v) + call $start:std/object-literal ) - (func $null (; 9 ;) (type $FUNCSIG$v) + (func $null (; 11 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/object-literal.ts b/tests/compiler/std/object-literal.ts similarity index 93% rename from tests/compiler/object-literal.ts rename to tests/compiler/std/object-literal.ts index e9682c10..3a5b8b46 100644 --- a/tests/compiler/object-literal.ts +++ b/tests/compiler/std/object-literal.ts @@ -1,4 +1,4 @@ -import "allocator/arena"; +import "collector/dummy"; class Foo { bar: i32; diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/std/object-literal.untouched.wat similarity index 67% rename from tests/compiler/object-literal.untouched.wat rename to tests/compiler/std/object-literal.untouched.wat index de5a7b21..89c4fa6f 100644 --- a/tests/compiler/object-literal.untouched.wat +++ b/tests/compiler/std/object-literal.untouched.wat @@ -1,27 +1,33 @@ (module + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00\16\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d\00") - (data (i32.const 40) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 80) "\01\00\00\00\"\00\00\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") - (table $0 1 funcref) - (elem (i32.const 0) $null) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (data (i32.const 8) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d\00") + (data (i32.const 48) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 96) "\01\00\00\00*\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") + (table $0 4 funcref) + (elem (i32.const 0) $null $~lib/string/String~iterate $std/object-literal/Foo~iterate $std/object-literal/Foo2~iterate) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 124)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 156)) + (global $~lib/capabilities i32 (i32.const 2)) (export "memory" (memory $0)) (export "table" (table $0)) + (export ".capabilities" (global $~lib/capabilities)) (start $start) - (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String~iterate (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -33,7 +39,7 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -112,12 +118,12 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -130,10 +136,33 @@ local.get $0 i32.store offset=4 local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/object-literal/Foo~iterate (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $2 + if + local.get $2 + local.get $1 + call_indirect (type $FUNCSIG$vi) + local.get $2 + local.get $1 + call $~lib/string/String~iterate + end + ) + (func $~lib/collector/dummy/__ref_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -141,8 +170,8 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 149 + i32.const 64 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -158,8 +187,8 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 151 + i32.const 64 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -168,8 +197,10 @@ local.get $1 i32.store local.get $0 + call $~lib/collector/dummy/__ref_register + local.get $0 ) - (func $~lib/string/String#get:length (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -177,7 +208,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 7 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (func $~lib/util/string/compareImpl (; 10 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) (local $5 i32) (local $6 i32) (local $7 i32) @@ -230,7 +261,7 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -274,7 +305,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $object-literal/bar (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/object-literal/bar (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 1 @@ -282,7 +313,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 112 i32.const 9 i32.const 2 call $~lib/env/abort @@ -290,19 +321,22 @@ end local.get $0 i32.load offset=4 - i32.const 16 + i32.const 24 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 88 + i32.const 112 i32.const 10 i32.const 2 call $~lib/env/abort unreachable end ) - (func $object-literal/bar2 (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/object-literal/Foo2~iterate (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + ) + (func $std/object-literal/bar2 (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 2 @@ -310,14 +344,14 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 112 i32.const 26 i32.const 2 call $~lib/env/abort unreachable end ) - (func $object-literal/Foo2#test (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/object-literal/Foo2#test (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.load i32.const 3 @@ -325,14 +359,14 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 112 i32.const 21 i32.const 4 call $~lib/env/abort unreachable end ) - (func $start:object-literal (; 12 ;) (type $FUNCSIG$v) + (func $start:std/object-literal (; 16 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -356,11 +390,11 @@ i32.const 1 i32.store local.get $0 - i32.const 16 + i32.const 24 i32.store offset=4 local.get $0 end - call $object-literal/bar + call $std/object-literal/bar block (result i32) i32.const 4 call $~lib/runtime/allocate @@ -372,7 +406,7 @@ i32.store local.get $1 end - call $object-literal/bar2 + call $std/object-literal/bar2 block (result i32) i32.const 4 call $~lib/runtime/allocate @@ -384,11 +418,11 @@ i32.store local.get $2 end - call $object-literal/Foo2#test + call $std/object-literal/Foo2#test ) - (func $start (; 13 ;) (type $FUNCSIG$v) - call $start:object-literal + (func $start (; 17 ;) (type $FUNCSIG$v) + call $start:std/object-literal ) - (func $null (; 14 ;) (type $FUNCSIG$v) + (func $null (; 18 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/operator-overloading.json b/tests/compiler/std/operator-overloading.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/std/operator-overloading.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 2d42564e..2fa1f405 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -167,7 +167,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -182,7 +182,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -1310,7 +1310,7 @@ if i32.const 0 i32.const 56 - i32.const 147 + i32.const 145 i32.const 0 call $~lib/env/abort unreachable @@ -1353,7 +1353,7 @@ if i32.const 0 i32.const 56 - i32.const 153 + i32.const 151 i32.const 0 call $~lib/env/abort unreachable @@ -1397,7 +1397,7 @@ if i32.const 0 i32.const 56 - i32.const 159 + i32.const 157 i32.const 0 call $~lib/env/abort unreachable @@ -1441,7 +1441,7 @@ if i32.const 0 i32.const 56 - i32.const 165 + i32.const 163 i32.const 0 call $~lib/env/abort unreachable @@ -1484,7 +1484,7 @@ if i32.const 0 i32.const 56 - i32.const 171 + i32.const 169 i32.const 0 call $~lib/env/abort unreachable @@ -1518,7 +1518,7 @@ if i32.const 0 i32.const 56 - i32.const 177 + i32.const 175 i32.const 0 call $~lib/env/abort unreachable @@ -1562,7 +1562,7 @@ if i32.const 0 i32.const 56 - i32.const 183 + i32.const 181 i32.const 0 call $~lib/env/abort unreachable @@ -1606,7 +1606,7 @@ if i32.const 0 i32.const 56 - i32.const 189 + i32.const 187 i32.const 0 call $~lib/env/abort unreachable @@ -1650,7 +1650,7 @@ if i32.const 0 i32.const 56 - i32.const 195 + i32.const 193 i32.const 0 call $~lib/env/abort unreachable @@ -1687,7 +1687,7 @@ if i32.const 0 i32.const 56 - i32.const 201 + i32.const 199 i32.const 0 call $~lib/env/abort unreachable @@ -1722,7 +1722,7 @@ if i32.const 0 i32.const 56 - i32.const 207 + i32.const 205 i32.const 0 call $~lib/env/abort unreachable @@ -1749,7 +1749,7 @@ if i32.const 0 i32.const 56 - i32.const 211 + i32.const 209 i32.const 0 call $~lib/env/abort unreachable @@ -1778,7 +1778,7 @@ if i32.const 0 i32.const 56 - i32.const 215 + i32.const 213 i32.const 0 call $~lib/env/abort unreachable @@ -1815,7 +1815,7 @@ if i32.const 0 i32.const 56 - i32.const 221 + i32.const 219 i32.const 0 call $~lib/env/abort unreachable @@ -1852,7 +1852,7 @@ if i32.const 0 i32.const 56 - i32.const 227 + i32.const 225 i32.const 0 call $~lib/env/abort unreachable @@ -1889,7 +1889,7 @@ if i32.const 0 i32.const 56 - i32.const 233 + i32.const 231 i32.const 0 call $~lib/env/abort unreachable @@ -1926,7 +1926,7 @@ if i32.const 0 i32.const 56 - i32.const 239 + i32.const 237 i32.const 0 call $~lib/env/abort unreachable @@ -1963,7 +1963,7 @@ if i32.const 0 i32.const 56 - i32.const 244 + i32.const 242 i32.const 0 call $~lib/env/abort unreachable @@ -2000,7 +2000,7 @@ if i32.const 0 i32.const 56 - i32.const 249 + i32.const 247 i32.const 0 call $~lib/env/abort unreachable @@ -2037,7 +2037,7 @@ if i32.const 0 i32.const 56 - i32.const 254 + i32.const 252 i32.const 0 call $~lib/env/abort unreachable @@ -2072,7 +2072,7 @@ if i32.const 0 i32.const 56 - i32.const 259 + i32.const 257 i32.const 0 call $~lib/env/abort unreachable @@ -2115,7 +2115,7 @@ if i32.const 0 i32.const 56 - i32.const 264 + i32.const 262 i32.const 0 call $~lib/env/abort unreachable @@ -2158,7 +2158,7 @@ if i32.const 0 i32.const 56 - i32.const 269 + i32.const 267 i32.const 0 call $~lib/env/abort unreachable @@ -2198,7 +2198,7 @@ if i32.const 0 i32.const 56 - i32.const 274 + i32.const 272 i32.const 0 call $~lib/env/abort unreachable @@ -2209,7 +2209,7 @@ if i32.const 0 i32.const 56 - i32.const 275 + i32.const 273 i32.const 0 call $~lib/env/abort unreachable @@ -2250,7 +2250,7 @@ if i32.const 0 i32.const 56 - i32.const 281 + i32.const 279 i32.const 0 call $~lib/env/abort unreachable @@ -2286,7 +2286,7 @@ if i32.const 0 i32.const 56 - i32.const 284 + i32.const 282 i32.const 0 call $~lib/env/abort unreachable @@ -2324,7 +2324,7 @@ if i32.const 0 i32.const 56 - i32.const 289 + i32.const 287 i32.const 0 call $~lib/env/abort unreachable @@ -2346,7 +2346,7 @@ if i32.const 0 i32.const 56 - i32.const 290 + i32.const 288 i32.const 0 call $~lib/env/abort unreachable @@ -2381,7 +2381,7 @@ if i32.const 0 i32.const 56 - i32.const 293 + i32.const 291 i32.const 0 call $~lib/env/abort unreachable @@ -2402,7 +2402,7 @@ if i32.const 0 i32.const 56 - i32.const 294 + i32.const 292 i32.const 0 call $~lib/env/abort unreachable @@ -2457,7 +2457,7 @@ if i32.const 0 i32.const 56 - i32.const 314 + i32.const 312 i32.const 0 call $~lib/env/abort unreachable @@ -2512,7 +2512,7 @@ if i32.const 0 i32.const 56 - i32.const 334 + i32.const 332 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.ts b/tests/compiler/std/operator-overloading.ts index d2098158..d8cca19a 100644 --- a/tests/compiler/std/operator-overloading.ts +++ b/tests/compiler/std/operator-overloading.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; - class Tester { constructor(public x: i32, public y: i32) { } diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 23756cc7..9b9d0a42 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -13,9 +13,9 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/operator-overloading/a1 (mut i32) (i32.const 0)) (global $std/operator-overloading/a2 (mut i32) (i32.const 0)) @@ -209,7 +209,7 @@ if i32.const 0 i32.const 16 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -226,7 +226,7 @@ if i32.const 0 i32.const 16 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -1889,7 +1889,7 @@ if i32.const 0 i32.const 56 - i32.const 147 + i32.const 145 i32.const 0 call $~lib/env/abort unreachable @@ -1925,7 +1925,7 @@ if i32.const 0 i32.const 56 - i32.const 153 + i32.const 151 i32.const 0 call $~lib/env/abort unreachable @@ -1961,7 +1961,7 @@ if i32.const 0 i32.const 56 - i32.const 159 + i32.const 157 i32.const 0 call $~lib/env/abort unreachable @@ -1997,7 +1997,7 @@ if i32.const 0 i32.const 56 - i32.const 165 + i32.const 163 i32.const 0 call $~lib/env/abort unreachable @@ -2033,7 +2033,7 @@ if i32.const 0 i32.const 56 - i32.const 171 + i32.const 169 i32.const 0 call $~lib/env/abort unreachable @@ -2069,7 +2069,7 @@ if i32.const 0 i32.const 56 - i32.const 177 + i32.const 175 i32.const 0 call $~lib/env/abort unreachable @@ -2105,7 +2105,7 @@ if i32.const 0 i32.const 56 - i32.const 183 + i32.const 181 i32.const 0 call $~lib/env/abort unreachable @@ -2141,7 +2141,7 @@ if i32.const 0 i32.const 56 - i32.const 189 + i32.const 187 i32.const 0 call $~lib/env/abort unreachable @@ -2177,7 +2177,7 @@ if i32.const 0 i32.const 56 - i32.const 195 + i32.const 193 i32.const 0 call $~lib/env/abort unreachable @@ -2203,7 +2203,7 @@ if i32.const 0 i32.const 56 - i32.const 201 + i32.const 199 i32.const 0 call $~lib/env/abort unreachable @@ -2229,7 +2229,7 @@ if i32.const 0 i32.const 56 - i32.const 207 + i32.const 205 i32.const 0 call $~lib/env/abort unreachable @@ -2245,7 +2245,7 @@ if i32.const 0 i32.const 56 - i32.const 211 + i32.const 209 i32.const 0 call $~lib/env/abort unreachable @@ -2261,7 +2261,7 @@ if i32.const 0 i32.const 56 - i32.const 215 + i32.const 213 i32.const 0 call $~lib/env/abort unreachable @@ -2287,7 +2287,7 @@ if i32.const 0 i32.const 56 - i32.const 221 + i32.const 219 i32.const 0 call $~lib/env/abort unreachable @@ -2313,7 +2313,7 @@ if i32.const 0 i32.const 56 - i32.const 227 + i32.const 225 i32.const 0 call $~lib/env/abort unreachable @@ -2339,7 +2339,7 @@ if i32.const 0 i32.const 56 - i32.const 233 + i32.const 231 i32.const 0 call $~lib/env/abort unreachable @@ -2365,7 +2365,7 @@ if i32.const 0 i32.const 56 - i32.const 239 + i32.const 237 i32.const 0 call $~lib/env/abort unreachable @@ -2396,7 +2396,7 @@ if i32.const 0 i32.const 56 - i32.const 244 + i32.const 242 i32.const 0 call $~lib/env/abort unreachable @@ -2427,7 +2427,7 @@ if i32.const 0 i32.const 56 - i32.const 249 + i32.const 247 i32.const 0 call $~lib/env/abort unreachable @@ -2458,7 +2458,7 @@ if i32.const 0 i32.const 56 - i32.const 254 + i32.const 252 i32.const 0 call $~lib/env/abort unreachable @@ -2490,7 +2490,7 @@ if i32.const 0 i32.const 56 - i32.const 259 + i32.const 257 i32.const 0 call $~lib/env/abort unreachable @@ -2526,7 +2526,7 @@ if i32.const 0 i32.const 56 - i32.const 264 + i32.const 262 i32.const 0 call $~lib/env/abort unreachable @@ -2562,7 +2562,7 @@ if i32.const 0 i32.const 56 - i32.const 269 + i32.const 267 i32.const 0 call $~lib/env/abort unreachable @@ -2592,7 +2592,7 @@ if i32.const 0 i32.const 56 - i32.const 274 + i32.const 272 i32.const 0 call $~lib/env/abort unreachable @@ -2604,7 +2604,7 @@ if i32.const 0 i32.const 56 - i32.const 275 + i32.const 273 i32.const 0 call $~lib/env/abort unreachable @@ -2634,7 +2634,7 @@ if i32.const 0 i32.const 56 - i32.const 281 + i32.const 279 i32.const 0 call $~lib/env/abort unreachable @@ -2659,7 +2659,7 @@ if i32.const 0 i32.const 56 - i32.const 284 + i32.const 282 i32.const 0 call $~lib/env/abort unreachable @@ -2694,7 +2694,7 @@ if i32.const 0 i32.const 56 - i32.const 289 + i32.const 287 i32.const 0 call $~lib/env/abort unreachable @@ -2716,7 +2716,7 @@ if i32.const 0 i32.const 56 - i32.const 290 + i32.const 288 i32.const 0 call $~lib/env/abort unreachable @@ -2746,7 +2746,7 @@ if i32.const 0 i32.const 56 - i32.const 293 + i32.const 291 i32.const 0 call $~lib/env/abort unreachable @@ -2768,7 +2768,7 @@ if i32.const 0 i32.const 56 - i32.const 294 + i32.const 292 i32.const 0 call $~lib/env/abort unreachable @@ -2834,7 +2834,7 @@ if i32.const 0 i32.const 56 - i32.const 314 + i32.const 312 i32.const 0 call $~lib/env/abort unreachable @@ -2900,7 +2900,7 @@ if i32.const 0 i32.const 56 - i32.const 334 + i32.const 332 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/pointer.json b/tests/compiler/std/pointer.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/std/pointer.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/polyfills.json b/tests/compiler/std/polyfills.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/std/polyfills.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/runtime.json b/tests/compiler/std/runtime.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/std/runtime.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index edd65d22..49bc79fa 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -1,35 +1,35 @@ (module - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$v (func)) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00,") - (data (i32.const 24) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") - (data (i32.const 72) "\01\00\00\00\1c") - (data (i32.const 88) "s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") - (data (i32.const 120) "\01\00\00\00\10") - (data (i32.const 136) "b\00a\00r\00r\00i\00e\00r\001") - (data (i32.const 152) "\01\00\00\00\10") - (data (i32.const 168) "b\00a\00r\00r\00i\00e\00r\002") - (data (i32.const 184) "\01\00\00\00\10") - (data (i32.const 200) "b\00a\00r\00r\00i\00e\00r\003") - (data (i32.const 216) "\01\00\00\00\1e") + (data (i32.const 8) "\03\00\00\00\1c") + (data (i32.const 24) "s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 56) "\03\00\00\00\10") + (data (i32.const 72) "b\00a\00r\00r\00i\00e\00r\001") + (data (i32.const 88) "\03\00\00\00\10") + (data (i32.const 104) "b\00a\00r\00r\00i\00e\00r\002") + (data (i32.const 120) "\03\00\00\00\10") + (data (i32.const 136) "b\00a\00r\00r\00i\00e\00r\003") + (data (i32.const 152) "\03\00\00\00,") + (data (i32.const 168) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 216) "\03\00\00\00\1e") (data (i32.const 232) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 4 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/string/String~iterate $~lib/string/String~iterate) - (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (elem (i32.const 0) $null $std/runtime/A~iterate $std/runtime/A~iterate $std/runtime/A~iterate) (global $std/runtime/register_ref (mut i32) (i32.const 0)) (global $std/runtime/barrier1 (mut i32) (i32.const 0)) (global $std/runtime/barrier2 (mut i32) (i32.const 0)) (global $std/runtime/barrier3 (mut i32) (i32.const 0)) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (global $std/runtime/ref1 (mut i32) (i32.const 0)) (global $std/runtime/header1 (mut i32) (i32.const 0)) (global $std/runtime/ref2 (mut i32) (i32.const 0)) @@ -44,7 +44,7 @@ (export "table" (table $0)) (export "main" (func $std/runtime/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/string/String~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/runtime/A~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) (func $~lib/allocator/tlsf/Root#setSLMap (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -53,8 +53,8 @@ i32.ge_u if i32.const 0 - i32.const 24 - i32.const 135 + i32.const 168 + i32.const 159 i32.const 4 call $~lib/env/abort unreachable @@ -73,8 +73,8 @@ i32.ge_u if i32.const 0 - i32.const 24 - i32.const 158 + i32.const 168 + i32.const 184 i32.const 4 call $~lib/env/abort unreachable @@ -84,8 +84,8 @@ i32.ge_u if i32.const 0 - i32.const 24 - i32.const 159 + i32.const 168 + i32.const 185 i32.const 4 call $~lib/env/abort unreachable @@ -110,8 +110,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 81 + i32.const 168 + i32.const 104 i32.const 4 call $~lib/env/abort unreachable @@ -128,8 +128,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 82 + i32.const 168 + i32.const 105 i32.const 11 call $~lib/env/abort unreachable @@ -141,8 +141,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 419 + i32.const 168 + i32.const 447 i32.const 2 call $~lib/env/abort unreachable @@ -158,8 +158,8 @@ i32.ge_u if i32.const 0 - i32.const 24 - i32.const 149 + i32.const 168 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable @@ -169,8 +169,8 @@ i32.ge_u if i32.const 0 - i32.const 24 - i32.const 150 + i32.const 168 + i32.const 176 i32.const 4 call $~lib/env/abort unreachable @@ -192,8 +192,8 @@ i32.ge_u if i32.const 0 - i32.const 24 - i32.const 129 + i32.const 168 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -218,8 +218,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 249 + i32.const 168 + i32.const 277 i32.const 4 call $~lib/env/abort unreachable @@ -241,8 +241,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 251 + i32.const 168 + i32.const 279 i32.const 4 call $~lib/env/abort unreachable @@ -342,8 +342,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 73 + i32.const 168 + i32.const 96 i32.const 4 call $~lib/env/abort unreachable @@ -356,8 +356,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 74 + i32.const 168 + i32.const 97 i32.const 11 call $~lib/env/abort unreachable @@ -372,8 +372,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 325 + i32.const 168 + i32.const 353 i32.const 4 call $~lib/env/abort unreachable @@ -384,8 +384,8 @@ i32.ne if i32.const 0 - i32.const 24 - i32.const 326 + i32.const 168 + i32.const 354 i32.const 4 call $~lib/env/abort unreachable @@ -397,8 +397,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 327 + i32.const 168 + i32.const 355 i32.const 4 call $~lib/env/abort unreachable @@ -418,8 +418,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 180 + i32.const 168 + i32.const 208 i32.const 4 call $~lib/env/abort unreachable @@ -432,8 +432,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 182 + i32.const 168 + i32.const 210 i32.const 4 call $~lib/env/abort unreachable @@ -456,8 +456,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 184 + i32.const 168 + i32.const 212 i32.const 4 call $~lib/env/abort unreachable @@ -468,8 +468,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 188 + i32.const 168 + i32.const 216 i32.const 23 call $~lib/env/abort unreachable @@ -509,8 +509,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 202 + i32.const 168 + i32.const 230 i32.const 24 call $~lib/env/abort unreachable @@ -523,8 +523,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 204 + i32.const 168 + i32.const 232 i32.const 6 call $~lib/env/abort unreachable @@ -568,8 +568,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 217 + i32.const 168 + i32.const 245 i32.const 4 call $~lib/env/abort unreachable @@ -647,8 +647,8 @@ i32.gt_u if i32.const 0 - i32.const 24 - i32.const 368 + i32.const 168 + i32.const 396 i32.const 4 call $~lib/env/abort unreachable @@ -658,8 +658,8 @@ i32.and if i32.const 0 - i32.const 24 - i32.const 369 + i32.const 168 + i32.const 397 i32.const 4 call $~lib/env/abort unreachable @@ -669,8 +669,8 @@ i32.and if i32.const 0 - i32.const 24 - i32.const 370 + i32.const 168 + i32.const 398 i32.const 4 call $~lib/env/abort unreachable @@ -686,8 +686,8 @@ i32.lt_u if i32.const 0 - i32.const 24 - i32.const 375 + i32.const 168 + i32.const 403 i32.const 6 call $~lib/env/abort unreachable @@ -714,8 +714,8 @@ i32.lt_u if i32.const 0 - i32.const 24 - i32.const 384 + i32.const 168 + i32.const 412 i32.const 6 call $~lib/env/abort unreachable @@ -767,8 +767,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 413 + i32.const 168 + i32.const 441 i32.const 2 call $~lib/env/abort unreachable @@ -793,8 +793,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 287 + i32.const 168 + i32.const 315 i32.const 4 call $~lib/env/abort unreachable @@ -872,8 +872,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 314 + i32.const 168 + i32.const 342 i32.const 16 call $~lib/env/abort unreachable @@ -899,8 +899,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 339 + i32.const 168 + i32.const 367 i32.const 4 call $~lib/env/abort unreachable @@ -919,8 +919,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 340 + i32.const 168 + i32.const 368 i32.const 4 call $~lib/env/abort unreachable @@ -930,8 +930,8 @@ i32.and if i32.const 0 - i32.const 24 - i32.const 341 + i32.const 168 + i32.const 369 i32.const 4 call $~lib/env/abort unreachable @@ -982,8 +982,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 359 + i32.const 168 + i32.const 387 i32.const 25 call $~lib/env/abort unreachable @@ -1143,8 +1143,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 472 + i32.const 168 + i32.const 502 i32.const 12 call $~lib/env/abort unreachable @@ -1158,8 +1158,8 @@ i32.lt_u if i32.const 0 - i32.const 24 - i32.const 475 + i32.const 168 + i32.const 505 i32.const 2 call $~lib/env/abort unreachable @@ -2467,8 +2467,8 @@ i32.and if i32.const 0 - i32.const 24 - i32.const 488 + i32.const 168 + i32.const 518 i32.const 6 call $~lib/env/abort unreachable @@ -2563,7 +2563,7 @@ if i32.const 0 i32.const 232 - i32.const 113 + i32.const 117 i32.const 8 call $~lib/env/abort unreachable @@ -2600,7 +2600,7 @@ if i32.const 0 i32.const 232 - i32.const 173 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -2615,7 +2615,7 @@ if i32.const 0 i32.const 232 - i32.const 175 + i32.const 179 i32.const 4 call $~lib/env/abort unreachable @@ -2631,7 +2631,7 @@ if i32.const 0 i32.const 232 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -2646,13 +2646,13 @@ if i32.const 0 i32.const 232 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable end local.get $1 - i32.const 2 + i32.const 1 i32.store local.get $0 global.set $std/runtime/register_ref @@ -2696,7 +2696,7 @@ br $repeat|0 else i32.const 0 - i32.const 88 + i32.const 24 i32.const 36 i32.const 2 call $~lib/env/abort @@ -2767,7 +2767,7 @@ br $continue|2 end end - i32.const 136 + i32.const 72 i32.const 1 global.get $std/runtime/barrier1 f64.convert_i32_u @@ -2776,7 +2776,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 168 + i32.const 104 i32.const 1 global.get $std/runtime/barrier2 f64.convert_i32_u @@ -2785,7 +2785,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 200 + i32.const 136 i32.const 1 global.get $std/runtime/barrier3 f64.convert_i32_u @@ -2807,7 +2807,7 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 24 i32.const 51 i32.const 0 call $~lib/env/abort @@ -2819,7 +2819,7 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 24 i32.const 52 i32.const 0 call $~lib/env/abort @@ -2833,7 +2833,7 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 24 i32.const 53 i32.const 0 call $~lib/env/abort @@ -2845,7 +2845,7 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 24 i32.const 54 i32.const 0 call $~lib/env/abort @@ -2860,7 +2860,7 @@ i32.eq if i32.const 0 - i32.const 88 + i32.const 24 i32.const 56 i32.const 0 call $~lib/env/abort @@ -2876,7 +2876,7 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 24 i32.const 58 i32.const 0 call $~lib/env/abort @@ -2892,7 +2892,7 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 24 i32.const 61 i32.const 0 call $~lib/env/abort @@ -2908,7 +2908,7 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 24 i32.const 65 i32.const 0 call $~lib/env/abort @@ -2920,11 +2920,11 @@ global.set $std/runtime/header4 global.get $std/runtime/header4 i32.load - i32.const 2 + i32.const 1 i32.ne if i32.const 0 - i32.const 88 + i32.const 24 i32.const 67 i32.const 0 call $~lib/env/abort @@ -2936,7 +2936,7 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 24 i32.const 68 i32.const 0 call $~lib/env/abort @@ -2953,7 +2953,7 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 24 i32.const 71 i32.const 0 call $~lib/env/abort @@ -2969,7 +2969,7 @@ i32.ne if i32.const 0 - i32.const 88 + i32.const 24 i32.const 72 i32.const 0 call $~lib/env/abort diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 7f2f7fa6..0bf3b556 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -1,49 +1,49 @@ (module - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$v (func)) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\01\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") - (data (i32.const 72) "\01\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") - (data (i32.const 120) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\001\00") - (data (i32.const 152) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\002\00") - (data (i32.const 184) "\01\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\003\00") - (data (i32.const 216) "\01\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 8) "\03\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 56) "\03\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\001\00") + (data (i32.const 88) "\03\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\002\00") + (data (i32.const 120) "\03\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\003\00") + (data (i32.const 152) "\03\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") + (data (i32.const 216) "\03\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 4 funcref) - (elem (i32.const 0) $null $~lib/string/String~iterate $std/runtime/A~iterate $std/runtime/B~iterate) - (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) - (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) - (global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8)) - (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) - (global $~lib/allocator/tlsf/FL_BITS i32 (i32.const 22)) - (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) - (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) - (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) - (global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8)) - (global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16)) - (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) - (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) - (global $~lib/allocator/tlsf/Root.SL_END i32 (i32.const 92)) - (global $~lib/allocator/tlsf/Root.HL_START i32 (i32.const 96)) - (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) - (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) - (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (elem (i32.const 0) $null $std/runtime/A~iterate $std/runtime/B~iterate $~lib/string/String~iterate) (global $std/runtime/register_ref (mut i32) (i32.const 0)) (global $std/runtime/link_ref (mut i32) (i32.const 0)) (global $std/runtime/link_parentRef (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) (global $std/runtime/barrier1 (mut i32) (i32.const 0)) (global $std/runtime/barrier2 (mut i32) (i32.const 0)) (global $std/runtime/barrier3 (mut i32) (i32.const 0)) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) + (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) + (global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8)) + (global $~lib/allocator/tlsf/FL_BITS i32 (i32.const 22)) + (global $~lib/allocator/tlsf/Root.SL_END i32 (i32.const 92)) + (global $~lib/allocator/tlsf/Root.HL_START i32 (i32.const 96)) + (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) + (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) + (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) + (global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8)) + (global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16)) + (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) + (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) + (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) + (global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824)) + (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $std/runtime/ref1 (mut i32) (i32.const 0)) (global $std/runtime/header1 (mut i32) (i32.const 0)) (global $std/runtime/ref2 (mut i32) (i32.const 0)) @@ -60,30 +60,14 @@ (export "table" (table $0)) (export "main" (func $std/runtime/main)) (export ".capabilities" (global $~lib/capabilities)) - (func $~lib/string/String~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/runtime/A~iterate (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + ) + (func $std/runtime/B~iterate (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + ) + (func $~lib/string/String~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) ) - (func $start:~lib/allocator/tlsf (; 3 ;) (type $FUNCSIG$v) - i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS - i32.shl - i32.const 32 - i32.le_s - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 114 - i32.const 0 - call $~lib/env/abort - unreachable - end - ) - (func $std/runtime/A~iterate (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - ) - (func $std/runtime/B~iterate (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - ) - (func $~lib/runtime/ADJUSTOBLOCK (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 @@ -95,7 +79,7 @@ i32.sub i32.shl ) - (func $std/runtime/isPowerOf2 (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/runtime/isPowerOf2 (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 0 @@ -113,20 +97,20 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/Root#set:tailRef (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) i32.const 0 local.get $1 i32.store offset=2912 ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u i32.eqz if i32.const 0 - i32.const 24 - i32.const 135 + i32.const 168 + i32.const 159 i32.const 4 call $~lib/env/abort unreachable @@ -139,15 +123,15 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 10 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 9 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u i32.eqz if i32.const 0 - i32.const 24 - i32.const 158 + i32.const 168 + i32.const 184 i32.const 4 call $~lib/env/abort unreachable @@ -158,8 +142,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 159 + i32.const 168 + i32.const 185 i32.const 4 call $~lib/env/abort unreachable @@ -176,11 +160,11 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Root#get:tailRef (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Root#get:tailRef (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 i32.load offset=2912 ) - (func $~lib/allocator/tlsf/Block#get:right (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -191,8 +175,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 81 + i32.const 168 + i32.const 104 i32.const 4 call $~lib/env/abort unreachable @@ -211,8 +195,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 24 - i32.const 82 + i32.const 168 + i32.const 105 i32.const 11 call $~lib/env/abort unreachable @@ -220,15 +204,15 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/fls (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 24 - i32.const 419 + i32.const 168 + i32.const 447 i32.const 2 call $~lib/env/abort unreachable @@ -238,15 +222,15 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u i32.eqz if i32.const 0 - i32.const 24 - i32.const 149 + i32.const 168 + i32.const 175 i32.const 4 call $~lib/env/abort unreachable @@ -257,8 +241,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 150 + i32.const 168 + i32.const 176 i32.const 4 call $~lib/env/abort unreachable @@ -274,15 +258,15 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 global.get $~lib/allocator/tlsf/FL_BITS i32.lt_u i32.eqz if i32.const 0 - i32.const 24 - i32.const 129 + i32.const 168 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -294,7 +278,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -311,8 +295,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 249 + i32.const 168 + i32.const 277 i32.const 4 call $~lib/env/abort unreachable @@ -337,8 +321,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 251 + i32.const 168 + i32.const 279 i32.const 4 call $~lib/env/abort unreachable @@ -439,7 +423,7 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -448,8 +432,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 73 + i32.const 168 + i32.const 96 i32.const 4 call $~lib/env/abort unreachable @@ -462,8 +446,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 24 - i32.const 74 + i32.const 168 + i32.const 97 i32.const 11 call $~lib/env/abort unreachable @@ -471,7 +455,7 @@ local.get $1 end ) - (func $~lib/allocator/tlsf/Root#setJump (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.load global.get $~lib/allocator/tlsf/FREE @@ -479,8 +463,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 325 + i32.const 168 + i32.const 353 i32.const 4 call $~lib/env/abort unreachable @@ -492,8 +476,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 326 + i32.const 168 + i32.const 354 i32.const 4 call $~lib/env/abort unreachable @@ -505,8 +489,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 327 + i32.const 168 + i32.const 355 i32.const 4 call $~lib/env/abort unreachable @@ -517,7 +501,7 @@ local.get $1 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -531,8 +515,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 180 + i32.const 168 + i32.const 208 i32.const 4 call $~lib/env/abort unreachable @@ -546,8 +530,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 182 + i32.const 168 + i32.const 210 i32.const 4 call $~lib/env/abort unreachable @@ -572,8 +556,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 184 + i32.const 168 + i32.const 212 i32.const 4 call $~lib/env/abort unreachable @@ -584,8 +568,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 24 - i32.const 188 + i32.const 168 + i32.const 216 i32.const 23 call $~lib/env/abort unreachable @@ -632,8 +616,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 24 - i32.const 202 + i32.const 168 + i32.const 230 i32.const 24 call $~lib/env/abort unreachable @@ -650,8 +634,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 204 + i32.const 168 + i32.const 232 i32.const 6 call $~lib/env/abort unreachable @@ -705,8 +689,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 217 + i32.const 168 + i32.const 245 i32.const 4 call $~lib/env/abort unreachable @@ -783,7 +767,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -796,8 +780,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 368 + i32.const 168 + i32.const 396 i32.const 4 call $~lib/env/abort unreachable @@ -809,8 +793,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 369 + i32.const 168 + i32.const 397 i32.const 4 call $~lib/env/abort unreachable @@ -822,8 +806,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 370 + i32.const 168 + i32.const 398 i32.const 4 call $~lib/env/abort unreachable @@ -843,8 +827,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 375 + i32.const 168 + i32.const 403 i32.const 6 call $~lib/env/abort unreachable @@ -872,8 +856,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 384 + i32.const 168 + i32.const 412 i32.const 6 call $~lib/env/abort unreachable @@ -936,15 +920,15 @@ call $~lib/allocator/tlsf/Root#insert i32.const 1 ) - (func $~lib/allocator/tlsf/ffs (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 24 - i32.const 413 + i32.const 168 + i32.const 441 i32.const 2 call $~lib/env/abort unreachable @@ -952,15 +936,15 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/ffs (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 24 - i32.const 413 + i32.const 168 + i32.const 441 i32.const 2 call $~lib/env/abort unreachable @@ -968,7 +952,7 @@ local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -989,8 +973,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 287 + i32.const 168 + i32.const 315 i32.const 4 call $~lib/env/abort unreachable @@ -1085,8 +1069,8 @@ local.get $7 else i32.const 0 - i32.const 24 - i32.const 314 + i32.const 168 + i32.const 342 i32.const 16 call $~lib/env/abort unreachable @@ -1109,7 +1093,7 @@ end local.get $6 ) - (func $~lib/allocator/tlsf/Root#use (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1122,8 +1106,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 339 + i32.const 168 + i32.const 367 i32.const 4 call $~lib/env/abort unreachable @@ -1142,8 +1126,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 340 + i32.const 168 + i32.const 368 i32.const 4 call $~lib/env/abort unreachable @@ -1155,8 +1139,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 341 + i32.const 168 + i32.const 369 i32.const 4 call $~lib/env/abort unreachable @@ -1215,8 +1199,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 24 - i32.const 359 + i32.const 168 + i32.const 387 i32.const 25 call $~lib/env/abort unreachable @@ -1237,7 +1221,7 @@ global.get $~lib/allocator/tlsf/Block.INFO i32.add ) - (func $~lib/allocator/tlsf/__mem_allocate (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1441,8 +1425,8 @@ i32.eqz if (result i32) i32.const 0 - i32.const 24 - i32.const 472 + i32.const 168 + i32.const 502 i32.const 12 call $~lib/env/abort unreachable @@ -1462,8 +1446,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 475 + i32.const 168 + i32.const 505 i32.const 2 call $~lib/env/abort unreachable @@ -1473,12 +1457,12 @@ local.get $0 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/memory/memory.allocate (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 call $~lib/allocator/tlsf/__mem_allocate return ) - (func $~lib/runtime/allocate (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/allocate (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/runtime/ADJUSTOBLOCK @@ -1500,7 +1484,7 @@ global.get $~lib/runtime/HEADER_SIZE i32.add ) - (func $~lib/util/memory/memcpy (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2701,7 +2685,7 @@ i32.store8 end ) - (func $~lib/memory/memory.copy (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2932,7 +2916,7 @@ end end ) - (func $~lib/memory/memory.fill (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3189,7 +3173,7 @@ end end ) - (func $~lib/allocator/tlsf/__mem_free (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/tlsf/__mem_free (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3213,8 +3197,8 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 488 + i32.const 168 + i32.const 518 i32.const 6 call $~lib/env/abort unreachable @@ -3232,15 +3216,15 @@ end end ) - (func $~lib/memory/memory.free (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.free (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 call $~lib/allocator/tlsf/__mem_free ) - (func $std/runtime/__ref_register (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/runtime/__ref_register (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $std/runtime/register_ref ) - (func $~lib/runtime/reallocate (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/reallocate (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3311,7 +3295,7 @@ if i32.const 0 i32.const 232 - i32.const 113 + i32.const 117 i32.const 8 call $~lib/env/abort unreachable @@ -3344,7 +3328,7 @@ i32.store offset=4 local.get $0 ) - (func $~lib/runtime/discard (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/discard (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3353,7 +3337,7 @@ if i32.const 0 i32.const 232 - i32.const 173 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -3370,7 +3354,7 @@ if i32.const 0 i32.const 232 - i32.const 175 + i32.const 179 i32.const 4 call $~lib/env/abort unreachable @@ -3378,7 +3362,7 @@ local.get $1 call $~lib/memory/memory.free ) - (func $~lib/runtime/register (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/register (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 global.get $~lib/memory/HEAP_BASE @@ -3387,7 +3371,7 @@ if i32.const 0 i32.const 232 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -3404,7 +3388,7 @@ if i32.const 0 i32.const 232 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -3416,13 +3400,13 @@ call $std/runtime/__ref_register local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub i32.load offset=4 ) - (func $~lib/string/String#get:length (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 global.get $~lib/runtime/HEADER_SIZE i32.sub @@ -3430,17 +3414,16 @@ i32.const 1 i32.shr_u ) - (func $start:std/runtime (; 39 ;) (type $FUNCSIG$v) + (func $start:std/runtime (; 38 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $start:~lib/allocator/tlsf + i32.const 1 i32.const 2 - i32.const 3 i32.ne i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 28 i32.const 0 call $~lib/env/abort @@ -3453,7 +3436,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 34 i32.const 0 call $~lib/env/abort @@ -3474,7 +3457,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 36 i32.const 2 call $~lib/env/abort @@ -3536,7 +3519,7 @@ end end end - i32.const 136 + i32.const 72 i32.const 1 global.get $std/runtime/barrier1 f64.convert_i32_u @@ -3545,7 +3528,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 168 + i32.const 104 i32.const 1 global.get $std/runtime/barrier2 f64.convert_i32_u @@ -3554,7 +3537,7 @@ f64.const 0 f64.const 0 call $~lib/env/trace - i32.const 200 + i32.const 136 i32.const 1 global.get $std/runtime/barrier3 f64.convert_i32_u @@ -3581,7 +3564,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 51 i32.const 0 call $~lib/env/abort @@ -3594,7 +3577,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 52 i32.const 0 call $~lib/env/abort @@ -3614,7 +3597,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 53 i32.const 0 call $~lib/env/abort @@ -3627,7 +3610,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 54 i32.const 0 call $~lib/env/abort @@ -3649,7 +3632,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 56 i32.const 0 call $~lib/env/abort @@ -3666,7 +3649,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 58 i32.const 0 call $~lib/env/abort @@ -3691,7 +3674,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 61 i32.const 0 call $~lib/env/abort @@ -3708,7 +3691,7 @@ global.get $std/runtime/ref4 local.set $0 local.get $0 - i32.const 2 + i32.const 1 call $~lib/runtime/register end drop @@ -3718,7 +3701,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 65 i32.const 0 call $~lib/env/abort @@ -3730,12 +3713,12 @@ global.set $std/runtime/header4 global.get $std/runtime/header4 i32.load - i32.const 2 + i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 67 i32.const 0 call $~lib/env/abort @@ -3748,7 +3731,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 68 i32.const 0 call $~lib/env/abort @@ -3768,7 +3751,7 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 71 i32.const 0 call $~lib/env/abort @@ -3781,14 +3764,14 @@ i32.eqz if i32.const 0 - i32.const 88 + i32.const 24 i32.const 72 i32.const 0 call $~lib/env/abort unreachable end ) - (func $std/runtime/main (; 40 ;) (type $FUNCSIG$v) + (func $std/runtime/main (; 39 ;) (type $FUNCSIG$v) global.get $~lib/started i32.eqz if @@ -3797,9 +3780,9 @@ global.set $~lib/started end ) - (func $start (; 41 ;) (type $FUNCSIG$v) + (func $start (; 40 ;) (type $FUNCSIG$v) call $start:std/runtime ) - (func $null (; 42 ;) (type $FUNCSIG$v) + (func $null (; 41 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/set.json b/tests/compiler/std/set.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/std/set.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 1fca9dc6..4b37e134 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -151,7 +151,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -166,7 +166,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -814,7 +814,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -834,7 +834,7 @@ else i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -849,7 +849,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -868,7 +868,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -888,7 +888,7 @@ else i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -903,7 +903,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -922,7 +922,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -936,7 +936,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -957,7 +957,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -975,7 +975,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -990,7 +990,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -1004,7 +1004,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -1025,7 +1025,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -1037,7 +1037,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -1362,7 +1362,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -1382,7 +1382,7 @@ else i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -1397,7 +1397,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -1416,7 +1416,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -1436,7 +1436,7 @@ else i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -1451,7 +1451,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -1470,7 +1470,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -1484,7 +1484,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -1505,7 +1505,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -1523,7 +1523,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -1538,7 +1538,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -1552,7 +1552,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -1573,7 +1573,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -1585,7 +1585,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -1997,7 +1997,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -2017,7 +2017,7 @@ else i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -2032,7 +2032,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -2051,7 +2051,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -2071,7 +2071,7 @@ else i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -2086,7 +2086,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -2105,7 +2105,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -2119,7 +2119,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -2140,7 +2140,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -2158,7 +2158,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -2173,7 +2173,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -2187,7 +2187,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -2208,7 +2208,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -2220,7 +2220,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -2581,7 +2581,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -2601,7 +2601,7 @@ else i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -2616,7 +2616,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -2635,7 +2635,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -2655,7 +2655,7 @@ else i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -2670,7 +2670,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -2689,7 +2689,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -2703,7 +2703,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -2724,7 +2724,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -2742,7 +2742,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -2757,7 +2757,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -2771,7 +2771,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -2792,7 +2792,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -2804,7 +2804,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -3183,7 +3183,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -3203,7 +3203,7 @@ else i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -3218,7 +3218,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -3237,7 +3237,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -3257,7 +3257,7 @@ else i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -3272,7 +3272,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -3291,7 +3291,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -3305,7 +3305,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -3326,7 +3326,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -3344,7 +3344,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -3359,7 +3359,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -3373,7 +3373,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -3394,7 +3394,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -3406,7 +3406,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -3456,7 +3456,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -3476,7 +3476,7 @@ else i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -3491,7 +3491,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -3510,7 +3510,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -3530,7 +3530,7 @@ else i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -3545,7 +3545,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -3564,7 +3564,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -3578,7 +3578,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -3599,7 +3599,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -3617,7 +3617,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -3632,7 +3632,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -3646,7 +3646,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -3667,7 +3667,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -3679,7 +3679,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -4129,7 +4129,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -4149,7 +4149,7 @@ else i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -4164,7 +4164,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -4183,7 +4183,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -4203,7 +4203,7 @@ else i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -4218,7 +4218,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -4237,7 +4237,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -4251,7 +4251,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -4272,7 +4272,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -4290,7 +4290,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -4305,7 +4305,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -4319,7 +4319,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -4340,7 +4340,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -4352,7 +4352,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -4402,7 +4402,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -4422,7 +4422,7 @@ else i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -4437,7 +4437,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -4456,7 +4456,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -4476,7 +4476,7 @@ else i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -4491,7 +4491,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -4510,7 +4510,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -4524,7 +4524,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -4545,7 +4545,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -4563,7 +4563,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -4578,7 +4578,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -4592,7 +4592,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -4613,7 +4613,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -4625,7 +4625,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -4978,7 +4978,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -4998,7 +4998,7 @@ else i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -5013,7 +5013,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -5032,7 +5032,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -5052,7 +5052,7 @@ else i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -5067,7 +5067,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -5086,7 +5086,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -5100,7 +5100,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -5121,7 +5121,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -5139,7 +5139,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -5154,7 +5154,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -5168,7 +5168,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -5189,7 +5189,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -5201,7 +5201,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -5554,7 +5554,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -5574,7 +5574,7 @@ else i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -5589,7 +5589,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -5608,7 +5608,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -5628,7 +5628,7 @@ else i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -5643,7 +5643,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -5662,7 +5662,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -5676,7 +5676,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -5697,7 +5697,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -5715,7 +5715,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -5730,7 +5730,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -5744,7 +5744,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -5765,7 +5765,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -5777,7 +5777,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/set.ts b/tests/compiler/std/set.ts index 1efb84ee..d31b40cd 100644 --- a/tests/compiler/std/set.ts +++ b/tests/compiler/std/set.ts @@ -1,4 +1,3 @@ -import "allocator/arena"; import "collector/dummy"; function testNumeric(): void { diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index b2445bfd..8b0772f3 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -25,9 +25,9 @@ (table $0 23 funcref) (elem (i32.const 0) $null $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/string/String~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate $~lib/set/Set~iterate) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) @@ -187,7 +187,7 @@ if i32.const 0 i32.const 24 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -204,7 +204,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -1076,7 +1076,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -1091,7 +1091,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -1114,7 +1114,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -1136,7 +1136,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -1151,7 +1151,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -1174,7 +1174,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -1196,7 +1196,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -1213,7 +1213,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -1236,7 +1236,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -1259,7 +1259,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -1274,7 +1274,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -1291,7 +1291,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -1314,7 +1314,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -1329,7 +1329,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -1898,7 +1898,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -1913,7 +1913,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -1936,7 +1936,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -1958,7 +1958,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -1973,7 +1973,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -1996,7 +1996,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -2018,7 +2018,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -2035,7 +2035,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -2058,7 +2058,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -2081,7 +2081,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -2096,7 +2096,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -2113,7 +2113,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -2136,7 +2136,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -2151,7 +2151,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -2750,7 +2750,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -2765,7 +2765,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -2788,7 +2788,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -2810,7 +2810,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -2825,7 +2825,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -2848,7 +2848,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -2870,7 +2870,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -2887,7 +2887,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -2910,7 +2910,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -2933,7 +2933,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -2948,7 +2948,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -2965,7 +2965,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -2988,7 +2988,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -3003,7 +3003,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -3572,7 +3572,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -3587,7 +3587,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -3610,7 +3610,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -3632,7 +3632,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -3647,7 +3647,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -3670,7 +3670,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -3692,7 +3692,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -3709,7 +3709,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -3732,7 +3732,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -3755,7 +3755,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -3770,7 +3770,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -3787,7 +3787,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -3810,7 +3810,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -3825,7 +3825,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -4428,7 +4428,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -4443,7 +4443,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -4466,7 +4466,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -4488,7 +4488,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -4503,7 +4503,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -4526,7 +4526,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -4548,7 +4548,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -4565,7 +4565,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -4588,7 +4588,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -4611,7 +4611,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -4626,7 +4626,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -4643,7 +4643,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -4666,7 +4666,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -4681,7 +4681,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -5242,7 +5242,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -5257,7 +5257,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -5280,7 +5280,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -5302,7 +5302,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -5317,7 +5317,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -5340,7 +5340,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -5362,7 +5362,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -5379,7 +5379,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -5402,7 +5402,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -5425,7 +5425,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -5440,7 +5440,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -5457,7 +5457,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -5480,7 +5480,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -5495,7 +5495,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -6147,7 +6147,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -6162,7 +6162,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -6185,7 +6185,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -6207,7 +6207,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -6222,7 +6222,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -6245,7 +6245,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -6267,7 +6267,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -6284,7 +6284,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -6307,7 +6307,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -6330,7 +6330,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -6345,7 +6345,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -6362,7 +6362,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -6385,7 +6385,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -6400,7 +6400,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -6964,7 +6964,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -6979,7 +6979,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -7002,7 +7002,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -7024,7 +7024,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -7039,7 +7039,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -7062,7 +7062,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -7084,7 +7084,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -7101,7 +7101,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -7124,7 +7124,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -7147,7 +7147,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -7162,7 +7162,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -7179,7 +7179,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -7202,7 +7202,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -7217,7 +7217,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -7785,7 +7785,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -7800,7 +7800,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -7823,7 +7823,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -7845,7 +7845,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -7860,7 +7860,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -7883,7 +7883,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -7905,7 +7905,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -7922,7 +7922,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -7945,7 +7945,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -7968,7 +7968,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -7983,7 +7983,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -8000,7 +8000,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -8023,7 +8023,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -8038,7 +8038,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable @@ -8606,7 +8606,7 @@ if i32.const 0 i32.const 128 - i32.const 9 + i32.const 8 i32.const 4 call $~lib/env/abort unreachable @@ -8621,7 +8621,7 @@ if i32.const 0 i32.const 128 - i32.const 11 + i32.const 10 i32.const 4 call $~lib/env/abort unreachable @@ -8644,7 +8644,7 @@ if i32.const 0 i32.const 128 - i32.const 13 + i32.const 12 i32.const 2 call $~lib/env/abort unreachable @@ -8666,7 +8666,7 @@ if i32.const 0 i32.const 128 - i32.const 17 + i32.const 16 i32.const 4 call $~lib/env/abort unreachable @@ -8681,7 +8681,7 @@ if i32.const 0 i32.const 128 - i32.const 19 + i32.const 18 i32.const 4 call $~lib/env/abort unreachable @@ -8704,7 +8704,7 @@ if i32.const 0 i32.const 128 - i32.const 21 + i32.const 20 i32.const 2 call $~lib/env/abort unreachable @@ -8726,7 +8726,7 @@ if i32.const 0 i32.const 128 - i32.const 25 + i32.const 24 i32.const 4 call $~lib/env/abort unreachable @@ -8743,7 +8743,7 @@ if i32.const 0 i32.const 128 - i32.const 27 + i32.const 26 i32.const 4 call $~lib/env/abort unreachable @@ -8766,7 +8766,7 @@ if i32.const 0 i32.const 128 - i32.const 29 + i32.const 28 i32.const 2 call $~lib/env/abort unreachable @@ -8789,7 +8789,7 @@ if i32.const 0 i32.const 128 - i32.const 33 + i32.const 32 i32.const 4 call $~lib/env/abort unreachable @@ -8804,7 +8804,7 @@ if i32.const 0 i32.const 128 - i32.const 35 + i32.const 34 i32.const 4 call $~lib/env/abort unreachable @@ -8821,7 +8821,7 @@ if i32.const 0 i32.const 128 - i32.const 37 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable @@ -8844,7 +8844,7 @@ if i32.const 0 i32.const 128 - i32.const 39 + i32.const 38 i32.const 2 call $~lib/env/abort unreachable @@ -8859,7 +8859,7 @@ if i32.const 0 i32.const 128 - i32.const 43 + i32.const 42 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/simd.json b/tests/compiler/std/simd.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/std/simd.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/static-array.json b/tests/compiler/std/static-array.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/std/static-array.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index fa2ddb9e..165ecd17 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -1437,7 +1437,7 @@ if i32.const 0 i32.const 280 - i32.const 113 + i32.const 117 i32.const 8 call $~lib/env/abort unreachable @@ -1671,7 +1671,7 @@ if i32.const 0 i32.const 192 - i32.const 8 + i32.const 6 i32.const 0 call $~lib/env/abort unreachable @@ -1683,7 +1683,7 @@ if i32.const 0 i32.const 192 - i32.const 9 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable @@ -1695,7 +1695,7 @@ if i32.const 0 i32.const 192 - i32.const 10 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable @@ -1712,7 +1712,7 @@ if i32.const 0 i32.const 192 - i32.const 12 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -1724,7 +1724,7 @@ if i32.const 0 i32.const 192 - i32.const 14 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -1736,7 +1736,7 @@ if i32.const 0 i32.const 192 - i32.const 15 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -1748,7 +1748,7 @@ if i32.const 0 i32.const 192 - i32.const 16 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -1761,7 +1761,7 @@ if i32.const 0 i32.const 192 - i32.const 18 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -1773,7 +1773,7 @@ if i32.const 0 i32.const 192 - i32.const 20 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -1785,7 +1785,7 @@ if i32.const 0 i32.const 192 - i32.const 21 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable @@ -1797,7 +1797,7 @@ if i32.const 0 i32.const 192 - i32.const 22 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -1810,7 +1810,7 @@ if i32.const 0 i32.const 192 - i32.const 24 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -1822,7 +1822,7 @@ if i32.const 0 i32.const 192 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -1834,7 +1834,7 @@ if i32.const 0 i32.const 192 - i32.const 27 + i32.const 25 i32.const 0 call $~lib/env/abort unreachable @@ -1846,7 +1846,7 @@ if i32.const 0 i32.const 192 - i32.const 28 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -1859,7 +1859,7 @@ if i32.const 0 i32.const 192 - i32.const 30 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/static-array.ts b/tests/compiler/std/static-array.ts index 851e8198..4fee0db3 100644 --- a/tests/compiler/std/static-array.ts +++ b/tests/compiler/std/static-array.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; // assignment checks for possible resize - const i: i32[] = [1, 2]; const I: i64[] = [3, 4]; const f: f32[] = [1.5, 2.5]; diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 35ff2ebe..869e4f88 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -31,10 +31,10 @@ (global $std/static-array/f i32 (i32.const 120)) (global $std/static-array/F i32 (i32.const 168)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/memory/HEAP_BASE i32 (i32.const 312)) (export "memory" (memory $0)) (export "table" (table $0)) @@ -1928,7 +1928,7 @@ if i32.const 0 i32.const 280 - i32.const 113 + i32.const 117 i32.const 8 call $~lib/env/abort unreachable @@ -2267,7 +2267,7 @@ if i32.const 0 i32.const 192 - i32.const 8 + i32.const 6 i32.const 0 call $~lib/env/abort unreachable @@ -2281,7 +2281,7 @@ if i32.const 0 i32.const 192 - i32.const 9 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable @@ -2295,7 +2295,7 @@ if i32.const 0 i32.const 192 - i32.const 10 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable @@ -2323,7 +2323,7 @@ if i32.const 0 i32.const 192 - i32.const 12 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -2336,7 +2336,7 @@ if i32.const 0 i32.const 192 - i32.const 14 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -2350,7 +2350,7 @@ if i32.const 0 i32.const 192 - i32.const 15 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -2364,7 +2364,7 @@ if i32.const 0 i32.const 192 - i32.const 16 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -2382,7 +2382,7 @@ if i32.const 0 i32.const 192 - i32.const 18 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -2395,7 +2395,7 @@ if i32.const 0 i32.const 192 - i32.const 20 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -2409,7 +2409,7 @@ if i32.const 0 i32.const 192 - i32.const 21 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable @@ -2423,7 +2423,7 @@ if i32.const 0 i32.const 192 - i32.const 22 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -2441,7 +2441,7 @@ if i32.const 0 i32.const 192 - i32.const 24 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -2454,7 +2454,7 @@ if i32.const 0 i32.const 192 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -2468,7 +2468,7 @@ if i32.const 0 i32.const 192 - i32.const 27 + i32.const 25 i32.const 0 call $~lib/env/abort unreachable @@ -2482,7 +2482,7 @@ if i32.const 0 i32.const 192 - i32.const 28 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -2500,7 +2500,7 @@ if i32.const 0 i32.const 192 - i32.const 30 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.json b/tests/compiler/std/string-utf8.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/std/string-utf8.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index abc32567..71f47c89 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -1464,7 +1464,7 @@ if i32.const 0 i32.const 136 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -1479,7 +1479,7 @@ if i32.const 0 i32.const 136 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -1835,7 +1835,7 @@ if i32.const 0 i32.const 40 - i32.const 7 + i32.const 5 i32.const 0 call $~lib/env/abort unreachable @@ -1854,7 +1854,7 @@ if i32.const 0 i32.const 40 - i32.const 11 + i32.const 9 i32.const 0 call $~lib/env/abort unreachable @@ -1866,7 +1866,7 @@ if i32.const 0 i32.const 40 - i32.const 12 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -1878,7 +1878,7 @@ if i32.const 0 i32.const 40 - i32.const 13 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -1890,7 +1890,7 @@ if i32.const 0 i32.const 40 - i32.const 14 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -1902,7 +1902,7 @@ if i32.const 0 i32.const 40 - i32.const 15 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -1914,7 +1914,7 @@ if i32.const 0 i32.const 40 - i32.const 16 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -1926,7 +1926,7 @@ if i32.const 0 i32.const 40 - i32.const 17 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -1938,7 +1938,7 @@ if i32.const 0 i32.const 40 - i32.const 18 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -1950,7 +1950,7 @@ if i32.const 0 i32.const 40 - i32.const 19 + i32.const 17 i32.const 0 call $~lib/env/abort unreachable @@ -1962,7 +1962,7 @@ if i32.const 0 i32.const 40 - i32.const 20 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -1972,7 +1972,7 @@ if i32.const 0 i32.const 40 - i32.const 21 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable @@ -1986,7 +1986,7 @@ if i32.const 0 i32.const 40 - i32.const 23 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -2002,7 +2002,7 @@ if i32.const 0 i32.const 40 - i32.const 24 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -2016,7 +2016,7 @@ if i32.const 0 i32.const 40 - i32.const 25 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable @@ -2032,7 +2032,7 @@ if i32.const 0 i32.const 40 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -2048,7 +2048,7 @@ if i32.const 0 i32.const 40 - i32.const 27 + i32.const 25 i32.const 0 call $~lib/env/abort unreachable @@ -2064,7 +2064,7 @@ if i32.const 0 i32.const 40 - i32.const 28 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.ts b/tests/compiler/std/string-utf8.ts index f3c6adbd..d3419813 100644 --- a/tests/compiler/std/string-utf8.ts +++ b/tests/compiler/std/string-utf8.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; - var str = "𐐷hi𤭢"; // -> f0 90 90 b7 68 69 f0 a4 ad a2 00 var len = str.lengthUTF8; diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index 7872dcde..36d69018 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -21,11 +21,11 @@ (elem (i32.const 0) $null) (global $std/string-utf8/str (mut i32) (i32.const 16)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $std/string-utf8/len (mut i32) (i32.const 0)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/string-utf8/ptr (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 228)) (export "memory" (memory $0)) @@ -1929,7 +1929,7 @@ if i32.const 0 i32.const 136 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -1946,7 +1946,7 @@ if i32.const 0 i32.const 136 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -2379,7 +2379,7 @@ if i32.const 0 i32.const 40 - i32.const 7 + i32.const 5 i32.const 0 call $~lib/env/abort unreachable @@ -2405,7 +2405,7 @@ if i32.const 0 i32.const 40 - i32.const 11 + i32.const 9 i32.const 0 call $~lib/env/abort unreachable @@ -2418,7 +2418,7 @@ if i32.const 0 i32.const 40 - i32.const 12 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -2431,7 +2431,7 @@ if i32.const 0 i32.const 40 - i32.const 13 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -2444,7 +2444,7 @@ if i32.const 0 i32.const 40 - i32.const 14 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -2457,7 +2457,7 @@ if i32.const 0 i32.const 40 - i32.const 15 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -2470,7 +2470,7 @@ if i32.const 0 i32.const 40 - i32.const 16 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -2483,7 +2483,7 @@ if i32.const 0 i32.const 40 - i32.const 17 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -2496,7 +2496,7 @@ if i32.const 0 i32.const 40 - i32.const 18 + i32.const 16 i32.const 0 call $~lib/env/abort unreachable @@ -2509,7 +2509,7 @@ if i32.const 0 i32.const 40 - i32.const 19 + i32.const 17 i32.const 0 call $~lib/env/abort unreachable @@ -2522,7 +2522,7 @@ if i32.const 0 i32.const 40 - i32.const 20 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -2535,7 +2535,7 @@ if i32.const 0 i32.const 40 - i32.const 21 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable @@ -2549,7 +2549,7 @@ if i32.const 0 i32.const 40 - i32.const 23 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -2565,7 +2565,7 @@ if i32.const 0 i32.const 40 - i32.const 24 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -2579,7 +2579,7 @@ if i32.const 0 i32.const 40 - i32.const 25 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable @@ -2595,7 +2595,7 @@ if i32.const 0 i32.const 40 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -2611,7 +2611,7 @@ if i32.const 0 i32.const 40 - i32.const 27 + i32.const 25 i32.const 0 call $~lib/env/abort unreachable @@ -2627,7 +2627,7 @@ if i32.const 0 i32.const 40 - i32.const 28 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.json b/tests/compiler/std/string.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/std/string.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index bb72370a..9f320c1d 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -1,9 +1,9 @@ (module + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$di (func (param i32) (result f64))) @@ -448,7 +448,7 @@ if i32.const 0 i32.const 120 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -463,7 +463,7 @@ if i32.const 0 i32.const 120 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -3277,7 +3277,7 @@ if i32.const 0 i32.const 120 - i32.const 113 + i32.const 117 i32.const 8 call $~lib/env/abort unreachable @@ -5215,7 +5215,7 @@ if i32.const 0 i32.const 120 - i32.const 173 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -5229,7 +5229,7 @@ if i32.const 0 i32.const 120 - i32.const 175 + i32.const 179 i32.const 4 call $~lib/env/abort unreachable @@ -5288,7 +5288,7 @@ if i32.const 0 i32.const 72 - i32.const 18 + i32.const 17 i32.const 0 call $~lib/env/abort unreachable @@ -5304,7 +5304,7 @@ if i32.const 0 i32.const 72 - i32.const 20 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable @@ -5330,7 +5330,7 @@ if i32.const 0 i32.const 72 - i32.const 21 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -5347,7 +5347,7 @@ if i32.const 0 i32.const 72 - i32.const 23 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -5360,7 +5360,7 @@ if i32.const 0 i32.const 72 - i32.const 24 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable @@ -5373,7 +5373,7 @@ if i32.const 0 i32.const 72 - i32.const 25 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -5386,7 +5386,7 @@ if i32.const 0 i32.const 72 - i32.const 27 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -5399,7 +5399,7 @@ if i32.const 0 i32.const 72 - i32.const 28 + i32.const 27 i32.const 0 call $~lib/env/abort unreachable @@ -5410,7 +5410,7 @@ if i32.const 264 i32.const 72 - i32.const 29 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable @@ -5421,7 +5421,7 @@ if i32.const 0 i32.const 72 - i32.const 31 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable @@ -5432,7 +5432,7 @@ if i32.const 0 i32.const 72 - i32.const 32 + i32.const 31 i32.const 0 call $~lib/env/abort unreachable @@ -5446,7 +5446,7 @@ if i32.const 0 i32.const 72 - i32.const 33 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable @@ -5461,7 +5461,7 @@ if i32.const 0 i32.const 72 - i32.const 35 + i32.const 34 i32.const 0 call $~lib/env/abort unreachable @@ -5476,7 +5476,7 @@ if i32.const 0 i32.const 72 - i32.const 36 + i32.const 35 i32.const 0 call $~lib/env/abort unreachable @@ -5491,7 +5491,7 @@ if i32.const 0 i32.const 72 - i32.const 37 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable @@ -5506,7 +5506,7 @@ if i32.const 0 i32.const 72 - i32.const 38 + i32.const 37 i32.const 0 call $~lib/env/abort unreachable @@ -5521,7 +5521,7 @@ if i32.const 0 i32.const 72 - i32.const 39 + i32.const 38 i32.const 0 call $~lib/env/abort unreachable @@ -5536,7 +5536,7 @@ if i32.const 0 i32.const 72 - i32.const 40 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable @@ -5551,7 +5551,7 @@ if i32.const 0 i32.const 72 - i32.const 41 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable @@ -5566,7 +5566,7 @@ if i32.const 0 i32.const 72 - i32.const 42 + i32.const 41 i32.const 0 call $~lib/env/abort unreachable @@ -5581,7 +5581,7 @@ if i32.const 0 i32.const 72 - i32.const 44 + i32.const 43 i32.const 0 call $~lib/env/abort unreachable @@ -5596,7 +5596,7 @@ if i32.const 0 i32.const 72 - i32.const 45 + i32.const 44 i32.const 0 call $~lib/env/abort unreachable @@ -5611,7 +5611,7 @@ if i32.const 0 i32.const 72 - i32.const 46 + i32.const 45 i32.const 0 call $~lib/env/abort unreachable @@ -5626,7 +5626,7 @@ if i32.const 0 i32.const 72 - i32.const 47 + i32.const 46 i32.const 0 call $~lib/env/abort unreachable @@ -5641,7 +5641,7 @@ if i32.const 0 i32.const 72 - i32.const 48 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable @@ -5656,7 +5656,7 @@ if i32.const 0 i32.const 72 - i32.const 49 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable @@ -5671,7 +5671,7 @@ if i32.const 0 i32.const 72 - i32.const 50 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable @@ -5686,7 +5686,7 @@ if i32.const 0 i32.const 72 - i32.const 51 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable @@ -5698,7 +5698,7 @@ if i32.const 0 i32.const 72 - i32.const 53 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -5712,7 +5712,7 @@ if i32.const 0 i32.const 72 - i32.const 54 + i32.const 53 i32.const 0 call $~lib/env/abort unreachable @@ -5724,7 +5724,7 @@ if i32.const 0 i32.const 72 - i32.const 55 + i32.const 54 i32.const 0 call $~lib/env/abort unreachable @@ -5737,7 +5737,7 @@ if i32.const 0 i32.const 72 - i32.const 56 + i32.const 55 i32.const 0 call $~lib/env/abort unreachable @@ -5749,7 +5749,7 @@ if i32.const 0 i32.const 72 - i32.const 57 + i32.const 56 i32.const 0 call $~lib/env/abort unreachable @@ -5763,7 +5763,7 @@ if i32.const 0 i32.const 72 - i32.const 58 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable @@ -5777,7 +5777,7 @@ if i32.const 0 i32.const 72 - i32.const 59 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable @@ -5791,7 +5791,7 @@ if i32.const 0 i32.const 72 - i32.const 60 + i32.const 59 i32.const 0 call $~lib/env/abort unreachable @@ -5805,7 +5805,7 @@ if i32.const 0 i32.const 72 - i32.const 61 + i32.const 60 i32.const 0 call $~lib/env/abort unreachable @@ -5819,7 +5819,7 @@ if i32.const 0 i32.const 72 - i32.const 62 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable @@ -5831,7 +5831,7 @@ if i32.const 0 i32.const 72 - i32.const 64 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -5845,7 +5845,7 @@ if i32.const 0 i32.const 72 - i32.const 65 + i32.const 64 i32.const 0 call $~lib/env/abort unreachable @@ -5864,7 +5864,7 @@ if i32.const 0 i32.const 72 - i32.const 66 + i32.const 65 i32.const 0 call $~lib/env/abort unreachable @@ -5878,7 +5878,7 @@ if i32.const 0 i32.const 72 - i32.const 67 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable @@ -5892,7 +5892,7 @@ if i32.const 0 i32.const 72 - i32.const 68 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable @@ -5906,7 +5906,7 @@ if i32.const 0 i32.const 72 - i32.const 69 + i32.const 68 i32.const 0 call $~lib/env/abort unreachable @@ -5920,7 +5920,7 @@ if i32.const 0 i32.const 72 - i32.const 70 + i32.const 69 i32.const 0 call $~lib/env/abort unreachable @@ -5934,7 +5934,7 @@ if i32.const 0 i32.const 72 - i32.const 71 + i32.const 70 i32.const 0 call $~lib/env/abort unreachable @@ -5948,7 +5948,7 @@ if i32.const 0 i32.const 72 - i32.const 72 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable @@ -5962,7 +5962,7 @@ if i32.const 0 i32.const 72 - i32.const 73 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable @@ -5974,7 +5974,7 @@ if i32.const 0 i32.const 72 - i32.const 74 + i32.const 73 i32.const 0 call $~lib/env/abort unreachable @@ -5986,7 +5986,7 @@ if i32.const 0 i32.const 72 - i32.const 80 + i32.const 79 i32.const 0 call $~lib/env/abort unreachable @@ -5998,7 +5998,7 @@ if i32.const 0 i32.const 72 - i32.const 81 + i32.const 80 i32.const 0 call $~lib/env/abort unreachable @@ -6010,7 +6010,7 @@ if i32.const 0 i32.const 72 - i32.const 82 + i32.const 81 i32.const 0 call $~lib/env/abort unreachable @@ -6022,7 +6022,7 @@ if i32.const 0 i32.const 72 - i32.const 83 + i32.const 82 i32.const 0 call $~lib/env/abort unreachable @@ -6034,7 +6034,7 @@ if i32.const 0 i32.const 72 - i32.const 84 + i32.const 83 i32.const 0 call $~lib/env/abort unreachable @@ -6046,7 +6046,7 @@ if i32.const 0 i32.const 72 - i32.const 85 + i32.const 84 i32.const 0 call $~lib/env/abort unreachable @@ -6058,7 +6058,7 @@ if i32.const 0 i32.const 72 - i32.const 86 + i32.const 85 i32.const 0 call $~lib/env/abort unreachable @@ -6070,7 +6070,7 @@ if i32.const 0 i32.const 72 - i32.const 87 + i32.const 86 i32.const 0 call $~lib/env/abort unreachable @@ -6082,7 +6082,7 @@ if i32.const 0 i32.const 72 - i32.const 89 + i32.const 88 i32.const 0 call $~lib/env/abort unreachable @@ -6094,7 +6094,7 @@ if i32.const 0 i32.const 72 - i32.const 90 + i32.const 89 i32.const 0 call $~lib/env/abort unreachable @@ -6106,7 +6106,7 @@ if i32.const 0 i32.const 72 - i32.const 91 + i32.const 90 i32.const 0 call $~lib/env/abort unreachable @@ -6118,7 +6118,7 @@ if i32.const 0 i32.const 72 - i32.const 92 + i32.const 91 i32.const 0 call $~lib/env/abort unreachable @@ -6130,7 +6130,7 @@ if i32.const 0 i32.const 72 - i32.const 93 + i32.const 92 i32.const 0 call $~lib/env/abort unreachable @@ -6146,7 +6146,7 @@ if i32.const 0 i32.const 72 - i32.const 96 + i32.const 95 i32.const 0 call $~lib/env/abort unreachable @@ -6158,7 +6158,7 @@ if i32.const 0 i32.const 72 - i32.const 97 + i32.const 96 i32.const 0 call $~lib/env/abort unreachable @@ -6170,7 +6170,7 @@ if i32.const 0 i32.const 72 - i32.const 98 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable @@ -6182,7 +6182,7 @@ if i32.const 0 i32.const 72 - i32.const 99 + i32.const 98 i32.const 0 call $~lib/env/abort unreachable @@ -6191,6 +6191,18 @@ i32.const 416 call $~lib/string/String.__ne i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 99 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 456 + i32.const 1144 + call $~lib/string/String.__ne + i32.eqz if i32.const 0 i32.const 72 @@ -6200,25 +6212,13 @@ unreachable end i32.const 456 - i32.const 1144 - call $~lib/string/String.__ne - i32.eqz - if - i32.const 0 - i32.const 72 - i32.const 101 - i32.const 0 - call $~lib/env/abort - unreachable - end - i32.const 456 i32.const 456 call $~lib/string/String.__eq i32.eqz if i32.const 0 i32.const 72 - i32.const 102 + i32.const 101 i32.const 0 call $~lib/env/abort unreachable @@ -6230,7 +6230,7 @@ if i32.const 0 i32.const 72 - i32.const 103 + i32.const 102 i32.const 0 call $~lib/env/abort unreachable @@ -6242,7 +6242,7 @@ if i32.const 0 i32.const 72 - i32.const 104 + i32.const 103 i32.const 0 call $~lib/env/abort unreachable @@ -6254,7 +6254,7 @@ if i32.const 0 i32.const 72 - i32.const 105 + i32.const 104 i32.const 0 call $~lib/env/abort unreachable @@ -6266,7 +6266,7 @@ if i32.const 0 i32.const 72 - i32.const 106 + i32.const 105 i32.const 0 call $~lib/env/abort unreachable @@ -6278,7 +6278,7 @@ if i32.const 0 i32.const 72 - i32.const 107 + i32.const 106 i32.const 0 call $~lib/env/abort unreachable @@ -6290,7 +6290,7 @@ if i32.const 0 i32.const 72 - i32.const 108 + i32.const 107 i32.const 0 call $~lib/env/abort unreachable @@ -6302,7 +6302,7 @@ if i32.const 0 i32.const 72 - i32.const 109 + i32.const 108 i32.const 0 call $~lib/env/abort unreachable @@ -6311,6 +6311,18 @@ i32.const 456 call $~lib/string/String.__gt i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 110 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 1496 + i32.const 456 + call $~lib/string/String.__gt + i32.eqz if i32.const 0 i32.const 72 @@ -6320,8 +6332,8 @@ unreachable end i32.const 1496 - i32.const 456 - call $~lib/string/String.__gt + i32.const 1520 + call $~lib/string/String.__gte i32.eqz if i32.const 0 @@ -6332,8 +6344,8 @@ unreachable end i32.const 1496 - i32.const 1520 - call $~lib/string/String.__gte + i32.const 1168 + call $~lib/string/String.__gt i32.eqz if i32.const 0 @@ -6345,8 +6357,7 @@ end i32.const 1496 i32.const 1168 - call $~lib/string/String.__gt - i32.eqz + call $~lib/string/String.__lt if i32.const 0 i32.const 72 @@ -6355,19 +6366,19 @@ call $~lib/env/abort unreachable end - i32.const 1496 - i32.const 1168 + i32.const 1144 + global.get $std/string/nullStr call $~lib/string/String.__lt if i32.const 0 i32.const 72 - i32.const 115 + i32.const 116 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1144 global.get $std/string/nullStr + i32.const 1144 call $~lib/string/String.__lt if i32.const 0 @@ -6377,20 +6388,21 @@ call $~lib/env/abort unreachable end - global.get $std/string/nullStr - i32.const 1144 - call $~lib/string/String.__lt + i32.const 480 + i32.const 416 + call $~lib/string/String.__gt + i32.eqz if i32.const 0 i32.const 72 - i32.const 118 + i32.const 119 i32.const 0 call $~lib/env/abort unreachable end - i32.const 480 i32.const 416 - call $~lib/string/String.__gt + i32.const 480 + call $~lib/string/String.__lt i32.eqz if i32.const 0 @@ -6400,9 +6412,9 @@ call $~lib/env/abort unreachable end - i32.const 416 i32.const 480 - call $~lib/string/String.__lt + i32.const 416 + call $~lib/string/String.__gte i32.eqz if i32.const 0 @@ -6413,8 +6425,7 @@ unreachable end i32.const 480 - i32.const 416 - call $~lib/string/String.__gte + call $~lib/string/String.__lte i32.eqz if i32.const 0 @@ -6425,8 +6436,8 @@ unreachable end i32.const 480 - call $~lib/string/String.__lte - i32.eqz + i32.const 416 + call $~lib/string/String.__lt if i32.const 0 i32.const 72 @@ -6435,9 +6446,9 @@ call $~lib/env/abort unreachable end - i32.const 480 i32.const 416 - call $~lib/string/String.__lt + i32.const 480 + call $~lib/string/String.__gt if i32.const 0 i32.const 72 @@ -6447,8 +6458,8 @@ unreachable end i32.const 416 - i32.const 480 - call $~lib/string/String.__gt + i32.const 416 + call $~lib/string/String.__lt if i32.const 0 i32.const 72 @@ -6459,22 +6470,11 @@ end i32.const 416 i32.const 416 - call $~lib/string/String.__lt - if - i32.const 0 - i32.const 72 - i32.const 126 - i32.const 0 - call $~lib/env/abort - unreachable - end - i32.const 416 - i32.const 416 call $~lib/string/String.__gt if i32.const 0 i32.const 72 - i32.const 127 + i32.const 126 i32.const 0 call $~lib/env/abort unreachable @@ -6486,7 +6486,7 @@ if i32.const 0 i32.const 72 - i32.const 128 + i32.const 127 i32.const 0 call $~lib/env/abort unreachable @@ -6497,7 +6497,7 @@ if i32.const 0 i32.const 72 - i32.const 129 + i32.const 128 i32.const 0 call $~lib/env/abort unreachable @@ -6518,7 +6518,7 @@ if i32.const 0 i32.const 72 - i32.const 133 + i32.const 132 i32.const 0 call $~lib/env/abort unreachable @@ -6532,7 +6532,7 @@ if i32.const 0 i32.const 72 - i32.const 135 + i32.const 134 i32.const 0 call $~lib/env/abort unreachable @@ -6546,7 +6546,7 @@ if i32.const 0 i32.const 72 - i32.const 137 + i32.const 136 i32.const 0 call $~lib/env/abort unreachable @@ -6560,7 +6560,7 @@ if i32.const 0 i32.const 72 - i32.const 138 + i32.const 137 i32.const 0 call $~lib/env/abort unreachable @@ -6574,7 +6574,7 @@ if i32.const 0 i32.const 72 - i32.const 139 + i32.const 138 i32.const 0 call $~lib/env/abort unreachable @@ -6588,7 +6588,7 @@ if i32.const 0 i32.const 72 - i32.const 140 + i32.const 139 i32.const 0 call $~lib/env/abort unreachable @@ -6602,7 +6602,7 @@ if i32.const 0 i32.const 72 - i32.const 141 + i32.const 140 i32.const 0 call $~lib/env/abort unreachable @@ -6616,7 +6616,7 @@ if i32.const 0 i32.const 72 - i32.const 142 + i32.const 141 i32.const 0 call $~lib/env/abort unreachable @@ -6630,7 +6630,7 @@ if i32.const 0 i32.const 72 - i32.const 143 + i32.const 142 i32.const 0 call $~lib/env/abort unreachable @@ -6644,7 +6644,7 @@ if i32.const 0 i32.const 72 - i32.const 144 + i32.const 143 i32.const 0 call $~lib/env/abort unreachable @@ -6658,7 +6658,7 @@ if i32.const 0 i32.const 72 - i32.const 145 + i32.const 144 i32.const 0 call $~lib/env/abort unreachable @@ -6675,7 +6675,7 @@ if i32.const 0 i32.const 72 - i32.const 149 + i32.const 148 i32.const 0 call $~lib/env/abort unreachable @@ -6690,7 +6690,7 @@ if i32.const 0 i32.const 72 - i32.const 150 + i32.const 149 i32.const 0 call $~lib/env/abort unreachable @@ -6705,7 +6705,7 @@ if i32.const 0 i32.const 72 - i32.const 151 + i32.const 150 i32.const 0 call $~lib/env/abort unreachable @@ -6720,7 +6720,7 @@ if i32.const 0 i32.const 72 - i32.const 152 + i32.const 151 i32.const 0 call $~lib/env/abort unreachable @@ -6735,7 +6735,7 @@ if i32.const 0 i32.const 72 - i32.const 153 + i32.const 152 i32.const 0 call $~lib/env/abort unreachable @@ -6750,7 +6750,7 @@ if i32.const 0 i32.const 72 - i32.const 154 + i32.const 153 i32.const 0 call $~lib/env/abort unreachable @@ -6765,7 +6765,7 @@ if i32.const 0 i32.const 72 - i32.const 155 + i32.const 154 i32.const 0 call $~lib/env/abort unreachable @@ -6793,7 +6793,7 @@ if i32.const 0 i32.const 72 - i32.const 160 + i32.const 159 i32.const 0 call $~lib/env/abort unreachable @@ -6808,7 +6808,7 @@ if i32.const 0 i32.const 72 - i32.const 162 + i32.const 161 i32.const 0 call $~lib/env/abort unreachable @@ -6836,7 +6836,7 @@ if i32.const 0 i32.const 72 - i32.const 164 + i32.const 163 i32.const 0 call $~lib/env/abort unreachable @@ -6864,7 +6864,7 @@ if i32.const 0 i32.const 72 - i32.const 166 + i32.const 165 i32.const 0 call $~lib/env/abort unreachable @@ -6914,7 +6914,7 @@ if i32.const 0 i32.const 72 - i32.const 168 + i32.const 167 i32.const 0 call $~lib/env/abort unreachable @@ -6964,7 +6964,7 @@ if i32.const 0 i32.const 72 - i32.const 170 + i32.const 169 i32.const 0 call $~lib/env/abort unreachable @@ -7025,7 +7025,7 @@ if i32.const 0 i32.const 72 - i32.const 172 + i32.const 171 i32.const 0 call $~lib/env/abort unreachable @@ -7086,7 +7086,7 @@ if i32.const 0 i32.const 72 - i32.const 174 + i32.const 173 i32.const 0 call $~lib/env/abort unreachable @@ -7147,7 +7147,7 @@ if i32.const 0 i32.const 72 - i32.const 176 + i32.const 175 i32.const 0 call $~lib/env/abort unreachable @@ -7197,7 +7197,7 @@ if i32.const 0 i32.const 72 - i32.const 178 + i32.const 177 i32.const 0 call $~lib/env/abort unreachable @@ -7212,7 +7212,7 @@ if i32.const 0 i32.const 72 - i32.const 180 + i32.const 179 i32.const 0 call $~lib/env/abort unreachable @@ -7240,7 +7240,7 @@ if i32.const 0 i32.const 72 - i32.const 182 + i32.const 181 i32.const 0 call $~lib/env/abort unreachable @@ -7268,7 +7268,7 @@ if i32.const 0 i32.const 72 - i32.const 184 + i32.const 183 i32.const 0 call $~lib/env/abort unreachable @@ -7318,7 +7318,7 @@ if i32.const 0 i32.const 72 - i32.const 186 + i32.const 185 i32.const 0 call $~lib/env/abort unreachable @@ -7368,7 +7368,7 @@ if i32.const 0 i32.const 72 - i32.const 188 + i32.const 187 i32.const 0 call $~lib/env/abort unreachable @@ -7418,7 +7418,7 @@ if i32.const 0 i32.const 72 - i32.const 190 + i32.const 189 i32.const 0 call $~lib/env/abort unreachable @@ -7431,7 +7431,7 @@ if i32.const 0 i32.const 72 - i32.const 192 + i32.const 191 i32.const 0 call $~lib/env/abort unreachable @@ -7444,7 +7444,7 @@ if i32.const 0 i32.const 72 - i32.const 193 + i32.const 192 i32.const 0 call $~lib/env/abort unreachable @@ -7457,7 +7457,7 @@ if i32.const 0 i32.const 72 - i32.const 194 + i32.const 193 i32.const 0 call $~lib/env/abort unreachable @@ -7470,7 +7470,7 @@ if i32.const 0 i32.const 72 - i32.const 195 + i32.const 194 i32.const 0 call $~lib/env/abort unreachable @@ -7483,7 +7483,7 @@ if i32.const 0 i32.const 72 - i32.const 196 + i32.const 195 i32.const 0 call $~lib/env/abort unreachable @@ -7496,7 +7496,7 @@ if i32.const 0 i32.const 72 - i32.const 197 + i32.const 196 i32.const 0 call $~lib/env/abort unreachable @@ -7509,7 +7509,7 @@ if i32.const 0 i32.const 72 - i32.const 198 + i32.const 197 i32.const 0 call $~lib/env/abort unreachable @@ -7522,7 +7522,7 @@ if i32.const 0 i32.const 72 - i32.const 199 + i32.const 198 i32.const 0 call $~lib/env/abort unreachable @@ -7535,7 +7535,7 @@ if i32.const 0 i32.const 72 - i32.const 200 + i32.const 199 i32.const 0 call $~lib/env/abort unreachable @@ -7548,7 +7548,7 @@ if i32.const 0 i32.const 72 - i32.const 201 + i32.const 200 i32.const 0 call $~lib/env/abort unreachable @@ -7561,7 +7561,7 @@ if i32.const 0 i32.const 72 - i32.const 202 + i32.const 201 i32.const 0 call $~lib/env/abort unreachable @@ -7574,7 +7574,7 @@ if i32.const 0 i32.const 72 - i32.const 203 + i32.const 202 i32.const 0 call $~lib/env/abort unreachable @@ -7587,7 +7587,7 @@ if i32.const 0 i32.const 72 - i32.const 204 + i32.const 203 i32.const 0 call $~lib/env/abort unreachable @@ -7600,7 +7600,7 @@ if i32.const 0 i32.const 72 - i32.const 205 + i32.const 204 i32.const 0 call $~lib/env/abort unreachable @@ -7613,7 +7613,7 @@ if i32.const 0 i32.const 72 - i32.const 207 + i32.const 206 i32.const 0 call $~lib/env/abort unreachable @@ -7626,7 +7626,7 @@ if i32.const 0 i32.const 72 - i32.const 208 + i32.const 207 i32.const 0 call $~lib/env/abort unreachable @@ -7639,7 +7639,7 @@ if i32.const 0 i32.const 72 - i32.const 209 + i32.const 208 i32.const 0 call $~lib/env/abort unreachable @@ -7652,7 +7652,7 @@ if i32.const 0 i32.const 72 - i32.const 210 + i32.const 209 i32.const 0 call $~lib/env/abort unreachable @@ -7665,7 +7665,7 @@ if i32.const 0 i32.const 72 - i32.const 211 + i32.const 210 i32.const 0 call $~lib/env/abort unreachable @@ -7678,7 +7678,7 @@ if i32.const 0 i32.const 72 - i32.const 213 + i32.const 212 i32.const 0 call $~lib/env/abort unreachable @@ -7691,7 +7691,7 @@ if i32.const 0 i32.const 72 - i32.const 214 + i32.const 213 i32.const 0 call $~lib/env/abort unreachable @@ -7704,7 +7704,7 @@ if i32.const 0 i32.const 72 - i32.const 215 + i32.const 214 i32.const 0 call $~lib/env/abort unreachable @@ -7717,7 +7717,7 @@ if i32.const 0 i32.const 72 - i32.const 216 + i32.const 215 i32.const 0 call $~lib/env/abort unreachable @@ -7730,7 +7730,7 @@ if i32.const 0 i32.const 72 - i32.const 217 + i32.const 216 i32.const 0 call $~lib/env/abort unreachable @@ -7743,7 +7743,7 @@ if i32.const 0 i32.const 72 - i32.const 218 + i32.const 217 i32.const 0 call $~lib/env/abort unreachable @@ -7756,7 +7756,7 @@ if i32.const 0 i32.const 72 - i32.const 219 + i32.const 218 i32.const 0 call $~lib/env/abort unreachable @@ -7769,7 +7769,7 @@ if i32.const 0 i32.const 72 - i32.const 220 + i32.const 219 i32.const 0 call $~lib/env/abort unreachable @@ -7782,7 +7782,7 @@ if i32.const 0 i32.const 72 - i32.const 221 + i32.const 220 i32.const 0 call $~lib/env/abort unreachable @@ -7795,7 +7795,7 @@ if i32.const 0 i32.const 72 - i32.const 222 + i32.const 221 i32.const 0 call $~lib/env/abort unreachable @@ -7808,7 +7808,7 @@ if i32.const 0 i32.const 72 - i32.const 223 + i32.const 222 i32.const 0 call $~lib/env/abort unreachable @@ -7821,7 +7821,7 @@ if i32.const 0 i32.const 72 - i32.const 225 + i32.const 224 i32.const 0 call $~lib/env/abort unreachable @@ -7834,7 +7834,7 @@ if i32.const 0 i32.const 72 - i32.const 226 + i32.const 225 i32.const 0 call $~lib/env/abort unreachable @@ -7847,7 +7847,7 @@ if i32.const 0 i32.const 72 - i32.const 227 + i32.const 226 i32.const 0 call $~lib/env/abort unreachable @@ -7860,7 +7860,7 @@ if i32.const 0 i32.const 72 - i32.const 228 + i32.const 227 i32.const 0 call $~lib/env/abort unreachable @@ -7873,7 +7873,7 @@ if i32.const 0 i32.const 72 - i32.const 229 + i32.const 228 i32.const 0 call $~lib/env/abort unreachable @@ -7886,7 +7886,7 @@ if i32.const 0 i32.const 72 - i32.const 230 + i32.const 229 i32.const 0 call $~lib/env/abort unreachable @@ -7899,7 +7899,7 @@ if i32.const 0 i32.const 72 - i32.const 231 + i32.const 230 i32.const 0 call $~lib/env/abort unreachable @@ -7912,7 +7912,7 @@ if i32.const 0 i32.const 72 - i32.const 232 + i32.const 231 i32.const 0 call $~lib/env/abort unreachable @@ -7925,7 +7925,7 @@ if i32.const 0 i32.const 72 - i32.const 233 + i32.const 232 i32.const 0 call $~lib/env/abort unreachable @@ -7938,7 +7938,7 @@ if i32.const 0 i32.const 72 - i32.const 234 + i32.const 233 i32.const 0 call $~lib/env/abort unreachable @@ -7951,7 +7951,7 @@ if i32.const 0 i32.const 72 - i32.const 235 + i32.const 234 i32.const 0 call $~lib/env/abort unreachable @@ -7964,7 +7964,7 @@ if i32.const 0 i32.const 72 - i32.const 238 + i32.const 237 i32.const 0 call $~lib/env/abort unreachable @@ -7977,7 +7977,7 @@ if i32.const 0 i32.const 72 - i32.const 239 + i32.const 238 i32.const 0 call $~lib/env/abort unreachable @@ -7990,7 +7990,7 @@ if i32.const 0 i32.const 72 - i32.const 240 + i32.const 239 i32.const 0 call $~lib/env/abort unreachable @@ -8003,7 +8003,7 @@ if i32.const 0 i32.const 72 - i32.const 241 + i32.const 240 i32.const 0 call $~lib/env/abort unreachable @@ -8016,7 +8016,7 @@ if i32.const 0 i32.const 72 - i32.const 242 + i32.const 241 i32.const 0 call $~lib/env/abort unreachable @@ -8029,7 +8029,7 @@ if i32.const 0 i32.const 72 - i32.const 243 + i32.const 242 i32.const 0 call $~lib/env/abort unreachable @@ -8042,7 +8042,7 @@ if i32.const 0 i32.const 72 - i32.const 244 + i32.const 243 i32.const 0 call $~lib/env/abort unreachable @@ -8055,7 +8055,7 @@ if i32.const 0 i32.const 72 - i32.const 245 + i32.const 244 i32.const 0 call $~lib/env/abort unreachable @@ -8068,7 +8068,7 @@ if i32.const 0 i32.const 72 - i32.const 246 + i32.const 245 i32.const 0 call $~lib/env/abort unreachable @@ -8081,7 +8081,7 @@ if i32.const 0 i32.const 72 - i32.const 247 + i32.const 246 i32.const 0 call $~lib/env/abort unreachable @@ -8094,7 +8094,7 @@ if i32.const 0 i32.const 72 - i32.const 248 + i32.const 247 i32.const 0 call $~lib/env/abort unreachable @@ -8107,7 +8107,7 @@ if i32.const 0 i32.const 72 - i32.const 251 + i32.const 250 i32.const 0 call $~lib/env/abort unreachable @@ -8120,7 +8120,7 @@ if i32.const 0 i32.const 72 - i32.const 252 + i32.const 251 i32.const 0 call $~lib/env/abort unreachable @@ -8133,7 +8133,7 @@ if i32.const 0 i32.const 72 - i32.const 253 + i32.const 252 i32.const 0 call $~lib/env/abort unreachable @@ -8146,7 +8146,7 @@ if i32.const 0 i32.const 72 - i32.const 254 + i32.const 253 i32.const 0 call $~lib/env/abort unreachable @@ -8159,7 +8159,7 @@ if i32.const 0 i32.const 72 - i32.const 255 + i32.const 254 i32.const 0 call $~lib/env/abort unreachable @@ -8172,7 +8172,7 @@ if i32.const 0 i32.const 72 - i32.const 261 + i32.const 260 i32.const 0 call $~lib/env/abort unreachable @@ -8185,7 +8185,7 @@ if i32.const 0 i32.const 72 - i32.const 262 + i32.const 261 i32.const 0 call $~lib/env/abort unreachable @@ -8198,7 +8198,7 @@ if i32.const 0 i32.const 72 - i32.const 263 + i32.const 262 i32.const 0 call $~lib/env/abort unreachable @@ -8211,7 +8211,7 @@ if i32.const 0 i32.const 72 - i32.const 264 + i32.const 263 i32.const 0 call $~lib/env/abort unreachable @@ -8224,7 +8224,7 @@ if i32.const 0 i32.const 72 - i32.const 266 + i32.const 265 i32.const 0 call $~lib/env/abort unreachable @@ -8237,7 +8237,7 @@ if i32.const 0 i32.const 72 - i32.const 267 + i32.const 266 i32.const 0 call $~lib/env/abort unreachable @@ -8250,7 +8250,7 @@ if i32.const 0 i32.const 72 - i32.const 268 + i32.const 267 i32.const 0 call $~lib/env/abort unreachable @@ -8263,7 +8263,7 @@ if i32.const 0 i32.const 72 - i32.const 269 + i32.const 268 i32.const 0 call $~lib/env/abort unreachable @@ -8276,7 +8276,7 @@ if i32.const 0 i32.const 72 - i32.const 270 + i32.const 269 i32.const 0 call $~lib/env/abort unreachable @@ -8289,7 +8289,7 @@ if i32.const 0 i32.const 72 - i32.const 271 + i32.const 270 i32.const 0 call $~lib/env/abort unreachable @@ -8302,7 +8302,7 @@ if i32.const 0 i32.const 72 - i32.const 273 + i32.const 272 i32.const 0 call $~lib/env/abort unreachable @@ -8315,7 +8315,7 @@ if i32.const 0 i32.const 72 - i32.const 274 + i32.const 273 i32.const 0 call $~lib/env/abort unreachable @@ -8328,7 +8328,7 @@ if i32.const 0 i32.const 72 - i32.const 275 + i32.const 274 i32.const 0 call $~lib/env/abort unreachable @@ -8341,7 +8341,7 @@ if i32.const 0 i32.const 72 - i32.const 276 + i32.const 275 i32.const 0 call $~lib/env/abort unreachable @@ -8354,7 +8354,7 @@ if i32.const 0 i32.const 72 - i32.const 277 + i32.const 276 i32.const 0 call $~lib/env/abort unreachable @@ -8367,7 +8367,7 @@ if i32.const 0 i32.const 72 - i32.const 278 + i32.const 277 i32.const 0 call $~lib/env/abort unreachable @@ -8380,7 +8380,7 @@ if i32.const 0 i32.const 72 - i32.const 279 + i32.const 278 i32.const 0 call $~lib/env/abort unreachable @@ -8393,7 +8393,7 @@ if i32.const 0 i32.const 72 - i32.const 280 + i32.const 279 i32.const 0 call $~lib/env/abort unreachable @@ -8406,7 +8406,7 @@ if i32.const 0 i32.const 72 - i32.const 281 + i32.const 280 i32.const 0 call $~lib/env/abort unreachable @@ -8419,7 +8419,7 @@ if i32.const 0 i32.const 72 - i32.const 283 + i32.const 282 i32.const 0 call $~lib/env/abort unreachable @@ -8432,7 +8432,7 @@ if i32.const 0 i32.const 72 - i32.const 284 + i32.const 283 i32.const 0 call $~lib/env/abort unreachable @@ -8445,7 +8445,7 @@ if i32.const 0 i32.const 72 - i32.const 286 + i32.const 285 i32.const 0 call $~lib/env/abort unreachable @@ -8458,7 +8458,7 @@ if i32.const 0 i32.const 72 - i32.const 287 + i32.const 286 i32.const 0 call $~lib/env/abort unreachable @@ -8471,7 +8471,7 @@ if i32.const 0 i32.const 72 - i32.const 288 + i32.const 287 i32.const 0 call $~lib/env/abort unreachable @@ -8484,7 +8484,7 @@ if i32.const 0 i32.const 72 - i32.const 289 + i32.const 288 i32.const 0 call $~lib/env/abort unreachable @@ -8497,7 +8497,7 @@ if i32.const 0 i32.const 72 - i32.const 291 + i32.const 290 i32.const 0 call $~lib/env/abort unreachable @@ -8510,7 +8510,7 @@ if i32.const 0 i32.const 72 - i32.const 292 + i32.const 291 i32.const 0 call $~lib/env/abort unreachable @@ -8523,7 +8523,7 @@ if i32.const 0 i32.const 72 - i32.const 293 + i32.const 292 i32.const 0 call $~lib/env/abort unreachable @@ -8536,7 +8536,7 @@ if i32.const 0 i32.const 72 - i32.const 294 + i32.const 293 i32.const 0 call $~lib/env/abort unreachable @@ -8549,7 +8549,7 @@ if i32.const 0 i32.const 72 - i32.const 295 + i32.const 294 i32.const 0 call $~lib/env/abort unreachable @@ -8562,7 +8562,7 @@ if i32.const 0 i32.const 72 - i32.const 296 + i32.const 295 i32.const 0 call $~lib/env/abort unreachable @@ -8575,7 +8575,7 @@ if i32.const 0 i32.const 72 - i32.const 297 + i32.const 296 i32.const 0 call $~lib/env/abort unreachable @@ -8588,7 +8588,7 @@ if i32.const 0 i32.const 72 - i32.const 298 + i32.const 297 i32.const 0 call $~lib/env/abort unreachable @@ -8601,7 +8601,7 @@ if i32.const 0 i32.const 72 - i32.const 299 + i32.const 298 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.ts b/tests/compiler/std/string.ts index e448e0f3..777dcce1 100644 --- a/tests/compiler/std/string.ts +++ b/tests/compiler/std/string.ts @@ -1,4 +1,3 @@ -import "allocator/arena"; import "collector/dummy"; import { diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 8785ede5..61eb3f6d 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -1,9 +1,9 @@ (module + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) @@ -177,12 +177,12 @@ (data (i32.const 6696) "\01\00\00\00\16\00\00\00\00\00\00\00\00\00\00\000\00.\000\000\000\000\003\005\006\008\009\00") (table $0 11 funcref) (elem (i32.const 0) $null $~lib/string/String~iterate $~lib/array/Array<~lib/string/String>~iterate $~lib/array/Array<~lib/string/String>~iterate $~lib/arraybuffer/ArrayBuffer~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate $~lib/array/Array~iterate) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $std/string/str (mut i32) (i32.const 24)) (global $std/string/nullStr (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/string/String.MAX_LENGTH i32 (i32.const 536870904)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) @@ -369,7 +369,7 @@ if i32.const 0 i32.const 120 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -386,7 +386,7 @@ if i32.const 0 i32.const 120 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -3947,7 +3947,7 @@ if i32.const 0 i32.const 120 - i32.const 113 + i32.const 117 i32.const 8 call $~lib/env/abort unreachable @@ -6783,7 +6783,7 @@ if i32.const 0 i32.const 120 - i32.const 173 + i32.const 177 i32.const 4 call $~lib/env/abort unreachable @@ -6800,7 +6800,7 @@ if i32.const 0 i32.const 120 - i32.const 175 + i32.const 179 i32.const 4 call $~lib/env/abort unreachable @@ -6875,7 +6875,7 @@ if i32.const 0 i32.const 72 - i32.const 18 + i32.const 17 i32.const 0 call $~lib/env/abort unreachable @@ -6888,7 +6888,7 @@ if i32.const 0 i32.const 72 - i32.const 20 + i32.const 19 i32.const 0 call $~lib/env/abort unreachable @@ -6902,7 +6902,7 @@ if i32.const 0 i32.const 72 - i32.const 21 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -6925,7 +6925,7 @@ if i32.const 0 i32.const 72 - i32.const 23 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -6938,7 +6938,7 @@ if i32.const 0 i32.const 72 - i32.const 24 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable @@ -6953,7 +6953,7 @@ if i32.const 0 i32.const 72 - i32.const 25 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -6966,7 +6966,7 @@ if i32.const 0 i32.const 72 - i32.const 27 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -6979,7 +6979,7 @@ if i32.const 0 i32.const 72 - i32.const 28 + i32.const 27 i32.const 0 call $~lib/env/abort unreachable @@ -6990,7 +6990,7 @@ if i32.const 264 i32.const 72 - i32.const 29 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable @@ -7003,7 +7003,7 @@ if i32.const 0 i32.const 72 - i32.const 31 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable @@ -7016,7 +7016,7 @@ if i32.const 0 i32.const 72 - i32.const 32 + i32.const 31 i32.const 0 call $~lib/env/abort unreachable @@ -7041,7 +7041,7 @@ if i32.const 0 i32.const 72 - i32.const 33 + i32.const 32 i32.const 0 call $~lib/env/abort unreachable @@ -7056,7 +7056,7 @@ if i32.const 0 i32.const 72 - i32.const 35 + i32.const 34 i32.const 0 call $~lib/env/abort unreachable @@ -7071,7 +7071,7 @@ if i32.const 0 i32.const 72 - i32.const 36 + i32.const 35 i32.const 0 call $~lib/env/abort unreachable @@ -7086,7 +7086,7 @@ if i32.const 0 i32.const 72 - i32.const 37 + i32.const 36 i32.const 0 call $~lib/env/abort unreachable @@ -7101,7 +7101,7 @@ if i32.const 0 i32.const 72 - i32.const 38 + i32.const 37 i32.const 0 call $~lib/env/abort unreachable @@ -7116,7 +7116,7 @@ if i32.const 0 i32.const 72 - i32.const 39 + i32.const 38 i32.const 0 call $~lib/env/abort unreachable @@ -7131,7 +7131,7 @@ if i32.const 0 i32.const 72 - i32.const 40 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable @@ -7146,7 +7146,7 @@ if i32.const 0 i32.const 72 - i32.const 41 + i32.const 40 i32.const 0 call $~lib/env/abort unreachable @@ -7161,7 +7161,7 @@ if i32.const 0 i32.const 72 - i32.const 42 + i32.const 41 i32.const 0 call $~lib/env/abort unreachable @@ -7176,7 +7176,7 @@ if i32.const 0 i32.const 72 - i32.const 44 + i32.const 43 i32.const 0 call $~lib/env/abort unreachable @@ -7191,7 +7191,7 @@ if i32.const 0 i32.const 72 - i32.const 45 + i32.const 44 i32.const 0 call $~lib/env/abort unreachable @@ -7206,7 +7206,7 @@ if i32.const 0 i32.const 72 - i32.const 46 + i32.const 45 i32.const 0 call $~lib/env/abort unreachable @@ -7221,7 +7221,7 @@ if i32.const 0 i32.const 72 - i32.const 47 + i32.const 46 i32.const 0 call $~lib/env/abort unreachable @@ -7236,7 +7236,7 @@ if i32.const 0 i32.const 72 - i32.const 48 + i32.const 47 i32.const 0 call $~lib/env/abort unreachable @@ -7251,7 +7251,7 @@ if i32.const 0 i32.const 72 - i32.const 49 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable @@ -7266,7 +7266,7 @@ if i32.const 0 i32.const 72 - i32.const 50 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable @@ -7281,7 +7281,7 @@ if i32.const 0 i32.const 72 - i32.const 51 + i32.const 50 i32.const 0 call $~lib/env/abort unreachable @@ -7296,7 +7296,7 @@ if i32.const 0 i32.const 72 - i32.const 53 + i32.const 52 i32.const 0 call $~lib/env/abort unreachable @@ -7311,7 +7311,7 @@ if i32.const 0 i32.const 72 - i32.const 54 + i32.const 53 i32.const 0 call $~lib/env/abort unreachable @@ -7323,6 +7323,21 @@ i32.const 0 i32.eq i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 54 + i32.const 0 + call $~lib/env/abort + unreachable + end + global.get $std/string/str + global.get $std/string/str + i32.const 0 + call $~lib/string/String#indexOf + i32.const 0 + i32.eq + i32.eqz if i32.const 0 i32.const 72 @@ -7332,7 +7347,7 @@ unreachable end global.get $std/string/str - global.get $std/string/str + i32.const 416 i32.const 0 call $~lib/string/String#indexOf i32.const 0 @@ -7347,21 +7362,6 @@ unreachable end global.get $std/string/str - i32.const 416 - i32.const 0 - call $~lib/string/String#indexOf - i32.const 0 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 72 - i32.const 57 - i32.const 0 - call $~lib/env/abort - unreachable - end - global.get $std/string/str i32.const 720 i32.const 0 call $~lib/string/String#indexOf @@ -7371,7 +7371,7 @@ if i32.const 0 i32.const 72 - i32.const 58 + i32.const 57 i32.const 0 call $~lib/env/abort unreachable @@ -7386,7 +7386,7 @@ if i32.const 0 i32.const 72 - i32.const 59 + i32.const 58 i32.const 0 call $~lib/env/abort unreachable @@ -7401,7 +7401,7 @@ if i32.const 0 i32.const 72 - i32.const 60 + i32.const 59 i32.const 0 call $~lib/env/abort unreachable @@ -7416,7 +7416,7 @@ if i32.const 0 i32.const 72 - i32.const 61 + i32.const 60 i32.const 0 call $~lib/env/abort unreachable @@ -7431,7 +7431,7 @@ if i32.const 0 i32.const 72 - i32.const 62 + i32.const 61 i32.const 0 call $~lib/env/abort unreachable @@ -7446,7 +7446,7 @@ if i32.const 0 i32.const 72 - i32.const 64 + i32.const 63 i32.const 0 call $~lib/env/abort unreachable @@ -7461,7 +7461,7 @@ if i32.const 0 i32.const 72 - i32.const 65 + i32.const 64 i32.const 0 call $~lib/env/abort unreachable @@ -7477,7 +7477,7 @@ if i32.const 0 i32.const 72 - i32.const 66 + i32.const 65 i32.const 0 call $~lib/env/abort unreachable @@ -7492,7 +7492,7 @@ if i32.const 0 i32.const 72 - i32.const 67 + i32.const 66 i32.const 0 call $~lib/env/abort unreachable @@ -7507,7 +7507,7 @@ if i32.const 0 i32.const 72 - i32.const 68 + i32.const 67 i32.const 0 call $~lib/env/abort unreachable @@ -7522,7 +7522,7 @@ if i32.const 0 i32.const 72 - i32.const 69 + i32.const 68 i32.const 0 call $~lib/env/abort unreachable @@ -7537,7 +7537,7 @@ if i32.const 0 i32.const 72 - i32.const 70 + i32.const 69 i32.const 0 call $~lib/env/abort unreachable @@ -7552,7 +7552,7 @@ if i32.const 0 i32.const 72 - i32.const 71 + i32.const 70 i32.const 0 call $~lib/env/abort unreachable @@ -7567,7 +7567,7 @@ if i32.const 0 i32.const 72 - i32.const 72 + i32.const 71 i32.const 0 call $~lib/env/abort unreachable @@ -7582,7 +7582,7 @@ if i32.const 0 i32.const 72 - i32.const 73 + i32.const 72 i32.const 0 call $~lib/env/abort unreachable @@ -7597,7 +7597,7 @@ if i32.const 0 i32.const 72 - i32.const 74 + i32.const 73 i32.const 0 call $~lib/env/abort unreachable @@ -7611,7 +7611,7 @@ if i32.const 0 i32.const 72 - i32.const 80 + i32.const 79 i32.const 0 call $~lib/env/abort unreachable @@ -7625,7 +7625,7 @@ if i32.const 0 i32.const 72 - i32.const 81 + i32.const 80 i32.const 0 call $~lib/env/abort unreachable @@ -7639,7 +7639,7 @@ if i32.const 0 i32.const 72 - i32.const 82 + i32.const 81 i32.const 0 call $~lib/env/abort unreachable @@ -7653,7 +7653,7 @@ if i32.const 0 i32.const 72 - i32.const 83 + i32.const 82 i32.const 0 call $~lib/env/abort unreachable @@ -7667,7 +7667,7 @@ if i32.const 0 i32.const 72 - i32.const 84 + i32.const 83 i32.const 0 call $~lib/env/abort unreachable @@ -7681,7 +7681,7 @@ if i32.const 0 i32.const 72 - i32.const 85 + i32.const 84 i32.const 0 call $~lib/env/abort unreachable @@ -7695,7 +7695,7 @@ if i32.const 0 i32.const 72 - i32.const 86 + i32.const 85 i32.const 0 call $~lib/env/abort unreachable @@ -7709,7 +7709,7 @@ if i32.const 0 i32.const 72 - i32.const 87 + i32.const 86 i32.const 0 call $~lib/env/abort unreachable @@ -7722,7 +7722,7 @@ if i32.const 0 i32.const 72 - i32.const 89 + i32.const 88 i32.const 0 call $~lib/env/abort unreachable @@ -7735,7 +7735,7 @@ if i32.const 0 i32.const 72 - i32.const 90 + i32.const 89 i32.const 0 call $~lib/env/abort unreachable @@ -7748,7 +7748,7 @@ if i32.const 0 i32.const 72 - i32.const 91 + i32.const 90 i32.const 0 call $~lib/env/abort unreachable @@ -7761,7 +7761,7 @@ if i32.const 0 i32.const 72 - i32.const 92 + i32.const 91 i32.const 0 call $~lib/env/abort unreachable @@ -7774,7 +7774,7 @@ if i32.const 0 i32.const 72 - i32.const 93 + i32.const 92 i32.const 0 call $~lib/env/abort unreachable @@ -7790,7 +7790,7 @@ if i32.const 0 i32.const 72 - i32.const 96 + i32.const 95 i32.const 0 call $~lib/env/abort unreachable @@ -7802,7 +7802,7 @@ if i32.const 0 i32.const 72 - i32.const 97 + i32.const 96 i32.const 0 call $~lib/env/abort unreachable @@ -7814,7 +7814,7 @@ if i32.const 0 i32.const 72 - i32.const 98 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable @@ -7826,7 +7826,7 @@ if i32.const 0 i32.const 72 - i32.const 99 + i32.const 98 i32.const 0 call $~lib/env/abort unreachable @@ -7835,6 +7835,18 @@ i32.const 416 call $~lib/string/String.__ne i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 99 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 456 + i32.const 1144 + call $~lib/string/String.__ne + i32.eqz if i32.const 0 i32.const 72 @@ -7844,25 +7856,13 @@ unreachable end i32.const 456 - i32.const 1144 - call $~lib/string/String.__ne - i32.eqz - if - i32.const 0 - i32.const 72 - i32.const 101 - i32.const 0 - call $~lib/env/abort - unreachable - end - i32.const 456 i32.const 456 call $~lib/string/String.__eq i32.eqz if i32.const 0 i32.const 72 - i32.const 102 + i32.const 101 i32.const 0 call $~lib/env/abort unreachable @@ -7874,7 +7874,7 @@ if i32.const 0 i32.const 72 - i32.const 103 + i32.const 102 i32.const 0 call $~lib/env/abort unreachable @@ -7886,7 +7886,7 @@ if i32.const 0 i32.const 72 - i32.const 104 + i32.const 103 i32.const 0 call $~lib/env/abort unreachable @@ -7898,7 +7898,7 @@ if i32.const 0 i32.const 72 - i32.const 105 + i32.const 104 i32.const 0 call $~lib/env/abort unreachable @@ -7910,7 +7910,7 @@ if i32.const 0 i32.const 72 - i32.const 106 + i32.const 105 i32.const 0 call $~lib/env/abort unreachable @@ -7922,7 +7922,7 @@ if i32.const 0 i32.const 72 - i32.const 107 + i32.const 106 i32.const 0 call $~lib/env/abort unreachable @@ -7934,7 +7934,7 @@ if i32.const 0 i32.const 72 - i32.const 108 + i32.const 107 i32.const 0 call $~lib/env/abort unreachable @@ -7946,7 +7946,7 @@ if i32.const 0 i32.const 72 - i32.const 109 + i32.const 108 i32.const 0 call $~lib/env/abort unreachable @@ -7955,6 +7955,18 @@ i32.const 456 call $~lib/string/String.__gt i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 110 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 1496 + i32.const 456 + call $~lib/string/String.__gt + i32.eqz if i32.const 0 i32.const 72 @@ -7964,8 +7976,8 @@ unreachable end i32.const 1496 - i32.const 456 - call $~lib/string/String.__gt + i32.const 1520 + call $~lib/string/String.__gte i32.eqz if i32.const 0 @@ -7976,8 +7988,8 @@ unreachable end i32.const 1496 - i32.const 1520 - call $~lib/string/String.__gte + i32.const 1168 + call $~lib/string/String.__gt i32.eqz if i32.const 0 @@ -7989,7 +8001,8 @@ end i32.const 1496 i32.const 1168 - call $~lib/string/String.__gt + call $~lib/string/String.__lt + i32.eqz i32.eqz if i32.const 0 @@ -7999,21 +8012,21 @@ call $~lib/env/abort unreachable end - i32.const 1496 - i32.const 1168 + i32.const 1144 + global.get $std/string/nullStr call $~lib/string/String.__lt i32.eqz i32.eqz if i32.const 0 i32.const 72 - i32.const 115 + i32.const 116 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1144 global.get $std/string/nullStr + i32.const 1144 call $~lib/string/String.__lt i32.eqz i32.eqz @@ -8025,19 +8038,6 @@ call $~lib/env/abort unreachable end - global.get $std/string/nullStr - i32.const 1144 - call $~lib/string/String.__lt - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 72 - i32.const 118 - i32.const 0 - call $~lib/env/abort - unreachable - end i32.const 480 i32.const 416 call $~lib/string/String.__gt @@ -8045,7 +8045,7 @@ if i32.const 0 i32.const 72 - i32.const 120 + i32.const 119 i32.const 0 call $~lib/env/abort unreachable @@ -8057,7 +8057,7 @@ if i32.const 0 i32.const 72 - i32.const 121 + i32.const 120 i32.const 0 call $~lib/env/abort unreachable @@ -8069,7 +8069,7 @@ if i32.const 0 i32.const 72 - i32.const 122 + i32.const 121 i32.const 0 call $~lib/env/abort unreachable @@ -8081,7 +8081,7 @@ if i32.const 0 i32.const 72 - i32.const 123 + i32.const 122 i32.const 0 call $~lib/env/abort unreachable @@ -8094,7 +8094,7 @@ if i32.const 0 i32.const 72 - i32.const 124 + i32.const 123 i32.const 0 call $~lib/env/abort unreachable @@ -8104,6 +8104,19 @@ call $~lib/string/String.__gt i32.eqz i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 124 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 416 + i32.const 416 + call $~lib/string/String.__lt + i32.eqz + i32.eqz if i32.const 0 i32.const 72 @@ -8114,7 +8127,7 @@ end i32.const 416 i32.const 416 - call $~lib/string/String.__lt + call $~lib/string/String.__gt i32.eqz i32.eqz if @@ -8127,8 +8140,7 @@ end i32.const 416 i32.const 416 - call $~lib/string/String.__gt - i32.eqz + call $~lib/string/String.__gte i32.eqz if i32.const 0 @@ -8140,24 +8152,12 @@ end i32.const 416 i32.const 416 - call $~lib/string/String.__gte - i32.eqz - if - i32.const 0 - i32.const 72 - i32.const 128 - i32.const 0 - call $~lib/env/abort - unreachable - end - i32.const 416 - i32.const 416 call $~lib/string/String.__lte i32.eqz if i32.const 0 i32.const 72 - i32.const 129 + i32.const 128 i32.const 0 call $~lib/env/abort unreachable @@ -8178,7 +8178,7 @@ if i32.const 0 i32.const 72 - i32.const 133 + i32.const 132 i32.const 0 call $~lib/env/abort unreachable @@ -8191,7 +8191,7 @@ if i32.const 0 i32.const 72 - i32.const 135 + i32.const 134 i32.const 0 call $~lib/env/abort unreachable @@ -8205,7 +8205,7 @@ if i32.const 0 i32.const 72 - i32.const 137 + i32.const 136 i32.const 0 call $~lib/env/abort unreachable @@ -8219,7 +8219,7 @@ if i32.const 0 i32.const 72 - i32.const 138 + i32.const 137 i32.const 0 call $~lib/env/abort unreachable @@ -8233,7 +8233,7 @@ if i32.const 0 i32.const 72 - i32.const 139 + i32.const 138 i32.const 0 call $~lib/env/abort unreachable @@ -8247,7 +8247,7 @@ if i32.const 0 i32.const 72 - i32.const 140 + i32.const 139 i32.const 0 call $~lib/env/abort unreachable @@ -8261,7 +8261,7 @@ if i32.const 0 i32.const 72 - i32.const 141 + i32.const 140 i32.const 0 call $~lib/env/abort unreachable @@ -8275,7 +8275,7 @@ if i32.const 0 i32.const 72 - i32.const 142 + i32.const 141 i32.const 0 call $~lib/env/abort unreachable @@ -8289,7 +8289,7 @@ if i32.const 0 i32.const 72 - i32.const 143 + i32.const 142 i32.const 0 call $~lib/env/abort unreachable @@ -8303,7 +8303,7 @@ if i32.const 0 i32.const 72 - i32.const 144 + i32.const 143 i32.const 0 call $~lib/env/abort unreachable @@ -8317,7 +8317,7 @@ if i32.const 0 i32.const 72 - i32.const 145 + i32.const 144 i32.const 0 call $~lib/env/abort unreachable @@ -8334,7 +8334,7 @@ if i32.const 0 i32.const 72 - i32.const 149 + i32.const 148 i32.const 0 call $~lib/env/abort unreachable @@ -8349,7 +8349,7 @@ if i32.const 0 i32.const 72 - i32.const 150 + i32.const 149 i32.const 0 call $~lib/env/abort unreachable @@ -8364,7 +8364,7 @@ if i32.const 0 i32.const 72 - i32.const 151 + i32.const 150 i32.const 0 call $~lib/env/abort unreachable @@ -8379,7 +8379,7 @@ if i32.const 0 i32.const 72 - i32.const 152 + i32.const 151 i32.const 0 call $~lib/env/abort unreachable @@ -8394,7 +8394,7 @@ if i32.const 0 i32.const 72 - i32.const 153 + i32.const 152 i32.const 0 call $~lib/env/abort unreachable @@ -8409,7 +8409,7 @@ if i32.const 0 i32.const 72 - i32.const 154 + i32.const 153 i32.const 0 call $~lib/env/abort unreachable @@ -8424,7 +8424,7 @@ if i32.const 0 i32.const 72 - i32.const 155 + i32.const 154 i32.const 0 call $~lib/env/abort unreachable @@ -8452,7 +8452,7 @@ if i32.const 0 i32.const 72 - i32.const 160 + i32.const 159 i32.const 0 call $~lib/env/abort unreachable @@ -8470,7 +8470,7 @@ if i32.const 0 i32.const 72 - i32.const 162 + i32.const 161 i32.const 0 call $~lib/env/abort unreachable @@ -8498,7 +8498,7 @@ if i32.const 0 i32.const 72 - i32.const 164 + i32.const 163 i32.const 0 call $~lib/env/abort unreachable @@ -8526,7 +8526,7 @@ if i32.const 0 i32.const 72 - i32.const 166 + i32.const 165 i32.const 0 call $~lib/env/abort unreachable @@ -8574,7 +8574,7 @@ if i32.const 0 i32.const 72 - i32.const 168 + i32.const 167 i32.const 0 call $~lib/env/abort unreachable @@ -8622,7 +8622,7 @@ if i32.const 0 i32.const 72 - i32.const 170 + i32.const 169 i32.const 0 call $~lib/env/abort unreachable @@ -8680,7 +8680,7 @@ if i32.const 0 i32.const 72 - i32.const 172 + i32.const 171 i32.const 0 call $~lib/env/abort unreachable @@ -8738,7 +8738,7 @@ if i32.const 0 i32.const 72 - i32.const 174 + i32.const 173 i32.const 0 call $~lib/env/abort unreachable @@ -8796,7 +8796,7 @@ if i32.const 0 i32.const 72 - i32.const 176 + i32.const 175 i32.const 0 call $~lib/env/abort unreachable @@ -8844,7 +8844,7 @@ if i32.const 0 i32.const 72 - i32.const 178 + i32.const 177 i32.const 0 call $~lib/env/abort unreachable @@ -8862,7 +8862,7 @@ if i32.const 0 i32.const 72 - i32.const 180 + i32.const 179 i32.const 0 call $~lib/env/abort unreachable @@ -8890,7 +8890,7 @@ if i32.const 0 i32.const 72 - i32.const 182 + i32.const 181 i32.const 0 call $~lib/env/abort unreachable @@ -8918,7 +8918,7 @@ if i32.const 0 i32.const 72 - i32.const 184 + i32.const 183 i32.const 0 call $~lib/env/abort unreachable @@ -8966,7 +8966,7 @@ if i32.const 0 i32.const 72 - i32.const 186 + i32.const 185 i32.const 0 call $~lib/env/abort unreachable @@ -9014,7 +9014,7 @@ if i32.const 0 i32.const 72 - i32.const 188 + i32.const 187 i32.const 0 call $~lib/env/abort unreachable @@ -9062,7 +9062,7 @@ if i32.const 0 i32.const 72 - i32.const 190 + i32.const 189 i32.const 0 call $~lib/env/abort unreachable @@ -9075,7 +9075,7 @@ if i32.const 0 i32.const 72 - i32.const 192 + i32.const 191 i32.const 0 call $~lib/env/abort unreachable @@ -9088,7 +9088,7 @@ if i32.const 0 i32.const 72 - i32.const 193 + i32.const 192 i32.const 0 call $~lib/env/abort unreachable @@ -9101,7 +9101,7 @@ if i32.const 0 i32.const 72 - i32.const 194 + i32.const 193 i32.const 0 call $~lib/env/abort unreachable @@ -9114,7 +9114,7 @@ if i32.const 0 i32.const 72 - i32.const 195 + i32.const 194 i32.const 0 call $~lib/env/abort unreachable @@ -9127,7 +9127,7 @@ if i32.const 0 i32.const 72 - i32.const 196 + i32.const 195 i32.const 0 call $~lib/env/abort unreachable @@ -9140,7 +9140,7 @@ if i32.const 0 i32.const 72 - i32.const 197 + i32.const 196 i32.const 0 call $~lib/env/abort unreachable @@ -9153,7 +9153,7 @@ if i32.const 0 i32.const 72 - i32.const 198 + i32.const 197 i32.const 0 call $~lib/env/abort unreachable @@ -9166,7 +9166,7 @@ if i32.const 0 i32.const 72 - i32.const 199 + i32.const 198 i32.const 0 call $~lib/env/abort unreachable @@ -9179,7 +9179,7 @@ if i32.const 0 i32.const 72 - i32.const 200 + i32.const 199 i32.const 0 call $~lib/env/abort unreachable @@ -9192,7 +9192,7 @@ if i32.const 0 i32.const 72 - i32.const 201 + i32.const 200 i32.const 0 call $~lib/env/abort unreachable @@ -9205,7 +9205,7 @@ if i32.const 0 i32.const 72 - i32.const 202 + i32.const 201 i32.const 0 call $~lib/env/abort unreachable @@ -9218,7 +9218,7 @@ if i32.const 0 i32.const 72 - i32.const 203 + i32.const 202 i32.const 0 call $~lib/env/abort unreachable @@ -9231,7 +9231,7 @@ if i32.const 0 i32.const 72 - i32.const 204 + i32.const 203 i32.const 0 call $~lib/env/abort unreachable @@ -9244,7 +9244,7 @@ if i32.const 0 i32.const 72 - i32.const 205 + i32.const 204 i32.const 0 call $~lib/env/abort unreachable @@ -9257,7 +9257,7 @@ if i32.const 0 i32.const 72 - i32.const 207 + i32.const 206 i32.const 0 call $~lib/env/abort unreachable @@ -9270,7 +9270,7 @@ if i32.const 0 i32.const 72 - i32.const 208 + i32.const 207 i32.const 0 call $~lib/env/abort unreachable @@ -9283,7 +9283,7 @@ if i32.const 0 i32.const 72 - i32.const 209 + i32.const 208 i32.const 0 call $~lib/env/abort unreachable @@ -9296,7 +9296,7 @@ if i32.const 0 i32.const 72 - i32.const 210 + i32.const 209 i32.const 0 call $~lib/env/abort unreachable @@ -9309,7 +9309,7 @@ if i32.const 0 i32.const 72 - i32.const 211 + i32.const 210 i32.const 0 call $~lib/env/abort unreachable @@ -9322,7 +9322,7 @@ if i32.const 0 i32.const 72 - i32.const 213 + i32.const 212 i32.const 0 call $~lib/env/abort unreachable @@ -9335,7 +9335,7 @@ if i32.const 0 i32.const 72 - i32.const 214 + i32.const 213 i32.const 0 call $~lib/env/abort unreachable @@ -9348,7 +9348,7 @@ if i32.const 0 i32.const 72 - i32.const 215 + i32.const 214 i32.const 0 call $~lib/env/abort unreachable @@ -9361,7 +9361,7 @@ if i32.const 0 i32.const 72 - i32.const 216 + i32.const 215 i32.const 0 call $~lib/env/abort unreachable @@ -9374,7 +9374,7 @@ if i32.const 0 i32.const 72 - i32.const 217 + i32.const 216 i32.const 0 call $~lib/env/abort unreachable @@ -9387,7 +9387,7 @@ if i32.const 0 i32.const 72 - i32.const 218 + i32.const 217 i32.const 0 call $~lib/env/abort unreachable @@ -9400,7 +9400,7 @@ if i32.const 0 i32.const 72 - i32.const 219 + i32.const 218 i32.const 0 call $~lib/env/abort unreachable @@ -9413,7 +9413,7 @@ if i32.const 0 i32.const 72 - i32.const 220 + i32.const 219 i32.const 0 call $~lib/env/abort unreachable @@ -9426,7 +9426,7 @@ if i32.const 0 i32.const 72 - i32.const 221 + i32.const 220 i32.const 0 call $~lib/env/abort unreachable @@ -9439,7 +9439,7 @@ if i32.const 0 i32.const 72 - i32.const 222 + i32.const 221 i32.const 0 call $~lib/env/abort unreachable @@ -9452,7 +9452,7 @@ if i32.const 0 i32.const 72 - i32.const 223 + i32.const 222 i32.const 0 call $~lib/env/abort unreachable @@ -9465,7 +9465,7 @@ if i32.const 0 i32.const 72 - i32.const 225 + i32.const 224 i32.const 0 call $~lib/env/abort unreachable @@ -9478,7 +9478,7 @@ if i32.const 0 i32.const 72 - i32.const 226 + i32.const 225 i32.const 0 call $~lib/env/abort unreachable @@ -9491,7 +9491,7 @@ if i32.const 0 i32.const 72 - i32.const 227 + i32.const 226 i32.const 0 call $~lib/env/abort unreachable @@ -9504,7 +9504,7 @@ if i32.const 0 i32.const 72 - i32.const 228 + i32.const 227 i32.const 0 call $~lib/env/abort unreachable @@ -9517,7 +9517,7 @@ if i32.const 0 i32.const 72 - i32.const 229 + i32.const 228 i32.const 0 call $~lib/env/abort unreachable @@ -9530,7 +9530,7 @@ if i32.const 0 i32.const 72 - i32.const 230 + i32.const 229 i32.const 0 call $~lib/env/abort unreachable @@ -9543,7 +9543,7 @@ if i32.const 0 i32.const 72 - i32.const 231 + i32.const 230 i32.const 0 call $~lib/env/abort unreachable @@ -9556,7 +9556,7 @@ if i32.const 0 i32.const 72 - i32.const 232 + i32.const 231 i32.const 0 call $~lib/env/abort unreachable @@ -9569,7 +9569,7 @@ if i32.const 0 i32.const 72 - i32.const 233 + i32.const 232 i32.const 0 call $~lib/env/abort unreachable @@ -9582,7 +9582,7 @@ if i32.const 0 i32.const 72 - i32.const 234 + i32.const 233 i32.const 0 call $~lib/env/abort unreachable @@ -9595,7 +9595,7 @@ if i32.const 0 i32.const 72 - i32.const 235 + i32.const 234 i32.const 0 call $~lib/env/abort unreachable @@ -9608,7 +9608,7 @@ if i32.const 0 i32.const 72 - i32.const 238 + i32.const 237 i32.const 0 call $~lib/env/abort unreachable @@ -9621,7 +9621,7 @@ if i32.const 0 i32.const 72 - i32.const 239 + i32.const 238 i32.const 0 call $~lib/env/abort unreachable @@ -9634,7 +9634,7 @@ if i32.const 0 i32.const 72 - i32.const 240 + i32.const 239 i32.const 0 call $~lib/env/abort unreachable @@ -9647,7 +9647,7 @@ if i32.const 0 i32.const 72 - i32.const 241 + i32.const 240 i32.const 0 call $~lib/env/abort unreachable @@ -9661,7 +9661,7 @@ if i32.const 0 i32.const 72 - i32.const 242 + i32.const 241 i32.const 0 call $~lib/env/abort unreachable @@ -9674,7 +9674,7 @@ if i32.const 0 i32.const 72 - i32.const 243 + i32.const 242 i32.const 0 call $~lib/env/abort unreachable @@ -9688,7 +9688,7 @@ if i32.const 0 i32.const 72 - i32.const 244 + i32.const 243 i32.const 0 call $~lib/env/abort unreachable @@ -9701,7 +9701,7 @@ if i32.const 0 i32.const 72 - i32.const 245 + i32.const 244 i32.const 0 call $~lib/env/abort unreachable @@ -9715,7 +9715,7 @@ if i32.const 0 i32.const 72 - i32.const 246 + i32.const 245 i32.const 0 call $~lib/env/abort unreachable @@ -9728,7 +9728,7 @@ if i32.const 0 i32.const 72 - i32.const 247 + i32.const 246 i32.const 0 call $~lib/env/abort unreachable @@ -9741,7 +9741,7 @@ if i32.const 0 i32.const 72 - i32.const 248 + i32.const 247 i32.const 0 call $~lib/env/abort unreachable @@ -9754,7 +9754,7 @@ if i32.const 0 i32.const 72 - i32.const 251 + i32.const 250 i32.const 0 call $~lib/env/abort unreachable @@ -9767,7 +9767,7 @@ if i32.const 0 i32.const 72 - i32.const 252 + i32.const 251 i32.const 0 call $~lib/env/abort unreachable @@ -9780,7 +9780,7 @@ if i32.const 0 i32.const 72 - i32.const 253 + i32.const 252 i32.const 0 call $~lib/env/abort unreachable @@ -9793,7 +9793,7 @@ if i32.const 0 i32.const 72 - i32.const 254 + i32.const 253 i32.const 0 call $~lib/env/abort unreachable @@ -9806,7 +9806,7 @@ if i32.const 0 i32.const 72 - i32.const 255 + i32.const 254 i32.const 0 call $~lib/env/abort unreachable @@ -9819,7 +9819,7 @@ if i32.const 0 i32.const 72 - i32.const 261 + i32.const 260 i32.const 0 call $~lib/env/abort unreachable @@ -9832,7 +9832,7 @@ if i32.const 0 i32.const 72 - i32.const 262 + i32.const 261 i32.const 0 call $~lib/env/abort unreachable @@ -9845,7 +9845,7 @@ if i32.const 0 i32.const 72 - i32.const 263 + i32.const 262 i32.const 0 call $~lib/env/abort unreachable @@ -9858,7 +9858,7 @@ if i32.const 0 i32.const 72 - i32.const 264 + i32.const 263 i32.const 0 call $~lib/env/abort unreachable @@ -9871,7 +9871,7 @@ if i32.const 0 i32.const 72 - i32.const 266 + i32.const 265 i32.const 0 call $~lib/env/abort unreachable @@ -9884,7 +9884,7 @@ if i32.const 0 i32.const 72 - i32.const 267 + i32.const 266 i32.const 0 call $~lib/env/abort unreachable @@ -9897,7 +9897,7 @@ if i32.const 0 i32.const 72 - i32.const 268 + i32.const 267 i32.const 0 call $~lib/env/abort unreachable @@ -9910,7 +9910,7 @@ if i32.const 0 i32.const 72 - i32.const 269 + i32.const 268 i32.const 0 call $~lib/env/abort unreachable @@ -9923,7 +9923,7 @@ if i32.const 0 i32.const 72 - i32.const 270 + i32.const 269 i32.const 0 call $~lib/env/abort unreachable @@ -9936,7 +9936,7 @@ if i32.const 0 i32.const 72 - i32.const 271 + i32.const 270 i32.const 0 call $~lib/env/abort unreachable @@ -9949,7 +9949,7 @@ if i32.const 0 i32.const 72 - i32.const 273 + i32.const 272 i32.const 0 call $~lib/env/abort unreachable @@ -9962,7 +9962,7 @@ if i32.const 0 i32.const 72 - i32.const 274 + i32.const 273 i32.const 0 call $~lib/env/abort unreachable @@ -9975,7 +9975,7 @@ if i32.const 0 i32.const 72 - i32.const 275 + i32.const 274 i32.const 0 call $~lib/env/abort unreachable @@ -9988,7 +9988,7 @@ if i32.const 0 i32.const 72 - i32.const 276 + i32.const 275 i32.const 0 call $~lib/env/abort unreachable @@ -10001,7 +10001,7 @@ if i32.const 0 i32.const 72 - i32.const 277 + i32.const 276 i32.const 0 call $~lib/env/abort unreachable @@ -10014,7 +10014,7 @@ if i32.const 0 i32.const 72 - i32.const 278 + i32.const 277 i32.const 0 call $~lib/env/abort unreachable @@ -10027,7 +10027,7 @@ if i32.const 0 i32.const 72 - i32.const 279 + i32.const 278 i32.const 0 call $~lib/env/abort unreachable @@ -10040,7 +10040,7 @@ if i32.const 0 i32.const 72 - i32.const 280 + i32.const 279 i32.const 0 call $~lib/env/abort unreachable @@ -10053,7 +10053,7 @@ if i32.const 0 i32.const 72 - i32.const 281 + i32.const 280 i32.const 0 call $~lib/env/abort unreachable @@ -10066,7 +10066,7 @@ if i32.const 0 i32.const 72 - i32.const 283 + i32.const 282 i32.const 0 call $~lib/env/abort unreachable @@ -10079,7 +10079,7 @@ if i32.const 0 i32.const 72 - i32.const 284 + i32.const 283 i32.const 0 call $~lib/env/abort unreachable @@ -10092,7 +10092,7 @@ if i32.const 0 i32.const 72 - i32.const 286 + i32.const 285 i32.const 0 call $~lib/env/abort unreachable @@ -10105,7 +10105,7 @@ if i32.const 0 i32.const 72 - i32.const 287 + i32.const 286 i32.const 0 call $~lib/env/abort unreachable @@ -10118,7 +10118,7 @@ if i32.const 0 i32.const 72 - i32.const 288 + i32.const 287 i32.const 0 call $~lib/env/abort unreachable @@ -10131,7 +10131,7 @@ if i32.const 0 i32.const 72 - i32.const 289 + i32.const 288 i32.const 0 call $~lib/env/abort unreachable @@ -10146,7 +10146,7 @@ if i32.const 0 i32.const 72 - i32.const 291 + i32.const 290 i32.const 0 call $~lib/env/abort unreachable @@ -10159,7 +10159,7 @@ if i32.const 0 i32.const 72 - i32.const 292 + i32.const 291 i32.const 0 call $~lib/env/abort unreachable @@ -10172,7 +10172,7 @@ if i32.const 0 i32.const 72 - i32.const 293 + i32.const 292 i32.const 0 call $~lib/env/abort unreachable @@ -10185,7 +10185,7 @@ if i32.const 0 i32.const 72 - i32.const 294 + i32.const 293 i32.const 0 call $~lib/env/abort unreachable @@ -10198,7 +10198,7 @@ if i32.const 0 i32.const 72 - i32.const 295 + i32.const 294 i32.const 0 call $~lib/env/abort unreachable @@ -10211,7 +10211,7 @@ if i32.const 0 i32.const 72 - i32.const 296 + i32.const 295 i32.const 0 call $~lib/env/abort unreachable @@ -10224,7 +10224,7 @@ if i32.const 0 i32.const 72 - i32.const 297 + i32.const 296 i32.const 0 call $~lib/env/abort unreachable @@ -10237,7 +10237,7 @@ if i32.const 0 i32.const 72 - i32.const 298 + i32.const 297 i32.const 0 call $~lib/env/abort unreachable @@ -10250,7 +10250,7 @@ if i32.const 0 i32.const 72 - i32.const 299 + i32.const 298 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/symbol.json b/tests/compiler/std/symbol.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/std/symbol.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 10f7e3cd..5eb2f0e9 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -144,7 +144,7 @@ if i32.const 0 i32.const 72 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -159,7 +159,7 @@ if i32.const 0 i32.const 72 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -2412,7 +2412,7 @@ if i32.const 0 i32.const 32 - i32.const 6 + i32.const 4 i32.const 0 call $~lib/env/abort unreachable @@ -2431,7 +2431,7 @@ if i32.const 0 i32.const 32 - i32.const 11 + i32.const 9 i32.const 0 call $~lib/env/abort unreachable @@ -2446,7 +2446,7 @@ if i32.const 0 i32.const 32 - i32.const 16 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -2455,7 +2455,7 @@ if i32.const 0 i32.const 32 - i32.const 17 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -2485,7 +2485,7 @@ if i32.const 0 i32.const 32 - i32.const 22 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -2497,7 +2497,7 @@ if i32.const 0 i32.const 32 - i32.const 23 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -2520,7 +2520,7 @@ if i32.const 0 i32.const 32 - i32.const 25 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable @@ -2533,7 +2533,7 @@ if i32.const 0 i32.const 32 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -2550,7 +2550,7 @@ if i32.const 0 i32.const 32 - i32.const 30 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable @@ -2563,7 +2563,7 @@ if i32.const 0 i32.const 32 - i32.const 31 + i32.const 29 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/symbol.ts b/tests/compiler/std/symbol.ts index 9604825b..9fb8c76a 100644 --- a/tests/compiler/std/symbol.ts +++ b/tests/compiler/std/symbol.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; - var sym1 = Symbol("123"); var sym2 = Symbol("123"); diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index a9ecd20a..b702816a 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -35,14 +35,14 @@ (data (i32.const 640) "\01\00\00\004\00\00\00S\00y\00m\00b\00o\00l\00(\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00)\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/symbol/nextId (mut i32) (i32.const 12)) (global $std/symbol/sym1 (mut i32) (i32.const 0)) (global $std/symbol/sym2 (mut i32) (i32.const 0)) (global $~lib/symbol/stringToId (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/symbol/idToString (mut i32) (i32.const 0)) @@ -200,7 +200,7 @@ if i32.const 0 i32.const 72 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -217,7 +217,7 @@ if i32.const 0 i32.const 72 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -3253,7 +3253,7 @@ if i32.const 0 i32.const 32 - i32.const 6 + i32.const 4 i32.const 0 call $~lib/env/abort unreachable @@ -3281,7 +3281,7 @@ if i32.const 0 i32.const 32 - i32.const 11 + i32.const 9 i32.const 0 call $~lib/env/abort unreachable @@ -3299,7 +3299,7 @@ if i32.const 0 i32.const 32 - i32.const 16 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable @@ -3311,7 +3311,7 @@ if i32.const 0 i32.const 32 - i32.const 17 + i32.const 15 i32.const 0 call $~lib/env/abort unreachable @@ -3341,7 +3341,7 @@ if i32.const 0 i32.const 32 - i32.const 22 + i32.const 20 i32.const 0 call $~lib/env/abort unreachable @@ -3353,7 +3353,7 @@ if i32.const 0 i32.const 32 - i32.const 23 + i32.const 21 i32.const 0 call $~lib/env/abort unreachable @@ -3367,7 +3367,7 @@ if i32.const 0 i32.const 32 - i32.const 25 + i32.const 23 i32.const 0 call $~lib/env/abort unreachable @@ -3380,7 +3380,7 @@ if i32.const 0 i32.const 32 - i32.const 26 + i32.const 24 i32.const 0 call $~lib/env/abort unreachable @@ -3397,7 +3397,7 @@ if i32.const 0 i32.const 32 - i32.const 30 + i32.const 28 i32.const 0 call $~lib/env/abort unreachable @@ -3410,7 +3410,7 @@ if i32.const 0 i32.const 32 - i32.const 31 + i32.const 29 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/trace.json b/tests/compiler/std/trace.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/std/trace.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/typedarray.json b/tests/compiler/std/typedarray.json new file mode 100644 index 00000000..85b9ce0f --- /dev/null +++ b/tests/compiler/std/typedarray.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 170cb2a9..36d42c47 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -1,7 +1,7 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) @@ -442,7 +442,7 @@ if i32.const 0 i32.const 80 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -457,7 +457,7 @@ if i32.const 0 i32.const 80 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -509,7 +509,7 @@ if i32.const 0 i32.const 80 - i32.const 232 + i32.const 236 i32.const 57 call $~lib/env/abort unreachable @@ -660,6 +660,18 @@ local.get $1 i32.load i32.sub + if + i32.const 0 + i32.const 24 + i32.const 34 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load offset=8 + local.get $0 + i32.ne if i32.const 0 i32.const 24 @@ -680,18 +692,6 @@ call $~lib/env/abort unreachable end - local.get $1 - i32.load offset=8 - local.get $0 - i32.ne - if - i32.const 0 - i32.const 24 - i32.const 37 - i32.const 2 - call $~lib/env/abort - unreachable - end local.get $0 call $~lib/typedarray/Uint8Array#constructor local.tee $1 @@ -699,6 +699,18 @@ local.get $1 i32.load i32.sub + if + i32.const 0 + i32.const 24 + i32.const 39 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load offset=8 + local.get $0 + i32.ne if i32.const 0 i32.const 24 @@ -719,18 +731,6 @@ call $~lib/env/abort unreachable end - local.get $1 - i32.load offset=8 - local.get $0 - i32.ne - if - i32.const 0 - i32.const 24 - i32.const 42 - i32.const 2 - call $~lib/env/abort - unreachable - end local.get $0 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $1 @@ -738,6 +738,18 @@ local.get $1 i32.load i32.sub + if + i32.const 0 + i32.const 24 + i32.const 44 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $1 + i32.load offset=8 + local.get $0 + i32.ne if i32.const 0 i32.const 24 @@ -758,18 +770,6 @@ call $~lib/env/abort unreachable end - local.get $1 - i32.load offset=8 - local.get $0 - i32.ne - if - i32.const 0 - i32.const 24 - i32.const 47 - i32.const 2 - call $~lib/env/abort - unreachable - end local.get $0 call $~lib/typedarray/Int16Array#constructor local.tee $1 @@ -780,7 +780,7 @@ if i32.const 0 i32.const 24 - i32.const 50 + i32.const 49 i32.const 2 call $~lib/env/abort unreachable @@ -794,7 +794,7 @@ if i32.const 0 i32.const 24 - i32.const 51 + i32.const 50 i32.const 2 call $~lib/env/abort unreachable @@ -808,7 +808,7 @@ if i32.const 0 i32.const 24 - i32.const 52 + i32.const 51 i32.const 2 call $~lib/env/abort unreachable @@ -823,7 +823,7 @@ if i32.const 0 i32.const 24 - i32.const 55 + i32.const 54 i32.const 2 call $~lib/env/abort unreachable @@ -837,7 +837,7 @@ if i32.const 0 i32.const 24 - i32.const 56 + i32.const 55 i32.const 2 call $~lib/env/abort unreachable @@ -851,7 +851,7 @@ if i32.const 0 i32.const 24 - i32.const 57 + i32.const 56 i32.const 2 call $~lib/env/abort unreachable @@ -866,7 +866,7 @@ if i32.const 0 i32.const 24 - i32.const 60 + i32.const 59 i32.const 2 call $~lib/env/abort unreachable @@ -880,7 +880,7 @@ if i32.const 0 i32.const 24 - i32.const 61 + i32.const 60 i32.const 2 call $~lib/env/abort unreachable @@ -894,7 +894,7 @@ if i32.const 0 i32.const 24 - i32.const 62 + i32.const 61 i32.const 2 call $~lib/env/abort unreachable @@ -909,7 +909,7 @@ if i32.const 0 i32.const 24 - i32.const 65 + i32.const 64 i32.const 2 call $~lib/env/abort unreachable @@ -923,7 +923,7 @@ if i32.const 0 i32.const 24 - i32.const 66 + i32.const 65 i32.const 2 call $~lib/env/abort unreachable @@ -937,7 +937,7 @@ if i32.const 0 i32.const 24 - i32.const 67 + i32.const 66 i32.const 2 call $~lib/env/abort unreachable @@ -952,7 +952,7 @@ if i32.const 0 i32.const 24 - i32.const 70 + i32.const 69 i32.const 2 call $~lib/env/abort unreachable @@ -966,7 +966,7 @@ if i32.const 0 i32.const 24 - i32.const 71 + i32.const 70 i32.const 2 call $~lib/env/abort unreachable @@ -980,7 +980,7 @@ if i32.const 0 i32.const 24 - i32.const 72 + i32.const 71 i32.const 2 call $~lib/env/abort unreachable @@ -995,7 +995,7 @@ if i32.const 0 i32.const 24 - i32.const 75 + i32.const 74 i32.const 2 call $~lib/env/abort unreachable @@ -1009,7 +1009,7 @@ if i32.const 0 i32.const 24 - i32.const 76 + i32.const 75 i32.const 2 call $~lib/env/abort unreachable @@ -1023,7 +1023,7 @@ if i32.const 0 i32.const 24 - i32.const 77 + i32.const 76 i32.const 2 call $~lib/env/abort unreachable @@ -1038,7 +1038,7 @@ if i32.const 0 i32.const 24 - i32.const 80 + i32.const 79 i32.const 2 call $~lib/env/abort unreachable @@ -1052,7 +1052,7 @@ if i32.const 0 i32.const 24 - i32.const 81 + i32.const 80 i32.const 2 call $~lib/env/abort unreachable @@ -1066,7 +1066,7 @@ if i32.const 0 i32.const 24 - i32.const 82 + i32.const 81 i32.const 2 call $~lib/env/abort unreachable @@ -1081,7 +1081,7 @@ if i32.const 0 i32.const 24 - i32.const 85 + i32.const 84 i32.const 2 call $~lib/env/abort unreachable @@ -1095,7 +1095,7 @@ if i32.const 0 i32.const 24 - i32.const 86 + i32.const 85 i32.const 2 call $~lib/env/abort unreachable @@ -1109,7 +1109,7 @@ if i32.const 0 i32.const 24 - i32.const 87 + i32.const 86 i32.const 2 call $~lib/env/abort unreachable @@ -3425,7 +3425,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -3514,7 +3514,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -3546,7 +3546,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -3642,7 +3642,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -3738,7 +3738,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -3809,7 +3809,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -3863,7 +3863,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -3963,7 +3963,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -4017,7 +4017,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -4116,7 +4116,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -4191,7 +4191,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -4260,7 +4260,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -4330,7 +4330,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -4362,7 +4362,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -4435,7 +4435,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -4508,7 +4508,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -4580,7 +4580,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -4610,7 +4610,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -4682,7 +4682,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -4712,7 +4712,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -4783,7 +4783,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -4854,7 +4854,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -4937,7 +4937,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -4950,7 +4950,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -4963,7 +4963,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5060,7 +5060,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -5073,7 +5073,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5086,7 +5086,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5164,7 +5164,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -5177,7 +5177,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5190,7 +5190,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5300,7 +5300,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -5313,7 +5313,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5326,7 +5326,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5436,7 +5436,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -5449,7 +5449,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5462,7 +5462,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5549,7 +5549,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -5562,7 +5562,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5575,7 +5575,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5685,7 +5685,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -5698,7 +5698,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5711,7 +5711,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5826,7 +5826,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -5839,7 +5839,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5852,7 +5852,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -5962,7 +5962,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -5975,7 +5975,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -5988,7 +5988,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -6103,7 +6103,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -6116,7 +6116,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -6129,7 +6129,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -6221,7 +6221,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -6234,7 +6234,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -6247,7 +6247,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -6328,7 +6328,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -6339,7 +6339,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -6407,7 +6407,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -6418,7 +6418,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -6447,7 +6447,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -6458,7 +6458,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -6543,7 +6543,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -6554,7 +6554,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -6626,7 +6626,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -6637,7 +6637,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -6718,7 +6718,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -6729,7 +6729,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -6758,7 +6758,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -6769,7 +6769,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -6851,7 +6851,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -6862,7 +6862,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -6891,7 +6891,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -6902,7 +6902,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -6984,7 +6984,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -6995,7 +6995,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -7077,7 +7077,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -7088,7 +7088,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -7167,7 +7167,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -7180,7 +7180,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -7252,7 +7252,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -7265,7 +7265,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -7295,7 +7295,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -7308,7 +7308,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -7391,7 +7391,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -7404,7 +7404,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -7480,7 +7480,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -7493,7 +7493,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -7574,7 +7574,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -7587,7 +7587,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -7617,7 +7617,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -7630,7 +7630,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -7711,7 +7711,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -7724,7 +7724,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -7754,7 +7754,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -7767,7 +7767,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -7848,7 +7848,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -7861,7 +7861,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -7942,7 +7942,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -7955,7 +7955,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -8034,7 +8034,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -8045,7 +8045,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -8120,7 +8120,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -8131,7 +8131,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -8160,7 +8160,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -8171,7 +8171,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -8254,7 +8254,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -8265,7 +8265,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -8338,7 +8338,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -8349,7 +8349,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -8428,7 +8428,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -8439,7 +8439,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -8468,7 +8468,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -8479,7 +8479,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -8559,7 +8559,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -8570,7 +8570,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -8606,7 +8606,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -8617,7 +8617,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -8847,7 +8847,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -8858,7 +8858,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -9096,7 +9096,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -9107,7 +9107,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -9126,7 +9126,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -9137,7 +9137,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -9148,7 +9148,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -9237,7 +9237,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -9317,7 +9317,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -9364,7 +9364,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -9383,7 +9383,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -9394,7 +9394,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -9405,7 +9405,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -9498,7 +9498,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -9581,7 +9581,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -9596,7 +9596,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -9607,7 +9607,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -9618,7 +9618,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -9700,7 +9700,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -9741,7 +9741,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -9757,7 +9757,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -9768,7 +9768,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -9779,7 +9779,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -9864,7 +9864,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -9908,7 +9908,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -9924,7 +9924,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -9935,7 +9935,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -9946,7 +9946,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -10030,7 +10030,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -10046,7 +10046,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -10057,7 +10057,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -10068,7 +10068,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -10152,7 +10152,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -10279,7 +10279,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -10306,7 +10306,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -10319,7 +10319,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -10332,7 +10332,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -10345,7 +10345,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -10521,7 +10521,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -10546,7 +10546,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -10559,7 +10559,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -10572,7 +10572,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -10585,7 +10585,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -10713,7 +10713,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -10738,7 +10738,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -10751,7 +10751,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -10764,7 +10764,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -10777,7 +10777,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -10971,7 +10971,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -10996,7 +10996,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -11009,7 +11009,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -11022,7 +11022,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -11035,7 +11035,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -11223,7 +11223,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -11248,7 +11248,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -11261,7 +11261,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -11274,7 +11274,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -11287,7 +11287,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -11408,7 +11408,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -11435,7 +11435,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -11448,7 +11448,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -11461,7 +11461,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -11474,7 +11474,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -11602,7 +11602,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -11627,7 +11627,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -11640,7 +11640,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -11653,7 +11653,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -11666,7 +11666,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -11851,7 +11851,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -11876,7 +11876,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -11889,7 +11889,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -11902,7 +11902,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -11915,7 +11915,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -12046,7 +12046,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -12071,7 +12071,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -12084,7 +12084,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -12097,7 +12097,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -12110,7 +12110,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -12295,7 +12295,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -12320,7 +12320,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -12333,7 +12333,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -12346,7 +12346,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -12359,7 +12359,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -12483,7 +12483,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -12510,7 +12510,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -12523,7 +12523,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -12536,7 +12536,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -12549,7 +12549,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -12590,7 +12590,7 @@ if i32.const 0 i32.const 24 - i32.const 97 + i32.const 96 i32.const 0 call $~lib/env/abort unreachable @@ -12604,7 +12604,7 @@ if i32.const 0 i32.const 24 - i32.const 98 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable @@ -12616,7 +12616,7 @@ if i32.const 0 i32.const 24 - i32.const 99 + i32.const 98 i32.const 0 call $~lib/env/abort unreachable @@ -12629,7 +12629,7 @@ if i32.const 0 i32.const 24 - i32.const 100 + i32.const 99 i32.const 0 call $~lib/env/abort unreachable @@ -12642,7 +12642,7 @@ if i32.const 0 i32.const 24 - i32.const 101 + i32.const 100 i32.const 0 call $~lib/env/abort unreachable @@ -12655,7 +12655,7 @@ if i32.const 0 i32.const 24 - i32.const 102 + i32.const 101 i32.const 0 call $~lib/env/abort unreachable @@ -12674,7 +12674,7 @@ if i32.const 0 i32.const 24 - i32.const 105 + i32.const 104 i32.const 0 call $~lib/env/abort unreachable @@ -12690,7 +12690,7 @@ if i32.const 0 i32.const 24 - i32.const 106 + i32.const 105 i32.const 0 call $~lib/env/abort unreachable @@ -12702,7 +12702,7 @@ if i32.const 0 i32.const 24 - i32.const 107 + i32.const 106 i32.const 0 call $~lib/env/abort unreachable @@ -12715,7 +12715,7 @@ if i32.const 0 i32.const 24 - i32.const 108 + i32.const 107 i32.const 0 call $~lib/env/abort unreachable @@ -12769,7 +12769,7 @@ if i32.const 0 i32.const 24 - i32.const 122 + i32.const 121 i32.const 0 call $~lib/env/abort unreachable @@ -12785,7 +12785,7 @@ if i32.const 0 i32.const 24 - i32.const 123 + i32.const 122 i32.const 0 call $~lib/env/abort unreachable @@ -12797,7 +12797,7 @@ if i32.const 0 i32.const 24 - i32.const 124 + i32.const 123 i32.const 0 call $~lib/env/abort unreachable @@ -12863,7 +12863,7 @@ if i32.const 0 i32.const 24 - i32.const 126 + i32.const 125 i32.const 0 call $~lib/env/abort unreachable @@ -12889,7 +12889,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 132 i32.const 0 call $~lib/env/abort unreachable @@ -12902,7 +12902,7 @@ if i32.const 0 i32.const 24 - i32.const 134 + i32.const 133 i32.const 0 call $~lib/env/abort unreachable @@ -12915,7 +12915,7 @@ if i32.const 0 i32.const 24 - i32.const 135 + i32.const 134 i32.const 0 call $~lib/env/abort unreachable @@ -12959,7 +12959,7 @@ if i32.const 0 i32.const 24 - i32.const 145 + i32.const 144 i32.const 0 call $~lib/env/abort unreachable @@ -12980,7 +12980,7 @@ if i32.const 0 i32.const 24 - i32.const 148 + i32.const 147 i32.const 0 call $~lib/env/abort unreachable @@ -13001,7 +13001,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 150 i32.const 0 call $~lib/env/abort unreachable @@ -13022,7 +13022,7 @@ if i32.const 0 i32.const 24 - i32.const 154 + i32.const 153 i32.const 0 call $~lib/env/abort unreachable @@ -13043,7 +13043,7 @@ if i32.const 0 i32.const 24 - i32.const 157 + i32.const 156 i32.const 0 call $~lib/env/abort unreachable @@ -13065,7 +13065,7 @@ if i32.const 0 i32.const 24 - i32.const 161 + i32.const 160 i32.const 0 call $~lib/env/abort unreachable @@ -13081,7 +13081,7 @@ if i32.const 0 i32.const 24 - i32.const 162 + i32.const 161 i32.const 0 call $~lib/env/abort unreachable @@ -13093,7 +13093,7 @@ if i32.const 0 i32.const 24 - i32.const 163 + i32.const 162 i32.const 0 call $~lib/env/abort unreachable @@ -13109,7 +13109,7 @@ if i32.const 0 i32.const 24 - i32.const 164 + i32.const 163 i32.const 0 call $~lib/env/abort unreachable @@ -13125,7 +13125,7 @@ if i32.const 0 i32.const 24 - i32.const 165 + i32.const 164 i32.const 0 call $~lib/env/abort unreachable @@ -13169,7 +13169,7 @@ if i32.const 0 i32.const 24 - i32.const 175 + i32.const 174 i32.const 0 call $~lib/env/abort unreachable @@ -13190,7 +13190,7 @@ if i32.const 0 i32.const 24 - i32.const 178 + i32.const 177 i32.const 0 call $~lib/env/abort unreachable @@ -13211,7 +13211,7 @@ if i32.const 0 i32.const 24 - i32.const 181 + i32.const 180 i32.const 0 call $~lib/env/abort unreachable @@ -13232,7 +13232,7 @@ if i32.const 0 i32.const 24 - i32.const 184 + i32.const 183 i32.const 0 call $~lib/env/abort unreachable @@ -13253,7 +13253,7 @@ if i32.const 0 i32.const 24 - i32.const 187 + i32.const 186 i32.const 0 call $~lib/env/abort unreachable @@ -13277,7 +13277,7 @@ if i32.const 0 i32.const 24 - i32.const 191 + i32.const 190 i32.const 0 call $~lib/env/abort unreachable @@ -13293,7 +13293,7 @@ if i32.const 0 i32.const 24 - i32.const 192 + i32.const 191 i32.const 0 call $~lib/env/abort unreachable @@ -13305,7 +13305,7 @@ if i32.const 0 i32.const 24 - i32.const 193 + i32.const 192 i32.const 0 call $~lib/env/abort unreachable @@ -13321,7 +13321,7 @@ if i32.const 0 i32.const 24 - i32.const 194 + i32.const 193 i32.const 0 call $~lib/env/abort unreachable @@ -13337,7 +13337,7 @@ if i32.const 0 i32.const 24 - i32.const 195 + i32.const 194 i32.const 0 call $~lib/env/abort unreachable @@ -13385,7 +13385,7 @@ if i32.const 0 i32.const 24 - i32.const 212 + i32.const 211 i32.const 0 call $~lib/env/abort unreachable @@ -13397,7 +13397,7 @@ if i32.const 0 i32.const 24 - i32.const 213 + i32.const 212 i32.const 0 call $~lib/env/abort unreachable @@ -13413,7 +13413,7 @@ if i32.const 0 i32.const 24 - i32.const 214 + i32.const 213 i32.const 0 call $~lib/env/abort unreachable @@ -13425,7 +13425,7 @@ if i32.const 0 i32.const 24 - i32.const 215 + i32.const 214 i32.const 0 call $~lib/env/abort unreachable @@ -13443,7 +13443,7 @@ if i32.const 0 i32.const 24 - i32.const 218 + i32.const 217 i32.const 0 call $~lib/env/abort unreachable @@ -13455,7 +13455,7 @@ if i32.const 0 i32.const 24 - i32.const 219 + i32.const 218 i32.const 0 call $~lib/env/abort unreachable @@ -13471,7 +13471,7 @@ if i32.const 0 i32.const 24 - i32.const 220 + i32.const 219 i32.const 0 call $~lib/env/abort unreachable @@ -13483,7 +13483,7 @@ if i32.const 0 i32.const 24 - i32.const 221 + i32.const 220 i32.const 0 call $~lib/env/abort unreachable @@ -13501,7 +13501,7 @@ if i32.const 0 i32.const 24 - i32.const 224 + i32.const 223 i32.const 0 call $~lib/env/abort unreachable @@ -13513,7 +13513,7 @@ if i32.const 0 i32.const 24 - i32.const 225 + i32.const 224 i32.const 0 call $~lib/env/abort unreachable @@ -13529,7 +13529,7 @@ if i32.const 0 i32.const 24 - i32.const 226 + i32.const 225 i32.const 0 call $~lib/env/abort unreachable @@ -13541,7 +13541,7 @@ if i32.const 0 i32.const 24 - i32.const 227 + i32.const 226 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/typedarray.ts b/tests/compiler/std/typedarray.ts index 380aa16f..914cda37 100644 --- a/tests/compiler/std/typedarray.ts +++ b/tests/compiler/std/typedarray.ts @@ -1,4 +1,3 @@ -import "allocator/arena"; import "collector/dummy"; assert(Int8Array.BYTES_PER_ELEMENT == 1); diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index a90300f4..69509e59 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -1,7 +1,7 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) @@ -81,10 +81,10 @@ (global $~lib/typedarray/Float32Array.BYTES_PER_ELEMENT i32 (i32.const 4)) (global $~lib/typedarray/Float64Array.BYTES_PER_ELEMENT i32 (i32.const 8)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 16)) - (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/typedarray/arr (mut i32) (i32.const 0)) (global $std/typedarray/af64 (mut i32) (i32.const 0)) @@ -503,7 +503,7 @@ if i32.const 0 i32.const 80 - i32.const 149 + i32.const 153 i32.const 4 call $~lib/env/abort unreachable @@ -520,7 +520,7 @@ if i32.const 0 i32.const 80 - i32.const 151 + i32.const 155 i32.const 4 call $~lib/env/abort unreachable @@ -598,7 +598,7 @@ if i32.const 0 i32.const 80 - i32.const 232 + i32.const 236 i32.const 57 call $~lib/env/abort unreachable @@ -998,7 +998,7 @@ if i32.const 0 i32.const 24 - i32.const 35 + i32.const 34 i32.const 2 call $~lib/env/abort unreachable @@ -1013,7 +1013,7 @@ if i32.const 0 i32.const 24 - i32.const 36 + i32.const 35 i32.const 2 call $~lib/env/abort unreachable @@ -1026,7 +1026,7 @@ if i32.const 0 i32.const 24 - i32.const 37 + i32.const 36 i32.const 2 call $~lib/env/abort unreachable @@ -1043,7 +1043,7 @@ if i32.const 0 i32.const 24 - i32.const 40 + i32.const 39 i32.const 2 call $~lib/env/abort unreachable @@ -1058,7 +1058,7 @@ if i32.const 0 i32.const 24 - i32.const 41 + i32.const 40 i32.const 2 call $~lib/env/abort unreachable @@ -1071,7 +1071,7 @@ if i32.const 0 i32.const 24 - i32.const 42 + i32.const 41 i32.const 2 call $~lib/env/abort unreachable @@ -1088,7 +1088,7 @@ if i32.const 0 i32.const 24 - i32.const 45 + i32.const 44 i32.const 2 call $~lib/env/abort unreachable @@ -1103,7 +1103,7 @@ if i32.const 0 i32.const 24 - i32.const 46 + i32.const 45 i32.const 2 call $~lib/env/abort unreachable @@ -1116,7 +1116,7 @@ if i32.const 0 i32.const 24 - i32.const 47 + i32.const 46 i32.const 2 call $~lib/env/abort unreachable @@ -1133,7 +1133,7 @@ if i32.const 0 i32.const 24 - i32.const 50 + i32.const 49 i32.const 2 call $~lib/env/abort unreachable @@ -1148,7 +1148,7 @@ if i32.const 0 i32.const 24 - i32.const 51 + i32.const 50 i32.const 2 call $~lib/env/abort unreachable @@ -1161,7 +1161,7 @@ if i32.const 0 i32.const 24 - i32.const 52 + i32.const 51 i32.const 2 call $~lib/env/abort unreachable @@ -1178,7 +1178,7 @@ if i32.const 0 i32.const 24 - i32.const 55 + i32.const 54 i32.const 2 call $~lib/env/abort unreachable @@ -1193,7 +1193,7 @@ if i32.const 0 i32.const 24 - i32.const 56 + i32.const 55 i32.const 2 call $~lib/env/abort unreachable @@ -1206,7 +1206,7 @@ if i32.const 0 i32.const 24 - i32.const 57 + i32.const 56 i32.const 2 call $~lib/env/abort unreachable @@ -1223,7 +1223,7 @@ if i32.const 0 i32.const 24 - i32.const 60 + i32.const 59 i32.const 2 call $~lib/env/abort unreachable @@ -1238,7 +1238,7 @@ if i32.const 0 i32.const 24 - i32.const 61 + i32.const 60 i32.const 2 call $~lib/env/abort unreachable @@ -1251,7 +1251,7 @@ if i32.const 0 i32.const 24 - i32.const 62 + i32.const 61 i32.const 2 call $~lib/env/abort unreachable @@ -1268,7 +1268,7 @@ if i32.const 0 i32.const 24 - i32.const 65 + i32.const 64 i32.const 2 call $~lib/env/abort unreachable @@ -1283,7 +1283,7 @@ if i32.const 0 i32.const 24 - i32.const 66 + i32.const 65 i32.const 2 call $~lib/env/abort unreachable @@ -1296,7 +1296,7 @@ if i32.const 0 i32.const 24 - i32.const 67 + i32.const 66 i32.const 2 call $~lib/env/abort unreachable @@ -1313,7 +1313,7 @@ if i32.const 0 i32.const 24 - i32.const 70 + i32.const 69 i32.const 2 call $~lib/env/abort unreachable @@ -1328,7 +1328,7 @@ if i32.const 0 i32.const 24 - i32.const 71 + i32.const 70 i32.const 2 call $~lib/env/abort unreachable @@ -1341,7 +1341,7 @@ if i32.const 0 i32.const 24 - i32.const 72 + i32.const 71 i32.const 2 call $~lib/env/abort unreachable @@ -1358,7 +1358,7 @@ if i32.const 0 i32.const 24 - i32.const 75 + i32.const 74 i32.const 2 call $~lib/env/abort unreachable @@ -1373,7 +1373,7 @@ if i32.const 0 i32.const 24 - i32.const 76 + i32.const 75 i32.const 2 call $~lib/env/abort unreachable @@ -1386,7 +1386,7 @@ if i32.const 0 i32.const 24 - i32.const 77 + i32.const 76 i32.const 2 call $~lib/env/abort unreachable @@ -1403,7 +1403,7 @@ if i32.const 0 i32.const 24 - i32.const 80 + i32.const 79 i32.const 2 call $~lib/env/abort unreachable @@ -1418,7 +1418,7 @@ if i32.const 0 i32.const 24 - i32.const 81 + i32.const 80 i32.const 2 call $~lib/env/abort unreachable @@ -1431,7 +1431,7 @@ if i32.const 0 i32.const 24 - i32.const 82 + i32.const 81 i32.const 2 call $~lib/env/abort unreachable @@ -1448,7 +1448,7 @@ if i32.const 0 i32.const 24 - i32.const 85 + i32.const 84 i32.const 2 call $~lib/env/abort unreachable @@ -1463,7 +1463,7 @@ if i32.const 0 i32.const 24 - i32.const 86 + i32.const 85 i32.const 2 call $~lib/env/abort unreachable @@ -1476,7 +1476,7 @@ if i32.const 0 i32.const 24 - i32.const 87 + i32.const 86 i32.const 2 call $~lib/env/abort unreachable @@ -4571,7 +4571,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -4692,7 +4692,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -4793,7 +4793,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -4920,7 +4920,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -5045,7 +5045,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -5144,7 +5144,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -5267,7 +5267,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -5390,7 +5390,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -5513,7 +5513,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -5636,7 +5636,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -5735,7 +5735,7 @@ if i32.const 0 i32.const 24 - i32.const 253 + i32.const 252 i32.const 2 call $~lib/env/abort unreachable @@ -5835,7 +5835,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -5933,7 +5933,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -6031,7 +6031,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -6131,7 +6131,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -6229,7 +6229,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -6325,7 +6325,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -6421,7 +6421,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -6517,7 +6517,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -6613,7 +6613,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -6709,7 +6709,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -6805,7 +6805,7 @@ if i32.const 0 i32.const 24 - i32.const 280 + i32.const 279 i32.const 2 call $~lib/env/abort unreachable @@ -6913,7 +6913,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -6927,7 +6927,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -6941,7 +6941,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -7068,7 +7068,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -7082,7 +7082,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -7096,7 +7096,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -7204,7 +7204,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -7218,7 +7218,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -7232,7 +7232,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -7363,7 +7363,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -7377,7 +7377,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -7391,7 +7391,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -7522,7 +7522,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -7536,7 +7536,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -7550,7 +7550,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -7658,7 +7658,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -7672,7 +7672,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -7686,7 +7686,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -7817,7 +7817,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -7831,7 +7831,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -7845,7 +7845,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -7976,7 +7976,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -7990,7 +7990,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -8004,7 +8004,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -8135,7 +8135,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -8149,7 +8149,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -8163,7 +8163,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -8294,7 +8294,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -8308,7 +8308,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -8322,7 +8322,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -8430,7 +8430,7 @@ if i32.const 0 i32.const 24 - i32.const 307 + i32.const 306 i32.const 2 call $~lib/env/abort unreachable @@ -8444,7 +8444,7 @@ if i32.const 0 i32.const 24 - i32.const 308 + i32.const 307 i32.const 2 call $~lib/env/abort unreachable @@ -8458,7 +8458,7 @@ if i32.const 0 i32.const 24 - i32.const 309 + i32.const 308 i32.const 2 call $~lib/env/abort unreachable @@ -8573,7 +8573,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -8590,7 +8590,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -8701,7 +8701,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -8718,7 +8718,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -8829,7 +8829,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -8846,7 +8846,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -8961,7 +8961,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -8978,7 +8978,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -9089,7 +9089,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -9106,7 +9106,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -9213,7 +9213,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -9230,7 +9230,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -9337,7 +9337,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -9354,7 +9354,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -9461,7 +9461,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -9478,7 +9478,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -9585,7 +9585,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -9602,7 +9602,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -9709,7 +9709,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -9726,7 +9726,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -9833,7 +9833,7 @@ if i32.const 0 i32.const 24 - i32.const 336 + i32.const 335 i32.const 2 call $~lib/env/abort unreachable @@ -9850,7 +9850,7 @@ if i32.const 0 i32.const 24 - i32.const 339 + i32.const 338 i32.const 2 call $~lib/env/abort unreachable @@ -9965,7 +9965,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -9981,7 +9981,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -10092,7 +10092,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -10108,7 +10108,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -10219,7 +10219,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -10235,7 +10235,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -10350,7 +10350,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -10366,7 +10366,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -10477,7 +10477,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -10493,7 +10493,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -10600,7 +10600,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -10616,7 +10616,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -10723,7 +10723,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -10739,7 +10739,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -10846,7 +10846,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -10862,7 +10862,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -10969,7 +10969,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -10985,7 +10985,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -11092,7 +11092,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -11108,7 +11108,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -11215,7 +11215,7 @@ if i32.const 728 i32.const 24 - i32.const 366 + i32.const 365 i32.const 2 call $~lib/env/abort unreachable @@ -11231,7 +11231,7 @@ if i32.const 776 i32.const 24 - i32.const 369 + i32.const 368 i32.const 2 call $~lib/env/abort unreachable @@ -11355,7 +11355,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -11372,7 +11372,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -11492,7 +11492,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -11509,7 +11509,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -11629,7 +11629,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -11646,7 +11646,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -11770,7 +11770,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -11787,7 +11787,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -11907,7 +11907,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -11924,7 +11924,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -12040,7 +12040,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -12057,7 +12057,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -12173,7 +12173,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -12190,7 +12190,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -12306,7 +12306,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -12323,7 +12323,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -12439,7 +12439,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -12456,7 +12456,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -12828,7 +12828,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -12845,7 +12845,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -13219,7 +13219,7 @@ if i32.const 0 i32.const 24 - i32.const 396 + i32.const 395 i32.const 2 call $~lib/env/abort unreachable @@ -13236,7 +13236,7 @@ if i32.const 0 i32.const 24 - i32.const 399 + i32.const 398 i32.const 2 call $~lib/env/abort unreachable @@ -13263,7 +13263,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -13275,7 +13275,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -13287,7 +13287,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -13392,7 +13392,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -13415,7 +13415,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -13427,7 +13427,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -13439,7 +13439,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -13538,7 +13538,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -13561,7 +13561,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -13573,7 +13573,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -13585,7 +13585,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -13684,7 +13684,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -13711,7 +13711,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -13723,7 +13723,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -13735,7 +13735,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -13840,7 +13840,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -13863,7 +13863,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -13875,7 +13875,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -13887,7 +13887,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -13986,7 +13986,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -14005,7 +14005,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -14017,7 +14017,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -14029,7 +14029,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -14122,7 +14122,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -14141,7 +14141,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -14153,7 +14153,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -14165,7 +14165,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -14258,7 +14258,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -14278,7 +14278,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -14290,7 +14290,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -14302,7 +14302,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -14398,7 +14398,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -14418,7 +14418,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -14430,7 +14430,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -14442,7 +14442,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -14538,7 +14538,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -14558,7 +14558,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -14570,7 +14570,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -14582,7 +14582,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -14678,7 +14678,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -14698,7 +14698,7 @@ if i32.const 896 i32.const 24 - i32.const 426 + i32.const 425 i32.const 4 call $~lib/env/abort unreachable @@ -14710,7 +14710,7 @@ if i32.const 960 i32.const 24 - i32.const 427 + i32.const 426 i32.const 4 call $~lib/env/abort unreachable @@ -14722,7 +14722,7 @@ if i32.const 1024 i32.const 24 - i32.const 428 + i32.const 427 i32.const 4 call $~lib/env/abort unreachable @@ -14818,7 +14818,7 @@ if i32.const 1104 i32.const 24 - i32.const 431 + i32.const 430 i32.const 2 call $~lib/env/abort unreachable @@ -14981,7 +14981,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -15010,7 +15010,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -15024,7 +15024,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -15038,7 +15038,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -15052,7 +15052,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -15346,7 +15346,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -15375,7 +15375,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -15389,7 +15389,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -15403,7 +15403,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -15417,7 +15417,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -15711,7 +15711,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -15740,7 +15740,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -15754,7 +15754,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -15768,7 +15768,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -15782,7 +15782,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -16082,7 +16082,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -16111,7 +16111,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -16125,7 +16125,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -16139,7 +16139,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -16153,7 +16153,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -16447,7 +16447,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -16476,7 +16476,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -16490,7 +16490,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -16504,7 +16504,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -16518,7 +16518,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -16669,7 +16669,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -16698,7 +16698,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -16712,7 +16712,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -16726,7 +16726,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -16740,7 +16740,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -17028,7 +17028,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -17057,7 +17057,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -17071,7 +17071,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -17085,7 +17085,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -17099,7 +17099,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -17390,7 +17390,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -17419,7 +17419,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -17433,7 +17433,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -17447,7 +17447,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -17461,7 +17461,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -17752,7 +17752,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -17781,7 +17781,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -17795,7 +17795,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -17809,7 +17809,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -17823,7 +17823,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -18114,7 +18114,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -18143,7 +18143,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -18157,7 +18157,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -18171,7 +18171,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -18185,7 +18185,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -18339,7 +18339,7 @@ if i32.const 1264 i32.const 24 - i32.const 462 + i32.const 461 i32.const 4 call $~lib/env/abort unreachable @@ -18368,7 +18368,7 @@ if i32.const 1352 i32.const 24 - i32.const 467 + i32.const 466 i32.const 2 call $~lib/env/abort unreachable @@ -18382,7 +18382,7 @@ if i32.const 1352 i32.const 24 - i32.const 468 + i32.const 467 i32.const 2 call $~lib/env/abort unreachable @@ -18396,7 +18396,7 @@ if i32.const 1352 i32.const 24 - i32.const 469 + i32.const 468 i32.const 2 call $~lib/env/abort unreachable @@ -18410,7 +18410,7 @@ if i32.const 1352 i32.const 24 - i32.const 470 + i32.const 469 i32.const 2 call $~lib/env/abort unreachable @@ -18425,7 +18425,7 @@ if i32.const 0 i32.const 24 - i32.const 4 + i32.const 3 i32.const 0 call $~lib/env/abort unreachable @@ -18437,7 +18437,7 @@ if i32.const 0 i32.const 24 - i32.const 5 + i32.const 4 i32.const 0 call $~lib/env/abort unreachable @@ -18449,7 +18449,7 @@ if i32.const 0 i32.const 24 - i32.const 6 + i32.const 5 i32.const 0 call $~lib/env/abort unreachable @@ -18461,7 +18461,7 @@ if i32.const 0 i32.const 24 - i32.const 7 + i32.const 6 i32.const 0 call $~lib/env/abort unreachable @@ -18473,7 +18473,7 @@ if i32.const 0 i32.const 24 - i32.const 8 + i32.const 7 i32.const 0 call $~lib/env/abort unreachable @@ -18485,7 +18485,7 @@ if i32.const 0 i32.const 24 - i32.const 9 + i32.const 8 i32.const 0 call $~lib/env/abort unreachable @@ -18497,7 +18497,7 @@ if i32.const 0 i32.const 24 - i32.const 10 + i32.const 9 i32.const 0 call $~lib/env/abort unreachable @@ -18509,7 +18509,7 @@ if i32.const 0 i32.const 24 - i32.const 11 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable @@ -18521,7 +18521,7 @@ if i32.const 0 i32.const 24 - i32.const 12 + i32.const 11 i32.const 0 call $~lib/env/abort unreachable @@ -18533,7 +18533,7 @@ if i32.const 0 i32.const 24 - i32.const 13 + i32.const 12 i32.const 0 call $~lib/env/abort unreachable @@ -18545,7 +18545,7 @@ if i32.const 0 i32.const 24 - i32.const 14 + i32.const 13 i32.const 0 call $~lib/env/abort unreachable @@ -18588,7 +18588,7 @@ if i32.const 0 i32.const 24 - i32.const 97 + i32.const 96 i32.const 0 call $~lib/env/abort unreachable @@ -18601,7 +18601,7 @@ if i32.const 0 i32.const 24 - i32.const 98 + i32.const 97 i32.const 0 call $~lib/env/abort unreachable @@ -18616,7 +18616,7 @@ if i32.const 0 i32.const 24 - i32.const 99 + i32.const 98 i32.const 0 call $~lib/env/abort unreachable @@ -18630,7 +18630,7 @@ if i32.const 0 i32.const 24 - i32.const 100 + i32.const 99 i32.const 0 call $~lib/env/abort unreachable @@ -18644,7 +18644,7 @@ if i32.const 0 i32.const 24 - i32.const 101 + i32.const 100 i32.const 0 call $~lib/env/abort unreachable @@ -18658,7 +18658,7 @@ if i32.const 0 i32.const 24 - i32.const 102 + i32.const 101 i32.const 0 call $~lib/env/abort unreachable @@ -18676,7 +18676,7 @@ if i32.const 0 i32.const 24 - i32.const 105 + i32.const 104 i32.const 0 call $~lib/env/abort unreachable @@ -18691,7 +18691,7 @@ if i32.const 0 i32.const 24 - i32.const 106 + i32.const 105 i32.const 0 call $~lib/env/abort unreachable @@ -18706,7 +18706,7 @@ if i32.const 0 i32.const 24 - i32.const 107 + i32.const 106 i32.const 0 call $~lib/env/abort unreachable @@ -18720,7 +18720,7 @@ if i32.const 0 i32.const 24 - i32.const 108 + i32.const 107 i32.const 0 call $~lib/env/abort unreachable @@ -18774,7 +18774,7 @@ if i32.const 0 i32.const 24 - i32.const 122 + i32.const 121 i32.const 0 call $~lib/env/abort unreachable @@ -18789,7 +18789,7 @@ if i32.const 0 i32.const 24 - i32.const 123 + i32.const 122 i32.const 0 call $~lib/env/abort unreachable @@ -18804,7 +18804,7 @@ if i32.const 0 i32.const 24 - i32.const 124 + i32.const 123 i32.const 0 call $~lib/env/abort unreachable @@ -18856,7 +18856,7 @@ if i32.const 0 i32.const 24 - i32.const 126 + i32.const 125 i32.const 0 call $~lib/env/abort unreachable @@ -18886,7 +18886,7 @@ if i32.const 0 i32.const 24 - i32.const 133 + i32.const 132 i32.const 0 call $~lib/env/abort unreachable @@ -18900,7 +18900,7 @@ if i32.const 0 i32.const 24 - i32.const 134 + i32.const 133 i32.const 0 call $~lib/env/abort unreachable @@ -18914,7 +18914,7 @@ if i32.const 0 i32.const 24 - i32.const 135 + i32.const 134 i32.const 0 call $~lib/env/abort unreachable @@ -18960,7 +18960,7 @@ if i32.const 0 i32.const 24 - i32.const 145 + i32.const 144 i32.const 0 call $~lib/env/abort unreachable @@ -18982,7 +18982,7 @@ if i32.const 0 i32.const 24 - i32.const 148 + i32.const 147 i32.const 0 call $~lib/env/abort unreachable @@ -19004,7 +19004,7 @@ if i32.const 0 i32.const 24 - i32.const 151 + i32.const 150 i32.const 0 call $~lib/env/abort unreachable @@ -19026,7 +19026,7 @@ if i32.const 0 i32.const 24 - i32.const 154 + i32.const 153 i32.const 0 call $~lib/env/abort unreachable @@ -19048,7 +19048,7 @@ if i32.const 0 i32.const 24 - i32.const 157 + i32.const 156 i32.const 0 call $~lib/env/abort unreachable @@ -19072,7 +19072,7 @@ if i32.const 0 i32.const 24 - i32.const 161 + i32.const 160 i32.const 0 call $~lib/env/abort unreachable @@ -19085,7 +19085,7 @@ if i32.const 0 i32.const 24 - i32.const 162 + i32.const 161 i32.const 0 call $~lib/env/abort unreachable @@ -19098,7 +19098,7 @@ if i32.const 0 i32.const 24 - i32.const 163 + i32.const 162 i32.const 0 call $~lib/env/abort unreachable @@ -19114,7 +19114,7 @@ if i32.const 0 i32.const 24 - i32.const 164 + i32.const 163 i32.const 0 call $~lib/env/abort unreachable @@ -19130,7 +19130,7 @@ if i32.const 0 i32.const 24 - i32.const 165 + i32.const 164 i32.const 0 call $~lib/env/abort unreachable @@ -19176,7 +19176,7 @@ if i32.const 0 i32.const 24 - i32.const 175 + i32.const 174 i32.const 0 call $~lib/env/abort unreachable @@ -19198,7 +19198,7 @@ if i32.const 0 i32.const 24 - i32.const 178 + i32.const 177 i32.const 0 call $~lib/env/abort unreachable @@ -19220,7 +19220,7 @@ if i32.const 0 i32.const 24 - i32.const 181 + i32.const 180 i32.const 0 call $~lib/env/abort unreachable @@ -19242,7 +19242,7 @@ if i32.const 0 i32.const 24 - i32.const 184 + i32.const 183 i32.const 0 call $~lib/env/abort unreachable @@ -19264,7 +19264,7 @@ if i32.const 0 i32.const 24 - i32.const 187 + i32.const 186 i32.const 0 call $~lib/env/abort unreachable @@ -19288,7 +19288,7 @@ if i32.const 0 i32.const 24 - i32.const 191 + i32.const 190 i32.const 0 call $~lib/env/abort unreachable @@ -19303,7 +19303,7 @@ if i32.const 0 i32.const 24 - i32.const 192 + i32.const 191 i32.const 0 call $~lib/env/abort unreachable @@ -19318,7 +19318,7 @@ if i32.const 0 i32.const 24 - i32.const 193 + i32.const 192 i32.const 0 call $~lib/env/abort unreachable @@ -19334,7 +19334,7 @@ if i32.const 0 i32.const 24 - i32.const 194 + i32.const 193 i32.const 0 call $~lib/env/abort unreachable @@ -19350,7 +19350,7 @@ if i32.const 0 i32.const 24 - i32.const 195 + i32.const 194 i32.const 0 call $~lib/env/abort unreachable @@ -19401,7 +19401,7 @@ if i32.const 0 i32.const 24 - i32.const 212 + i32.const 211 i32.const 0 call $~lib/env/abort unreachable @@ -19414,7 +19414,7 @@ if i32.const 0 i32.const 24 - i32.const 213 + i32.const 212 i32.const 0 call $~lib/env/abort unreachable @@ -19427,7 +19427,7 @@ if i32.const 0 i32.const 24 - i32.const 214 + i32.const 213 i32.const 0 call $~lib/env/abort unreachable @@ -19440,7 +19440,7 @@ if i32.const 0 i32.const 24 - i32.const 215 + i32.const 214 i32.const 0 call $~lib/env/abort unreachable @@ -19459,7 +19459,7 @@ if i32.const 0 i32.const 24 - i32.const 218 + i32.const 217 i32.const 0 call $~lib/env/abort unreachable @@ -19472,7 +19472,7 @@ if i32.const 0 i32.const 24 - i32.const 219 + i32.const 218 i32.const 0 call $~lib/env/abort unreachable @@ -19485,7 +19485,7 @@ if i32.const 0 i32.const 24 - i32.const 220 + i32.const 219 i32.const 0 call $~lib/env/abort unreachable @@ -19498,7 +19498,7 @@ if i32.const 0 i32.const 24 - i32.const 221 + i32.const 220 i32.const 0 call $~lib/env/abort unreachable @@ -19517,7 +19517,7 @@ if i32.const 0 i32.const 24 - i32.const 224 + i32.const 223 i32.const 0 call $~lib/env/abort unreachable @@ -19530,7 +19530,7 @@ if i32.const 0 i32.const 24 - i32.const 225 + i32.const 224 i32.const 0 call $~lib/env/abort unreachable @@ -19543,7 +19543,7 @@ if i32.const 0 i32.const 24 - i32.const 226 + i32.const 225 i32.const 0 call $~lib/env/abort unreachable @@ -19556,7 +19556,7 @@ if i32.const 0 i32.const 24 - i32.const 227 + i32.const 226 i32.const 0 call $~lib/env/abort unreachable diff --git a/tests/compiler/switch.json b/tests/compiler/switch.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/switch.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/ternary.json b/tests/compiler/ternary.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/ternary.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/threads.json b/tests/compiler/threads.json index 32c45dde..b3cf3d47 100644 --- a/tests/compiler/threads.json +++ b/tests/compiler/threads.json @@ -3,6 +3,7 @@ "threads" ], "asc_flags": [ + "--runtime none", "--memoryBase 8", "--sharedMemory 1" ] diff --git a/tests/compiler/typealias.json b/tests/compiler/typealias.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/typealias.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/unary.json b/tests/compiler/unary.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/unary.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/void.json b/tests/compiler/void.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/void.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/while.json b/tests/compiler/while.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/while.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/wildcard-export.json b/tests/compiler/wildcard-export.json new file mode 100644 index 00000000..b1da366f --- /dev/null +++ b/tests/compiler/wildcard-export.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file